宗地合并时判断行政区划是否一致
Showing
2 changed files
with
16 additions
and
23 deletions
... | @@ -170,16 +170,13 @@ | ... | @@ -170,16 +170,13 @@ |
170 | this.getData(this.queryData) | 170 | this.getData(this.queryData) |
171 | }, | 171 | }, |
172 | addData: function (val) { | 172 | addData: function (val) { |
173 | let flag; | 173 | this.$emit("getData",val) |
174 | this.$emit("getData", | 174 | // if (this.isZdClose) { |
175 | val | 175 | // this.close(); |
176 | , i => { | 176 | // } |
177 | flag = i | 177 | }, |
178 | }) | 178 | isClose(flag){ |
179 | console.log(flag,"返回值") | 179 | |
180 | if (flag&&this.isZdClose) { | ||
181 | this.close(); | ||
182 | } | ||
183 | }, | 180 | }, |
184 | close: function () { | 181 | close: function () { |
185 | this.$emit('close') | 182 | this.$emit('close') | ... | ... |
... | @@ -453,6 +453,7 @@ | ... | @@ -453,6 +453,7 @@ |
453 | }, | 453 | }, |
454 | addZdData(data) { | 454 | addZdData(data) { |
455 | this.zdhbqData.push(data); | 455 | this.zdhbqData.push(data); |
456 | this.centerDialogVisible = false; | ||
456 | ZdfggetZxx(data.zdbsm).then(res => { | 457 | ZdfggetZxx(data.zdbsm).then(res => { |
457 | if (res.success) { | 458 | if (res.success) { |
458 | res.result.zrzList.forEach(item => { | 459 | res.result.zrzList.forEach(item => { |
... | @@ -474,35 +475,30 @@ | ... | @@ -474,35 +475,30 @@ |
474 | } | 475 | } |
475 | }) | 476 | }) |
476 | }, | 477 | }, |
477 | async getData(data, callback) { | 478 | getData(data) { |
478 | console.log(data, '选择宗地数据') | 479 | console.log(data, '选择宗地数据') |
479 | let flat = true; | ||
480 | switch (this.tabName) { | 480 | switch (this.tabName) { |
481 | case "zd": | 481 | case "zd": |
482 | let arr = []; | 482 | let arr = this.zdhbqData.filter(i => i.zdbsm === data.zdbsm); |
483 | arr = this.zdhbqData.filter(i => i.zdbsm === data.zdbsm); | ||
484 | if (arr.length > 0) { | 483 | if (arr.length > 0) { |
485 | this.$message.info("当前宗地已选择,请重新选择") | 484 | this.$message.info("当前宗地已选择,请重新选择") |
486 | callback(false) | ||
487 | break | 485 | break |
488 | } | 486 | } |
489 | arr = this.zdhbqData.filter(i => i.xzqbsm !== data.xzqbsm || i.djqbsm !== data.djqbsm || i.djzqbsm !== data.djzqbsm); | 487 | let arr1 = this.zdhbqData.filter(i => i.xzqbsm !== data.xzqbsm || i.djqbsm !== data.djqbsm || i.djzqbsm !== data.djzqbsm); |
490 | if (arr.length > 0) { | 488 | if (arr1.length > 0) { |
491 | this.$confirm('当前宗地不在同一地籍子区下,请确认?') | 489 | this.$confirm('当前宗地不在同一地籍子区下,是否继续选择?') |
492 | .then(_ => { | 490 | .then(_ => { |
493 | this.addZdData(data) | 491 | this.addZdData(data); |
494 | }) | 492 | }) |
495 | .catch(_ => { | 493 | .catch(_ => { |
496 | flat = false; | ||
497 | }); | 494 | }); |
498 | callback(flat) | ||
499 | } else { | 495 | } else { |
500 | this.addZdData(data) | 496 | this.addZdData(data) |
501 | } | 497 | } |
502 | break | 498 | break |
503 | case "dz": | 499 | case "dz": |
504 | arr = this.dzhbqData.filter(i => i.glbsm === data.glbsm); | 500 | let arr3 = this.dzhbqData.filter(i => i.glbsm === data.glbsm); |
505 | if (arr.length > 0) { | 501 | if (arr3.length > 0) { |
506 | break | 502 | break |
507 | } | 503 | } |
508 | if (this.dzhbqData.includes(data)) { | 504 | if (this.dzhbqData.includes(data)) { | ... | ... |
-
Please register or sign in to post a comment