From 9c462ffe8482b5711b7e1f3155f2bb5dae0405a4 Mon Sep 17 00:00:00 2001 From: xuhongjie <1943105267@qq.com> Date: Sat, 9 Nov 2024 18:27:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=A5=BC=E6=A0=8B=E6=88=B7?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=90=8E=E8=BF=94=E5=9B=9E=E4=B8=8D=E5=9C=A8?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A5=BC=E4=B8=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/building/map.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pages/building/map.vue b/pages/building/map.vue index c614e57..44b90f2 100644 --- a/pages/building/map.vue +++ b/pages/building/map.vue @@ -47,18 +47,21 @@ }, onShow(){ - this.getBuildData() + + this.currentIndex = this.currentIndex ? this.currentIndex : 0 + this.getBuildData(this.currentIndex) }, methods: { // 获取该楼层数据 async getBuildData(index) { this.list = buildjson[this.deptname.replace("幢", "")]; + let res = await getNumNew({ buildingId: this.buildingId, }); this.buildData = res.data - this.clickFoort(this.list[0], 0) + this.clickFoort(this.list[index],index) }, @@ -88,7 +91,7 @@ }, clickFoort(item, index) { - if (this.currentIndex == index) return + this.filterListData(index) this.mapData = item this.currentIndex = index