From ef51ae09decb4e016a849d8a5d96be7f44dafc4f Mon Sep 17 00:00:00 2001
From: Lou <luzhiping@qqyjz.com>
Date: Wed, 17 Jan 2024 19:28:20 +0800
Subject: [PATCH] 修复问题

---
 subPackage/workbench/views/cscj.vue |   29 ++++++++++++++++++-----------
 1 files changed, 18 insertions(+), 11 deletions(-)

diff --git a/subPackage/workbench/views/cscj.vue b/subPackage/workbench/views/cscj.vue
index 1cc18a2..b5f2ce8 100644
--- a/subPackage/workbench/views/cscj.vue
+++ b/subPackage/workbench/views/cscj.vue
@@ -640,17 +640,24 @@
 
 					this.form.jwd = `${Number(data.lng).toFixed(6)},${Number(data.lat).toFixed(6)}`
 					this.form.building = arr.join("")
-					this.firstId = data.placePoiLabelVOList[0].poiCode;
-					this.categoryValue = data.placePoiLabelVOList[data.placePoiLabelVOList.length - 1].labelName;
-					uni.$u.sleep(500).then(() => {
-						data.placePoiLabelVOList.forEach(item => {
-							let firstIndex = this.categoryList[0].findIndex(i => i.categoryNo ==
-								item.poiCode)
-							let childIndex = this.categoryList[1].findIndex(i => i.categoryNo ==
-								item.poiCode)
-							this.categoryIndex = [firstIndex, childIndex]
-						})
-					})
+					let labelList = data.placePoiLabelVOList;
+					let tempLabelList = [];
+					for (let i of labelList) { //过滤一级数据
+						if (i.type != 1) {
+							tempLabelList.push(i)
+						}
+					}
+					this.firstId = tempLabelList[0].poiCode;
+					this.categoryValue = tempLabelList[1].labelName;
+					this.form.label = tempLabelList[1].poiCode
+					setTimeout(() => {
+						let firstIndex = this.categoryList[0].findIndex(i => i.categoryNo ==
+							tempLabelList[0].poiCode)
+						let childIndex = this.categoryList[1].findIndex(i => i.categoryNo ==
+							tempLabelList[1].poiCode)
+						this.categoryIndex = [firstIndex, childIndex]
+					}, 500)
+
 
 					Object.keys(this.comprehensiveData).forEach(key => {
 						this.comprehensiveData[key].forEach(item => {

--
Gitblit v1.9.3