瀏覽代碼

Merge branch 'develop' of http://39.106.8.246:3003/web/wanda-bm-guide into smswb_dev

yunxing 4 年之前
父節點
當前提交
84b368582a
共有 1 個文件被更改,包括 27 次插入21 次删除
  1. 27 21
      src/views/statistics/index.vue

+ 27 - 21
src/views/statistics/index.vue

@@ -30,7 +30,7 @@
                     class="special-my-tree-select"
                     ref="treeSelect"
                     width='300'
-                    :hideClear='false'
+                    :hideClear='true'
                     :isReadOnly='false'
                     :caption='"选择管理分区:"'
                     :data='regulateDistrictData'
@@ -323,22 +323,22 @@ export default {
          * @Param data 当前点击的项
          */
         createNavpathByData(data) {
+            console.log(data)
+            let pathArr = data.path.split('/')
+            let newArr = []
+            pathArr.forEach(item => {
+                newArr.push(item.split('&'))
+            })
+            this.crumbsHtml = newArr
             if (data.level === 1) {
-                this.crumbsHtml = []
-            } else {
-                let pathArr = data.path.split('/')
-                let newArr = []
-                pathArr.forEach(item => {
-                    newArr.push(item.split('&'))
-                })
-                this.crumbsHtml = newArr
                 this.currentZoneData = data
-            }
-            if (data.level === 0) {
+                this.crumbsHtml = []
+            } else if (data.level === 0) {
                 this.crumbsHtml.pop()
                 this.currentZoneData = this.getDataByCityCcode(data.cparentcode)
+            } else {
+                this.currentZoneData = data
             }
-            
         },
         /**
          * @Description 通过导航进行导航
@@ -376,30 +376,34 @@ export default {
          * @Param data 返回选中项的数据
          */
         selectProjectItem(ids) {
+            console.log(ids)
             if (!ids && this.currentZoneData) {
                 this.pantGroupMap(this.regulateDistrictData[0], this.systemList[0].smsxt)
                 this.createNavpathByData(this.regulateDistrictData[0])
             }
             let data = this.getDataByCityCcode(ids)
-            this.currentLevel = data.level
-            if (data.level === 0) {  //  level=0时 plazaId必填
-                // this.queryPlazaInfoCount(data.ccode, data.level, data.ccode)
-            } else {
+       
+            if (data.level !== 0) {  //  level=0时 plazaId必填
+                this.currentLevel = data.level
                 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) 
+            } else {
+                let parentNode = this.getDataByCityCcode(data.cparentcode)
+                this.currentLevel = parentNode.level
+                this.getSystemList(parentNode.ccode, parentNode.level) 
+                this.pantProjectsMap(parentNode, this.currentSysId)
             }
-            this.currentZoneData = data
-
+            this.createNavpathByData(data)
             let level = data.level // //1集团 2中心 3区域 0广场
             if (level === 1) {
                 this.pantGroupMap(data, this.currentSysId)
             } else if (level === 2) {
-                this.pantZonesMap(data, '1001')
+                this.pantZonesMap(data, this.currentSysId)
             } else if (level === 3) {
                 this.pantProjectsMap(data, this.currentSysId)
             } else {   // 点击项为广场时 直接跳转到详情页  地图不用响应
+             
                 let pathData = {fromGroup: 'true'}
                 let routeData = this.$router.resolve({
                     name:'/home/homePage',
@@ -943,6 +947,7 @@ export default {
          * @Param data 数据
          */
         pantProjectsMap(data) {
+         
             this.clearAllLayers()
             let name = data.cname.split('区域')[0]
             let geo = this.provinceCities[name]
@@ -992,6 +997,7 @@ export default {
             })
             Promise.all(promiseAll).then(result => {
                 this.loadingInstance.close()
+                console.log(layerArr, this.currentLevel)
                 if (this.currentLevel === 3) {
                     layerArr.forEach(item => {