Sfoglia il codice sorgente

'修改电井控制商铺第二次不高亮问题'

zhangyu 4 anni fa
parent
commit
353ac365bd
1 ha cambiato i file con 20 aggiunte e 16 eliminazioni
  1. 20 16
      src/components/floorMap/index.vue

+ 20 - 16
src/components/floorMap/index.vue

@@ -284,12 +284,12 @@ export default {
             this.clearHightLight()
             pointData.forEach((point) => {
                 let location = point.id ? point.id : ''
-                if (this.wellMap.hasOwnProperty(location)) {
-                    this.wellMap[location].forEach((item) => {
-                        item.highLightFlag = true
-                        item.zOrder = 30
-                    })
-                } else {
+                // if (this.wellMap.hasOwnProperty(location)) {
+                //     this.wellMap[location].forEach((item) => {
+                //         item.highLightFlag = true
+                //         item.zOrder = 30
+                //     })
+                // } else {
                     let getParams = {
                         plazaId: this.plazaId,
                         floor: this.floorid,
@@ -297,7 +297,7 @@ export default {
                     }
                     queryShops({ getParams }).then((res) => {
                         let shopsnumList = []
-                        let shopsnumItemList = []
+                        // let shopsnumItemList = []
                         if (res.data && res.data.length) {
                             for (let floor in res.data[0]) {
                                 if (res.data[0][floor].length) {
@@ -312,13 +312,13 @@ export default {
                                 if (shopsnumList.findIndex((name) => name == item.data.Name) != -1) {
                                     item.highLightFlag = true
                                     item.zOrder = 30
-                                    shopsnumItemList.push(item)
+                                    // shopsnumItemList.push(item)
                                 }
                             })
-                            this.wellMap[location] = shopsnumItemList
+                            // this.wellMap[location] = shopsnumItemList
                         }
                     })
-                }
+                // }
             })
             this.visible = false
         },
@@ -655,12 +655,16 @@ export default {
         // 清除电井关联商铺的高亮状态
         clearHightLight() {
             ItemColor.spaceHighColor = new SColor('#FBF2CC')
-            for (let key in this.wellMap) {
-                this.wellMap[key].forEach((item) => {
-                    item.highLightFlag = false
-                    item.zOrder = ItemOrder.spaceOrder
-                })
-            }
+            // for (let key in this.wellMap) {
+            //     this.wellMap[key].forEach((item) => {
+            //         item.highLightFlag = false
+            //         item.zOrder = ItemOrder.spaceOrder
+            //     })
+            // }
+            this.fParser.spaceList.forEach((item) => {
+                item.highLightFlag = false
+                item.zOrder = ItemOrder.spaceOrder
+            })
         },
         // 适配底图到窗口
         fit() {