ddbf5e7d by 杨威

宗地合并时判断行政区划是否一致

1 parent 08f33c4e
......@@ -170,16 +170,13 @@
this.getData(this.queryData)
},
addData: function (val) {
let flag;
this.$emit("getData",
val
, i => {
flag = i
})
console.log(flag,"返回值")
if (flag&&this.isZdClose) {
this.close();
}
this.$emit("getData",val)
// if (this.isZdClose) {
// this.close();
// }
},
isClose(flag){
},
close: function () {
this.$emit('close')
......
......@@ -453,6 +453,7 @@
},
addZdData(data) {
this.zdhbqData.push(data);
this.centerDialogVisible = false;
ZdfggetZxx(data.zdbsm).then(res => {
if (res.success) {
res.result.zrzList.forEach(item => {
......@@ -474,35 +475,30 @@
}
})
},
async getData(data, callback) {
getData(data) {
console.log(data, '选择宗地数据')
let flat = true;
switch (this.tabName) {
case "zd":
let arr = [];
arr = this.zdhbqData.filter(i => i.zdbsm === data.zdbsm);
let arr = this.zdhbqData.filter(i => i.zdbsm === data.zdbsm);
if (arr.length > 0) {
this.$message.info("当前宗地已选择,请重新选择")
callback(false)
break
}
arr = this.zdhbqData.filter(i => i.xzqbsm !== data.xzqbsm || i.djqbsm !== data.djqbsm || i.djzqbsm !== data.djzqbsm);
if (arr.length > 0) {
this.$confirm('当前宗地不在同一地籍子区下,请确认?')
let arr1 = this.zdhbqData.filter(i => i.xzqbsm !== data.xzqbsm || i.djqbsm !== data.djqbsm || i.djzqbsm !== data.djzqbsm);
if (arr1.length > 0) {
this.$confirm('当前宗地不在同一地籍子区下,是否继续选择?')
.then(_ => {
this.addZdData(data)
this.addZdData(data);
})
.catch(_ => {
flat = false;
});
callback(flat)
} else {
this.addZdData(data)
}
break
case "dz":
arr = this.dzhbqData.filter(i => i.glbsm === data.glbsm);
if (arr.length > 0) {
let arr3 = this.dzhbqData.filter(i => i.glbsm === data.glbsm);
if (arr3.length > 0) {
break
}
if (this.dzhbqData.includes(data)) {
......