aa4e2e55 by weimo934

feat(sxdr):属性导入

1 parent 08c74968
...@@ -52,53 +52,37 @@ ...@@ -52,53 +52,37 @@
52 sxdrData: { 52 sxdrData: {
53 bsm: '' 53 bsm: ''
54 }, 54 },
55 errorData:[] 55 errorData: []
56 } 56 }
57 }, 57 },
58 mounted(){ 58 mounted() {
59 this.$store.state.sxdrType=''; 59 this.$store.state.sxdrType = '';
60 }, 60 },
61 methods: { 61 methods: {
62 loading(){ 62 loading() {
63 debugger 63 this.$store.state.sxdrType = this.dylx;
64 switch (this.dylx) {
65 case "zd":
66 this.$store.state.sxdrType='zd';
67 break;
68 case "dz":
69 this.$store.state.sxdrType='dz';
70 break;
71 case "zrz":
72 this.$store.state.sxdrType='zrz';
73 break;
74 case "h":
75 this.$store.state.sxdrType="h";
76 break;
77 default:
78 break;
79 }
80 }, 64 },
81 reset(){ 65 reset() {
82 this.errorData=[]; 66 this.errorData = [];
83 this.uploadUrl=''; 67 this.uploadUrl = '';
84 this.sxdrData={bsm:''}; 68 this.sxdrData = {bsm: ''};
85 this.$store.state.sxdrType='';
86 }, 69 },
87 close() { 70 close() {
88 this.$emit('close') 71 this.$emit('close')
89 this.reset(); 72 this.reset();
90 }, 73 },
91 downloadTemplate() { 74 downloadTemplate() {
92 window.open(`/api/tx/excelGeo/zdTemplate?type=`+this.dylx); 75 window.open(`/api/tx/excelGeo/zdTemplate?type=` + this.dylx);
93 }, 76 },
94 uploadSuccess(res, file, fileList) { 77 uploadSuccess(res, file, fileList) {
95 if (res.success) { 78 if (res.success) {
96 this.$message.success("上传成功") 79 this.$message.success("上传成功")
80 debugger
97 this.loading(); 81 this.loading();
98 this.close() 82 this.close()
99 } else { 83 } else {
100 this.$message.error("上传失败") 84 this.$message.error("上传失败")
101 this.errorData=res.result 85 this.errorData = res.result
102 } 86 }
103 } 87 }
104 }, 88 },
...@@ -123,15 +107,16 @@ ...@@ -123,15 +107,16 @@
123 </script> 107 </script>
124 108
125 <style scoped lang="less"> 109 <style scoped lang="less">
126 .main-button{ 110 .main-button {
127 display: -webkit-flex; 111 display: -webkit-flex;
128 display: flex; 112 display: flex;
129 flex-direction: column-reverse; 113 flex-direction: column-reverse;
130 flex-wrap:nowrap; 114 flex-wrap: nowrap;
131 } 115 }
132 ul{ 116
117 ul {
133 margin-top: 20px; 118 margin-top: 20px;
134 li{ 119 li {
135 line-height: 15px; 120 line-height: 15px;
136 color: red; 121 color: red;
137 } 122 }
......
...@@ -81,7 +81,8 @@ ...@@ -81,7 +81,8 @@
81 </td> 81 </td>
82 <td colspan="2">宗地特征码<i class="requisite">*</i></td> 82 <td colspan="2">宗地特征码<i class="requisite">*</i></td>
83 <td colspan="4"> 83 <td colspan="4">
84 <el-select class="formSelect" ref="zdtzm" :disabled="formData.qszt!='0'" v-model="formData.zdtzmbsm"> 84 <el-select class="formSelect" ref="zdtzm" :disabled="formData.qszt!='0'"
85 v-model="formData.zdtzmbsm">
85 <el-option 86 <el-option
86 v-for="item in $store.state.zdtzmList" 87 v-for="item in $store.state.zdtzmList"
87 :key="item.bsm" 88 :key="item.bsm"
...@@ -112,7 +113,8 @@ ...@@ -112,7 +113,8 @@
112 class="formInput percent80" 113 class="formInput percent80"
113 v-model="formData.zddm" 114 v-model="formData.zddm"
114 /> 115 />
115 <el-button type="warning" :disabled="formData.qszt!='0'" class="createBtn" @click="generatorCode" 116 <el-button type="warning" :disabled="formData.qszt!='0'" class="createBtn"
117 @click="generatorCode"
116 >生成 118 >生成
117 </el-button> 119 </el-button>
118 </td> 120 </td>
...@@ -120,13 +122,14 @@ ...@@ -120,13 +122,14 @@
120 <tr> 122 <tr>
121 <td colspan="2">地籍号</td> 123 <td colspan="2">地籍号</td>
122 <td colspan="4"> 124 <td colspan="4">
123 <input type="text" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.djh" /> 125 <input type="text" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.djh"/>
124 </td> 126 </td>
125 127
126 <td colspan="2">不动产单元号<i class="requisite">*</i></td> 128 <td colspan="2">不动产单元号<i class="requisite">*</i></td>
127 <td colspan="4" class="psr"> 129 <td colspan="4" class="psr">
128 <input 130 <input
129 type="text" :disabled="formData.qszt!='0'" @blur="inputBlur($event)" ref="bdcdyh" maxlength="28" 131 type="text" :disabled="formData.qszt!='0'" @blur="inputBlur($event)" ref="bdcdyh"
132 maxlength="28"
130 class="formInput" 133 class="formInput"
131 v-model="formData.bdcdyh" 134 v-model="formData.bdcdyh"
132 /> 135 />
...@@ -136,7 +139,8 @@ ...@@ -136,7 +139,8 @@
136 <tr> 139 <tr>
137 <td colspan="2">坐落<i class="requisite">*</i></td> 140 <td colspan="2">坐落<i class="requisite">*</i></td>
138 <td colspan="4"> 141 <td colspan="4">
139 <input type="text" :disabled="formData.qszt!='0'" @blur="inputBlur($event)" ref="zl" class="formInput" v-model="formData.zl" /> 142 <input type="text" :disabled="formData.qszt!='0'" @blur="inputBlur($event)" ref="zl"
143 class="formInput" v-model="formData.zl"/>
140 </td> 144 </td>
141 <td colspan="2">项目名称</td> 145 <td colspan="2">项目名称</td>
142 <td colspan="4" class="psr"> 146 <td colspan="4" class="psr">
...@@ -162,20 +166,20 @@ ...@@ -162,20 +166,20 @@
162 </td> 166 </td>
163 <td colspan="2">价格(元)</td> 167 <td colspan="2">价格(元)</td>
164 <td colspan="4" class="psr"> 168 <td colspan="4" class="psr">
165 <input type="text" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.jg" /> 169 <input type="text" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.jg"/>
166 </td> 170 </td>
167 </tr> 171 </tr>
168 <tr> 172 <tr>
169 <td colspan="2" rowspan="2">所在图幅号</td> 173 <td colspan="2" rowspan="2">所在图幅号</td>
170 <td colspan="2">比例尺</td> 174 <td colspan="2">比例尺</td>
171 <td colspan="8" class="psr"> 175 <td colspan="8" class="psr">
172 <input type="text" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.blc" /> 176 <input type="text" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.blc"/>
173 </td> 177 </td>
174 </tr> 178 </tr>
175 <tr> 179 <tr>
176 <td colspan="2">图幅号</td> 180 <td colspan="2">图幅号</td>
177 <td colspan="8" class="psr"> 181 <td colspan="8" class="psr">
178 <input type="text" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.tfh" /> 182 <input type="text" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.tfh"/>
179 </td> 183 </td>
180 </tr> 184 </tr>
181 <tr> 185 <tr>
...@@ -207,7 +211,7 @@ ...@@ -207,7 +211,7 @@
207 </td> 211 </td>
208 <td colspan="2">容积说明</td> 212 <td colspan="2">容积说明</td>
209 <td colspan="4" class="psr"> 213 <td colspan="4" class="psr">
210 <input type="text" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.rjlsm" /> 214 <input type="text" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.rjlsm"/>
211 </td> 215 </td>
212 </tr> 216 </tr>
213 <tr> 217 <tr>
...@@ -239,7 +243,7 @@ ...@@ -239,7 +243,7 @@
239 </td> 243 </td>
240 <td colspan="2">建筑密度说明</td> 244 <td colspan="2">建筑密度说明</td>
241 <td colspan="4" class="psr"> 245 <td colspan="4" class="psr">
242 <input type="text" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.jzmdsm" /> 246 <input type="text" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.jzmdsm"/>
243 </td> 247 </td>
244 </tr> 248 </tr>
245 <tr> 249 <tr>
...@@ -271,32 +275,36 @@ ...@@ -271,32 +275,36 @@
271 </td> 275 </td>
272 <td colspan="2">建筑限高说明</td> 276 <td colspan="2">建筑限高说明</td>
273 <td colspan="4" class="psr"> 277 <td colspan="4" class="psr">
274 <input type="text" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.jzxgsm" /> 278 <input type="text" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.jzxgsm"/>
275 </td> 279 </td>
276 </tr> 280 </tr>
277 <tr> 281 <tr>
278 <td colspan="2" rowspan="4">宗地四至</td> 282 <td colspan="2" rowspan="4">宗地四至</td>
279 <td colspan="2">北至<i class="requisite">*</i></td> 283 <td colspan="2">北至<i class="requisite">*</i></td>
280 <td colspan="8" class="psr"> 284 <td colspan="8" class="psr">
281 <input type="text" @blur="inputBlur($event)" ref="zdszb" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.zdszb" /> 285 <input type="text" @blur="inputBlur($event)" ref="zdszb" :disabled="formData.qszt!='0'"
286 class="formInput" v-model="formData.zdszb"/>
282 </td> 287 </td>
283 </tr> 288 </tr>
284 <tr> 289 <tr>
285 <td colspan="2">东至<i class="requisite">*</i></td> 290 <td colspan="2">东至<i class="requisite">*</i></td>
286 <td colspan="8" class="psr"> 291 <td colspan="8" class="psr">
287 <input type="text" @blur="inputBlur($event)" ref="zdszd" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.zdszd" /> 292 <input type="text" @blur="inputBlur($event)" ref="zdszd" :disabled="formData.qszt!='0'"
293 class="formInput" v-model="formData.zdszd"/>
288 </td> 294 </td>
289 </tr> 295 </tr>
290 <tr> 296 <tr>
291 <td colspan="2">南至<i class="requisite">*</i></td> 297 <td colspan="2">南至<i class="requisite">*</i></td>
292 <td colspan="8" class="psr"> 298 <td colspan="8" class="psr">
293 <input type="text" @blur="inputBlur($event)" ref="zdszn" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.zdszn" /> 299 <input type="text" @blur="inputBlur($event)" ref="zdszn" :disabled="formData.qszt!='0'"
300 class="formInput" v-model="formData.zdszn"/>
294 </td> 301 </td>
295 </tr> 302 </tr>
296 <tr> 303 <tr>
297 <td colspan="2">西至<i class="requisite">*</i></td> 304 <td colspan="2">西至<i class="requisite">*</i></td>
298 <td colspan="8" class="psr"> 305 <td colspan="8" class="psr">
299 <input type="text" @blur="inputBlur($event)" ref="zdszx" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.zdszx" /> 306 <input type="text" @blur="inputBlur($event)" ref="zdszx" :disabled="formData.qszt!='0'"
307 class="formInput" v-model="formData.zdszx"/>
300 </td> 308 </td>
301 </tr> 309 </tr>
302 <tr> 310 <tr>
...@@ -307,33 +315,38 @@ ...@@ -307,33 +315,38 @@
307 <tr> 315 <tr>
308 <td colspan="2" rowspan="2">批准面积(㎡)</td> 316 <td colspan="2" rowspan="2">批准面积(㎡)</td>
309 <td colspan="2" rowspan="2"> 317 <td colspan="2" rowspan="2">
310 <input type="text" :disabled="formData.qszt!='0'" onkeyup="value=value.replace(/[^\d\.]/g,'')" class="formInput" v-model="formData.pzmj" /> 318 <input type="text" :disabled="formData.qszt!='0'" onkeyup="value=value.replace(/[^\d\.]/g,'')"
319 class="formInput" v-model="formData.pzmj"/>
311 </td> 320 </td>
312 <td colspan="2" rowspan="2">宗地面积(㎡)<i class="requisite">*</i></td> 321 <td colspan="2" rowspan="2">宗地面积(㎡)<i class="requisite">*</i></td>
313 <td colspan="2" rowspan="2"> 322 <td colspan="2" rowspan="2">
314 <input type="text" :disabled="formData.qszt!='0'" @blur="inputBlur($event)" ref="zdmj" onkeyup="value=value.replace(/[^\d\.]/g,'')" class="formInput" v-model="formData.zdmj" /> 323 <input type="text" :disabled="formData.qszt!='0'" @blur="inputBlur($event)" ref="zdmj"
324 onkeyup="value=value.replace(/[^\d\.]/g,'')" class="formInput" v-model="formData.zdmj"/>
315 </td> 325 </td>
316 <td colspan="2">建筑占地总面积</td> 326 <td colspan="2">建筑占地总面积</td>
317 <td colspan="2"> 327 <td colspan="2">
318 <input type="text" :disabled="formData.qszt!='0'" onkeyup="value=value.replace(/[^\d\.]/g,'')" class="formInput" v-model="formData.jzzdzmj" /> 328 <input type="text" :disabled="formData.qszt!='0'" onkeyup="value=value.replace(/[^\d\.]/g,'')"
329 class="formInput" v-model="formData.jzzdzmj"/>
319 </td> 330 </td>
320 </tr> 331 </tr>
321 <tr> 332 <tr>
322 <td colspan="2">建筑面积(㎡)</td> 333 <td colspan="2">建筑面积(㎡)</td>
323 <td colspan="2"> 334 <td colspan="2">
324 <input type="text" :disabled="formData.qszt!='0'" onkeyup="value=value.replace(/[^\d\.]/g,'')" class="formInput" v-model="formData.jzzmj" /> 335 <input type="text" :disabled="formData.qszt!='0'" onkeyup="value=value.replace(/[^\d\.]/g,'')"
336 class="formInput" v-model="formData.jzzmj"/>
325 </td> 337 </td>
326 </tr> 338 </tr>
327 <tr> 339 <tr>
328 <td colspan="2">共有/共用权利人情况</td> 340 <td colspan="2">共有/共用权利人情况</td>
329 <td colspan="10"> 341 <td colspan="10">
330 <input type="text" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.gygyqlrqk" /> 342 <input type="text" :disabled="formData.qszt!='0'" class="formInput"
343 v-model="formData.gygyqlrqk"/>
331 </td> 344 </td>
332 </tr> 345 </tr>
333 <tr> 346 <tr>
334 <td colspan="2" rowspan="2">说明</td> 347 <td colspan="2" rowspan="2">说明</td>
335 <td colspan="10" rowspan="2"> 348 <td colspan="10" rowspan="2">
336 <input type="text" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.sm" /> 349 <input type="text" :disabled="formData.qszt!='0'" class="formInput" v-model="formData.sm"/>
337 </td> 350 </td>
338 </tr> 351 </tr>
339 </table> 352 </table>
...@@ -356,10 +369,10 @@ ...@@ -356,10 +369,10 @@
356 </template> 369 </template>
357 370
358 <script> 371 <script>
359 import Qlr from "../../../components/formMenu/qlr"; 372 import Qlr from "../../../components/formMenu/qlr";
360 import Qlxz from "../../../components/formMenu/qlxz"; 373 import Qlxz from "../../../components/formMenu/qlxz";
361 import geoUtils from "@components/lineTree/tx/js/geoUtils"; 374 import geoUtils from "@components/lineTree/tx/js/geoUtils";
362 import { 375 import {
363 getAllList, 376 getAllList,
364 getDdicByMC, 377 getDdicByMC,
365 getListByXzqbsm, 378 getListByXzqbsm,
...@@ -367,15 +380,15 @@ import { ...@@ -367,15 +380,15 @@ import {
367 submit, 380 submit,
368 getTree, 381 getTree,
369 registerCall 382 registerCall
370 } from "../../../api/common"; 383 } from "../../../api/common";
371 import { 384 import {
372 getBdcdyh, 385 getBdcdyh,
373 getQjZdjbxxDetailById, 386 getQjZdjbxxDetailById,
374 updateQjZdjbxx, 387 updateQjZdjbxx,
375 } from "../../../api/zd"; 388 } from "../../../api/zd";
376 389
377 export default { 390 export default {
378 inject:['getRightTree'], 391 inject: ['getRightTree'],
379 name: "", 392 name: "",
380 components: { 393 components: {
381 Qlr, 394 Qlr,
...@@ -385,69 +398,69 @@ export default { ...@@ -385,69 +398,69 @@ export default {
385 data() { 398 data() {
386 return { 399 return {
387 rules: [], 400 rules: [],
388 rjl:'', 401 rjl: '',
389 jzmd:'', 402 jzmd: '',
390 jzxg:'', 403 jzxg: '',
391 compareList: [ 404 compareList: [
392 { label: "<", value: "<" }, 405 {label: "<", value: "<"},
393 { label: ">", value: ">" }, 406 {label: ">", value: ">"},
394 { label: "=", value: "=" }, 407 {label: "=", value: "="},
395 { label: "<=", value: "<=" }, 408 {label: "<=", value: "<="},
396 { label: ">=", value: ">=" }, 409 {label: ">=", value: ">="},
397 { label: "-", value: "-" }, 410 {label: "-", value: "-"},
398 ], 411 ],
399 formData: {}, 412 formData: {},
400 dpdm:'', //宗地底盘代码 413 dpdm: '', //宗地底盘代码
401 curZdbsm:'', 414 curZdbsm: '',
402 mainBoxWidth:0, 415 mainBoxWidth: 0,
403 geoAttributes:{ 416 geoAttributes: {
404 OBJECTID:"", 417 OBJECTID: "",
405 BSM:"", 418 BSM: "",
406 YSDM:"", 419 YSDM: "",
407 ZDDM:"", 420 ZDDM: "",
408 BDCDYH:"", 421 BDCDYH: "",
409 ZDTZM :"", 422 ZDTZM: "",
410 ZL:"", 423 ZL: "",
411 ZDMJ:0, 424 ZDMJ: 0,
412 MJDW:"", 425 MJDW: "",
413 YT:"", 426 YT: "",
414 DJ:"", 427 DJ: "",
415 JG:0, 428 JG: 0,
416 QLLX:"", 429 QLLX: "",
417 QLXZ:"", 430 QLXZ: "",
418 QLSDFS:"", 431 QLSDFS: "",
419 RJL:0, 432 RJL: 0,
420 JZMD:0, 433 JZMD: 0,
421 JZXG:0, 434 JZXG: 0,
422 ZDSZD:"", 435 ZDSZD: "",
423 ZDSZN :"", 436 ZDSZN: "",
424 ZDSZX :"", 437 ZDSZX: "",
425 ZDSZB :"", 438 ZDSZB: "",
426 TFH:"", 439 TFH: "",
427 DJH:"", 440 DJH: "",
428 DAH:"", 441 DAH: "",
429 BZ :"", 442 BZ: "",
430 ZT:"", 443 ZT: "",
431 YWZT:"", 444 YWZT: "",
432 BLID:"", 445 BLID: "",
433 XMMC:"", 446 XMMC: "",
434 XMID:"", 447 XMID: "",
435 BGRQ:"", 448 BGRQ: "",
436 BGID:"", 449 BGID: "",
437 BGZT:"", 450 BGZT: "",
438 TDZH:"", 451 TDZH: "",
439 QSZT:0, 452 QSZT: 0,
440 BBLX:0, 453 BBLX: 0,
441 SFDB:0, 454 SFDB: 0,
442 QLR :"", 455 QLR: "",
443 CUTID:"", 456 CUTID: "",
444 BHQKID:"", 457 BHQKID: "",
445 DJZQDM :"", 458 DJZQDM: "",
446 SYQLXID:"", 459 SYQLXID: "",
447 } 460 }
448 }; 461 };
449 }, 462 },
450 mixins:[geoUtils], 463 mixins: [geoUtils],
451 created() { 464 created() {
452 this.curZdbsm = this.$route.query.bsm; 465 this.curZdbsm = this.$route.query.bsm;
453 }, 466 },
...@@ -458,12 +471,12 @@ export default { ...@@ -458,12 +471,12 @@ export default {
458 }) 471 })
459 }, 472 },
460 methods: { 473 methods: {
461 registerCall(){ 474 registerCall() {
462 let data={ 475 let data = {
463 type:'zd', 476 type: 'zd',
464 bsm:this.$store.state.zdbsm 477 bsm: this.$store.state.zdbsm
465 } 478 }
466 registerCall(data).then(res=>{ 479 registerCall(data).then(res => {
467 if (res.success) { 480 if (res.success) {
468 this.$message.success("登记成功") 481 this.$message.success("登记成功")
469 this.getRightTree(this.$store.state.zdbsm) 482 this.getRightTree(this.$store.state.zdbsm)
...@@ -476,8 +489,8 @@ export default { ...@@ -476,8 +489,8 @@ export default {
476 .then((res) => { 489 .then((res) => {
477 if (res.result) { 490 if (res.result) {
478 this.formData = res.result; 491 this.formData = res.result;
479 console.log(res.result,'res.result'); 492 console.log(res.result, 'res.result');
480 this.getXzqData(res.result.xzqbsm,res.result.djqbsm); 493 this.getXzqData(res.result.xzqbsm, res.result.djqbsm);
481 //如果没有宗地代码,自动生成 494 //如果没有宗地代码,自动生成
482 // if(res.result.zddm == null){ 495 // if(res.result.zddm == null){
483 // this.generatorCode() 496 // this.generatorCode()
...@@ -489,8 +502,8 @@ export default { ...@@ -489,8 +502,8 @@ export default {
489 this.formData.jyjzmd = this.isInterval(this.formData.jyjzmd) ? '-' : this.formData.jyjzmd; 502 this.formData.jyjzmd = this.isInterval(this.formData.jyjzmd) ? '-' : this.formData.jyjzmd;
490 this.jzxg = this.isInterval(this.formData.jyjzxg) ? this.formData.jyjzxg : ''; 503 this.jzxg = this.isInterval(this.formData.jyjzxg) ? this.formData.jyjzxg : '';
491 this.formData.jyjzxg = this.isInterval(this.formData.jyjzxg) ? '-' : this.formData.jyjzxg; 504 this.formData.jyjzxg = this.isInterval(this.formData.jyjzxg) ? '-' : this.formData.jyjzxg;
492 if(res.result.list.length>0){ 505 if (res.result.list.length > 0) {
493 if(res.result.list[0].list.length<1){ 506 if (res.result.list[0].list.length < 1) {
494 res.result.list[0].list.push({ 507 res.result.list[0].list.push({
495 "pzdjbsm": "", 508 "pzdjbsm": "",
496 "pzdjmc": "", 509 "pzdjmc": "",
...@@ -509,12 +522,12 @@ export default { ...@@ -509,12 +522,12 @@ export default {
509 "tdzh": "" 522 "tdzh": ""
510 }) 523 })
511 } 524 }
512 this.$nextTick(()=>{ 525 this.$nextTick(() => {
513 //权利性质数据传给子组件 526 //权利性质数据传给子组件
514 this.$refs.qlxzModule.countList = res.result.list; 527 this.$refs.qlxzModule.countList = res.result.list;
515 }) 528 })
516 }else{ 529 } else {
517 this.$nextTick(()=>{ 530 this.$nextTick(() => {
518 //权利性质数据传给子组件 531 //权利性质数据传给子组件
519 this.$refs.qlxzModule.countList = [ 532 this.$refs.qlxzModule.countList = [
520 { 533 {
...@@ -550,30 +563,31 @@ export default { ...@@ -550,30 +563,31 @@ export default {
550 } 563 }
551 } 564 }
552 }) 565 })
553 .catch((error) => {}); 566 .catch((error) => {
567 });
554 }, 568 },
555 569
556 //构造底盘代码,前6位是xzqbsm,接着3位djqbsm,3位djzqbsm,最后2位是syqlxbsm 860101555888GB 570 //构造底盘代码,前6位是xzqbsm,接着3位djqbsm,3位djzqbsm,最后2位是syqlxbsm 860101555888GB
557 generatorDpdm() { 571 generatorDpdm() {
558 this.$store.state.xzqList.forEach((item)=>{ 572 this.$store.state.xzqList.forEach((item) => {
559 if(item.bsm === this.formData.xzqbsm){ 573 if (item.bsm === this.formData.xzqbsm) {
560 this.dpdm = item.dm; 574 this.dpdm = item.dm;
561 } 575 }
562 }); 576 });
563 this.$store.state.djqList.forEach((item)=>{ 577 this.$store.state.djqList.forEach((item) => {
564 if(item.bsm === this.formData.djqbsm){ 578 if (item.bsm === this.formData.djqbsm) {
565 this.dpdm = this.dpdm + item.dm; 579 this.dpdm = this.dpdm + item.dm;
566 } 580 }
567 }); 581 });
568 this.$store.state.djzqList.forEach((item)=>{ 582 this.$store.state.djzqList.forEach((item) => {
569 if(item.bsm === this.formData.djzqbsm){ 583 if (item.bsm === this.formData.djzqbsm) {
570 this.dpdm = this.dpdm + item.dm; 584 this.dpdm = this.dpdm + item.dm;
571 } 585 }
572 }); 586 });
573 587
574 this.dpdm = this.dpdm + this.formData.syqlxbsm; 588 this.dpdm = this.dpdm + this.formData.syqlxbsm;
575 this.$store.state.zdtzmList.forEach((item)=>{ 589 this.$store.state.zdtzmList.forEach((item) => {
576 if(item.bsm === this.formData.zdtzmbsm){ 590 if (item.bsm === this.formData.zdtzmbsm) {
577 this.dpdm = this.dpdm + item.dm; 591 this.dpdm = this.dpdm + item.dm;
578 } 592 }
579 }); 593 });
...@@ -593,7 +607,8 @@ export default { ...@@ -593,7 +607,8 @@ export default {
593 this.formData.zddm = res.result.substring(0, 19); 607 this.formData.zddm = res.result.substring(0, 19);
594 this.formData.bdcdyh = res.result; 608 this.formData.bdcdyh = res.result;
595 }) 609 })
596 .catch((error) => {}); 610 .catch((error) => {
611 });
597 this.$message({ 612 this.$message({
598 type: 'success', 613 type: 'success',
599 message: '生成成功!' 614 message: '生成成功!'
...@@ -609,7 +624,7 @@ export default { ...@@ -609,7 +624,7 @@ export default {
609 //生成宗地代码 624 //生成宗地代码
610 generatorCode() { 625 generatorCode() {
611 626
612 if((this.formData.zddm!=null&&this.formData.zddm!=='')||(this.formData.bdcdyh!=null&&this.formData.bdcdyh!=='')){ 627 if ((this.formData.zddm != null && this.formData.zddm !== '') || (this.formData.bdcdyh != null && this.formData.bdcdyh !== '')) {
613 this.open(); 628 this.open();
614 return; 629 return;
615 } 630 }
...@@ -621,82 +636,83 @@ export default { ...@@ -621,82 +636,83 @@ export default {
621 this.formData.zddm = res.result.substring(0, 19); 636 this.formData.zddm = res.result.substring(0, 19);
622 this.formData.bdcdyh = res.result; 637 this.formData.bdcdyh = res.result;
623 }) 638 })
624 .catch((error) => {}); 639 .catch((error) => {
640 });
625 }, 641 },
626 //修改宗地基本信息 642 //修改宗地基本信息
627 updateZDxx(formData) { 643 updateZDxx(formData) {
628 //获取权利性质数据 644 //获取权利性质数据
629 this.formData.list = this.$refs.qlxzModule.getQlxzDataList(); 645 this.formData.list = this.$refs.qlxzModule.getQlxzDataList();
630 console.log(this.$refs.qlxzModule.getRulesResult(),'this.$refs.qlxzModule.getRules()'); 646 console.log(this.$refs.qlxzModule.getRulesResult(), 'this.$refs.qlxzModule.getRules()');
631 //判断容密高是否为区间值,如果是区间值,则将输入框的值赋予 647 //判断容密高是否为区间值,如果是区间值,则将输入框的值赋予
632 this.formData.jyrjl = this.isInterval(this.formData.jyrjl) ? this.rjl : this.formData.jyrjl; 648 this.formData.jyrjl = this.isInterval(this.formData.jyrjl) ? this.rjl : this.formData.jyrjl;
633 this.formData.jyjzmd = this.isInterval(this.formData.jyjzmd) ? this.jzmd : this.formData.jyjzmd; 649 this.formData.jyjzmd = this.isInterval(this.formData.jyjzmd) ? this.jzmd : this.formData.jyjzmd;
634 this.formData.jyjzxg = this.isInterval(this.formData.jyjzxg) ? this.jzxg : this.formData.jyjzxg; 650 this.formData.jyjzxg = this.isInterval(this.formData.jyjzxg) ? this.jzxg : this.formData.jyjzxg;
635 this.rules= [ 651 this.rules = [
636 { 652 {
637 data:this.formData.zdtzmbsm, 653 data: this.formData.zdtzmbsm,
638 name:'宗地特征码', 654 name: '宗地特征码',
639 dom:this.$refs.zdtzm, 655 dom: this.$refs.zdtzm,
640 rule: /^\s*$/g, //非空 656 rule: /^\s*$/g, //非空
641 }, 657 },
642 { 658 {
643 data:this.formData.zddm, 659 data: this.formData.zddm,
644 name:'宗地代码', 660 name: '宗地代码',
645 dom:this.$refs.zddm, 661 dom: this.$refs.zddm,
646 rule: /^\s*$/g, //非空 662 rule: /^\s*$/g, //非空
647 }, 663 },
648 { 664 {
649 data:this.formData.bdcdyh, 665 data: this.formData.bdcdyh,
650 name:'不动产单元号', 666 name: '不动产单元号',
651 dom:this.$refs.bdcdyh, 667 dom: this.$refs.bdcdyh,
652 rule: /^\s*$/g, //非空 668 rule: /^\s*$/g, //非空
653 }, 669 },
654 { 670 {
655 data:this.formData.zl, 671 data: this.formData.zl,
656 name:'坐落', 672 name: '坐落',
657 dom:this.$refs.zl, 673 dom: this.$refs.zl,
658 rule: /^\s*$/g, //非空 674 rule: /^\s*$/g, //非空
659 }, 675 },
660 { 676 {
661 data:this.formData.zdszd, 677 data: this.formData.zdszd,
662 name:'宗地东至', 678 name: '宗地东至',
663 dom:this.$refs.zdszd, 679 dom: this.$refs.zdszd,
664 rule: /^\s*$/g, //非空 680 rule: /^\s*$/g, //非空
665 }, 681 },
666 { 682 {
667 data:this.formData.zdszb, 683 data: this.formData.zdszb,
668 name:'宗地北至', 684 name: '宗地北至',
669 dom:this.$refs.zdszb, 685 dom: this.$refs.zdszb,
670 rule: /^\s*$/g, //非空 686 rule: /^\s*$/g, //非空
671 }, 687 },
672 { 688 {
673 data:this.formData.zdszx, 689 data: this.formData.zdszx,
674 name:'宗地西至', 690 name: '宗地西至',
675 dom:this.$refs.zdszx, 691 dom: this.$refs.zdszx,
676 rule: /^\s*$/g, //非空 692 rule: /^\s*$/g, //非空
677 }, 693 },
678 { 694 {
679 data:this.formData.zdszn, 695 data: this.formData.zdszn,
680 name:'宗地南至', 696 name: '宗地南至',
681 dom:this.$refs.zdszn, 697 dom: this.$refs.zdszn,
682 rule: /^\s*$/g, //非空 698 rule: /^\s*$/g, //非空
683 }, 699 },
684 { 700 {
685 data:this.formData.zdmj, 701 data: this.formData.zdmj,
686 name:'宗地面积', 702 name: '宗地面积',
687 dom:this.$refs.zdmj, 703 dom: this.$refs.zdmj,
688 rule: /^\s*$/g, //非空 704 rule: /^\s*$/g, //非空
689 }, 705 },
690 ] 706 ]
691 // console.log(this.rules,'rules'); 707 // console.log(this.rules,'rules');
692 this.$refs.qlxzModule.getRules(); 708 this.$refs.qlxzModule.getRules();
693 let flag = true; 709 let flag = true;
694 this.rules.forEach(item=>{ 710 this.rules.forEach(item => {
695 if(item.rule.test(item.data) || item.data == null){ 711 if (item.rule.test(item.data) || item.data == null) {
696 if(item.dom.$el){ 712 if (item.dom.$el) {
697 item.dom.$el.style.border = '1px solid red'; 713 item.dom.$el.style.border = '1px solid red';
698 item.dom.$el.style.boxSizing = 'border-box'; 714 item.dom.$el.style.boxSizing = 'border-box';
699 }else{ 715 } else {
700 item.dom.style.border = '1px solid red'; 716 item.dom.style.border = '1px solid red';
701 item.dom.style.boxSizing = 'border-box'; 717 item.dom.style.boxSizing = 'border-box';
702 } 718 }
...@@ -709,18 +725,18 @@ export default { ...@@ -709,18 +725,18 @@ export default {
709 return false 725 return false
710 } 726 }
711 }) 727 })
712 this.$nextTick(()=>{ 728 this.$nextTick(() => {
713 if(flag && this.$refs.qlxzModule.getRulesResult()){ 729 if (flag && this.$refs.qlxzModule.getRulesResult()) {
714 //宗地面积处理 730 //宗地面积处理
715 // console.log(this.formData.zdmj,'this.formData.zdmj'); 731 // console.log(this.formData.zdmj,'this.formData.zdmj');
716 // this.formData.zdmj = this.formData.zdmj.replace(/[^\d\.]/g,'') 732 // this.formData.zdmj = this.formData.zdmj.replace(/[^\d\.]/g,'')
717 //判断宗地代码和不动产单元号是否手动修改过(宗地代码和不动产单元号的前14位是否和底盘代码一致) 733 //判断宗地代码和不动产单元号是否手动修改过(宗地代码和不动产单元号的前14位是否和底盘代码一致)
718 if(this.formData.zddm.substring(0,14) != this.dpdm || this.formData.bdcdyh.substring(0,14) != this.dpdm){ 734 if (this.formData.zddm.substring(0, 14) != this.dpdm || this.formData.bdcdyh.substring(0, 14) != this.dpdm) {
719 this.$message({ 735 this.$message({
720 message: '宗地代码或不动产单元号有误,请核对后再试一次', 736 message: '宗地代码或不动产单元号有误,请核对后再试一次',
721 type: "warning", 737 type: "warning",
722 }); 738 });
723 }else{ 739 } else {
724 updateQjZdjbxx(this.formData) 740 updateQjZdjbxx(this.formData)
725 .then((res) => { 741 .then((res) => {
726 if (res.code == 200) { 742 if (res.code == 200) {
...@@ -738,28 +754,29 @@ export default { ...@@ -738,28 +754,29 @@ export default {
738 }); 754 });
739 } 755 }
740 }) 756 })
741 .catch((error) => {}); 757 .catch((error) => {
758 });
742 //保存到空间库里面 759 //保存到空间库里面
743 var self = this; 760 var self = this;
744 for(var key in this.geoAttributes){ 761 for (var key in this.geoAttributes) {
745 if(key == "BSM"){ 762 if (key == "BSM") {
746 self.geoAttributes[key] = this.$store.state.zdbsm 763 self.geoAttributes[key] = this.$store.state.zdbsm
747 }else if(key == 'QLSDFS'){ 764 } else if (key == 'QLSDFS') {
748 var qlsdfsList = self.$store.state.qlsdfsList,value = self.formData.qlsdfs; 765 var qlsdfsList = self.$store.state.qlsdfsList, value = self.formData.qlsdfs;
749 var qlsdfs = qlsdfsList.filter(item => { 766 var qlsdfs = qlsdfsList.filter(item => {
750 return item.bsm == value; 767 return item.bsm == value;
751 }) 768 })
752 self.geoAttributes[key] = qlsdfs[0] ? qlsdfs[0].mc:""; 769 self.geoAttributes[key] = qlsdfs[0] ? qlsdfs[0].mc : "";
753 }else { 770 } else {
754 var formKay = key.toLowerCase(); 771 var formKay = key.toLowerCase();
755 self.geoAttributes[key] = self.formData[formKay]; 772 self.geoAttributes[key] = self.formData[formKay];
756 } 773 }
757 } 774 }
758 self.updAttributes(this.$store.state.zdbsm,'zd',this.geoAttributes,function (res) { 775 self.updAttributes(this.$store.state.zdbsm, 'zd', this.geoAttributes, function (res) {
759 console.log("属性保存完成!!"); 776 console.log("属性保存完成!!");
760 }); 777 });
761 } 778 }
762 }else{ 779 } else {
763 this.$message({ 780 this.$message({
764 // message: item.name+'不能为空', 781 // message: item.name+'不能为空',
765 message: '请完善表单后再继续操作', 782 message: '请完善表单后再继续操作',
...@@ -769,23 +786,23 @@ export default { ...@@ -769,23 +786,23 @@ export default {
769 }) 786 })
770 787
771 }, 788 },
772 inputBlur(e){ 789 inputBlur(e) {
773 if(e.target.value!=''){ 790 if (e.target.value != '') {
774 e.target.style.border="" 791 e.target.style.border = ""
775 }else{ 792 } else {
776 e.target.style.border="1px solid red"; 793 e.target.style.border = "1px solid red";
777 e.target.style.boxSizing = 'border-box'; 794 e.target.style.boxSizing = 'border-box';
778 } 795 }
779 }, 796 },
780 //提交宗地基本信息 797 //提交宗地基本信息
781 submitZDxx(){ 798 submitZDxx() {
782 let data={ 799 let data = {
783 glbsm:this.$store.state.zdbsm, 800 glbsm: this.$store.state.zdbsm,
784 status:1, 801 status: 1,
785 type:"zd" 802 type: "zd"
786 } 803 }
787 submit(data).then((res)=>{ 804 submit(data).then((res) => {
788 if(res.code===200){ 805 if (res.code === 200) {
789 this.$message.success("提交成功!") 806 this.$message.success("提交成功!")
790 this.getZdjbxxData(this.curZdbsm); 807 this.getZdjbxxData(this.curZdbsm);
791 getTree(this.curZdbsm).then((res) => { 808 getTree(this.curZdbsm).then((res) => {
...@@ -813,7 +830,8 @@ export default { ...@@ -813,7 +830,8 @@ export default {
813 this.djqList = res.result; 830 this.djqList = res.result;
814 this.$store.state.djqList = res.result; 831 this.$store.state.djqList = res.result;
815 }) 832 })
816 .catch((error) => {}); 833 .catch((error) => {
834 });
817 }, 835 },
818 changeDjq(item) { 836 changeDjq(item) {
819 getListByPbsm(item) 837 getListByPbsm(item)
...@@ -822,23 +840,25 @@ export default { ...@@ -822,23 +840,25 @@ export default {
822 this.djzqList = res.result; 840 this.djzqList = res.result;
823 this.$store.state.djzqList = res.result; 841 this.$store.state.djzqList = res.result;
824 }) 842 })
825 .catch((error) => {}); 843 .catch((error) => {
844 });
826 }, 845 },
827 //判断容密高是否为区间 846 //判断容密高是否为区间
828 isInterval(val){ 847 isInterval(val) {
829 if(val == '>' || val == '<' || val == '=' || val == '>=' || val == '<='|| val == null){ 848 if (val == '>' || val == '<' || val == '=' || val == '>=' || val == '<=' || val == null) {
830 return false 849 return false
831 }else{ 850 } else {
832 return true; 851 return true;
833 } 852 }
834 }, 853 },
835 //根据宗地信息的行政区代码查询行政区地籍区地籍子区的字典数据 854 //根据宗地信息的行政区代码查询行政区地籍区地籍子区的字典数据
836 getXzqData(xzqdm,djqdm){ 855 getXzqData(xzqdm, djqdm) {
837 getAllList() 856 getAllList()
838 .then((res) => { 857 .then((res) => {
839 this.$store.state.xzqList = res.result; 858 this.$store.state.xzqList = res.result;
840 }) 859 })
841 .catch((error) => {}); 860 .catch((error) => {
861 });
842 862
843 getListByPbsm(djqdm) 863 getListByPbsm(djqdm)
844 .then((res) => { 864 .then((res) => {
...@@ -849,9 +869,11 @@ export default { ...@@ -849,9 +869,11 @@ export default {
849 //生成底盘代码 869 //生成底盘代码
850 this.generatorDpdm(); 870 this.generatorDpdm();
851 }) 871 })
852 .catch((error) => {}); 872 .catch((error) => {
873 });
853 }) 874 })
854 .catch((error) => {}); 875 .catch((error) => {
876 });
855 } 877 }
856 }, 878 },
857 computed: { 879 computed: {
...@@ -869,41 +891,46 @@ export default { ...@@ -869,41 +891,46 @@ export default {
869 }, 891 },
870 }, 892 },
871 watch: { 893 watch: {
872 zl: function(val) { 894 zl: function (val) {
873 this.$store.state.zdzl = val; 895 this.$store.state.zdzl = val;
874 }, 896 },
875 mj: function(val) { 897 mj: function (val) {
876 this.$store.state.zdmj = val; 898 this.$store.state.zdmj = val;
877 }, 899 },
878 zddm: function(val) { 900 zddm: function (val) {
879 this.$store.state.zddm = val; 901 this.$store.state.zddm = val;
880 }, 902 },
881 zdbsm:function (val) { 903 zdbsm: function (val) {
882 this.getZdjbxxData(val) 904 this.getZdjbxxData(val)
883 this.curZdbsm = val; 905 this.curZdbsm = val;
884 }, 906 },
885 "formData.bdcdyh":function (val) { 907 "formData.bdcdyh": function (val) {
886 if (val != '') { 908 if (val != '') {
887 this.$refs.bdcdyh.style.border = ''; 909 this.$refs.bdcdyh.style.border = '';
888 } 910 }
889 }, 911 },
890 "formData.zddm":function (val) { 912 "formData.zddm": function (val) {
891 if (val != '') { 913 if (val != '') {
892 this.$refs.zddm.style.border = ''; 914 this.$refs.zddm.style.border = '';
893 } 915 }
894 } 916 }
895 }, 917 },
896 "$store.state.sxdrType": function (val) { 918 "$store.state.sxdrType": {
897 debugger 919 handler(n) {
898 this.$message.success(val); 920 this.$message.success(n)
899 if (val==='zd'){ 921 this.$nextTick(()=>{
922 if (n === 'zd') {
900 this.getZdjbxxData(this.$store.state.zdbsm) 923 this.getZdjbxxData(this.$store.state.zdbsm)
901 } 924 }
925 })
902 }, 926 },
903 }; 927 immediate: true,
928 deep: true,
929 }
930 };
904 </script> 931 </script>
905 <style lang="less" scoped> 932 <style lang="less" scoped>
906 .main { 933 .main {
907 box-sizing: border-box; 934 box-sizing: border-box;
908 padding: 18px; 935 padding: 18px;
909 height: auto; 936 height: auto;
...@@ -972,7 +999,7 @@ export default { ...@@ -972,7 +999,7 @@ export default {
972 right: 6px; 999 right: 6px;
973 text-align: center; 1000 text-align: center;
974 background-color: #ffffff; 1001 background-color: #ffffff;
975 .el-button{ 1002 .el-button {
976 padding: 10px 30px; 1003 padding: 10px 30px;
977 margin-top: 8px; 1004 margin-top: 8px;
978 } 1005 }
...@@ -985,5 +1012,5 @@ export default { ...@@ -985,5 +1012,5 @@ export default {
985 border-color: rgba(0, 202, 205, .8); 1012 border-color: rgba(0, 202, 205, .8);
986 } 1013 }
987 } 1014 }
988 } 1015 }
989 </style> 1016 </style>
......