c0efdb180c3e66518c55aaa8aa004ca0301a4a5d.svn-base 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526
  1. <template>
  2. <div>
  3. <el-container style="height:520px;">
  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="videoClick" v-if="isFj">视频监控</el-button>
  12. </p>
  13. <el-form-item label="水库名称">
  14. <el-input v-model="formObj.rsName" readonly autocomplete="off" style="width:70%;"></el-input>
  15. </el-form-item>
  16. <el-form-item label="管理机构">
  17. <el-input v-model="formObj.rsAdmName" autocomplete="off" style="width:70%;"></el-input>
  18. </el-form-item>
  19. <el-form-item label="行政区划">
  20. <div v-if="showLocSelect">
  21. <el-select v-model="provName" placeholder="选择省" @change="provChange" style="width:20%">
  22. <el-option
  23. v-for="item in provList"
  24. :key="item.adCode"
  25. :label="item.adName"
  26. :value="item.adCode">
  27. </el-option>
  28. </el-select>
  29. <el-select v-model="cityName" placeholder="选择市" @change="cityChange" style="width:20%">
  30. <el-option
  31. v-for="item in cityList"
  32. :key="item.adCode"
  33. :label="item.adName"
  34. :value="item.adCode">
  35. </el-option>
  36. </el-select>
  37. <el-select v-model="countryName" placeholder="选择县" @change="countryChange" 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.location" readonly autocomplete="off"
  50. style="width:70%;"></el-input>&#x3000;<span @click="showLocSelect = true"
  51. style="color: #009fff;font-size:12px;cursor:pointer">更改</span>
  52. </div>
  53. </el-form-item>
  54. <el-form-item label="所在地点">
  55. <el-input v-model="formObj.hystSite" placeholder="请输入详细地点" autocomplete="off" style="width:70%;"></el-input>
  56. </el-form-item>
  57. <el-form-item label="建成时间">
  58. <el-date-picker v-model="formObj.resCreateTime" type="date" value-format="yyyy-MM-dd" placeholder="选择日期">
  59. </el-date-picker>
  60. </el-form-item>
  61. <el-form-item label="注册登记号">
  62. <el-input v-model="formObj.damRegCode" autocomplete="off" style="width:70%;"></el-input>
  63. </el-form-item>
  64. <el-form-item label="工程规模" prop="engScal">
  65. <el-select v-model="formObj.engScal" placeholder="请选择">
  66. <el-option v-for="item in gongchengguimo" :key="item.value" :label="item.label"
  67. :value="item.value"></el-option>
  68. </el-select>
  69. </el-form-item>
  70. <el-form-item label="功能类型">
  71. <el-input v-model="formObj.rsClass" autocomplete="off" style="width:70%;"></el-input>
  72. </el-form-item>
  73. <el-form-item label="主坝坝型" prop="rsType">
  74. <el-select v-model="formObj.damType" placeholder="请选择">
  75. <el-option v-for="item in zhubaleixing" :key="item.value" :label="item.label"
  76. :value="item.value"></el-option>
  77. </el-select>
  78. <!-- <el-input v-model="changeSupervision.inspPblmsName" :disabled="true" clearable></el-input> -->
  79. </el-form-item>
  80. <el-form-item label="总库容(万m³)" prop="totCap">
  81. <el-input v-model="formObj.totCap" autocomplete="off" style="width:70%;"></el-input>
  82. </el-form-item>
  83. <el-form-item label="主坝最大坝高(m)" prop="damSizeHig">
  84. <el-input v-model="formObj.damSizeHig" autocomplete="off" style="width:70%;"></el-input>
  85. </el-form-item>
  86. <el-form-item label="正常蓄水位" prop="normz">
  87. <el-input v-model="formObj.normz" autocomplete="off" style="width:70%;"></el-input>
  88. </el-form-item>
  89. <el-form-item label="汛限水位" prop="fsltdz">
  90. <el-input v-model="formObj.fsltdz" autocomplete="off" style="width:70%;"></el-input>
  91. </el-form-item>
  92. <el-form-item label="设计洪水位(m)">
  93. <el-input clearable v-model="formObj.desFlStag" autocomplete="off" style="width:70%;"></el-input>
  94. </el-form-item>
  95. <el-form-item label="防洪高水位(m)">
  96. <el-input clearable v-model="formObj.flConTopStag" autocomplete="off" style="width:70%;"></el-input>
  97. </el-form-item>
  98. <el-form-item label="下闸蓄水时间">
  99. <!--<el-input v-model="formObj.impdDt" autocomplete="off" style="width:70%;"></el-input>-->
  100. <unlimitDatePicker v-model="formObj.impdDt" :editable="false" type="date" placeholder="选择日期">
  101. </unlimitDatePicker>
  102. </el-form-item>
  103. <el-form-item label="最近一次加固改造_蓄水运行时间">
  104. <!--<el-input v-model="formObj.rnfcImpdDt" autocomplete="off" style="width:70%;"></el-input>-->
  105. <unlimitDatePicker v-model="formObj.rnfcImpdDt" :editable="false" type="date" placeholder="选择日期">
  106. </unlimitDatePicker>
  107. </el-form-item>
  108. <el-form-item label="">
  109. <!-- <el-button @click="cancelHandler">取 消</el-button> -->
  110. <el-button type="primary" @click="addHandler" :disabled="ifView">保 存</el-button>
  111. </el-form-item>
  112. </el-form>
  113. </el-main>
  114. </el-container>
  115. <theRecentAppearance v-if="xcztShow" @jqmmDialogClose="jqmmDialog" :jqmmShow="xcztShow"
  116. :jqmmEngId="currentObjectRgstrId" :dialogTitle="currentObjectName + '近期面貌'"
  117. style="z-index: 9999;"></theRecentAppearance>
  118. <rtspPlay v-if="rtspShow" :rsCode="rsCode" @playDialogClose="playDialogClose" :dialogTitle="currentObjectName + '视频监控'"></rtspPlay>
  119. <!--影像弹窗-->
  120. <el-dialog :title="currentObjectName + '影像'" :visible.sync="imageShow" append-to-body :close-on-click-modal="false"
  121. width="60%">
  122. <div style="height: 60vh;">
  123. <mapLocation ref="mapRef" v-if="imageShow" :gdX="centerX" :gdY="centerY"></mapLocation>
  124. </div>
  125. </el-dialog>
  126. </div>
  127. </template>
  128. <script>
  129. import inputWith from "@widget/inuptWith.vue"
  130. import request from "@util/gw_ajax_request.js"
  131. import theRecentAppearance from '../../duChaDuiXiang/theRecentAppearance'
  132. import unlimitDatePicker from '@baseWidget/unLimitdatePicker.vue'
  133. import mapLocation from '../mapLocation'
  134. import {getRsvrRgstrZxskhtk} from "@api/duChaTianBao.js"
  135. import {dateFormat} from "@util/gw_date.js"
  136. import rtspPlay from '../play.vue'
  137. export default {
  138. components: {
  139. inputWith: inputWith,
  140. unlimitDatePicker: unlimitDatePicker,
  141. theRecentAppearance,
  142. mapLocation,
  143. rtspPlay
  144. },
  145. props: ['currentObjectRgstrId', 'currentResCode', 'currentObjectId', 'currentObjectName', 'ifView'],
  146. data() {
  147. return {
  148. formObj: {
  149. "rsName": '',
  150. "rsAdmName": "",
  151. "rsLoc": "",
  152. "intm": "",
  153. "engScal": "",
  154. "totCap": "",
  155. "damMaxHigh": "",
  156. "damTypeStr": "",
  157. "damType": "",
  158. // "rsType":'',
  159. "regCode": "",
  160. "rsvrLong": "",
  161. "rsvrLat": "",
  162. "compDate": "",
  163. "compDateStr": "",
  164. "location": "",
  165. "admDiv": "",
  166. "normz": "",
  167. "fsltdz": "",
  168. "centerXGd": "",
  169. "centerYGd": ""
  170. },
  171. dialogFormVisible: false,
  172. formLabelWidth: '160px',
  173. loading: true,
  174. operationType1: '',
  175. currentResCode1: '',
  176. currentObjectId1: '',
  177. value1: '',
  178. gongchengguimo: [
  179. {
  180. value: "1",
  181. label: "大(1)型"
  182. },
  183. {
  184. value: "2",
  185. label: "大(2)型"
  186. },
  187. {
  188. value: "3",
  189. label: "中型"
  190. },
  191. // {
  192. // value: "4",
  193. // label: "小(1)型"
  194. // },
  195. // {
  196. // value: "5",
  197. // label: "小(2)型"
  198. // },
  199. // {
  200. // value: "9",
  201. // label: "其他"
  202. // },
  203. ],
  204. zhubaleixing: [
  205. {
  206. value: "1",
  207. label: "混凝土坝"
  208. },
  209. {
  210. value: "2",
  211. label: "碾压混凝土坝"
  212. },
  213. {
  214. value: "3",
  215. label: "浆砌石坝"
  216. },
  217. {
  218. value: "4",
  219. label: "土坝"
  220. },
  221. {
  222. value: "5",
  223. label: "堆石坝"
  224. },
  225. {
  226. value: "6",
  227. label: "挡水坝"
  228. },
  229. {
  230. value: "7",
  231. label: "其他"
  232. },
  233. ],
  234. provList: [],
  235. cityList: [],
  236. countryList: [],
  237. provName: '',
  238. cityName: '',
  239. countryName: '',
  240. provNames: '',
  241. cityNames: '',
  242. countryNames: '',
  243. curSelectItem: 0,
  244. showLocSelect: false,
  245. locat: {
  246. location: "",
  247. admDiv: ""
  248. },
  249. xcztShow: false,
  250. rtspShow: false,
  251. imageShow: false,
  252. xcztEngId: '',
  253. centerX: 0,
  254. centerY: 0,
  255. rsCode:""
  256. }
  257. },
  258. computed: {
  259. recPersId() {
  260. return localStorage.getItem("userid") ? localStorage.getItem("userid") : ''
  261. },
  262. isFj(){
  263. if(localStorage.getItem('currentRlcode').substring(0,2)=="35"){
  264. return true;
  265. }else{
  266. return false;
  267. }
  268. }
  269. },
  270. mounted() {
  271. this.currentResCode1 = this.currentResCode;
  272. this.currentObjectId1 = this.currentObjectId;
  273. this.getRgstridObj();
  274. this.getAreaList()
  275. },
  276. watch: {
  277. currentObjectRgstrId(n, o) {
  278. this.getRgstridObj();
  279. },
  280. showLocSelect(val) {
  281. if (!val) {
  282. this.formObj.location = this.locat.location
  283. this.formObj.admDiv = this.locat.admDiv
  284. this.provName = ''
  285. this.cityName = ''
  286. this.countryName = ''
  287. }
  288. }
  289. },
  290. methods: {
  291. playDialogClose(){
  292. this.rtspShow = false;
  293. },
  294. videoClick(){
  295. this.rtspShow = true;
  296. },
  297. getRgstridObj() {
  298. var _self = this;
  299. getRsvrRgstrZxskhtk(_self.currentObjectRgstrId).then(
  300. (res) => {
  301. if (res.data) {
  302. _self.formObj = res.data;
  303. this.locat.location = res.data.location
  304. this.locat.admDiv = res.data.admDiv
  305. this.centerX = res.data.centerX;
  306. this.centerY = res.data.centerY;
  307. _self.formObj.impdDt = dateFormat(res.data.impdDt, 'yyyy-MM-dd');
  308. _self.formObj.rnfcImpdDt = dateFormat(res.data.rnfcImpdDt, 'yyyy-MM-dd');
  309. _self.formObj.resCreateTime = dateFormat(res.data.resCreateTime, 'yyyy-MM-dd');
  310. _self.rsCode = res.data.rsCode;
  311. } else {
  312. _self.formObj = {};
  313. }
  314. },
  315. (err) => {
  316. }
  317. );
  318. },
  319. addHandler() {
  320. var _self = this;
  321. // _self.formObj.compDate = _self.value1;
  322. // _self.formObj['compDateStr'] = dateFormat(_self.value1, 'yyyy-MM-dd');
  323. _self.formObj['persId'] = _self.recPersId;
  324. _self.formObj.objId = _self.currentObjectId1;
  325. // _self.formObj.compDateDesc = _self.formObj.compDateStr==''?null:_self.formObj.compDateStr;
  326. console.log(_self.formObj);
  327. //基础信息纠错,经纬度修改粗略校验经度纬度整数部分的范围
  328. // if (this.formObj.centerYGd < 4 || this.formObj.centerYGd > 54) {
  329. // this.$message.error('纬度的整数范围应在4-54之间,请重新填写!');
  330. // this.formObj.centerYGd = '';
  331. // return;
  332. // }
  333. // if (this.formObj.centerXGd < 74 || this.formObj.centerXGd > 136) {
  334. // this.$message.error('经度的整数范围应在74-136之间,请重新填写!');
  335. // this.formObj.centerXGd = '';
  336. // return;
  337. // }
  338. try {
  339. this.$confirm('确认保存基础信息?', '提示', {
  340. confirmButtonText: '确定',
  341. cancelButtonText: '取消',
  342. type: 'warning'
  343. }).then(() => {
  344. request.post('/bis/insp/rslkbk', _self.formObj).then((res) => {
  345. if (res.success) {
  346. _self.showLocSelect = false;
  347. _self.getRgstridObj()
  348. _self.$message.success("修改成功");
  349. _self.$emit("addShuiKuSuccess");
  350. } else {
  351. _self.$message.warning(res.message);
  352. return;
  353. }
  354. });
  355. })
  356. } catch (e) {
  357. }
  358. },
  359. cancelHandler() {
  360. this.$emit('cancelHandler');
  361. },
  362. formatRadio(val) {
  363. if (val == '1') {
  364. return '是'
  365. } else if (val == '0') {
  366. return '否'
  367. } else {
  368. return val
  369. }
  370. },
  371. // formatEngScal(val) {
  372. // switch (val) {
  373. // case '1':
  374. // val = '大(1)型';
  375. // break;
  376. // case '2':
  377. // val = '大(2)型';
  378. // break;
  379. // case '3':
  380. // val = '中型';
  381. // break;
  382. // case '4':
  383. // val = '小(1)型';
  384. // break;
  385. // case '5':
  386. // val = '小(2)型';
  387. // break;
  388. // case '9':
  389. // val = '其他';
  390. // break;
  391. // }
  392. // return val;
  393. // },
  394. // formatdamType(val) {
  395. // switch (val) {
  396. // case '1':
  397. // val = '混凝土坝';
  398. // break;
  399. // case '2':
  400. // val = '碾压混凝土坝';
  401. // break;
  402. // case '3':
  403. // val = '浆砌石坝';
  404. // break;
  405. // case '4':
  406. // val = '土坝';
  407. // break;
  408. // case '5':
  409. // val = '堆石坝';
  410. // break;
  411. // case '6':
  412. // val = '挡水坝';
  413. // break;
  414. // case '7':
  415. // val = '其它';
  416. // break;
  417. // }
  418. // return val;
  419. // },
  420. getAreaList(val) {
  421. let areaParams = {
  422. adName: "",
  423. id: this.dczId,
  424. pageNum: 1,
  425. pageSize: 10000
  426. }
  427. let adCode = ''
  428. if (!val) {
  429. adCode = '000000000000'
  430. } else {
  431. adCode = val
  432. }
  433. request.get('/dc/ad/base/getAdData', {params: {'adCode': adCode}}).then(res => {
  434. if (res.success) {
  435. if (this.curSelectItem == 1) {
  436. this.cityList = res.data
  437. } else if (this.curSelectItem == 2) {
  438. this.countryList = res.data
  439. } else {
  440. this.provList = res.data
  441. }
  442. }
  443. })
  444. },
  445. provChange(val) {
  446. this.curSelectItem = 1
  447. this.cityName = ''
  448. this.countryName = ''
  449. this.formObj.admDiv = val
  450. this.provList.forEach(ele => {
  451. if (ele.adCode == this.provName) {
  452. this.provNames = ele.adName
  453. }
  454. })
  455. this.formObj.location = this.provNames
  456. this.getAreaList(val)
  457. },
  458. cityChange(val) {
  459. this.curSelectItem = 2
  460. if (val && val != '') {
  461. this.formObj.admDiv = val
  462. this.countryName = ''
  463. this.cityList.forEach(ele => {
  464. if (ele.adCode == this.cityName) {
  465. this.cityNames = ele.adName
  466. }
  467. })
  468. this.formObj.location = this.provNames + this.cityNames
  469. this.getAreaList(val)
  470. }
  471. },
  472. countryChange(val) {
  473. if (val && val != '') {
  474. this.formObj.admDiv = val
  475. this.countryList.forEach(ele => {
  476. if (ele.adCode == this.countryName) {
  477. this.countryNames = ele.adName
  478. }
  479. })
  480. this.formObj.location = this.provNames + this.cityNames + this.countryNames
  481. }
  482. },
  483. // 近期面貌
  484. recentAppearance() {
  485. this.xcztShow = true;
  486. },
  487. jqmmDialog() {
  488. this.xcztShow = false;
  489. },
  490. //影像
  491. imageClick() {
  492. if (!this.centerX && !this.centerY) {
  493. this.$message.warning('暂无经纬度信息!');
  494. return false;
  495. }
  496. this.imageShow = true;
  497. }
  498. },
  499. }
  500. </script>
  501. <style>
  502. #dcdxHeader {
  503. padding: 15px 20px;
  504. }
  505. #dxdcFooter {
  506. text-align: center;
  507. }
  508. #dxdcAside {
  509. border: 1px solid #d5d5ff;
  510. }
  511. .el-dialog__wrapper .el-treeWhite {
  512. /* max-height: 260px !important; */
  513. }
  514. </style>