6ea7aa91c98f380210a42b1a70a43285f11da47e.svn-base 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368
  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.depName" autocomplete="off" style="width:70%;"></el-input>
  14. </el-form-item>
  15. <!-- <el-form-item label="取水许可证号">-->
  16. <!-- <el-input v-model="formObj.wintCode" 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-input v-model="formObj.loc" autocomplete="off" style="width:70%;"></el-input>
  55. </el-form-item>
  56. <el-form-item label="单位负责人">
  57. <el-input v-model="formObj.utLead" autocomplete="off" style="width:70%;"></el-input>
  58. </el-form-item>
  59. <el-form-item label="负责人电话">
  60. <el-input v-model="formObj.principalTel" autocomplete="off" style="width:70%;"></el-input>
  61. </el-form-item>
  62. <el-form-item label="联系人">
  63. <el-input v-model="formObj.depPers" autocomplete="off" style="width:70%;"></el-input>
  64. </el-form-item>
  65. <el-form-item label="联系电话">
  66. <el-input v-model="formObj.depPersTel" autocomplete="off" style="width:70%;"></el-input>
  67. </el-form-item>
  68. <el-form-item label="经度">
  69. <el-input v-model="formObj.centerX" autocomplete="off" style="width:70%;"></el-input>
  70. </el-form-item>
  71. <el-form-item label="纬度">
  72. <el-input v-model="formObj.centerY" autocomplete="off" style="width:70%;"></el-input>
  73. </el-form-item>
  74. <el-form-item label="备注">
  75. <el-input v-model="formObj.note" autocomplete="off" style="width:70%;"></el-input>
  76. </el-form-item>
  77. <el-form-item label="" style="text-align: center">
  78. <!-- <el-button @click="cancelHandler">取 消</el-button> -->
  79. <el-button type="primary" @click="addHandler" v-if="openType">保 存</el-button>
  80. </el-form-item>
  81. </el-form>
  82. </el-main>
  83. </el-container>
  84. <theRecentAppearance v-if="xcztShow" @jqmmDialogClose="jqmmDialog" :jqmmShow="xcztShow" :openType="openType"
  85. :jqmmEngId="currentObjectRgstrId" :dialogTitle="currentObjectName + '近期面貌'"
  86. style="z-index: 9999;"></theRecentAppearance>
  87. <!--影像弹窗-->
  88. <el-dialog :title="currentObjectName + '影像'" :visible.sync="imageShow" append-to-body :close-on-click-modal="false"
  89. width="60%">
  90. <div style="height: 60vh;">
  91. <mapLocation ref="mapRef" v-if="imageShow" :gdX="centerX" :gdY="centerY"></mapLocation>
  92. </div>
  93. </el-dialog>
  94. </div>
  95. </template>
  96. <script>
  97. import inputWith from "@widget/inuptWith.vue"
  98. import request from "@util/gw_ajax_request.js"
  99. import theRecentAppearance from '../../duChaDuiXiang/theRecentAppearance'
  100. import unlimitDatePicker from '@baseWidget/unLimitdatePicker.vue'
  101. import mapLocation from '../mapLocation'
  102. import {
  103. getrgstrIdObject_aqscssjygk
  104. } from "@api/duChaTianBao.js"
  105. import {
  106. dateFormat
  107. } from "@util/gw_date.js"
  108. export default {
  109. components: {
  110. inputWith: inputWith,
  111. unlimitDatePicker: unlimitDatePicker,
  112. theRecentAppearance,
  113. mapLocation
  114. },
  115. props: ['id','currentObjectRgstrId', 'currentResCode', 'currentObjectId', 'currentObjectName','openType'],
  116. data() {
  117. return {
  118. formObj: {
  119. depName:'',
  120. //wintCode:'',
  121. loc:'',
  122. depPers:'',
  123. depPersTel:'',
  124. utLead:'',
  125. principalTel:'',
  126. note:'',
  127. centerX:'',
  128. centerY:'',
  129. adName:"",
  130. adCode:""
  131. },
  132. dialogFormVisible: false,
  133. formLabelWidth: '160px',
  134. loading: true,
  135. operationType1: '',
  136. currentResCode1: '',
  137. currentObjectId1: '',
  138. value1: '',
  139. provList: [],
  140. cityList: [],
  141. countryList: [],
  142. provName: '',
  143. cityName: '',
  144. countryName: '',
  145. provNames: '',
  146. cityNames: '',
  147. countryNames: '',
  148. curSelectItem: 0,
  149. showLocSelect: false,
  150. locat: {
  151. location: "",
  152. admDiv: ""
  153. },
  154. xcztShow: false,
  155. imageShow: false,
  156. xcztEngId: '',
  157. centerX: 0,
  158. centerY: 0
  159. }
  160. },
  161. computed: {
  162. recPersId() {
  163. return localStorage.getItem("userid") ? localStorage.getItem("userid") : ''
  164. }
  165. },
  166. mounted() {
  167. this.currentResCode1 = this.currentResCode;
  168. this.currentObjectId1 = this.currentObjectId;
  169. this.getRgstridObj();
  170. this.getAreaList()
  171. },
  172. watch: {
  173. id(n, o) {
  174. this.getRgstridObj();
  175. },
  176. showLocSelect(val) {
  177. if (!val) {
  178. this.formObj.rvLoc = this.locat.location
  179. this.formObj.admDiv = this.locat.admDiv
  180. this.provName = ''
  181. this.cityName = ''
  182. this.countryName = ''
  183. }
  184. }
  185. },
  186. methods: {
  187. getRgstridObj() {
  188. var _self = this;
  189. getrgstrIdObject_aqscssjygk(_self.currentObjectRgstrId).then(
  190. (res) => {
  191. if (res.data) {
  192. _self.formObj = res.data;
  193. } else {
  194. _self.formObj = {};
  195. }
  196. },
  197. (err) => {
  198. }
  199. );
  200. },
  201. addHandler() {
  202. var _self = this;
  203. // _self.formObj.compDate = _self.value1;
  204. // _self.formObj['compDateStr'] = dateFormat(_self.value1, 'yyyy-MM-dd');
  205. _self.formObj['persId'] = _self.recPersId;
  206. _self.formObj.objId = _self.currentObjectId1;
  207. _self.formObj.adCode = _self.countryName;
  208. // _self.formObj.compDateDesc = _self.formObj.compDateStr==''?null:_self.formObj.compDateStr;
  209. console.log(_self.formObj);
  210. //基础信息纠错,经纬度修改粗略校验经度纬度整数部分的范围
  211. // if (this.formObj.centerY < 4 || this.formObj.centerY > 54) {
  212. // this.$message.error('纬度的整数范围应在4-54之间,请重新填写!');
  213. // this.formObj.centerY = '';
  214. // return;
  215. // }
  216. // if (this.formObj.centerX < 74 || this.formObj.centerX > 136) {
  217. // this.$message.error('经度的整数范围应在74-136之间,请重新填写!');
  218. // this.formObj.centerX = '';
  219. // return;
  220. // }
  221. try {
  222. this.$confirm('确认保存基础信息?', '提示', {
  223. confirmButtonText: '确定',
  224. cancelButtonText: '取消',
  225. type: 'warning'
  226. }).then(() => {
  227. request.post('/bis/insp/drdmp', _self.formObj).then((res) => {
  228. if (res.success) {
  229. _self.$emit("addShuiKuSuccess");
  230. _self.showLocSelect = false
  231. _self.getRgstridObj()
  232. _self.$message.success("修改成功");
  233. } else {
  234. _self.$emit('cancelHandler');
  235. }
  236. });
  237. })
  238. } catch (e) {
  239. }
  240. },
  241. cancelHandler() {
  242. this.$emit('cancelHandler');
  243. },
  244. formatRadio(val) {
  245. if (val == '1') {
  246. return '是'
  247. } else if (val == '0') {
  248. return '否'
  249. } else {
  250. return val
  251. }
  252. },
  253. getAreaList(val) {
  254. let areaParams = {
  255. adName: "",
  256. id: this.dczId,
  257. pageNum: 1,
  258. pageSize: 10000
  259. }
  260. let adCode = ''
  261. if (!val) {
  262. adCode = '000000000000'
  263. } else {
  264. adCode = val
  265. }
  266. request.get('/dc/ad/base/getAdData', {params: {'adCode': adCode}}).then(res => {
  267. if (res.success) {
  268. if (this.curSelectItem == 1) {
  269. this.cityList = res.data
  270. } else if (this.curSelectItem == 2) {
  271. this.countryList = res.data
  272. } else {
  273. this.provList = res.data
  274. }
  275. }
  276. })
  277. },
  278. provChange(val) {
  279. this.curSelectItem = 1
  280. this.cityName = ''
  281. this.countryName = ''
  282. this.formObj.admDiv = val
  283. this.provList.forEach(ele => {
  284. if (ele.adCode == this.provName) {
  285. this.provNames = ele.adName
  286. }
  287. })
  288. this.formObj.adName = this.provNames
  289. this.getAreaList(val)
  290. },
  291. RsvrTypeChange(val) {
  292. },
  293. cityChange(val) {
  294. this.curSelectItem = 2
  295. if (val && val != '') {
  296. this.formObj.admDiv = val
  297. this.countryName = ''
  298. this.cityList.forEach(ele => {
  299. if (ele.adCode == this.cityName) {
  300. this.cityNames = ele.adName
  301. }
  302. })
  303. this.formObj.adName = this.provNames + this.cityNames
  304. this.getAreaList(val)
  305. }
  306. },
  307. countryChange(val) {
  308. if (val && val != '') {
  309. this.formObj.admDiv = val
  310. this.countryList.forEach(ele => {
  311. if (ele.adCode == this.countryName) {
  312. this.countryNames = ele.adName
  313. }
  314. })
  315. this.formObj.adName = this.provNames + this.cityNames + this.countryNames
  316. }
  317. },
  318. // 近期面貌
  319. recentAppearance() {
  320. this.xcztShow = true;
  321. },
  322. jqmmDialog() {
  323. this.xcztShow = false;
  324. },
  325. //影像
  326. imageClick() {
  327. if (!this.centerX && !this.centerY) {
  328. this.$message.warning('暂无经纬度信息!');
  329. return false;
  330. }
  331. this.imageShow = true;
  332. }
  333. },
  334. }
  335. </script>
  336. <style>
  337. #dcdxHeader {
  338. padding: 15px 20px;
  339. }
  340. #dxdcFooter {
  341. text-align: center;
  342. }
  343. #dxdcAside {
  344. border: 1px solid #d5d5ff;
  345. }
  346. .el-dialog__wrapper .el-treeWhite {
  347. /* max-height: 260px !important; */
  348. }
  349. </style>