25066110 by weimo934

fix(hb):合并选择数据去重

1 parent 5028f767
...@@ -229,7 +229,7 @@ ...@@ -229,7 +229,7 @@
229 </tr> 229 </tr>
230 </table> 230 </table>
231 </div> 231 </div>
232 <query-data @getData="getData" :centerDialogVisible.sync="centerDialogVisible" :dylxs="['dz']" 232 <query-data @getData="getData" :centerDialogVisible.sync="centerDialogVisible" :dylxs="['dz']" :isZdClose="true"
233 @close="close"></query-data> 233 @close="close"></query-data>
234 <div class="header-button" :style="{width:fgBoxWidth+'px'}"> 234 <div class="header-button" :style="{width:fgBoxWidth+'px'}">
235 <el-button type="primary" class="saveBtn">保存</el-button> 235 <el-button type="primary" class="saveBtn">保存</el-button>
...@@ -345,7 +345,7 @@ ...@@ -345,7 +345,7 @@
345 </tr> 345 </tr>
346 </table> 346 </table>
347 </div> 347 </div>
348 <query-data @getData="getData" :centerDialogVisible.sync="centerDialogVisible" :dylxs="['h']" 348 <query-data @getData="getData" :centerDialogVisible.sync="centerDialogVisible" :dylxs="['h']" :isZdClose="true"
349 @close="close"></query-data> 349 @close="close"></query-data>
350 <div class="header-button" :style="{width:fgBoxWidth+'px'}"> 350 <div class="header-button" :style="{width:fgBoxWidth+'px'}">
351 <el-button type="primary" class="saveBtn">保存</el-button> 351 <el-button type="primary" class="saveBtn">保存</el-button>
...@@ -439,8 +439,6 @@ ...@@ -439,8 +439,6 @@
439 newzdzdtzmbsm: this.zdhbqData.zdtzmbsm, 439 newzdzdtzmbsm: this.zdhbqData.zdtzmbsm,
440 oldzdbsms: oldBsm 440 oldzdbsms: oldBsm
441 } 441 }
442 console.log(this.zdhbhData,"宗地合并后数据");
443 console.log(this.zdhbqData,"宗地合并前数据")
444 ZdHb(data).then(res=>{ 442 ZdHb(data).then(res=>{
445 if (res.success) { 443 if (res.success) {
446 this.$message.success("合并成功") 444 this.$message.success("合并成功")
...@@ -559,15 +557,36 @@ ...@@ -559,15 +557,36 @@
559 this.centerDialogVisible = true; 557 this.centerDialogVisible = true;
560 }, 558 },
561 getData: function (data) { 559 getData: function (data) {
560 console.log(data,'data')
561 console.log(this.zdhbqData,'宗地合并前数据')
562 let arr=[];
562 switch (this.tabName) { 563 switch (this.tabName) {
563 case "zd": 564 case "zd":
564 this.zdhbqData.push(data) 565 arr=this.zdhbqData.filter(i=>i.zddm==data.zddm);
566 if (arr.length>0) {
567 break
568 }
569 this.zdhbqData.push(data);
565 break 570 break
566 case "dz": 571 case "dz":
567 this.dzhbqData.push(data) 572 arr=this.dzhbqData.filter(i=>i.glbsm==data.glbsm);
573 if (arr.length>0) {
574 break
575 }
576 if (this.dzhbqData.includes(data)) {
577 break
578 }
579 this.dzhbqData.push(data);
568 break 580 break
569 case "h": 581 case "h":
570 this.hhbqData.push(data) 582 arr=this.hhbqData.filter(i=>i.glbsm==data.glbsm);
583 if (arr.length>0) {
584 break
585 }
586 if (this.hhbqData.includes(data)) {
587 break
588 }
589 this.hhbqData.push(data);
571 break 590 break
572 default: 591 default:
573 break; 592 break;
......