dc8e07a6c9ccd21bf86098612b25fc29e3321f55.svn-base 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402
  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. <el-button type="warning" style="float: right; margin-right: 10px;" @click="nowCheckBtn">现场检查上传</el-button>
  12. </p>
  13. <el-form-item label="水源地名称" required>
  14. <el-input v-model="formObj.swhsName" autocomplete="off" style="width:70%;"></el-input>
  15. </el-form-item>
  16. <el-form-item label="行政区划" required >
  17. <div v-if="showLocSelect">
  18. <el-select v-model="provName" placeholder="选择省" @change="provChange" style="width:20%">
  19. <el-option
  20. v-for="item in provList"
  21. :key="item.adCode"
  22. :label="item.adName"
  23. :value="item.adCode">
  24. </el-option>
  25. </el-select>
  26. <el-select v-model="cityName" placeholder="选择市" @change="cityChange" style="width:20%">
  27. <el-option
  28. v-for="item in cityList"
  29. :key="item.adCode"
  30. :label="item.adName"
  31. :value="item.adCode">
  32. </el-option>
  33. </el-select>
  34. <el-select v-model="countryName" placeholder="选择县" @change="countryChange" style="width:20%">
  35. <el-option
  36. v-for="item in countryList"
  37. :key="item.adCode"
  38. :label="item.adName"
  39. :value="item.adCode">
  40. </el-option>
  41. </el-select>
  42. &#x3000;<span v-if="showLocSelect" @click="showLocSelect = false"
  43. style="color: #009fff;font-size:12px;cursor:pointer">取消</span>
  44. </div>
  45. <div v-else>
  46. <el-input v-model="formObj.adName" readonly autocomplete="off"
  47. style="width:70%;"></el-input>&#x3000;<span @click="showLocSelect = true" v-if="openType"
  48. style="color: #009fff;font-size:12px;cursor:pointer">更改</span>
  49. </div>
  50. </el-form-item>
  51. <el-form-item label="水源地类型" required>
  52. <el-select v-model="formObj.wainWasoType">
  53. <el-option label="水库" value="1"></el-option>
  54. <el-option label="湖泊" value="2"></el-option>
  55. <el-option label="河流/河道" value="3"></el-option>
  56. <el-option label="其他" value="9"></el-option>
  57. </el-select>
  58. </el-form-item>
  59. <el-form-item label="使用状态">
  60. <el-select v-model="formObj.swhsUse">
  61. <el-option label="城市日常" value="1"></el-option>
  62. <el-option label="城市日常、应急" value="2"></el-option>
  63. <el-option label="城乡日常" value="3"></el-option>
  64. <el-option label="城乡日常、应急" value="4"></el-option>
  65. </el-select>
  66. </el-form-item>
  67. <el-form-item label="水源地级别">
  68. <el-select v-model="formObj.swhsLevel">
  69. <el-option label="市级" value="1"></el-option>
  70. <el-option label="县级" value="2"></el-option>
  71. </el-select>
  72. </el-form-item>
  73. <el-form-item label="取水口位置">
  74. <el-input v-model="formObj.wainLoc" autocomplete="off" style="width:70%;"></el-input>
  75. </el-form-item>
  76. <el-form-item label="管理单位">
  77. <el-input v-model="formObj.insName" autocomplete="off" style="width:70%;"></el-input>
  78. </el-form-item>
  79. <el-form-item label="管理单位联系人">
  80. <el-input v-model="formObj.insPer" autocomplete="off" style="width:70%;"></el-input>
  81. </el-form-item>
  82. <el-form-item label="管理单位联系人电话">
  83. <el-input v-model="formObj.insPerPhone" autocomplete="off" style="width:70%;"></el-input>
  84. </el-form-item>
  85. <el-form-item label="水行政主管部门">
  86. <el-input v-model="formObj.dept" autocomplete="off" style="width:70%;"></el-input>
  87. </el-form-item>
  88. <el-form-item label="水行政主管部门联系人">
  89. <el-input v-model="formObj.deptPer" autocomplete="off" style="width:70%;"></el-input>
  90. </el-form-item>
  91. <el-form-item label="水行政主管部门联系电话">
  92. <el-input v-model="formObj.deptPerPhone" autocomplete="off" style="width:70%;"></el-input>
  93. </el-form-item>
  94. <el-form-item label="备注">
  95. <el-input v-model="formObj.note" type="textarea" autocomplete="off" style="width:70%;"></el-input>
  96. </el-form-item>
  97. <el-form-item label="经度">
  98. <el-input v-model="formObj.gdX" autocomplete="off" style="width:70%;"></el-input>
  99. </el-form-item>
  100. <el-form-item label="纬度">
  101. <el-input v-model="formObj.gdY" autocomplete="off" style="width:70%;"></el-input>
  102. </el-form-item>
  103. <el-form-item label="" style="text-align: center">
  104. <!-- <el-button @click="cancelHandler">取 消</el-button> -->
  105. <el-button type="primary" @click="addHandler" v-if="openType">保 存</el-button>
  106. </el-form-item>
  107. </el-form>
  108. </el-main>
  109. </el-container>
  110. <theRecentAppearance v-if="xcztShow" @jqmmDialogClose="jqmmDialog" :jqmmShow="xcztShow" :openType="openType"
  111. :jqmmEngId="currentObjectRgstrId" :dialogTitle="currentObjectName + '近期面貌'"
  112. style="z-index: 9999;"></theRecentAppearance>
  113. <nowCheck v-if="xcztShow1" @jqmmDialogClose="jqmmDialogNow" :jqmmShow="xcztShow1" type="onSite" :openType="openType"
  114. :jqmmEngId="currentObjectRgstrId" :dialogTitle="currentObjectName + '现场检查资料'"
  115. style="z-index: 9999;"></nowCheck>
  116. <!--影像弹窗-->
  117. <el-dialog :title="currentObjectName + '影像'" :visible.sync="imageShow" append-to-body :close-on-click-modal="false"
  118. width="60%">
  119. <div style="height: 60vh;">
  120. <mapLocation ref="mapRef" v-if="imageShow" :gdX="formObj.gdX" :gdY="formObj.gdY"></mapLocation>
  121. </div>
  122. </el-dialog>
  123. </div>
  124. </template>
  125. <script>
  126. import inputWith from "@widget/inuptWith.vue"
  127. import request from "@util/gw_ajax_request.js"
  128. import theRecentAppearance from '../../duChaDuiXiang/theRecentAppearance'
  129. import nowCheck from '../../duChaDuiXiang/nowCheck'
  130. import unlimitDatePicker from '@baseWidget/unLimitdatePicker.vue'
  131. import mapLocation from '../mapLocation'
  132. import {
  133. getrgstrIdObject_swhsjs_state
  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. nowCheck
  145. },
  146. props: ['id','currentObjectRgstrId', 'currentResCode', 'currentObjectId', 'currentObjectName','openType'],
  147. data() {
  148. return {
  149. formObj: {
  150. wiuName:"",
  151. adCode:"",
  152. adName:"",
  153. codeVal:"",
  154. unitType:"",
  155. ndstyType:"",
  156. rgstrAddr:"",
  157. bizAddr:"",
  158. wiuContact:"",
  159. wiuContactTel:"",
  160. name:"",
  161. isUnit:"",
  162. gdX:"",
  163. gdY:"",
  164. note:""
  165. },
  166. dialogFormVisible: false,
  167. formLabelWidth: '200px',
  168. loading: true,
  169. operationType1: '',
  170. currentResCode1: '',
  171. currentObjectId1: '',
  172. value1: '',
  173. provList: [],
  174. cityList: [],
  175. countryList: [],
  176. provName: '',
  177. cityName: '',
  178. countryName: '',
  179. provNames: '',
  180. cityNames: '',
  181. countryNames: '',
  182. curSelectItem: 0,
  183. showLocSelect: false,
  184. locat: {
  185. location: "",
  186. admDiv: ""
  187. },
  188. xcztShow: false,
  189. xcztShow1: 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_swhsjs_state(_self.currentObjectRgstrId).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. if(!this.formObj.swhsName){
  239. this.$message.warning('请输入水源地名称')
  240. return
  241. }
  242. if(!this.formObj.wainWasoType){
  243. this.$message.warning('请选择水源地类型')
  244. return
  245. }
  246. _self.formObj['persId'] = _self.recPersId;
  247. _self.formObj.objId = _self.currentObjectId1;
  248. try {
  249. this.$confirm('确认保存基础信息?', '提示', {
  250. confirmButtonText: '确定',
  251. cancelButtonText: '取消',
  252. type: 'warning'
  253. }).then(() => {
  254. request.post('/bis/insp/swhsjs', _self.formObj).then((res) => {
  255. if (res.success) {
  256. _self.$emit("addShuiKuSuccess");
  257. _self.showLocSelect = false
  258. _self.getRgstridObj()
  259. _self.$message.success("修改成功");
  260. } else {
  261. _self.$emit('cancelHandler');
  262. }
  263. });
  264. })
  265. } catch (e) {
  266. }
  267. },
  268. cancelHandler() {
  269. this.$emit('cancelHandler');
  270. },
  271. formatRadio(val) {
  272. if (val == '1') {
  273. return '是'
  274. } else if (val == '0') {
  275. return '否'
  276. } else {
  277. return val
  278. }
  279. },
  280. getAreaList(val) {
  281. let areaParams = {
  282. adName: "",
  283. id: this.dczId,
  284. pageNum: 1,
  285. pageSize: 10000
  286. }
  287. let adCode = ''
  288. if (!val) {
  289. adCode = '000000000000'
  290. } else {
  291. adCode = val
  292. }
  293. request.get('/dc/ad/base/getAdData', {params: {'adCode': adCode}}).then(res => {
  294. if (res.success) {
  295. if (this.curSelectItem == 1) {
  296. this.cityList = res.data
  297. } else if (this.curSelectItem == 2) {
  298. this.countryList = res.data
  299. } else {
  300. this.provList = res.data
  301. }
  302. }
  303. })
  304. },
  305. provChange(val) {
  306. this.curSelectItem = 1
  307. this.formObj.adCode = val
  308. this.cityName = ''
  309. this.countryName = ''
  310. this.formObj.admDiv = val
  311. this.provList.forEach(ele => {
  312. if (ele.adCode == this.provName) {
  313. this.provNames = ele.adName
  314. }
  315. })
  316. this.formObj.adName = this.provNames
  317. this.getAreaList(val)
  318. },
  319. RsvrTypeChange(val) {
  320. },
  321. cityChange(val) {
  322. this.curSelectItem = 2
  323. if (val && val != '') {
  324. this.formObj.admDiv = val
  325. this.formObj.adCode = val
  326. this.countryName = ''
  327. this.cityList.forEach(ele => {
  328. if (ele.adCode == this.cityName) {
  329. this.cityNames = ele.adName
  330. }
  331. })
  332. this.formObj.adName = this.provNames + this.cityNames
  333. this.getAreaList(val)
  334. }
  335. },
  336. countryChange(val) {
  337. if (val && val != '') {
  338. this.formObj.adCode = val
  339. this.formObj.admDiv = val
  340. this.countryList.forEach(ele => {
  341. if (ele.adCode == this.countryName) {
  342. this.countryNames = ele.adName
  343. }
  344. })
  345. this.formObj.adName = this.provNames + this.cityNames + this.countryNames
  346. }
  347. },
  348. // 近期面貌
  349. recentAppearance() {
  350. this.xcztShow = true;
  351. },
  352. nowCheckBtn(){
  353. this.xcztShow1 = true;
  354. },
  355. jqmmDialog() {
  356. this.xcztShow = false;
  357. },
  358. jqmmDialogNow(){
  359. this.xcztShow1 = false;
  360. },
  361. //影像
  362. imageClick() {
  363. if (!this.formObj.gdX && !this.formObj.gdY) {
  364. this.$message.warning('暂无经纬度信息!');
  365. return false;
  366. }
  367. this.imageShow = true;
  368. }
  369. },
  370. }
  371. </script>
  372. <style>
  373. #dcdxHeader {
  374. padding: 15px 20px;
  375. }
  376. #dxdcFooter {
  377. text-align: center;
  378. }
  379. #dxdcAside {
  380. border: 1px solid #d5d5ff;
  381. }
  382. .el-dialog__wrapper .el-treeWhite {
  383. /* max-height: 260px !important; */
  384. }
  385. </style>