f4ab74b2bccfd8a6539dd7b79d4c213bcc63974b.svn-base 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361
  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;">
  8. <i class="left-vertical"></i>
  9. <span>基本信息</span>
  10. <el-button type="warning" style="float: right;" @click="recentAppearance">近期面貌</el-button>
  11. <el-button type="warning" style="float: right; margin-right: 10px;" @click="imageClick">影像
  12. </el-button>
  13. <span class="hrs"></span>
  14. </p>
  15. <el-form-item label="机井名称" required >
  16. <el-input v-model="formObj.wellName" 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"
  37. style="width:20%">
  38. <el-option
  39. v-for="item in countryList"
  40. :key="item.adCode"
  41. :label="item.adName"
  42. :value="item.adCode">
  43. </el-option>
  44. </el-select>
  45. &#x3000;<span v-if="showLocSelect" @click="showLocSelect = false"
  46. style="color: #009fff;font-size:12px;cursor:pointer">取消</span>
  47. </div>
  48. <div v-else>
  49. <el-input v-model="formObj.adName" readonly autocomplete="off"
  50. style="width:70%;"></el-input>&#x3000;<span @click="showLocSelect = true"
  51. v-if="openType"
  52. style="color: #009fff;font-size:12px;cursor:pointer">更改</span>
  53. </div>
  54. </el-form-item>
  55. <el-form-item label="机井类型">
  56. <el-select v-model="formObj.wellType" placeholder="机井类型">
  57. <el-option value="1" label="市域内保留井"></el-option>
  58. <el-option value="2" label="市域外保留井"></el-option>
  59. <el-option value="3" label="封存抗旱井"></el-option>
  60. <el-option value="4" label="关闭井"></el-option>
  61. </el-select>
  62. </el-form-item>
  63. <el-form-item label="井深(米)">
  64. <el-input v-model="formObj.wellHeight" autocomplete="off" style="width:70%;"></el-input>
  65. </el-form-item>
  66. <el-form-item label="成井日期">
  67. <el-date-picker
  68. v-model="formObj.wellTime"
  69. type="year"
  70. format="yyyy"
  71. value-format="yyyy"
  72. placeholder="选择日期">
  73. </el-date-picker>
  74. </el-form-item>
  75. <el-form-item label="联系人">
  76. <el-input v-model="formObj.contact" autocomplete="off" style="width:70%;"></el-input>
  77. </el-form-item>
  78. <el-form-item label="联系电话">
  79. <el-input v-model="formObj.contactTel" autocomplete="off" style="width:70%;"></el-input>
  80. </el-form-item>
  81. <el-form-item label="经度">
  82. <el-input v-model="formObj.centerX" autocomplete="off" style="width:70%;"></el-input>
  83. </el-form-item>
  84. <el-form-item label="纬度">
  85. <el-input v-model="formObj.centerY" autocomplete="off" style="width:70%;"></el-input>
  86. </el-form-item>
  87. <el-form-item label="">
  88. <el-button type="primary" @click="addHandler" v-if="openType">保 存</el-button>
  89. </el-form-item>
  90. </el-form>
  91. </el-main>
  92. </el-container>
  93. <theRecentAppearance v-if="xcztShow" @jqmmDialogClose="jqmmDialog" :jqmmShow="xcztShow" :openType="openType"
  94. :jqmmEngId="currentObjectRgstrId" :dialogTitle="currentObjectName + '近期面貌'"
  95. style="z-index: 9999;"></theRecentAppearance>
  96. <!--影像弹窗-->
  97. <el-dialog :title="currentObjectName + '影像'" :visible.sync="imageShow" append-to-body
  98. :close-on-click-modal="false"
  99. width="60%">
  100. <div style="height: 60vh;">
  101. <mapLocation ref="mapRef" v-if="imageShow" :gdX="centerX" :gdY="centerY"></mapLocation>
  102. </div>
  103. </el-dialog>
  104. </div>
  105. </template>
  106. <script>
  107. import inputWith from "@widget/inuptWith.vue"
  108. import request from "@util/gw_ajax_request.js"
  109. import theRecentAppearance from '../../duChaDuiXiang/theRecentAppearance'
  110. import unlimitDatePicker from '@baseWidget/unLimitdatePicker.vue'
  111. import mapLocation from '../mapLocation'
  112. export default {
  113. components: {
  114. inputWith: inputWith,
  115. unlimitDatePicker: unlimitDatePicker,
  116. theRecentAppearance,
  117. mapLocation
  118. },
  119. props: ['id', 'currentObjectRgstrId', 'currentResCode', 'currentObjectId', 'currentObjectName', 'openType'],
  120. data() {
  121. return {
  122. formObj: {
  123. wellName:'',
  124. wellType:'',
  125. wellTime:'',
  126. wellHeight:'',
  127. adCode: "",//行政区划编码 ,
  128. adName: "",//行政区划名称 ,
  129. centerX: "",//经度 ,
  130. centerY: "",//纬度 ,
  131. contact: "",//单位联系人 ,
  132. contactTel: "",//单位联系人电话 ,
  133. },
  134. dialogFormVisible: false,
  135. formLabelWidth: '160px',
  136. loading: true,
  137. operationType1: '',
  138. currentResCode1: '',
  139. currentObjectId1: '',
  140. value1: '',
  141. provList: [],
  142. cityList: [],
  143. countryList: [],
  144. provName: '',
  145. cityName: '',
  146. countryName: '',
  147. provNames: '',
  148. cityNames: '',
  149. countryNames: '',
  150. curSelectItem: 0,
  151. showLocSelect: false,
  152. locat: {
  153. location: "",
  154. admDiv: ""
  155. },
  156. xcztShow: false,
  157. imageShow: false,
  158. xcztEngId: '',
  159. centerX: 0,
  160. centerY: 0
  161. }
  162. },
  163. computed: {
  164. recPersId() {
  165. return localStorage.getItem("userid") ? localStorage.getItem("userid") : ''
  166. }
  167. },
  168. mounted() {
  169. this.currentResCode1 = this.currentResCode;
  170. this.currentObjectId1 = this.currentObjectId;
  171. this.getRgstridObj();
  172. this.getAreaList()
  173. },
  174. watch: {
  175. id(n, o) {
  176. this.getRgstridObj();
  177. },
  178. showLocSelect(val) {
  179. if (!val) {
  180. this.formObj.rvLoc = this.locat.location
  181. this.formObj.admDiv = this.locat.admDiv
  182. this.provName = ''
  183. this.cityName = ''
  184. this.countryName = ''
  185. }
  186. }
  187. },
  188. methods: {
  189. getRgstridObj() {
  190. var _self = this;
  191. request.post(`/att/grow/base/getObjId/${_self.currentObjectId}`).then(
  192. (res) => {
  193. if (res.data) {
  194. _self.formObj = res.data;
  195. } else {
  196. _self.formObj = {};
  197. }
  198. },
  199. (err) => {
  200. }
  201. );
  202. },
  203. addHandler() {
  204. var _self = this;
  205. _self.formObj['persId'] = _self.recPersId;
  206. _self.formObj.objId = _self.currentObjectId1;
  207. try {
  208. this.$confirm('确认保存基础信息?', '提示', {
  209. confirmButtonText: '确定',
  210. cancelButtonText: '取消',
  211. type: 'warning'
  212. }).then(() => {
  213. request.post('/bis/insp/grow', _self.formObj).then((res) => {
  214. if (res.success) {
  215. _self.$emit("addShuiKuSuccess");
  216. _self.$emit("changeWellType",_self.formObj.wellType);
  217. _self.showLocSelect = false
  218. _self.getRgstridObj()
  219. _self.$message.success("修改成功");
  220. } else {
  221. _self.$emit('cancelHandler');
  222. }
  223. });
  224. })
  225. } catch (e) {
  226. }
  227. },
  228. cancelHandler() {
  229. this.$emit('cancelHandler');
  230. },
  231. getAreaList(val) {
  232. let areaParams = {
  233. adName: "",
  234. id: this.dczId,
  235. pageNum: 1,
  236. pageSize: 10000
  237. }
  238. let adCode = ''
  239. if (!val) {
  240. adCode = '000000000000'
  241. } else {
  242. adCode = val
  243. }
  244. request.get('/dc/ad/base/getAdData', {params: {'adCode': adCode}}).then(res => {
  245. if (res.success) {
  246. if (this.curSelectItem == 1) {
  247. this.cityList = res.data
  248. } else if (this.curSelectItem == 2) {
  249. this.countryList = res.data
  250. } else {
  251. this.provList = res.data
  252. }
  253. }
  254. })
  255. },
  256. provChange(val) {
  257. this.curSelectItem = 1
  258. this.cityName = ''
  259. this.countryName = ''
  260. this.formObj.admDiv = val
  261. this.provList.forEach(ele => {
  262. if (ele.adCode == this.provName) {
  263. this.provNames = ele.adName
  264. }
  265. })
  266. this.formObj.adName = this.provNames
  267. this.getAreaList(val)
  268. },
  269. RsvrTypeChange(val) {
  270. },
  271. cityChange(val) {
  272. this.curSelectItem = 2
  273. if (val && val != '') {
  274. this.formObj.admDiv = val
  275. this.countryName = ''
  276. this.cityList.forEach(ele => {
  277. if (ele.adCode == this.cityName) {
  278. this.cityNames = ele.adName
  279. }
  280. })
  281. this.formObj.adName = this.provNames + this.cityNames
  282. this.getAreaList(val)
  283. }
  284. },
  285. countryChange(val) {
  286. if (val && val != '') {
  287. this.formObj.admDiv = val
  288. this.countryList.forEach(ele => {
  289. if (ele.adCode == this.countryName) {
  290. this.countryNames = ele.adName
  291. }
  292. })
  293. this.formObj.adName = this.provNames + this.cityNames + this.countryNames
  294. }
  295. },
  296. // 近期面貌
  297. recentAppearance() {
  298. this.xcztShow = true;
  299. },
  300. jqmmDialog() {
  301. this.xcztShow = false;
  302. },
  303. //影像
  304. imageClick() {
  305. if (!this.centerX && !this.centerY) {
  306. this.$message.warning('暂无经纬度信息!');
  307. return false;
  308. }
  309. this.imageShow = true;
  310. }
  311. },
  312. }
  313. </script>
  314. <style>
  315. #dcdxHeader {
  316. padding: 15px 20px;
  317. }
  318. #dxdcFooter {
  319. text-align: center;
  320. }
  321. #dxdcAside {
  322. border: 1px solid #d5d5ff;
  323. }
  324. .el-dialog__wrapper .el-treeWhite {
  325. /* max-height: 260px !important; */
  326. }
  327. .left-vertical {
  328. width: 8px;
  329. height: 17px;
  330. background: rgb(250, 205, 145);
  331. display: inline-block;
  332. vertical-align: bottom;
  333. }
  334. .hrs {
  335. display: inline-block;
  336. width: calc(100% - 40px);
  337. margin-left: 10px;
  338. height: 1px;
  339. vertical-align: middle;
  340. background-color: #ddd;
  341. }
  342. </style>