优化楼栋户修改后返回不在修改楼上

main
许宏杰 6 months ago
parent 658588407a
commit 9c462ffe84

@ -47,18 +47,21 @@
}, },
onShow(){ onShow(){
this.getBuildData()
this.currentIndex = this.currentIndex ? this.currentIndex : 0
this.getBuildData(this.currentIndex)
}, },
methods: { methods: {
// //
async getBuildData(index) { async getBuildData(index) {
this.list = buildjson[this.deptname.replace("幢", "")]; this.list = buildjson[this.deptname.replace("幢", "")];
let res = await getNumNew({ let res = await getNumNew({
buildingId: this.buildingId, buildingId: this.buildingId,
}); });
this.buildData = res.data this.buildData = res.data
this.clickFoort(this.list[0], 0) this.clickFoort(this.list[index],index)
}, },
@ -88,7 +91,7 @@
}, },
clickFoort(item, index) { clickFoort(item, index) {
if (this.currentIndex == index) return
this.filterListData(index) this.filterListData(index)
this.mapData = item this.mapData = item
this.currentIndex = index this.currentIndex = index

Loading…
Cancel
Save