349dc2fb2e4aefa49e6ecad809d0e61c7570255f.svn-base 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413
  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="水库名称" required >
  13. <el-input v-model="formObj.rsName" autocomplete="off" style="width:70%;"></el-input>
  14. </el-form-item>
  15. <el-form-item label="管理机构" >
  16. <el-input v-model="formObj.rsAdmName" autocomplete="off" style="width:70%;"></el-input>
  17. </el-form-item>
  18. <el-form-item label="行政区划" required>
  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.location" autocomplete="off" style="width:70%;"></el-input>
  55. </el-form-item>
  56. <el-form-item label="工程规模">
  57. <el-select v-model="formObj.engScal" placeholder="请选择">
  58. <el-option v-for="item in gongchengguimo" :key="item.value" :label="item.label" :value="item.value"></el-option>
  59. </el-select>
  60. </el-form-item>
  61. <el-form-item label="总库容(万m³)">
  62. <el-input v-model="formObj.totCap" autocomplete="off" style="width:70%;"></el-input>
  63. </el-form-item>
  64. <el-form-item label="最大坝高(m)">
  65. <el-input v-model="formObj.damSizeHig" autocomplete="off" style="width:70%;"></el-input>
  66. </el-form-item>
  67. <el-form-item label="主坝坝型">
  68. <el-select v-model="formObj.damType" placeholder="请选择">
  69. <el-option v-for="item in zhubaleixing" :key="item.value" :label="item.label" :value="item.value"></el-option>
  70. </el-select>
  71. </el-form-item>
  72. <el-form-item label="注册登记号">
  73. <el-input v-model="formObj.damRegCode" autocomplete="off" style="width:70%;"></el-input>
  74. </el-form-item>
  75. <el-form-item label="经度">
  76. <el-input v-model="formObj.gdX" autocomplete="off" style="width:70%;"></el-input>
  77. </el-form-item>
  78. <el-form-item label="纬度">
  79. <el-input v-model="formObj.gdY" autocomplete="off" style="width:70%;"></el-input>
  80. </el-form-item>
  81. <el-form-item label="" style="text-align: center">
  82. <el-button type="primary" @click="addHandler" v-if="openType">保 存</el-button>
  83. </el-form-item>
  84. </el-form>
  85. </el-main>
  86. </el-container>
  87. <theRecentAppearance v-if="xcztShow" @jqmmDialogClose="jqmmDialog" :jqmmShow="xcztShow" :openType="openType"
  88. :jqmmEngId="currentObjectRgstrId" :dialogTitle="currentObjectName + '近期面貌'"
  89. style="z-index: 9999;"></theRecentAppearance>
  90. <!--影像弹窗-->
  91. <el-dialog :title="currentObjectName + '影像'" :visible.sync="imageShow" append-to-body :close-on-click-modal="false"
  92. width="60%">
  93. <div style="height: 60vh;">
  94. <mapLocation ref="mapRef" v-if="imageShow" :gdX="formObj.gdX" :gdY="formObj.gdY"></mapLocation>
  95. </div>
  96. </el-dialog>
  97. </div>
  98. </template>
  99. <script>
  100. import inputWith from "@widget/inuptWith.vue"
  101. import request from "@util/gw_ajax_request.js"
  102. import theRecentAppearance from '../../duChaDuiXiang/theRecentAppearance'
  103. import unlimitDatePicker from '@baseWidget/unLimitdatePicker.vue'
  104. import mapLocation from '../mapLocation'
  105. import {
  106. getrgstrIdObject_skfhdd_state
  107. } from "@api/duChaTianBao.js"
  108. import {
  109. dateFormat
  110. } from "@util/gw_date.js"
  111. export default {
  112. components: {
  113. inputWith: inputWith,
  114. unlimitDatePicker: unlimitDatePicker,
  115. theRecentAppearance,
  116. mapLocation
  117. },
  118. props: ['id','currentObjectRgstrId', 'currentResCode', 'currentObjectId', 'currentObjectName','openType'],
  119. data() {
  120. return {
  121. formObj: {
  122. "rsName": '',
  123. "rsAdmName": "",
  124. "rsLoc": "",
  125. "location": '',
  126. "intm": "",
  127. "engScal": "",
  128. "totCap": "",
  129. "damMaxHigh": "",
  130. "damTypeStr": "",
  131. "damType":"",
  132. "damRegCode":"",
  133. "rsType":'',
  134. "regCode": "",
  135. "rsvrLong": "",
  136. "rsvrLat": "",
  137. "compDate": "",
  138. "admDiv": "",
  139. "gdX": "",
  140. "gdY": ""
  141. },
  142. dialogFormVisible: false,
  143. formLabelWidth: '160px',
  144. loading: true,
  145. operationType1: '',
  146. currentResCode1: '',
  147. currentObjectId1: '',
  148. value1: '',
  149. provList: [],
  150. cityList: [],
  151. countryList: [],
  152. provName: '',
  153. cityName: '',
  154. countryName: '',
  155. provNames: '',
  156. cityNames: '',
  157. countryNames: '',
  158. curSelectItem: 0,
  159. showLocSelect: false,
  160. locat: {
  161. location: "",
  162. admDiv: ""
  163. },
  164. xcztShow: false,
  165. imageShow: false,
  166. xcztEngId: '',
  167. centerX: 0,
  168. centerY: 0,
  169. gongchengguimo:[
  170. {
  171. value: "4",
  172. label: "小(1)型"
  173. },
  174. {
  175. value: "5",
  176. label: "小(2)型"
  177. },
  178. {
  179. value: "1",
  180. label: "大(1)型"
  181. },
  182. {
  183. value: "2",
  184. label: "大(2)型"
  185. },
  186. {
  187. value: "3",
  188. label: "中型"
  189. }
  190. ],
  191. zhubaleixing:[
  192. {
  193. value: "1",
  194. label: "混凝土坝"
  195. },
  196. {
  197. value: "2",
  198. label: "碾压混凝土坝"
  199. },
  200. {
  201. value: "3",
  202. label: "浆砌石坝"
  203. },
  204. {
  205. value: "4",
  206. label: "土坝"
  207. },
  208. {
  209. value: "5",
  210. label: "堆石坝"
  211. },
  212. {
  213. value: "6",
  214. label: "挡水坝"
  215. },
  216. {
  217. value: "7",
  218. label: "其他"
  219. }
  220. ]
  221. }
  222. },
  223. computed: {
  224. recPersId() {
  225. return localStorage.getItem("userid") ? localStorage.getItem("userid") : ''
  226. }
  227. },
  228. mounted() {
  229. this.currentResCode1 = this.currentResCode;
  230. this.currentObjectId1 = this.currentObjectId;
  231. this.getRgstridObj();
  232. this.getAreaList()
  233. },
  234. watch: {
  235. id(n, o) {
  236. this.getRgstridObj();
  237. },
  238. showLocSelect(val) {
  239. if (!val) {
  240. this.formObj.rvLoc = this.locat.location
  241. this.formObj.admDiv = this.locat.admDiv
  242. this.provName = ''
  243. this.cityName = ''
  244. this.countryName = ''
  245. }
  246. }
  247. },
  248. methods: {
  249. getRgstridObj() {
  250. var _self = this;
  251. getrgstrIdObject_skfhdd_state(_self.currentObjectRgstrId).then(
  252. (res) => {
  253. if (res.data) {
  254. _self.formObj = res.data;
  255. } else {
  256. _self.formObj = {};
  257. }
  258. },
  259. (err) => {
  260. }
  261. );
  262. },
  263. addHandler() {
  264. var _self = this;
  265. _self.formObj['persId'] = _self.recPersId;
  266. _self.formObj.objId = _self.currentObjectId1;
  267. _self.formObj.adCode = _self.countryName;
  268. try {
  269. this.$confirm('确认保存基础信息?', '提示', {
  270. confirmButtonText: '确定',
  271. cancelButtonText: '取消',
  272. type: 'warning'
  273. }).then(() => {
  274. request.post('/bis/insp/rsfcoqh', _self.formObj).then((res) => {
  275. if (res.success) {
  276. _self.$emit("addShuiKuSuccess");
  277. _self.showLocSelect = false
  278. _self.getRgstridObj()
  279. _self.$message.success("修改成功");
  280. } else {
  281. _self.$emit('cancelHandler');
  282. }
  283. });
  284. })
  285. } catch (e) {
  286. }
  287. },
  288. cancelHandler() {
  289. this.$emit('cancelHandler');
  290. },
  291. formatRadio(val) {
  292. if (val == '1') {
  293. return '是'
  294. } else if (val == '0') {
  295. return '否'
  296. } else {
  297. return val
  298. }
  299. },
  300. getAreaList(val) {
  301. let areaParams = {
  302. adName: "",
  303. id: this.dczId,
  304. pageNum: 1,
  305. pageSize: 10000
  306. }
  307. let adCode = ''
  308. if (!val) {
  309. adCode = '000000000000'
  310. } else {
  311. adCode = val
  312. }
  313. request.get('/dc/ad/base/getAdData', {params: {'adCode': adCode}}).then(res => {
  314. if (res.success) {
  315. if (this.curSelectItem == 1) {
  316. this.cityList = res.data
  317. } else if (this.curSelectItem == 2) {
  318. this.countryList = res.data
  319. } else {
  320. this.provList = res.data
  321. }
  322. }
  323. })
  324. },
  325. provChange(val) {
  326. this.curSelectItem = 1
  327. this.cityName = ''
  328. this.countryName = ''
  329. this.formObj.admDiv = val
  330. this.provList.forEach(ele => {
  331. if (ele.adCode == this.provName) {
  332. this.provNames = ele.adName
  333. }
  334. })
  335. this.formObj.adName = this.provNames
  336. this.getAreaList(val)
  337. },
  338. RsvrTypeChange(val) {
  339. },
  340. cityChange(val) {
  341. this.curSelectItem = 2
  342. if (val && val != '') {
  343. this.formObj.admDiv = val
  344. this.countryName = ''
  345. this.cityList.forEach(ele => {
  346. if (ele.adCode == this.cityName) {
  347. this.cityNames = ele.adName
  348. }
  349. })
  350. this.formObj.adName = this.provNames + this.cityNames
  351. this.getAreaList(val)
  352. }
  353. },
  354. countryChange(val) {
  355. if (val && val != '') {
  356. this.formObj.admDiv = val
  357. this.countryList.forEach(ele => {
  358. if (ele.adCode == this.countryName) {
  359. this.countryNames = ele.adName
  360. }
  361. })
  362. this.formObj.adName = this.provNames + this.cityNames + this.countryNames
  363. this.formObj.adCode = val
  364. }
  365. },
  366. // 近期面貌
  367. recentAppearance() {
  368. this.xcztShow = true;
  369. },
  370. jqmmDialog() {
  371. this.xcztShow = false;
  372. },
  373. //影像
  374. imageClick() {
  375. if (!this.formObj.gdX && !this.formObj.gdY) {
  376. this.$message.warning('暂无经纬度信息!');
  377. return false;
  378. }
  379. this.imageShow = true;
  380. }
  381. },
  382. }
  383. </script>
  384. <style>
  385. #dcdxHeader {
  386. padding: 15px 20px;
  387. }
  388. #dxdcFooter {
  389. text-align: center;
  390. }
  391. #dxdcAside {
  392. border: 1px solid #d5d5ff;
  393. }
  394. .el-dialog__wrapper .el-treeWhite {
  395. /* max-height: 260px !important; */
  396. }
  397. </style>