728e43a1b5c8f1ecaec920345eba67eedeccb5be.svn-base 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401
  1. <template>
  2. <div>
  3. <el-container>
  4. <el-main style="border:1px solid #d5d5ff;margin-left:5px;padding:0px;">
  5. <p style="font-weight:bolder;background-color:#d5d5ff;padding:3px;">信息填报</p>
  6. <el-form :model="formObj" :label-width="formLabelWidth">
  7. <p style="margin-top:10px;margin-bottom: 10px;overflow: hidden;"><i class="el-icon-caret-right"></i><span
  8. style="width:120px;padding-left: 10px">基本信息</span><span class="hrs"></span>
  9. <el-button type="warning" style="float: right;" @click="recentAppearance">近期面貌</el-button>
  10. <el-button type="warning" style="float: right; margin-right: 10px;" @click="imageClick">影像</el-button>
  11. </p>
  12. <el-form-item label="单位名称">
  13. <el-input v-model="formObj.utName" autocomplete="off" style="width:70%;"></el-input>
  14. </el-form-item>
  15. <el-form-item label="统一社会信用代码">
  16. <el-input v-model="formObj.utCode" autocomplete="off" style="width:70%;"></el-input>
  17. </el-form-item>
  18. <el-form-item label="行政区划">
  19. <div v-if="showLocSelect">
  20. <el-select v-model="provName" placeholder="选择省" @change="provChange" style="width:20%">
  21. <el-option
  22. v-for="item in provList"
  23. :key="item.adCode"
  24. :label="item.adName"
  25. :value="item.adCode">
  26. </el-option>
  27. </el-select>
  28. <el-select v-model="cityName" placeholder="选择市" @change="cityChange" style="width:20%">
  29. <el-option
  30. v-for="item in cityList"
  31. :key="item.adCode"
  32. :label="item.adName"
  33. :value="item.adCode">
  34. </el-option>
  35. </el-select>
  36. <el-select v-model="countryName" placeholder="选择县" @change="countryChange" style="width:20%">
  37. <el-option
  38. v-for="item in countryList"
  39. :key="item.adCode"
  40. :label="item.adName"
  41. :value="item.adCode">
  42. </el-option>
  43. </el-select>
  44. &#x3000;<span v-if="showLocSelect" @click="showLocSelect = false"
  45. style="color: #009fff;font-size:12px;cursor:pointer">取消</span>
  46. </div>
  47. <div v-else>
  48. <el-input v-model="formObj.adName" readonly autocomplete="off"
  49. style="width:70%;"></el-input>&#x3000;<span @click="showLocSelect = true" v-if="openType"
  50. style="color: #009fff;font-size:12px;cursor:pointer">更改</span>
  51. </div>
  52. </el-form-item>
  53. <el-form-item label="单位类型" >
  54. <el-select v-model="formObj.utType" clearable>
  55. <el-option label="企业" value="1"></el-option>
  56. <el-option label="机关" value="2"></el-option>
  57. <el-option label="学校" value="3"></el-option>
  58. <el-option label="2019整改" value="4"></el-option>
  59. <el-option label="政府机关" value="5"></el-option>
  60. </el-select>
  61. </el-form-item>
  62. <el-form-item label="单位性质">
  63. <el-select v-model="formObj.utPpt" clearable>
  64. <el-option label="节水型" value="1"></el-option>
  65. <el-option label="非节水型" value="2"></el-option>
  66. </el-select>
  67. </el-form-item>
  68. <el-form-item label="节水单位获批时间">
  69. <el-date-picker
  70. v-model="formObj.appDepTm"
  71. type="date"
  72. format="yyyy-MM-dd"
  73. value-format="yyyy-MM-dd"
  74. placeholder="选择日期">
  75. </el-date-picker>
  76. </el-form-item>
  77. <el-form-item label="节水单位获批部门">
  78. <el-input v-model="formObj.appDep" autocomplete="off" style="width:70%;"></el-input>
  79. </el-form-item>
  80. <el-form-item label="用水单位负责人">
  81. <el-input v-model="formObj.utLead" autocomplete="off" style="width:70%;"></el-input>
  82. </el-form-item>
  83. <el-form-item label="负责人电话">
  84. <el-input v-model="formObj.principalTel" autocomplete="off" style="width:70%;"></el-input>
  85. </el-form-item>
  86. <el-form-item label="用水单位联系人">
  87. <el-input v-model="formObj.utAttn" autocomplete="off" style="width:70%;"></el-input>
  88. </el-form-item>
  89. <el-form-item label="用水单位联系方式">
  90. <el-input v-model="formObj.utCont" autocomplete="off" style="width:70%;"></el-input>
  91. </el-form-item>
  92. <el-form-item label="注册地址">
  93. <el-input v-model="formObj.signAddr" autocomplete="off" style="width:70%;"></el-input>
  94. </el-form-item>
  95. <el-form-item label="单位地址">
  96. <el-input v-model="formObj.utAddr" autocomplete="off" style="width:70%;"></el-input>
  97. </el-form-item>
  98. <el-form-item label="经度">
  99. <el-input v-model="formObj.centerX" autocomplete="off" style="width:70%;"></el-input>
  100. </el-form-item>
  101. <el-form-item label="纬度">
  102. <el-input v-model="formObj.centerY" autocomplete="off" style="width:70%;"></el-input>
  103. </el-form-item>
  104. <el-form-item label="备注">
  105. <el-input v-model="formObj.note" autocomplete="off" style="width:70%;"></el-input>
  106. </el-form-item>
  107. <el-form-item label="">
  108. <!-- <el-button @click="cancelHandler">取 消</el-button> -->
  109. <el-button type="primary" @click="addHandler" v-if="openType">保 存</el-button>
  110. </el-form-item>
  111. </el-form>
  112. </el-main>
  113. </el-container>
  114. <theRecentAppearance v-if="xcztShow" @jqmmDialogClose="jqmmDialog" :jqmmShow="xcztShow" :openType="openType"
  115. :jqmmEngId="currentObjectRgstrId" :dialogTitle="currentObjectName + '近期面貌'"
  116. style="z-index: 9999;"></theRecentAppearance>
  117. <!--影像弹窗-->
  118. <el-dialog :title="currentObjectName + '影像'" :visible.sync="imageShow" append-to-body :close-on-click-modal="false"
  119. width="60%">
  120. <div style="height: 60vh;">
  121. <mapLocation ref="mapRef" v-if="imageShow" :gdX="centerX" :gdY="centerY"></mapLocation>
  122. </div>
  123. </el-dialog>
  124. </div>
  125. </template>
  126. <script>
  127. import inputWith from "@widget/inuptWith.vue"
  128. import request from "@util/gw_ajax_request.js"
  129. import theRecentAppearance from '../../duChaDuiXiang/theRecentAppearance'
  130. import unlimitDatePicker from '@baseWidget/unLimitdatePicker.vue'
  131. import mapLocation from '../mapLocation'
  132. import {
  133. getrgstrIdObject_jsztfh
  134. } from "@api/duChaTianBao.js"
  135. import {
  136. dateFormat
  137. } from "@util/gw_date.js"
  138. export default {
  139. components: {
  140. inputWith: inputWith,
  141. unlimitDatePicker: unlimitDatePicker,
  142. theRecentAppearance,
  143. mapLocation
  144. },
  145. props: ['id','currentObjectRgstrId', 'currentResCode', 'currentObjectId', 'currentObjectName','openType'],
  146. data() {
  147. return {
  148. formObj: {
  149. 'utName':'',
  150. 'utCode':'',
  151. 'adName':'',
  152. 'adCode':'',
  153. 'utType':'',
  154. 'utPpt':'',
  155. 'utLead':'',
  156. 'utAttn':'',
  157. 'utCont':'',
  158. 'signAddr':'',
  159. 'utAddr':'',
  160. 'centerX':'',
  161. 'centerY':'',
  162. 'principalTel':'',
  163. 'note':'',
  164. 'appDepTm':'',
  165. 'appDep':''
  166. },
  167. dialogFormVisible: false,
  168. formLabelWidth: '160px',
  169. loading: true,
  170. operationType1: '',
  171. currentResCode1: '',
  172. currentObjectId1: '',
  173. value1: '',
  174. provList: [],
  175. cityList: [],
  176. countryList: [],
  177. provName: '',
  178. cityName: '',
  179. countryName: '',
  180. provNames: '',
  181. cityNames: '',
  182. countryNames: '',
  183. curSelectItem: 0,
  184. showLocSelect: false,
  185. locat: {
  186. location: "",
  187. admDiv: ""
  188. },
  189. xcztShow: false,
  190. imageShow: false,
  191. xcztEngId: '',
  192. centerX: 0,
  193. centerY: 0
  194. }
  195. },
  196. computed: {
  197. recPersId() {
  198. return localStorage.getItem("userid") ? localStorage.getItem("userid") : ''
  199. }
  200. },
  201. mounted() {
  202. this.currentResCode1 = this.currentResCode;
  203. this.currentObjectId1 = this.currentObjectId;
  204. this.getRgstridObj();
  205. this.getAreaList()
  206. },
  207. watch: {
  208. id(n, o) {
  209. this.getRgstridObj();
  210. },
  211. showLocSelect(val) {
  212. if (!val) {
  213. this.formObj.rvLoc = this.locat.location
  214. this.formObj.admDiv = this.locat.admDiv
  215. this.provName = ''
  216. this.cityName = ''
  217. this.countryName = ''
  218. }
  219. }
  220. },
  221. methods: {
  222. getRgstridObj() {
  223. var _self = this;
  224. getrgstrIdObject_jsztfh(_self.currentObjectId).then(
  225. (res) => {
  226. if (res.data) {
  227. _self.formObj = res.data;
  228. } else {
  229. _self.formObj = {};
  230. }
  231. },
  232. (err) => {
  233. }
  234. );
  235. },
  236. addHandler() {
  237. var _self = this;
  238. // _self.formObj.compDate = _self.value1;
  239. // _self.formObj['compDateStr'] = dateFormat(_self.value1, 'yyyy-MM-dd');
  240. _self.formObj['persId'] = _self.recPersId;
  241. _self.formObj.objId = _self.currentObjectId1;
  242. // _self.formObj.compDateDesc = _self.formObj.compDateStr==''?null:_self.formObj.compDateStr;
  243. console.log(_self.formObj);
  244. //基础信息纠错,经纬度修改粗略校验经度纬度整数部分的范围
  245. // if (this.formObj.centerY < 4 || this.formObj.centerY > 54) {
  246. // this.$message.error('纬度的整数范围应在4-54之间,请重新填写!');
  247. // this.formObj.centerY = '';
  248. // return;
  249. // }
  250. // if (this.formObj.centerX < 74 || this.formObj.centerX > 136) {
  251. // this.$message.error('经度的整数范围应在74-136之间,请重新填写!');
  252. // this.formObj.centerX = '';
  253. // return;
  254. // }
  255. try {
  256. this.$confirm('确认保存基础信息?', '提示', {
  257. confirmButtonText: '确定',
  258. cancelButtonText: '取消',
  259. type: 'warning'
  260. }).then(() => {
  261. request.post('/bis/insp/wtcrr', _self.formObj).then((res) => {
  262. if (res.success) {
  263. _self.$emit("addShuiKuSuccess");
  264. _self.showLocSelect = false
  265. _self.getRgstridObj()
  266. _self.$message.success("修改成功");
  267. } else {
  268. _self.$emit('cancelHandler');
  269. }
  270. });
  271. })
  272. } catch (e) {
  273. }
  274. },
  275. cancelHandler() {
  276. this.$emit('cancelHandler');
  277. },
  278. formatRadio(val) {
  279. if (val == '1') {
  280. return '是'
  281. } else if (val == '0') {
  282. return '否'
  283. } else {
  284. return val
  285. }
  286. },
  287. getAreaList(val) {
  288. let areaParams = {
  289. adName: "",
  290. id: this.dczId,
  291. pageNum: 1,
  292. pageSize: 10000
  293. }
  294. let adCode = ''
  295. if (!val) {
  296. adCode = '000000000000'
  297. } else {
  298. adCode = val
  299. }
  300. request.get('/dc/ad/base/getAdData', {params: {'adCode': adCode}}).then(res => {
  301. if (res.success) {
  302. if (this.curSelectItem == 1) {
  303. this.cityList = res.data
  304. } else if (this.curSelectItem == 2) {
  305. this.countryList = res.data
  306. } else {
  307. this.provList = res.data
  308. }
  309. }
  310. })
  311. },
  312. provChange(val) {
  313. this.curSelectItem = 1
  314. this.cityName = ''
  315. this.countryName = ''
  316. this.formObj.admDiv = val
  317. this.provList.forEach(ele => {
  318. if (ele.adCode == this.provName) {
  319. this.provNames = ele.adName
  320. }
  321. })
  322. this.formObj.adName = this.provNames
  323. this.getAreaList(val)
  324. },
  325. RsvrTypeChange(val) {
  326. },
  327. cityChange(val) {
  328. this.curSelectItem = 2
  329. if (val && val != '') {
  330. this.formObj.admDiv = val
  331. this.countryName = ''
  332. this.cityList.forEach(ele => {
  333. if (ele.adCode == this.cityName) {
  334. this.cityNames = ele.adName
  335. }
  336. })
  337. this.formObj.adName = this.provNames + this.cityNames
  338. this.getAreaList(val)
  339. }
  340. },
  341. countryChange(val) {
  342. if (val && val != '') {
  343. this.formObj.admDiv = val
  344. this.countryList.forEach(ele => {
  345. if (ele.adCode == this.countryName) {
  346. this.countryNames = ele.adName
  347. }
  348. })
  349. this.formObj.adName = this.provNames + this.cityNames + this.countryNames
  350. }
  351. },
  352. // 近期面貌
  353. recentAppearance() {
  354. this.xcztShow = true;
  355. },
  356. jqmmDialog() {
  357. this.xcztShow = false;
  358. },
  359. //影像
  360. imageClick() {
  361. if (!this.centerX && !this.centerY) {
  362. this.$message.warning('暂无经纬度信息!');
  363. return false;
  364. }
  365. this.imageShow = true;
  366. }
  367. },
  368. }
  369. </script>
  370. <style>
  371. #dcdxHeader {
  372. padding: 15px 20px;
  373. }
  374. #dxdcFooter {
  375. text-align: center;
  376. }
  377. #dxdcAside {
  378. border: 1px solid #d5d5ff;
  379. }
  380. .el-dialog__wrapper .el-treeWhite {
  381. /* max-height: 260px !important; */
  382. }
  383. </style>