0d9fee7e by weimo934

feat(hb):宗地合并继承行政区

1 parent bf0bf3d2
......@@ -410,7 +410,6 @@
methods: {
getZdData(id) {
getQjZdjbxxDetailById(id).then(res => {
console.log(res.result, '宗地信息')
this.dzhbhData.xzqbsm = res.result.xzqbsm
this.changeXzq(this.dzhbhData.xzqbsm)
this.dzhbhData.djqbsm = res.result.djqbsm
......@@ -429,7 +428,6 @@
this.geZrztData(this.queryData)
},
deleteData(index) {
console.log(this.dzhbqData, '多幢合并前数据')
let data = this.dzhbqData[index];
// 多幢
if (data.zrzCount) {
......@@ -477,8 +475,12 @@
this.geDztData(this.queryData)
},
addData(data) {
if (this.dzhbqData.length === 0) {
this.zdbsm = data.zdbsm;
}
this.zrzIsVisible = false;
this.dzIsVisible = false;
this.dzhbqData.push(data);
this.zdbsm = data.zdbsm
},
addDzData(data) {
let arr = [];
......@@ -489,12 +491,19 @@
}
arr = this.dzhbqData.filter(i => i.zdbsm !== data.zdbsm);
if (arr.length > 0) {
this.$message.info("当前选择多幢不在同一宗地下,请重新选择")
return
this.$confirm('当前选择多幢不在同一宗地下,是否继续选择?')
.then(_ => {
this.dzList.push(data)
this.addData(data)
return
})
.catch(_ => {
return
});
} else {
this.dzList.push(data);
this.addData(data)
}
this.dzIsVisible = false;
this.dzList.push(data)
this.addData(data)
},
addZrzData(data) {
let arr = [];
......@@ -505,12 +514,19 @@
}
arr = this.dzhbqData.filter(i => i.zdbsm !== data.zdbsm);
if (arr.length > 0) {
this.$message.info("当前选择自然幢不在同一宗地下,请重新选择")
return
this.$confirm('当前选择多幢不在同一宗地下,是否继续选择?')
.then(_ => {
this.zrzList.push(data)
this.addData(data)
return
})
.catch(_ => {
return
});
}else {
this.zrzList.push(data)
this.addData(data)
}
this.zrzIsVisible = false;
this.zrzList.push(data)
this.addData(data)
},
getXzqList() {
getAllList()
......
......@@ -584,7 +584,6 @@
dzfgGetZrzxx(dzbsm){
dzfgGetZrzxx(dzbsm).then(res => {
if (res.success) {
console.log(res.result,'res.result');
res.result.forEach(item=>{
item.hasChoosed = ''
})
......
......@@ -181,7 +181,7 @@
getListByPbsm,
getDdicByMC
} from "@api/common";
import {ZdHb} from "@api/zd"
import {ZdHb,getQjZdjbxxDetailById} from "@api/zd"
import {saveDzHb, ZdfggetZxx} from "@api/dz"
import QueryData from '@components/queryData/queryData'
import zdQueryData from '@components/zdQueryData/zdQueryData'
......@@ -203,6 +203,7 @@
}
], // 多幢合并后数据
hhbhData: {}, // 户合并后数据
zdbsm:'', //宗地BSM
fgBoxWidth: 0,
xzq: [],
djq: [],
......@@ -240,13 +241,22 @@
this.hhbtabs = true
}
},
getZdData(id) {
getQjZdjbxxDetailById(id).then(res => {
this.zdhbhData.xzqbsm = res.result.xzqbsm
this.changeXzq(this.zdhbhData.xzqbsm)
this.zdhbhData.djqbsm = res.result.djqbsm
this.changeDjq(this.zdhbhData.djqbsm)
this.zdhbhData.djzqbsm = res.result.djzqbsm
this.zdhbhData.syqlxbsm = res.result.syqlxbsm
this.zdhbhData.zdtzmbsm = res.result.zdtzmbsm
})
},
save() {
switch (this.tabName) {
case "zd":
this.zdHb();
break
case "dz":
break
case "h":
break;
default:
......@@ -319,10 +329,15 @@
case "zd":
this.zdhbqData.splice(index, 1);
//删除幢信息中的数据
console.log(item);
console.log(this.zdZrzList, 'this.zdZrzList');
this.zdZrzList = this.zdZrzList.filter(i => i.zdbsm !== item.zdbsm);
this.zdDzList = this.zdDzList.filter(i => i.zdbsm !== item.zdbsm);
if (this.zdhbqData.length === 0) {
this.zdhbhData.xzqbsm = ""
this.zdhbhData.djqbsm = ""
this.zdhbhData.djzqbsm = ""
this.zdhbhData.syqlxbsm = ""
this.zdhbhData.zdtzmbsm = ""
}
break
case "dz":
this.dzhbqData.splice(index, 1)
......@@ -398,6 +413,9 @@
this.centerDialogVisible = true;
},
addZdData(data) {
if (this.zdhbqData.length === 0) {
this.zdbsm=data.zdbsm;
}
this.zdhbqData.push(data);
this.centerDialogVisible = false;
ZdfggetZxx(data.zdbsm).then(res => {
......@@ -488,7 +506,11 @@
}
},
computed: {},
watch: {},
watch: {
zdbsm: function (bsm) {
this.getZdData(bsm)
}
},
}
</script>
<style scoped lang="less">
......