25066110 by weimo934

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

1 parent 5028f767
......@@ -229,7 +229,7 @@
</tr>
</table>
</div>
<query-data @getData="getData" :centerDialogVisible.sync="centerDialogVisible" :dylxs="['dz']"
<query-data @getData="getData" :centerDialogVisible.sync="centerDialogVisible" :dylxs="['dz']" :isZdClose="true"
@close="close"></query-data>
<div class="header-button" :style="{width:fgBoxWidth+'px'}">
<el-button type="primary" class="saveBtn">保存</el-button>
......@@ -345,7 +345,7 @@
</tr>
</table>
</div>
<query-data @getData="getData" :centerDialogVisible.sync="centerDialogVisible" :dylxs="['h']"
<query-data @getData="getData" :centerDialogVisible.sync="centerDialogVisible" :dylxs="['h']" :isZdClose="true"
@close="close"></query-data>
<div class="header-button" :style="{width:fgBoxWidth+'px'}">
<el-button type="primary" class="saveBtn">保存</el-button>
......@@ -439,8 +439,6 @@
newzdzdtzmbsm: this.zdhbqData.zdtzmbsm,
oldzdbsms: oldBsm
}
console.log(this.zdhbhData,"宗地合并后数据");
console.log(this.zdhbqData,"宗地合并前数据")
ZdHb(data).then(res=>{
if (res.success) {
this.$message.success("合并成功")
......@@ -559,15 +557,36 @@
this.centerDialogVisible = true;
},
getData: function (data) {
console.log(data,'data')
console.log(this.zdhbqData,'宗地合并前数据')
let arr=[];
switch (this.tabName) {
case "zd":
this.zdhbqData.push(data)
arr=this.zdhbqData.filter(i=>i.zddm==data.zddm);
if (arr.length>0) {
break
}
this.zdhbqData.push(data);
break
case "dz":
this.dzhbqData.push(data)
arr=this.dzhbqData.filter(i=>i.glbsm==data.glbsm);
if (arr.length>0) {
break
}
if (this.dzhbqData.includes(data)) {
break
}
this.dzhbqData.push(data);
break
case "h":
this.hhbqData.push(data)
arr=this.hhbqData.filter(i=>i.glbsm==data.glbsm);
if (arr.length>0) {
break
}
if (this.hhbqData.includes(data)) {
break
}
this.hhbqData.push(data);
break
default:
break;
......