ソースを参照

修改集团首页bug

fujunwen 4 年 前
コミット
392e9ed23e
1 ファイル変更15 行追加11 行削除
  1. 15 11
      src/views/statistics/index.vue

+ 15 - 11
src/views/statistics/index.vue

@@ -269,8 +269,6 @@ export default {
         this.currentTime()
     },
     mounted() {
-         
-        
         window.vm = this
         this.getFrameworkTreeData()
         window.addEventListener('resize', this.reinitalMap, false)
@@ -334,8 +332,13 @@ export default {
                     newArr.push(item.split('&'))
                 })
                 this.crumbsHtml = newArr
+                this.currentZoneData = data
             }
-            this.currentZoneData = data
+            if (data.level === 0) {
+                this.crumbsHtml.pop()
+                this.currentZoneData = this.getDataByCityCcode(data.cparentcode)
+            }
+            
         },
         /**
          * @Description 通过导航进行导航 
@@ -349,7 +352,6 @@ export default {
             if (level === this.regulateDistrictData[0].level) {
                 this.selectedZone = ''
             } 
-            this.currentZoneData = data
             this.currentLevel = level
             this.getEventStatusData(level, data.ccode)
             this.queryPlazaInfoCount(data.ccode, data.level, data.cid) 
@@ -376,13 +378,13 @@ export default {
             let data = this.getDataByCityCcode(ids)
             this.currentLevel = data.level
             if (data.level === 0) {  //  level=0时 plazaId必填
-                this.queryPlazaInfoCount(data.ccode, data.level, data.ccode)
+                // this.queryPlazaInfoCount(data.ccode, data.level, data.ccode)
             } else {
                 this.queryPlazaInfoCount(data.ccode, data.level)
+                this.getSystemList(data.ccode, data.level) 
+                this.getEventStatusData(this.currentLevel, data.ccode)
+                this.createNavpathByData(data)
             }
-            this.getSystemList(data.ccode, data.level) 
-            this.getEventStatusData(this.currentLevel, data.ccode)
-            this.createNavpathByData(data)
             this.currentZoneData = data
   
             let level = data.level // //1集团 2中心 3区域 0广场
@@ -1036,13 +1038,15 @@ export default {
                 feaureGroup.on('click', ev => {
                     this.currentZoneData = data
                     this.currentLevel = data.level
-                    this.getEventStatusData(data.level, data.ccode)
-                    this.queryPlazaInfoCount(data.ccode, data.level) 
+                    if (data.level !== 0) {
+                        this.getEventStatusData(data.level, data.ccode)
+                        this.queryPlazaInfoCount(data.ccode, data.level) 
+                        this.getSystemList(data.ccode, data.level)   
+                    }
                     if (type !== 'project') {
                         groupLayer.clearLayers()
                     }
                     this.createNavpathByData(data)
-                    this.getSystemList(data.ccode, data.level)   
                     if (type === 'group') {
                         this.pantZonesMap(data, this.currentSysId)
                     }