YaolongHan 4 gadi atpakaļ
vecāks
revīzija
ec261f524f
2 mainītis faili ar 56 papildinājumiem un 56 dzēšanām
  1. 2 2
      src/store/index.js
  2. 54 54
      src/views/statistics/index.vue

+ 2 - 2
src/store/index.js

@@ -8,9 +8,9 @@ import router from '../router'
 Vue.use(Vuex)
 export default new Vuex.Store({
     state: {
-        // ssoToken: 'admin:liujiandong',
+        ssoToken: 'admin:liujiandong',
         // ssoToken: '',
-        ssoToken: null,
+        // ssoToken: null,
         plazaName: "",
         isPreview: false,
         lastRoute: '',

+ 54 - 54
src/views/statistics/index.vue

@@ -1,12 +1,13 @@
 <template>
     <div class='overview'>
         <!-- 顶部路由 -->
-        <!-- <div class='menu'>
+        <div class='menu'>
             <div class='home' @click='$emit("update:modelNum", 0)'>
                 <div class='downright'></div>
                 <div class='home-box'>
                     <img src='@/assets/imgs/logo.png' alt />
-                    <span>{{plazas.length>0?formatter(plazaId,plazas):'--'}}</span>
+                    <!-- <span>{{plazas.length>0?formatter(plazaId,plazas):'--'}}</span> -->
+                    <span>万达集团管理说明书</span>
                 </div>
             </div>
             <div class='home-right'>
@@ -14,7 +15,7 @@
                     <span class='span3'>{{times}}</span>
                 </span>
             </div>
-        </div> -->
+        </div>
         <!-- 面包屑 -->
         <nav class='navigation'>
             <section class='crumbs'>
@@ -185,7 +186,7 @@ export default {
                 "东南": 'dongnan',
                 "其他": 'Other'
             },
-            provinceCities: {  // 各个区域的的中心坐标 缩放级别 
+            provinceCities: {  // 各个区域的的中心坐标 缩放级别
                 "青岛": {  center: [36.06667, 120.33333], zoom: 8 },
                 "北京": {  center: [39.604882122321174, 116.43660987308282], zoom: 8 },
                 "天津": {  center: [39.130593, 117.260892], zoom: 7 },
@@ -258,19 +259,19 @@ export default {
         ...mapGetters(['plazas', 'plazaId', 'accessLevel'])
     },
     watch: {
-         
+
     },
     created() {
         this.currentTime()
     },
     mounted() {
-         
-        
+
+
         window.vm = this
         this.getFrameworkTreeData()
         window.addEventListener('resize', this.reinitalMap, false)
     },
-    methods: {  
+    methods: {
         showToolTip (index) {
             this.maintainList.forEach(item => {item.showToolTip = false})
             this.maintainList[index].showToolTip = true
@@ -323,7 +324,7 @@ export default {
             this.currentZoneData = data
         },
         /**
-         * @Description 通过导航进行导航 
+         * @Description 通过导航进行导航
          * @Param id 所选区域的id
          * @Param index 点击项的序号
          */
@@ -333,12 +334,12 @@ export default {
             let level = data.level    //1集团 2中心 3区域 0广场
             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) 
-            this.getSystemList(data.ccode, data.level) 
+            this.queryPlazaInfoCount(data.ccode, data.level, data.cid)
+            this.getSystemList(data.ccode, data.level)
             if (level === 1) {
                 this.pantGroupMap(data, this.currentSysId)
             } else if (level === 2) {
@@ -365,11 +366,11 @@ export default {
             } else {
                 this.queryPlazaInfoCount(data.ccode, data.level)
             }
-            this.getSystemList(data.ccode, data.level) 
+            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广场
             if (level === 1) {
                 this.pantGroupMap(data, this.currentSysId)
@@ -379,7 +380,7 @@ export default {
                 this.pantProjectsMap(data, this.currentSysId)
             } else {   // 点击项为广场时 直接跳转到详情页  地图不用响应
                 let pathData = {fromGroup: 'true'}
-                let routeData = this.$router.resolve({  
+                let routeData = this.$router.resolve({
                     name:'/home/homePage',
                 })
                 window.open(routeData.href, '_blank');
@@ -388,11 +389,11 @@ export default {
                     plazaName: data.cname,
                     plazaId: data.ccode
                 }
-                this.$store.commit('SETPLAZENAME', data.cname) 
+                this.$store.commit('SETPLAZENAME', data.cname)
                 localStorage.setItem('PLAZAID', data.ccode)
             }
         },
-   
+
         /**
          * @Description  查询项目信息统计数量
          * @Param  ccode  管理分区编码 必填
@@ -479,7 +480,7 @@ export default {
             })
         },
          /**
-        * @Description 展开 维保 第三方检测 专维 
+        * @Description 展开 维保 第三方检测 专维
         * @Param  item 展开的某一项
         */
         toggerPanel(item) {
@@ -514,7 +515,7 @@ export default {
         /**
         *@Description 根据数据计算维保/第三方检测/专维各自颜色条的长度  维保、第三方检测是用即将逾期数据判断;专维是如果有逾期未完成直接标红,如果没有,按照即将逾期的数量显示颜色
         *@Param item 某一项的数据
-        *@Param title 标题 
+        *@Param title 标题
         */
         barStyle(item, title) {
             let bg = ''
@@ -522,7 +523,7 @@ export default {
             let ratio = 0
             if (title === '专维') {
                 if (item.unfinished>0) {
-                    bg = 'linear-gradient(to right, #F54E45 , #F54E45)'  
+                    bg = 'linear-gradient(to right, #F54E45 , #F54E45)'
                 } else {
                     bg = this.barColors[type]
                 }
@@ -537,11 +538,11 @@ export default {
             }
         },
         /**
-         * @Description 根据数据来返 维保/第三方检测/专维 三个模块中显示条的颜色 
+         * @Description 根据数据来返 维保/第三方检测/专维 三个模块中显示条的颜色
          * @Param num 即将逾期数 / 逾期未完成数
          * @Param total 总数
          */
-        selectColorByNum (num, total) {    
+        selectColorByNum (num, total) {
             let devide =  num / total
             if ( (num > 1 && num <=24  ) || (  devide > 0.1 && devide <=0.2 ) ) {
                 return 0
@@ -551,7 +552,7 @@ export default {
                 return 2
             }
         },
-  
+
         /**
         * @Description 根据数据 判定地图上图标的显示显示颜色
         * @Param data 作为判断的数据
@@ -578,7 +579,7 @@ export default {
             this.times = moment().format('YYYY.MM.DD HH:mm')
             setTimeout(this.currentTime, 1000)
         },
- 
+
          /**
         * @Description 格式化时间
         * @method param empty
@@ -598,7 +599,7 @@ export default {
         * @method param plazaId 广场id  如果是广场则此参数必填 其他情况下非必填
         */
         getSystemList(ccode, level) {
-            let params = null 
+            let params = null
             if (level === 0) {
                 params = {getParams:{plazaId: ccode, level}}
             } else {
@@ -632,7 +633,7 @@ export default {
          * @Param ccode 管理分区编码 必填
          * @Param level 1集团 2中心 3区域 0广场 必填
          */
-        getEventStatusData(level, ccode) {  
+        getEventStatusData(level, ccode) {
             let params = {
                 getParams: {
                     level,
@@ -642,7 +643,7 @@ export default {
             queryEventStatus(params).then(res => {
                 if (res.result === 'success') {
                     let data = res.data
-                    let orginalObj = { 
+                    let orginalObj = {
                         1:{title:'维保',data:[], expand: 0, showToolTip:false},
                         2:{title:'第三方检测',data:[], expand: 0, showToolTip:false},
                         0:{title:'专维',data:[], expand: 0, showToolTip:false},
@@ -703,13 +704,13 @@ export default {
                     }
                 }
             }).addTo(myMaps)
-            if (this.currentLevel === 1) {//1集团 
+            if (this.currentLevel === 1) {//1集团
                 this.pantGroupMap(this.currentZoneData, this.currentSysId)
             } else if (this.currentLevel === 2) {  // 2中心
                 this.pantZonesMap(this.currentZoneData, this.currentSysId)
-            } else if (this.currentLevel === 3) {  // 3区域 
+            } else if (this.currentLevel === 3) {  // 3区域
                 this.pantProjectsMap(this.currentZoneData, this.currentSysId)
-            }  
+            }
         },
         /**
          * @Description 清空地图 并添加全国底图
@@ -772,7 +773,7 @@ export default {
                 let promise = new Promise((resolve, reject) => {
                     let params = {
                         getParams: {
-                            smsxt: this.currentSysId,  
+                            smsxt: this.currentSysId,
                             level: 2,    // 中心
                             ccode: item.ccode
                         }
@@ -845,7 +846,7 @@ export default {
                 let promise = new Promise((resolve, reject) => {
                     let params = {
                         getParams: {
-                            smsxt: this.currentSysId, 
+                            smsxt: this.currentSysId,
                             level: 3,   // 区域
                             ccode: item.ccode
                         }
@@ -853,7 +854,7 @@ export default {
                     querySystemCard(params).then(res => {
                         if (res.result === 'success') {
                             let name = item.cname.split('区域')[0]
-                            
+
                             let num = 0
                             if (res.data) {
                                 let equip = res.data[0]
@@ -912,7 +913,7 @@ export default {
                     let params = {
                         getParams: {
                             plazaId: item.cid,   // 所查对象是广场的时候plazaId必传
-                            smsxt: this.currentSysId,  
+                            smsxt: this.currentSysId,
                             level: 0,   // 广场
                             ccode: item.ccode
                         }
@@ -975,14 +976,14 @@ export default {
                 html: type =='group' ? name :`<div>${name}</div>`,
                 className: 'my-leaflet-div-icon',
                 iconSize: 30
-            }) 
+            })
             let circleIcon = L.icon({
                 iconUrl: require(`../../assets/images/icons/${color}.png`),
                 iconSize: [24, 24],
                 iconAnchor: [16, 38],
             });
- 
-            if (color  && center) { 
+
+            if (color  && center) {
                 let popup = L.popup({closeOnClick:true,offset: [-3,-20]}).setLatLng(center).setContent(contentHtml)
                 let marker = L.marker(center, { icon: textIcon }).addTo(groupLayer)
                 let marker2 = L.marker(center,{ icon: circleIcon} ).addTo(groupLayer)
@@ -997,18 +998,18 @@ export default {
                     this.currentZoneData = data
                     this.currentLevel = data.level
                     this.getEventStatusData(data.level, data.ccode)
-                    this.queryPlazaInfoCount(data.ccode, data.level) 
+                    this.queryPlazaInfoCount(data.ccode, data.level)
                     if (type !== 'project') {
                         groupLayer.clearLayers()
                     }
                     this.createNavpathByData(data)
-                    this.getSystemList(data.ccode, data.level)   
+                    this.getSystemList(data.ccode, data.level)
                     if (type === 'group') {
                         this.pantZonesMap(data, this.currentSysId)
-                    } 
+                    }
                     if (type === 'zone') {
                         this.pantProjectsMap(data, this.currentSysId)
-                    } 
+                    }
                     if (type === 'project') {
                         let routeData = this.$router.resolve({
                             name:'/home/homePage',
@@ -1019,9 +1020,9 @@ export default {
                             plazaName: data.cname,
                             plazaId: data.ccode
                         }
-                        this.$store.commit('SETPLAZENAME', data.cname) 
+                        this.$store.commit('SETPLAZENAME', data.cname)
                         localStorage.setItem('PLAZAID', data.ccode)
-                    }   
+                    }
                 })
             }
         },
@@ -1037,7 +1038,7 @@ export default {
                     let item = data[i]
                     if (item.is_exception_num) {
                         html += `<div class="line">
-                            <span>${item.category_name}</span> 
+                            <span>${item.category_name}</span>
                             <span>${item.asset_num || '--'}台</span>
                             <span><span style="display: inline-block;width: 16px;height: 16px;line-height: 16px;border-radius: 8px; color: white; background : #F54E45;text-align: center;cursor: default;">!</span><em>${
                                 item.is_exception_num
@@ -1045,7 +1046,7 @@ export default {
                         </div>`
                     } else {
                         html += `<div class="line">
-                            <span>${item.category_name}</span> 
+                            <span>${item.category_name}</span>
                             <span>${item.asset_num || '--'}台</span>
                         </div>`
                     }
@@ -1055,7 +1056,7 @@ export default {
                 return ''
             }
         },
-        
+
     },
     beforeDestroy() {
         window.removeEventListener('resize', this.reinitalMap)
@@ -1095,7 +1096,7 @@ export default {
         box-shadow: 0px 2px 10px 0px rgba(31, 35, 41, 0.1);
         overflow: hidden;
         .home {
-            width: 265px;
+            width: 285px;
             height: 48px;
             // line-height: 48px;
             text-align: center;
@@ -1247,7 +1248,7 @@ export default {
                 margin-left: 1.2rem;
             }
         }
-        
+
         .system-general {
             width: 29.4%;
             box-sizing: border-box;
@@ -1276,7 +1277,7 @@ export default {
                             display: flex;
                             align-items: center;
                             width: 25%;
-                            padding: 1.2rem 0 1.2rem 1rem ;  
+                            padding: 1.2rem 0 1.2rem 1rem ;
                             border-right: 1px solid #EFF0F1;
                             .img {
                                 height: 2.8rem;
@@ -1346,7 +1347,7 @@ export default {
                                     }
                                 }
                             }
-                             
+
                         }
                     }
                     li.selected {
@@ -1412,9 +1413,9 @@ export default {
                 #map {
                     height: 70vh;
                     overflow: hidden;
-                    
+
                     svg {
-                        pointer-events: none; 
+                        pointer-events: none;
                     }
                 }
                 .legend {
@@ -1524,5 +1525,4 @@ export default {
         }
     }
 }
-</style> 
- 
+</style>