Browse Source

提交代码

fujunwen 4 years ago
parent
commit
81d5e03172

+ 3 - 9
src/api/coreDeviceReport.js

@@ -1,8 +1,8 @@
 /*
  * @Author: your name
  * @Date: 2020-07-03 19:04:47
- * @LastEditTime: 2020-07-09 19:58:31
- * @LastEditors: your name
+ * @LastEditTime: 2020-07-10 15:06:43
+ * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: \wanda-bm-guide\src\api\coreDeviceReport.js
  */
@@ -10,19 +10,13 @@
 // 核心设备报表 接口
 import httputils from '@/api/httputils'
 
-<<<<<<< HEAD
-// 系统列表
-// export function queryEquipmentList() {
-//     return httputils.getJson(`/data/v_glsms_systemcfg/querySmsxt`)
-// }
-=======
+
 /**
  * 系统列表
  */
 export function querySystemList() {
   return httputils.getJson(`/data/v_glsms_systemcfg/querySmsxt`);
 }
->>>>>>> develop-cd-xxd
 /**
  * 系统下的设备
  * @param { 接口地址 } url

+ 0 - 3
src/api/httputils.js

@@ -26,15 +26,12 @@ axiosservice.interceptors.request.use(
             config.headers = {
                 'sso-token': token,
                 isPreview: isPreview, //默认false,当预览开启的时候是true
-<<<<<<< HEAD
-=======
             }
         }
         // if (config.url.indexOf('/data') > -1 && config.url !== '/data/data/auth/check') {
         if (config.url.indexOf('/data') > -1) {
             config.headers = {
                 'sso-token': 'admin:xiejialin1',
->>>>>>> develop-cd-xxd
             }
         }
         return config

+ 0 - 4
src/api/legendLibrary.js

@@ -72,13 +72,9 @@ export function graphElementSearch({ postParams }) {
 // }
 
 // 业下设备分类和位置分类树形结构
-<<<<<<< HEAD
-export function queryDeviceAndPOsition({ postParams }) {
-=======
 export function queryDeviceAndPOsition({
     postParams
 }) {
->>>>>>> develop-cd-xxd
     return httputils.postJson(`/data/t_system_wzfl/query`, postParams)
 }
 

BIN
src/assets/images/icons/1008.png


+ 3 - 4
src/main.ts

@@ -1,4 +1,3 @@
- 
 import Vue from 'vue'
 import router from './router'
 import store from './store'
@@ -28,7 +27,7 @@ import cookies from 'vue-cookie'
 Vue.use(cookies)
 import Pui from 'meri-design'
 import 'meri-design/dist/index.css'
-import "leaflet/dist/leaflet.css";
+import 'leaflet/dist/leaflet.css'
 Vue.use(Pui)
 
 //////////模拟传入参数
@@ -38,8 +37,8 @@ const username = 'lengqiang'
 console.log(store.state.isrequestAuth)
 // router.beforeEach(async (to, from, next) => {
 //     if (!store.state.isrequestAuth) {
-//         await store.dispatch('getUserInfo', username)
-//         await store.dispatch('getFloors')
+//         // await store.dispatch('getUserInfo', username)
+//         // await store.dispatch('getFloors')
 //     }
 //     next()
 // })

+ 15 - 9
src/views/homepage/index.vue

@@ -3,23 +3,23 @@
         <section class="homepage-cards-content">
             <div class="cards-item" v-for="(item , index) in cardsList" :key="index" :style = itemStyle(item)>
                 <h4>{{item.smsxtname}}</h4>
-                <div class="equipment-list">
+                <div class="equipment-list" v-if="item.assetTypeList">
                     <div @click="navToInnerPage(item, equip)" class="equipment-item" v-for="equip in item.assetTypeList" >
                         <div class="equip-name">
                             <h5>{{equip.category_name}}</h5>
                             <div class="exception-number" v-if="equip.is_exception_num">{{equip.is_exception_num}}</div>
                         </div>
-                        <div></div>
                         <section>
                             <div class="equip-statis"><span class="equip-number">{{equip.asset_num}}</span><span class="equip-unit">台</span></div>
                             <div><em v-if="false">维保中</em></div>
                         </section>
                     </div>
                 </div>
+                <div v-else class="empty-content"   style="border-top:none; height:8rem;line-height:8rem;">暂无数据</div>
                 <div v-if="item.rptGlsmsStatisticsList && item.rptGlsmsStatisticsList.length" class="alert-list" @click="navToGanttPage(item, equip)">
-                    <div class="alert-item"   v-for="(option , index) in  item.rptGlsmsStatisticsList" :key="index" >
-                        <img v-if="option.level"  :src="srcList[option.type][option.level]"> 
-                        <div  class="content">
+                    <div class="alert-item"  v-for="(option , index) in  item.rptGlsmsStatisticsList" :key="index" >
+                        <img v-if="option.total"  :src="srcList[option.type][option.level]" > 
+                        <div  class="content" v-if="option.total">
                             <p class="line">
                                 <span >{{option.type === 1 ? '维保': option.type === 0 ? '专维' :  '第三方检测' }}</span>
                                 <span><em :style="{color:item.level == 1? '#646C73': item.level == 2 ? '#E07A04 ' :'#C13830'}">{{option.unfinished}}</em>/<em>{{option.total}}</em></span>
@@ -124,12 +124,18 @@ export default {
         },
         itemStyle (option) {
             let num = 0
-            option.assetTypeList.forEach(item=>{
-                num +=  item.is_exception_num
-            })
+            if (option.assetTypeList) {
+                option.assetTypeList.forEach(item=>{
+                    if (typeof item.is_exception_num === "number") {
+                        num +=  item.is_exception_num
+                    }
+                })
+            }
             if (option.rptGlsmsStatisticsList) {
                 option.rptGlsmsStatisticsList.forEach(option => {
-                    num +=  option.unfinished
+                    if (typeof option.unfinished === "number") {
+                        num +=  option.unfinished
+                    }
                 })
             }
             if (num > 0) {

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

@@ -47,12 +47,13 @@
                             </div>
                             <span>{{item.smsxtname}}</span>
                         </div>
-                        <div class="system-equipments" >
+                        <div class="system-equipments" v-if="item.assetTypeList">
                             <div class="number" v-for="(equip , index) in item.assetTypeList" :key="index">
                                 <p>{{equip.category_name}}<span v-if="equip.is_exception_num">{{equip.is_exception_num}}</span></p>
                                 <p><span>{{equip.asset_num}}</span><span>台</span></p>
                             </div>
                         </div>
+                        <div v-else style="width:65%;text-align:center;">暂无数据</div>
                     </li>
                 </ul>
             </div>
@@ -511,17 +512,9 @@ export default {
                             })
                         }
                         let color = that.paintColorByData(num)
-                        let layer = L.geoJSON(JsonData.features, {
-                            style:function(){
-                                return {
-                                    'weight': 1,
-                                    'color':  color.border,
-                                    'fillColor':color.area
-                                }
-                            }
-                        }).addTo(maps);
-
+            
                         let center = JsonData.features[0].properties.center
+
                         let marker = L.divIcon({
                             html: JsonData.features[0].properties.name,
                             iconSize:30
@@ -821,6 +814,17 @@ export default {
                 contextmenu: true,
                 contextmenuWidth: 140,
             })
+            let JsonData = require("../../assets/geoData/china.json")
+             let layer = L.geoJSON(JsonData.features, {
+                style:function(){
+                    return {
+                        'weight': 1,
+                        'color': '#B3D2FF',
+                        'fillColor':'#DEECFF' 
+                    }
+                }
+            }).addTo(maps);
+            return
             if(this.currentLevel === 1) {   //1集团 3区域 0广场
                 this.pantGroupMap(this.currentDistrictData[0],"1001")
             } else if (this.currentLevel === 2) {  // 2中心 
@@ -834,13 +838,13 @@ export default {
             maps.eachLayer(function(layer){
                 maps.removeLayer(layer)
             })
-            let data = require(`../../assets/geoData/ChinaBorder.json`)
+            let data = require(`../../assets/geoData/china.json`)
             L.geoJSON(data.features, {
                 style:function(){
                     return {
                         'weight': 1,
                         'color': 'black',
-                        'fillColor':'#f1f1f1'
+                        'fillColor':'#e0ebff'
                     }
                 }
             }).addTo(maps);
@@ -964,7 +968,9 @@ export default {
                     let result = res.data
                     if (result && Array.isArray(result)) {
                         result.forEach(item => {
-                            item.assetTypeList = item.assetTypeList.splice(0,3)
+                            if (item.assetTypeList) {
+                                item.assetTypeList = item.assetTypeList.splice(0,3)
+                            }
                         })
                         res.data.forEach(item => {
                             item.selected = false
@@ -1150,7 +1156,7 @@ export default {
                 ul{
                     li.system-item{
                         display: flex;
-                        justify-content: space-around;
+                        justify-content: flex-start;
                         align-items: center;
                         width: calc(100% - 3.2rem);
                         margin-left: 1.6rem;