Просмотр исходного кода

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

yx 4 лет назад
Родитель
Сommit
1c65e917d5

+ 237 - 209
src/App.vue

@@ -1,137 +1,153 @@
 <template>
-    <div id='app'>
-        <div :id='`fengMap${id}`' class='fengMap'></div>
-        <router-view />
-    </div>
+  <div id="app">
+    <div :id="`fengMap${id}`" class="fengMap"></div>
+    <router-view />
+  </div>
 </template>
 <script>
-import { mapGetters, mapActions, mapMutations } from 'vuex'
-import { SFengParser } from '@saga-web/feng-map'
-import { setFloor } from '@/api/public.js'
-window.fengmapData = null
+import { mapGetters, mapActions, mapMutations } from "vuex";
+import { SFengParser } from "@saga-web/feng-map";
+import { setFloor } from "@/api/public.js";
+window.fengmapData = null;
 export default {
-    data() {
-        return {
-            view: '',
-            scene: '',
-            id: '2',
-            canvasID: '',
-            key: '23f30a832a862c58637a4aadbf50a566',
-            appName: '万达可视化系统',
-            mapServerURL: `http://map.wanda.cn/editor`,
-            mapthemeUrl: `http://map.wanda.cn/editor/webtheme`,
-            isMounted: false,
-            plazaIds: ''
-        }
-    },
-    /**
-     * 刷新保存vuex信息
-     */
-    created() {
-        let beforeunload = JSON.parse(localStorage.getItem('beforeunload'))
-        // 删除 store中的ssoToken
-        beforeunload && delete beforeunload.ssoToken
-        this.$store.replaceState(Object.assign(this.$store.state, beforeunload))
-        //    刷新时,将haveFengMap 置为false,解决设备设施页面,刷新时不出新楼层图的问题
-        this.SETHAVEFENGMAP(false)
-        localStorage.removeItem('beforeunload')
-        window.addEventListener('beforeunload', () => {
-            let state = JSON.stringify(this.$store.state)
-            localStorage.setItem('beforeunload', state)
-        })
-    },
-    mounted() {
-        this.isMounted = true
-        this.plazaIds = localStorage.getItem('PLAZAID')
-    },
-    computed: {
-        ...mapGetters(['plazaId', 'fmapID', 'haveFengMap', 'accessLevel'])
+  data() {
+    return {
+      view: "",
+      scene: "",
+      id: "2",
+      canvasID: "",
+      key: "23f30a832a862c58637a4aadbf50a566",
+      appName: "万达可视化系统",
+      mapServerURL: `http://map.wanda.cn/editor`,
+      mapthemeUrl: `http://map.wanda.cn/editor/webtheme`,
+      isMounted: false,
+      plazaIds: ""
+    };
+  },
+  /**
+   * 刷新保存vuex信息
+   */
+  created() {
+    let beforeunload = JSON.parse(localStorage.getItem("beforeunload"));
+    // 删除 store中的ssoToken
+    if (beforeunload) {
+      delete beforeunload.ssoToken;
+      delete beforeunload.plazaId;
+      delete beforeunload.isPreview;
+    }
+
+    let plazaId = localStorage.getItem("PLAZAID");
+    let isPreview = sessionStorage.getItem("SETISPREVIEW");
+    this.$store.replaceState(
+      Object.assign(this.$store.state, beforeunload, { plazaId, isPreview })
+    );
+    //    刷新时,将haveFengMap 置为false,解决设备设施页面,刷新时不出新楼层图的问题
+    this.SETHAVEFENGMAP(false);
+    localStorage.removeItem("beforeunload");
+    window.addEventListener("beforeunload", () => {
+      let state = JSON.stringify(this.$store.state);
+      localStorage.setItem("beforeunload", state);
+    });
+  },
+  mounted() {
+    this.isMounted = true;
+    this.plazaIds = localStorage.getItem("PLAZAID");
+  },
+  computed: {
+    ...mapGetters(["plazaId", "fmapID", "haveFengMap", "accessLevel"])
+  },
+  methods: {
+    ...mapActions(["getfmapID"]),
+    ...mapMutations(["SETHAVEFENGMAP"]),
+    getFengMap() {
+      this.getfmapID().then(() => {
+        this.getMap();
+      });
     },
-    methods: {
-        ...mapActions(['getfmapID']),
-        ...mapMutations(['SETHAVEFENGMAP']),
-        getFengMap() {
-            this.getfmapID().then(() => {
-                this.getMap()
-            })
-        },
-        getMap() {
-            //如果项目为 南昌八一路 长春重庆路 青岛台东路 则不走楼层缓存接口
-            // if(this.plazaIds == "1001064" || this.plazaIds == "1001065" || this.plazaIds == "1001066"){
-            //     let arr = ["b2","b1","f1","f2","f3","f4","f5","f6","g80"];
-            //     setFloor({ plazaId: this.plazaIds }, arr)
-            //     .then(res => {
-            //       console.log("缓存楼层", res);
-            //     })
-            //     .catch(error => {
-            //       console.log("缓存楼层", error);
-            //     });
-            //     return
-            //   }
+    getMap() {
+      //如果项目为 南昌八一路 长春重庆路 青岛台东路 则不走楼层缓存接口
+      // if(this.plazaIds == "1001064" || this.plazaIds == "1001065" || this.plazaIds == "1001066"){
+      //     let arr = ["b2","b1","f1","f2","f3","f4","f5","f6","g80"];
+      //     setFloor({ plazaId: this.plazaIds }, arr)
+      //     .then(res => {
+      //       console.log("缓存楼层", res);
+      //     })
+      //     .catch(error => {
+      //       console.log("缓存楼层", error);
+      //     });
+      //     return
+      //   }
 
-            window.fengmapData = new SFengParser(
-                `fengMap${this.id}`,
-                `${this.mapServerURL}/fmap/${this.fmapID}`,
-                this.key,
-                this.appName,
-                null,
-                this.mapthemeUrl
-            )
-            if (this.fmapID.includes('null')) {
-                this.SETHAVEFENGMAP(0)
-            }
-            window.fengmapData.loadMap(this.fmapID, (a, b) => {
-                const dataArr = b.map(item => {
-                    return item.gname
-                })
-                // 获取主题数据
-                window.fengmapData.loadTheme(`${this.mapServerURL}/webtheme/${this.fmapID}/${this.fmapID}.theme`).then(res => {
-                    this.SETHAVEFENGMAP(1)
-                })
-                // 缓存楼层数据
-                if (dataArr.length) {
-                    //如果项目为 南昌八一路 长春重庆路 青岛台东路 则不走楼层缓存接口
-                    // if(this.plazaIds == "1001064" || this.plazaIds == "1001065" || this.plazaIds == "1001066"){
-                    //   let arr = ["b2","b1","f1","f2","f3","f4","f5","f6","g80"];
-                    //   setFloor({ plazaId: this.plazaIds }, arr)
-                    //   .then(res => {
-                    //     console.log("缓存楼层", res);
-                    //   })
-                    //   .catch(error => {
-                    //     console.log("缓存楼层", error);
-                    //   });
-                    //   return
-                    // }
-                    setFloor({ plazaId: this.plazaIds }, dataArr)
-                        .then(res => {
-                            console.log('缓存楼层', res)
-                        })
-                        .catch(error => {
-                            console.log('缓存楼层', error)
-                        })
-                }
+      window.fengmapData = new SFengParser(
+        `fengMap${this.id}`,
+        `${this.mapServerURL}/fmap/${this.fmapID}`,
+        this.key,
+        this.appName,
+        null,
+        this.mapthemeUrl
+      );
+      if (this.fmapID.includes("null")) {
+        this.SETHAVEFENGMAP(0);
+      }
+      window.fengmapData.loadMap(this.fmapID, (a, b) => {
+        const dataArr = b.map(item => {
+          return item.gname;
+        });
+        // 获取主题数据
+        window.fengmapData
+          .loadTheme(
+            `${this.mapServerURL}/webtheme/${this.fmapID}/${this.fmapID}.theme`
+          )
+          .then(res => {
+            this.SETHAVEFENGMAP(1);
+          });
+        // 缓存楼层数据
+        if (dataArr.length) {
+          //如果项目为 南昌八一路 长春重庆路 青岛台东路 则不走楼层缓存接口
+          // if(this.plazaIds == "1001064" || this.plazaIds == "1001065" || this.plazaIds == "1001066"){
+          //   let arr = ["b2","b1","f1","f2","f3","f4","f5","f6","g80"];
+          //   setFloor({ plazaId: this.plazaIds }, arr)
+          //   .then(res => {
+          //     console.log("缓存楼层", res);
+          //   })
+          //   .catch(error => {
+          //     console.log("缓存楼层", error);
+          //   });
+          //   return
+          // }
+          setFloor({ plazaId: this.plazaIds }, dataArr)
+            .then(res => {
+              console.log("缓存楼层", res);
             })
+            .catch(error => {
+              console.log("缓存楼层", error);
+            });
         }
+      });
+    }
+  },
+  watch: {
+    plazaId(plazaId) {
+      let plazaid = this.$route.query.plazaId
+        ? this.$route.query.plazaId
+        : plazaId;
+      console.log("获取到id", plazaid);
+      window.fengmapData = null;
+      // 当获取到到项目id,请求底图
+      if (plazaid) {
+        // 请求该项目下的楼层数据
+        this.getFengMap();
+      } else {
+        window.fengmapData = null;
+      }
     },
-    watch: {
-        plazaIds(plazaId) {
-            console.log('获取到id', plazaId)
-            window.fengmapData = null
-            // 当获取到到项目id,请求底图
-            if (plazaId) {
-                // 请求该项目下的楼层数据
-                this.getFengMap()
-            } else {
-                window.fengmapData = null
-            }
-        },
-        isMounted(isMounted) {
-            if (isMounted && this.plazaIds) {
-                this.getFengMap()
-            }
-        }
+    isMounted(isMounted) {
+      if (isMounted && this.plazaIds) {
+        this.getFengMap();
+      }
     }
-}
+  }
+};
 </script>
 <style lang="less">
 body,
@@ -159,8 +175,8 @@ input,
 textarea,
 th,
 td {
-    margin: 0;
-    padding: 0;
+  margin: 0;
+  padding: 0;
 }
 
 body,
@@ -168,7 +184,7 @@ button,
 input,
 select,
 textarea {
-    font: 12px/1.5 Arial, 'Microsoft YaHei', '\65b0\5b8b\4f53';
+  font: 12px/1.5 Arial, "Microsoft YaHei", "\65b0\5b8b\4f53";
 }
 
 h1,
@@ -177,7 +193,7 @@ h3,
 h4,
 h5,
 h6 {
-    font-size: 100%;
+  font-size: 100%;
 }
 
 address,
@@ -187,158 +203,170 @@ var,
 em,
 i,
 u {
-    font-style: normal;
+  font-style: normal;
 }
 
 ol,
 ul {
-    list-style: none;
+  list-style: none;
 }
 
 a {
-    text-decoration: none;
+  text-decoration: none;
 }
 
 a:hover {
-    text-decoration: underline;
+  text-decoration: underline;
 }
 
 img {
-    border: none;
-    vertical-align: middle;
+  border: none;
+  vertical-align: middle;
 }
 
 :focus {
-    outline: 0;
+  outline: 0;
 }
 
 button,
 input,
 select,
 textarea {
-    font-size: 100%;
+  font-size: 100%;
 }
 
 table {
-    border-collapse: collapse;
-    border-spacing: 0;
+  border-collapse: collapse;
+  border-spacing: 0;
 }
 
 /* 滚动条样式 */
 
 body ::-webkit-scrollbar {
-    width: 5px;
-    height: 8px;
+  width: 5px;
+  height: 8px;
 }
 
 body ::-webkit-scrollbar-track {
-    background-color: rgba(0, 0, 0, 0);
-    border-radius: 3px;
+  background-color: rgba(0, 0, 0, 0);
+  border-radius: 3px;
 }
 
 body ::-webkit-scrollbar-thumb {
-    border-radius: 3px;
-    background: #e6e6e6;
-    border: 1px solid #e6e6e6;
+  border-radius: 3px;
+  background: #e6e6e6;
+  border: 1px solid #e6e6e6;
 }
 
 body ::-webkit-scrollbar-thumb:vertical:hover {
-    background: #e6e6e6;
-    border: 1px solid #e6e6e6;
+  background: #e6e6e6;
+  border: 1px solid #e6e6e6;
 }
 
 #app {
-    //meri-design组件select的字体颜色
-    /deep/ .p-select-fakePlaceholder {
-        span {
-            span {
-                color: #606266 !important;
-                font-size: 13px;
-                font-weight: normal;
-            }
-        }
-    }
-    //element 分页组件背景色
-    /deep/ .el-pagination.is-background .el-pager li:not(.disabled).active {
-        background: linear-gradient(180deg, rgba(54, 156, 247, 1) 0%, rgba(2, 91, 170, 1) 100%);
-    }
-    //element button
-    /deep/ .el-button--primary,
-    .p-button-primary {
-        background: linear-gradient(180deg, rgba(54, 156, 247, 1) 0%, rgba(2, 91, 170, 1) 100%);
+  //meri-design组件select的字体颜色
+  /deep/ .p-select-fakePlaceholder {
+    span {
+      span {
+        color: #606266 !important;
+        font-size: 13px;
+        font-weight: normal;
+      }
     }
+  }
+  //element 分页组件背景色
+  /deep/ .el-pagination.is-background .el-pager li:not(.disabled).active {
+    background: linear-gradient(
+      180deg,
+      rgba(54, 156, 247, 1) 0%,
+      rgba(2, 91, 170, 1) 100%
+    );
+  }
+  //element button
+  /deep/ .el-button--primary,
+  .p-button-primary {
+    background: linear-gradient(
+      180deg,
+      rgba(54, 156, 247, 1) 0%,
+      rgba(2, 91, 170, 1) 100%
+    );
+  }
 }
 .clearfix::after {
-    content: '.';
-    display: block;
-    height: 0;
-    clear: both;
-    visibility: hidden;
+  content: ".";
+  display: block;
+  height: 0;
+  clear: both;
+  visibility: hidden;
 }
 .clearfix {
-    zoom: 1;
+  zoom: 1;
 }
 
 .left {
-    float: left;
+  float: left;
 }
 
 .right {
-    float: right;
+  float: right;
 }
 html,
 body {
-    width: 100%;
-    height: 100%;
-    // min-width: 1920px;
-    //   background: url('./assets/images/back.jpg') no-repeat;
+  width: 100%;
+  height: 100%;
+  // min-width: 1920px;
+  //   background: url('./assets/images/back.jpg') no-repeat;
 }
 #app {
-    height: 100%;
-    width: 100%;
-    position: relative;
-    .fengMap {
-        position: fixed;
-        width: 100px;
-        height: 100px;
-        z-index: -1;
-        opacity: 0;
-    }
+  height: 100%;
+  width: 100%;
+  position: relative;
+  .fengMap {
+    position: fixed;
+    width: 100px;
+    height: 100px;
+    z-index: -1;
+    opacity: 0;
+  }
 }
 // element表头背景颜色修改
 .core-device-report,
 .specification-update-record {
-    .el-table thead th {
-        background-color: #f8f9fa;
-    }
-    .el-pagination.is-background .el-pager li:not(.disabled).active {
-        background: linear-gradient(180deg, rgba(54, 156, 247, 1) 0%, rgba(2, 91, 170, 1) 100%);
-    }
+  .el-table thead th {
+    background-color: #f8f9fa;
+  }
+  .el-pagination.is-background .el-pager li:not(.disabled).active {
+    background: linear-gradient(
+      180deg,
+      rgba(54, 156, 247, 1) 0%,
+      rgba(2, 91, 170, 1) 100%
+    );
+  }
 }
 // 说明书更新记录 element 时间控件样式重写
 .specification-update-record,
 .core-device-report {
-    .el-input__inner {
-        height: 32px;
-        line-height: 32px;
-    }
-    .el-date-editor .el-range__icon,
-    .el-date-editor .el-range-separator {
-        line-height: 26px;
-        width: 8%;
-    }
+  .el-input__inner {
+    height: 32px;
+    line-height: 32px;
+  }
+  .el-date-editor .el-range__icon,
+  .el-date-editor .el-range-separator {
+    line-height: 26px;
+    width: 8%;
+  }
 }
 .el-dialog__header {
-    border-bottom: 1px solid rgba(239, 240, 241, 1);
+  border-bottom: 1px solid rgba(239, 240, 241, 1);
 }
 .gantt-chart .el-dialog__title {
-    font-weight: 500;
+  font-weight: 500;
 }
 .img-detail-container {
-    .el-dialog__body {
-        padding-top: 0;
-        padding-bottom: 0;
-        padding-right: 0;
-    }
+  .el-dialog__body {
+    padding-top: 0;
+    padding-bottom: 0;
+    padding-right: 0;
+  }
 }
 </style>

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


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


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


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


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


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


+ 45 - 45
src/components/Legend/src/legend.vue

@@ -136,50 +136,50 @@ export default {
             interval: 10 * 60 * 1000, //定时器时长,默认 10分钟
             timer: null, //保存定时器
             timer1: null,
-            tableHeigth: 300 // 编辑图例框得高度
+            tableHeigth: 300, // 编辑图例框得高度
         }
     },
     computed: {
-        ...mapGetters(['planNum', 'typeNum', 'plazaId', 'fmapID', 'floorSelect', 'isMessage', 'ssoToken', 'showView', 'legendTable'])
+        ...mapGetters(['planNum', 'typeNum', 'plazaId', 'fmapID', 'floorSelect', 'isMessage', 'ssoToken', 'showView', 'legendTable']),
     },
     props: {
         floors: {
             //原理图中有数据楼层
             default: () => {
-                []
+                ;[]
             },
-            type: Array
+            type: Array,
         },
         type: {
             // 原理图类型 == 0 ;
             default: '1',
-            type: String
+            type: String,
         },
         systemName: {
             default: '',
-            type: String
+            type: String,
         },
         categoryId: {
             default: '',
-            type: String
+            type: String,
         },
         editTips: {
             // 编辑器文案
             type: String,
-            default: ''
+            default: '',
         },
         // 区分lengend 在外边 0 还是弹窗内部 1
         innerLeng: {
             type: Number,
-            default: 0
+            default: 0,
         },
         // 弹窗组件内部传入的楼层信息
         floorInfo: {
             type: Object,
             default() {
                 return {}
-            }
-        }
+            },
+        },
     },
     components: { lengendView, legendRemarks, lengendEdit },
     watch: {
@@ -194,7 +194,7 @@ export default {
                     }, this.interval)
                 }
             },
-            deep: true
+            deep: true,
         },
         '$store.state.categoryId': {
             handler(newV, oldV) {
@@ -206,7 +206,7 @@ export default {
                     }, this.interval)
                 }
             },
-            deep: true
+            deep: true,
         },
         // 弹窗组件内传入floorInfo,查询 getDraftNum
         floorInfo: {
@@ -219,13 +219,13 @@ export default {
                     }, this.interval)
                 }
             },
-            deep: true
-        }
+            deep: true,
+        },
     },
     '$refs.viewLengend': {
         handler(newV, oldV) {
             this.$refs.viewLengend.setSelected()
-        }
+        },
     },
     methods: {
         /**
@@ -247,7 +247,7 @@ export default {
                 Filters: `projectId='${this.plazaId}';isPub=false;BuildingId='1';categoryId='${categoryId}';floorId='${floorId}'`,
                 PageNumber: 1,
                 PageSize: 500,
-                Projection: ['floorId']
+                Projection: ['floorId'],
             }
             try {
                 // 调用接口
@@ -264,8 +264,8 @@ export default {
         },
         formatFloor() {
             this.floorSelectAble = []
-            this.floorSelectAble = this.floorSelect.filter(item => {
-                const hit = this.floors.find(i => i.gname == item.id)
+            this.floorSelectAble = this.floorSelect.filter((item) => {
+                const hit = this.floors.find((i) => i.gname == item.id)
                 return !hit
             })
         },
@@ -281,12 +281,12 @@ export default {
                 projectId: this.$store.state.plazaId,
                 BuildingID: '1',
                 Pub: true,
-                FloorID: this.$cookie.get('floorNow')
+                FloorID: this.$cookie.get('floorNow'),
             }
             let data = {}
-            queryRead({ data, postParams }).then(res => {
-                if (res.data.Data && res.data.Data[0].Note) {
-                    let Res = res.data ? res.data.Data[0].Note : ''
+            queryRead({ data, postParams }).then((res) => {
+                if (res.data) {
+                    let Res = res.data.Data && res.data.Data[0] ? res.data.Data[0].Note : ''
                     if (Res) {
                         this.$store.commit('SETREMARKSTEXT', Res)
                     } else {
@@ -353,20 +353,20 @@ export default {
             //弹窗组件点击新增楼层,确认的楼层 楼层字段处理
             if (this.floor) {
                 // 从store中筛选出选中的楼层信息
-                let floorInfo = this.$store.state.floorsArr.filter(item => item.gname === this.floor)[0]
+                let floorInfo = this.$store.state.floorsArr.filter((item) => item.gname === this.floor)[0]
                 FloorID = this.floor
                 floorName = floorInfo.code
                 seq = floorInfo.seq
                 categoryId = this.categoryId
             }
             const { conf } = window.__systemConf
-            const editerUrl = conf[process.env.NODE_ENV + '_editerUrl'];
-            if(this.plazaId){
+            const editerUrl = conf[process.env.NODE_ENV + '_editerUrl']
+            if (!this.plazaId) {
                 return
             }
             let data = `categoryId=${categoryId}&projectId=${this.plazaId}&BuildingID=1&FloorID=${FloorID}&FloorName=${floorName}&fmapID=${this.fmapID}&seq=${seq}&token=${this.ssoToken}`
             let url = editerUrl + 'editer?' + encodeURIComponent(data)
-            window.open(url, "edit")
+            window.open(url, 'edit')
         },
         handleSwich(val) {
             this.queryView(!val)
@@ -387,18 +387,18 @@ export default {
                 projectId: this.$store.state.plazaId,
                 flag: flag,
                 buildingId: '1',
-                floorId: this.$store.state.currentFloor.gname
+                floorId: this.$store.state.currentFloor.gname,
             }
             // 弹窗组件内传入floorInfo,使用其楼层id
             this.floorInfo.gname && (data.floorId = this.floorInfo.gname)
-            queryStatis({ data, postParams }).then(res => {
+            queryStatis({ data, postParams }).then((res) => {
                 this.$store.commit('SETPLANNUM', '')
                 this.loading = false
                 let viewTable = []
                 viewTable = res.data.Data ? res.data.Data : []
                 this.$store.commit('SETLEGENDTABLE', viewTable)
                 if (viewTable.length > 0) {
-                    viewTable.forEach(el => {
+                    viewTable.forEach((el) => {
                         if (el.Name == '主要设备房') {
                             this.$store.commit('SETPLANNUM', el.Num)
                         }
@@ -439,11 +439,11 @@ export default {
                 projectId: this.$store.state.plazaId,
                 flag: flag,
                 buildingId: '1',
-                floorId: this.$store.state.currentFloor.gname
+                floorId: this.$store.state.currentFloor.gname,
             }
             // 弹窗组件内传入floorInfo,使用其楼层id
             this.floorInfo.gname && (data.floorId = this.floorInfo.gname)
-            queryStatis({ data, postParams }).then(res => {
+            queryStatis({ data, postParams }).then((res) => {
                 this.loading1 = false
                 this.editTable = res.data.Data ? res.data.Data : []
             })
@@ -452,48 +452,48 @@ export default {
         queryEdit(val) {
             let arr = []
             if (val.length > 0) {
-                val.forEach(e => {
+                val.forEach((e) => {
                     let obj = {
                         BuildingId: '1',
                         Num: Number(e.Num),
                         GraphElementId: e.GraphElementId,
                         FloorId: this.$cookie.get('floorMapId'),
                         ProjectId: e.ProjectId,
-                        CategoryId: e.GraphCategoryId
+                        CategoryId: e.GraphCategoryId,
                     }
                     arr.push(obj)
                 })
             }
             let params = {
                 postParams: {
-                    Content: arr
-                }
+                    Content: arr,
+                },
             }
             updateStatis(params)
-                .then(res => {
+                .then((res) => {
                     if (res.Result == 'success') {
                         this.$message({
                             message: '操作成功',
-                            type: 'success'
+                            type: 'success',
                         })
                         this.$store.commit('SETSHOWVIEW', 1)
                     } else {
                         this.$message({
                             message: '操作失败',
-                            type: 'error'
+                            type: 'error',
                         })
                     }
                 })
-                .catch(err => {
+                .catch((err) => {
                     this.$message({
                         message: err,
-                        type: 'error'
+                        type: 'error',
                     })
                 })
         },
         saveNum(val) {
             if (val.length > 0) {
-                val.forEach(element => {
+                val.forEach((element) => {
                     element.Modify = element.IsModify
                 })
                 this.queryEdit(val)
@@ -526,7 +526,7 @@ export default {
             })
             // 备注
             bus.$off('queryRemarksMethods')
-            bus.$on('queryRemarksMethods', res => {
+            bus.$on('queryRemarksMethods', (res) => {
                 if (res) {
                     this.$store.commit('SETREMARKSTEXT', res)
                 } else {
@@ -557,7 +557,7 @@ export default {
                 dom.style.maxHeight = '434px'
                 this.tableHeigth = '334px'
             }
-        }
+        },
     },
     mounted() {
         this.init()
@@ -572,7 +572,7 @@ export default {
         })
         // 设置图例最大高度
         this.setLengedHeight()
-    }
+    },
 }
 </script>
 <style lang="less" scoped>

+ 4 - 1
src/components/menuList.vue

@@ -126,6 +126,9 @@ export default {
         toDrafts() {
             const { conf } = window.__systemConf
             // { editerUrl } = conf;
+            if(!this.plazaId){
+                return
+            }
             const editerUrl = conf[process.env.NODE_ENV + '_editerUrl']
             let data = `projectId=${this.plazaId}&fmapID=${this.fmapID}&token=${this.$store.state.ssoToken}`
             let url = editerUrl + 'drafts?' + encodeURIComponent(data)
@@ -178,7 +181,7 @@ export default {
         },
 
         dumpLegend() {
-            const { conf } = window.__systemConf
+            const { conf } = window.__systemConf;
             const wandaBmGuideUrl = conf[process.env.NODE_ENV + '_wandaBmGuideUrl']
             window.open(`${wandaBmGuideUrl}home/legendLibrary?token=${this.$store.state.ssoToken}`, "legendLibrary")
         }

+ 17 - 6
src/components/viewLengend.vue

@@ -30,6 +30,7 @@
                 ref='dataTable'
                 v-if='legendTable.length>=0'
                 :data='legendTable'
+                :height='tableHeight'
                 tooltip-effect='dark'
                 style='width:100%;'
                 @selection-change='handleSelectionChange'
@@ -78,7 +79,7 @@ export default {
         return {
             swich: true,
             multipleSelection: [],
-            key: 0
+            key: 0,
         }
     },
     methods: {
@@ -92,7 +93,7 @@ export default {
         },
         handleSelectionChange(val) {
             this.multipleSelection = val
-            const tempArr = val.map(t => {
+            const tempArr = val.map((t) => {
                 return t.GraphElementId
             })
             bus.$emit('changeShow', tempArr)
@@ -101,13 +102,20 @@ export default {
             this.$emit('changeSwitch', val)
         },
         setSelected() {
-            this.legendTable.forEach(t => {
+            this.legendTable.forEach((t) => {
                 this.$refs.dataTable.toggleRowSelection(t, true)
             })
-        }
+        },
     },
     computed: {
-        ...mapGetters(['scpzTable', 'legendTable', 'remarksText'])
+        ...mapGetters(['scpzTable', 'legendTable', 'remarksText']),
+        tableHeight() {
+            if (window.screen.height > 1000) {
+                return 500
+            } else {
+                return 334
+            }
+        },
         // initText() {
         // if (this.defaultComment) {
         //     return this.defaultComment
@@ -120,7 +128,7 @@ export default {
     updated() {
         this.setSelected()
     },
-    created() {}
+    created() {},
 }
 </script>
 <style lang="less" scoped>
@@ -203,6 +211,9 @@ export default {
             border: 1px solid rgba(255, 77, 79, 0.5) !important;
         }
     }
+    .el-table--scrollable-x .el-table__body-wrapper {
+        overflow-x: hidden;
+    }
 }
 </style>
 

+ 2 - 0
src/main.ts

@@ -55,6 +55,8 @@ document.addEventListener('readystatechange',()=>{
         IndexLoading.remove(indexLoading)
     }
 })
+
+
 new Vue({
     router,
     store,

+ 7 - 5
src/router/index.js

@@ -121,10 +121,11 @@ router.beforeEach(async (to, from, next) => {
             // 有token 将数据 isPreview赋给 vuex方便取值
             store.commit('SETISPREVIEW', sessionStorage.getItem("SETISPREVIEW"))
             // 如果在跳转获取token之前保存了指定的路径,则后去token后需要跳转到相关页面
-            if(to.path !='/group' || to.path !='/home/homepage' ){
+            console.log(to.path)
+            if(to.path !='/group' && to.path !='/home/homepage' && to.path !='/' ){
                 if(!store.state.permissions || store.state.permissions.length ==0){
                     // 如果没有请求permissions则请求getUserInfo
-                    await store.dispatch("getUserInfo", router)
+                    await store.dispatch("getUserInfoNoPath", router)
                 }
             }
 
@@ -214,10 +215,11 @@ function redirectGetToken (to) {
     if (previewUrl) {
         sessionStorage.setItem("SETISPREVIEW", previewUrl)
         store.commit('SETISPREVIEW', previewUrl)
-    }else{
-        sessionStorage.setItem("SETISPREVIEW", 'false')
-        store.commit('SETISPREVIEW', 'false')
     }
+    // else{
+    //     sessionStorage.setItem("SETISPREVIEW", 'false')
+    //     store.commit('SETISPREVIEW', 'false')
+    // }
     if (plazaId) {
         localStorage.setItem('PLAZAID', plazaId)
         store.commit('STOREPLAZAID', plazaId)

+ 21 - 29
src/store/index.js

@@ -1,20 +1,14 @@
 import Vue from 'vue'
 import Vuex from 'vuex'
-import {
-    login,
-    queryFloor,
-    queryfmapID
-} from '@/api/login.js'
-import {
-    queryBrand
-} from '@/api/public.js'
+import { login, queryFloor, queryfmapID } from '@/api/login.js'
+import { queryBrand } from '@/api/public.js'
 import axios from 'axios'
 import router from '../router'
 
 Vue.use(Vuex)
 export default new Vuex.Store({
     state: {
-        ssoToken: 'admin:liulin34',
+        ssoToken: 'admin:liujiandong',
         // ssoToken: '',
         // ssoToken: null,
         plazaName: '',
@@ -70,7 +64,7 @@ export default new Vuex.Store({
         planNum: (state) => state.planNum,
         typeNum: (state) => state.typeNum,
         isrequestAuth: (state) => state.isrequestAuth,
-        permissions:(state)=>state.permissions
+        permissions: (state) => state.permissions,
     },
     mutations: {
         SETPLAZENAME(state, data) {
@@ -167,20 +161,19 @@ export default new Vuex.Store({
     },
     actions: {
         // 获取项目列表、userId
-        async getUserInfo({
-            commit
-        }, palyload) {
+        async getUserInfo({ commit }, palyload) {
             await login({
-                    returnTree: true,
-                })
+                returnTree: true,
+            })
                 .then((res) => {
                     // 获取用户当前权限
                     console.log(res.result)
                     if (res.result === 'success') {
                         commit('STOREACCESSLEVEL', res.level)
-                        commit('SETAUTHMSG',res)
-                        let level = res.level;
-                        if (window.opener.__fromGroupPage) {
+                        commit('SETAUTHMSG', res)
+                        let level = res.level
+                        console.log('window.opener', window.opener)
+                        if (window.opener && window.opener.__fromGroupPage) {
                             let data = window.opener.__fromGroupPage
                             level = data.level
                             commit('SETPLAZENAME', data.plazaName)
@@ -198,6 +191,7 @@ export default new Vuex.Store({
                                 }
                                 router.push({
                                     path: './home/overview',
+                                    query: { plazaId: res.treeData[0].ccode },
                                 })
                             } else {
                                 router.push({
@@ -217,19 +211,17 @@ export default new Vuex.Store({
                     // commit('SETISREQUESTtAUTH', err)
                 })
         },
-        async getUserInfoNoPath({
-            commit
-        }, palyload) {
+        async getUserInfoNoPath({ commit }, palyload) {
             await login({
-                    returnTree: true,
-                })
+                returnTree: true,
+            })
                 .then((res) => {
                     if (res.result === 'success') {
-                        commit('STOREACCESSLEVEL', res.level)
-                        commit('SETAUTHMSG',res)
-                        localStorage.setItem('PLAZAID', res.treeData[0].ccode)
-                        commit('STOREPLAZAID', res.treeData[0].ccode)
-                        commit('SETPLAZENAME', res.treeData[0].cname)
+                        // commit('STOREACCESSLEVEL', res.level)
+                        commit('SETAUTHMSG', res)
+                        // localStorage.setItem('PLAZAID', res.treeData[0].ccode)
+                        // commit('STOREPLAZAID', res.treeData[0].ccode)
+                        // commit('SETPLAZENAME', res.treeData[0].cname)
                     }
                 })
                 .catch((err) => {
@@ -275,4 +267,4 @@ export default new Vuex.Store({
         },
     },
     modules: {},
-})
+})

+ 7 - 1
src/views/analysis/CoreDeviceReport.vue

@@ -300,7 +300,13 @@ export default {
         if (result === "success") {
           let newData = [],
             abnormalList = [];
-
+          if (!data[0].assetTypeList) {
+            this.tableData = [];
+            this.systemContentData = [];
+            this.curPage = 1;
+            this.tatol = 0;
+            return
+          }
           _.forEach(data[0].assetTypeList, (item, index) => {
             let itemData = {
               name: item.category_name,

+ 17 - 1
src/views/overview/index.vue

@@ -205,6 +205,9 @@
 import PicModal from './picModal'
 import { queryFact } from '@/api/overview'
 import { mapGetters } from 'vuex'
+import {
+    query
+} from "@/utils/query"
 export default {
     data() {
         return {
@@ -343,9 +346,10 @@ export default {
             // }
         },
         query() {
+            let plazaId = this.$route.query.plazaId ?this.$route.query.plazaId:this.plazaId
             let params = {
                 getParams: {
-                    plazaId: this.$store.state.plazaId || localStorage.getItem('PLAZAID'),
+                    plazaId: plazaId,
                     // plazaId: '1000303'//这个id有3条数据
                 },
             }
@@ -376,6 +380,8 @@ export default {
                     this.shuzihuayijiao = res.shuzihuayijiao ? res.shuzihuayijiao : ''
                     if (res.plazaName) {
                         this.$store.commit('SETPLAZENAME', res.plazaName)
+                    }else{
+                         this.$store.commit('SETPLAZENAME','')
                     }
                 }
             })
@@ -417,6 +423,16 @@ export default {
     components: {
         PicModal,
     },
+    watch: {
+        '$store.state.plazaId': {
+          handler(val,nel){
+           console.log('val',val,nel)
+           this.query()
+          },
+          immediate:true
+        }
+    },
+
 }
 </script>
 <style lang="less" scoped>

+ 240 - 195
src/views/statistics/index.vue

@@ -26,13 +26,16 @@
             </section>
             <section>
                 <TreeSelect
-                    width='280'
+                    class="special-my-tree-select"
+                    ref="treeSelect"
+                    width='300'
                     :hideClear='false'
                     :isReadOnly='false'
-                    :caption='"选择管理分区"'
+                    :caption='"选择管理分区"'
                     :data='regulateDistrictData'
-                    placeholder="全部"
+                    :placeholder="placeholder"
                     :disabled='false'
+                    v-model="selectedZone"
                     @change='selectProjectItem'
                 />
             </section>
@@ -59,7 +62,7 @@
                             <div class='system-equipments' v-if='item.assetTypeList'>
                                 <div class='number' v-for='(equip , index) in item.assetTypeList' :key='index'>
                                     <div class="title">
-                                        <P>{{equip.category_name}}</p>
+                                        <P :title="equip.category_name">{{equip.category_name}}</p>
                                         <span :style="{right: equip.is_exception_num > 99 ? '-2rem' :  equip.is_exception_num > 9 ? '-1.5rem' :'-1rem'}" v-if='equip.is_exception_num'>{{equip.is_exception_num}}</span>
                                     </div>
                                     <p>
@@ -97,7 +100,7 @@
                         <strong>{{plazaInfoCount.zhsxChangeCount}}</strong>
                     </div>
                 </section>
-                <section class='map-container'>
+                <section class='map-container' id="map-container">
                     <div id='map'></div>
                     <div class='legend'>
                         <div class='legend-bar' v-for='(bar , index) in legendList' :key='index'>
@@ -154,6 +157,7 @@
 
 <script>
 let myMaps = null
+import { Loading } from 'element-ui';
 import { login } from '@/api/login'
 import { getPlazaInfoCount, querySystemCard, getCardList, queryEventStatus } from '@/api/homePage'
 import { formatTime } from '@/utils/format.js'
@@ -165,6 +169,7 @@ import 'leaflet-contextmenu'
 export default {
     data() {
         return {
+            placeholder:'全部',
             crumbsHtml: [], // 导航数据
             zoneNames: {   // 各个中心对应的拼音名称
                 "东北": 'dongbei',
@@ -178,45 +183,45 @@ export default {
                 "东南": 'dongnan',
                 "其他": 'Other'
             },
-            provinceCities: {  // 各个区域的的省会城市  坐标 缩放级别 
-                "青岛": { province: 'shandong', center: [36.06667, 120.33333], zoom: 8 },
-                "北京": { province: 'beijing', center: [39.604882122321174, 116.43660987308282], zoom: 8 },
-                "天津": { province: 'tianjin', center: [39.130593, 117.260892], zoom: 7 },
-                "济南": { province: 'shandong', center: [36.4, 117.0], zoom: 7 },
-                "上海": { province: 'shanghai', center: [31.090574094954192, 121.46299249603001], zoom: 10 },
-                "南京": { province: 'jiangsu', center: [32.05, 118.78333], zoom: 7 },
-                "无锡": { province: 'jiangsu', center: [31.57, 120.3], zoom: 9 },
-                "厦门": { province: 'fujian', center: [24.46667, 118.1], zoom: 9 },
-                "宁波": { province: 'zhejiang', center: [29.52, 121.33], zoom: 8 },
-                "杭州": { province: 'zhejiang', center: [30.323100460201648, 120.50270908851112], zoom: 9 },
-                "福州": { province: 'fujian', center: [26.05, 119.18], zoom: 8 },
-                "合肥": { province: 'anhui', center: [31.52, 117.17], zoom: 7 },
-                "长沙": { province: 'hunan', center: [28.12, 112.59], zoom: 8 },
-                "南昌": { province: 'jiangxi', center: [28.4, 115.55], zoom: 8 },
-                "大连": { province: 'liaoning', center: [39.98974718404572, 122.66034125625548], zoom: 8 },
-                "沈阳": { province: 'liaoning', center: [41.72213058512578, 122.93479223528372], zoom: 8 },
-                "长春": { province: 'jilin', center: [42.88033923363183, 127.02188147691707], zoom: 8 },
-                "东莞": { province: 'guangdong', center: [23.644524198573688, 114.83844948916203], zoom: 8 },
-                "南宁": { province: 'guangxi', center: [22.48, 108.19], zoom: 7 },
-                "广州": { province: 'guangdong', center: [22.755920681486405, 112.01244459124548], zoom: 7 },
-                "太原": { province: 'shanxi1', center: [37.54, 112.33], zoom: 7 },
-                "武汉": { province: 'hubei', center: [31.147006308556566, 112.97898510653813], zoom: 7 },
-                "郑州": { province: 'henan', center: [34.46, 113.4], zoom: 7 },
-                "哈尔滨": { province: 'heilongjiang', center: [46.800059446787316, 128.40505022926592], zoom: 7 },
-                "乌鲁木齐": { province: 'xinjiang', center: [43.45, 87.36], zoom: 8 },
-                "呼和浩特": { province: 'neimenggu', center: [45.182036837015886, 116.82329020199336], zoom: 5 },
-                "西安": { province: 'shanxi2', center: [36.08462129606931, 109.4527754086213], zoom: 7 },
-                "银川": { province: 'ningxia', center: [38.108627664321276, 102.36578196225639], zoom: 7 },
-                "成都": { province: 'sichuan', center: [30.24957724046765, 103.4647651330231], zoom: 7 },
-                "昆明": { province: 'yunnan', center: [25.903703303407667, 105.10972266685498], zoom: 8 },
-                "重庆": { province: 'chongqing', center: [29.35, 106.33], zoom: 8 }
+            provinceCities: {  // 各个区域的的中心坐标 缩放级别 
+                "青岛": {  center: [36.06667, 120.33333], zoom: 8 },
+                "北京": {  center: [39.604882122321174, 116.43660987308282], zoom: 8 },
+                "天津": {  center: [39.130593, 117.260892], zoom: 7 },
+                "济南": {  center: [36.4, 117.0], zoom: 7 },
+                "上海": {  center: [31.090574094954192, 121.46299249603001], zoom: 10 },
+                "南京": {  center: [32.05, 118.78333], zoom: 7 },
+                "无锡": {  center: [31.57, 120.3], zoom: 9 },
+                "厦门": {  center: [24.46667, 118.1], zoom: 9 },
+                "宁波": {  center: [29.52, 121.33], zoom: 8 },
+                "杭州": {  center: [30.323100460201648, 120.50270908851112], zoom: 9 },
+                "福州": {  center: [26.05, 119.18], zoom: 8 },
+                "合肥": {  center: [31.52, 117.17], zoom: 7 },
+                "长沙": {  center: [28.12, 112.59], zoom: 8 },
+                "南昌": {  center: [28.4, 115.55], zoom: 8 },
+                "大连": {  center: [39.98974718404572, 122.66034125625548], zoom: 8 },
+                "沈阳": {  center: [41.72213058512578, 122.93479223528372], zoom: 8 },
+                "长春": {  center: [42.88033923363183, 127.02188147691707], zoom: 8 },
+                "东莞": {  center: [23.644524198573688, 114.83844948916203], zoom: 8 },
+                "南宁": {  center: [22.48, 108.19], zoom: 7 },
+                "广州": {  center: [22.755920681486405, 112.01244459124548], zoom: 7 },
+                "太原": {  center: [37.54, 112.33], zoom: 7 },
+                "武汉": {  center: [31.147006308556566, 112.97898510653813], zoom: 7 },
+                "郑州": {  center: [34.46, 113.4], zoom: 7 },
+                "哈尔滨": {  center: [46.800059446787316, 128.40505022926592], zoom: 7 },
+                "乌鲁木齐": { center: [43.45, 87.36], zoom: 8 },
+                "呼和浩特": { center: [45.182036837015886, 116.82329020199336], zoom: 5 },
+                "西安": { center: [36.08462129606931, 109.4527754086213], zoom: 7 },
+                "银川": { center: [38.108627664321276, 102.36578196225639], zoom: 7 },
+                "成都": { center: [30.24957724046765, 103.4647651330231], zoom: 7 },
+                "昆明": { center: [25.903703303407667, 105.10972266685498], zoom: 8 },
+                "重庆": { center: [29.35, 106.33], zoom: 8 }
             },
             zoneCenter: {  // 各个区域的中心坐标
                 dongbei: [43.161614, 124.396818], // 取自 东北运营中心 长春区域 四平万达广场
                 xibei: [37.999781, 106.197518], // 西北  银川区域 吴忠万达广场     zoom 5
                 huabei: [39.019075, 117.686953], // 华北中心  天津区域  天津塘沽万达广场
                 huazhong: [33.999249, 113.872131], // 华中 郑州 许昌万达广场
-                huadong: [32.477565, 119.923391], // 华东 南京 泰州
+                huadong: [31.477565, 119.923391], // 华东 南京 泰州
                 zhongnan: [28.860875644389676, 114.55131767165491],
                 huanan: [22.635788, 110.17923], // 华南 南宁 玉林万达广场
                 dongnan: [26.657907, 119.545678], //东南 福州 宁德万达广场
@@ -238,32 +243,27 @@ export default {
             currentSysId: '', // 当前系统ID
             regulateDistrictData: [], // 分区数据
             maintainList: [],  // 专维  维保  第三方检测 数据
-            circleSize: {  // 根据缩放级别 规定绘制点的尺寸  下标文字离点的距离
-                4: { inner: 50000, outer: 100000, offset: 2 },
-                5: { inner: 15000, outer: 30000, offset: 0.8 },
-                6: { inner: 15000, outer: 30000, offset: 0.8 },
-                7: { inner: 8000, outer: 16000, offset: 0.3 },
-                8: { inner: 4000, outer: 8000, offset: 0.14 },
-                9: { inner: 2000, outer: 4000, offset: 0.08 },
-                10: { inner: 1000, outer: 2000, offset: 0.04 },
-                11: { inner: 1000, outer: 2000, offset: 0.04 }
-            },
             barColors :{  // // 专维  维保  第三方检测 颜色
                 0: 'linear-gradient(to right, #369CF7 , #025BAA)',   // 蓝色
                 1: 'linear-gradient(to right, #F58300 , #F58300)',   // 黄色
                 2: 'linear-gradient(to right, #F54E45 , #F54E45)'    // 红色
-            }
+            },
+            selectedZone:'',
+            loadingInstance:null
         }
     },
     computed: {
         ...mapGetters(['plazas', 'plazaId', 'accessLevel'])
     },
-    watch: {},
+    watch: {
+         
+    },
     created() {
         this.currentTime()
     },
     mounted() {
-    
+         
+        
         window.vm = this
         this.getFrameworkTreeData()
         window.addEventListener('resize', this.reinitalMap, false)
@@ -329,6 +329,9 @@ export default {
             let data = this.getDataByCityCcode(id)  // 根据
             if (!data) return
             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)
@@ -349,6 +352,10 @@ export default {
          * @Param data 返回选中项的数据
          */
         selectProjectItem(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必填
@@ -356,7 +363,6 @@ export default {
             } else {
                 this.queryPlazaInfoCount(data.ccode, data.level)
             }
-       
             this.getSystemList(data.ccode, data.level) 
             this.getEventStatusData(this.currentLevel, data.ccode)
             this.createNavpathByData(data)
@@ -374,7 +380,7 @@ export default {
                 let routeData = this.$router.resolve({  
                     name:'/home/homePage',
                 })
-                window.open(routeData.href, true);
+                window.open(routeData.href, '_blank');
                 window.__fromGroupPage = {
                     level: 0,
                     plazaName: data.cname,
@@ -382,8 +388,6 @@ export default {
                 }
                 this.$store.commit('SETPLAZENAME', data.cname) 
                 localStorage.setItem('PLAZAID', data.ccode)
-                this.$store.commit('STOREPLAZAID', data.ccode) 
-                this.$store.commit('SETISGETMAP',true) 
             }
         },
    
@@ -447,7 +451,9 @@ export default {
                     data.open = true  // 默认展开第一级
                     this.regulateDistrictData = [data]
                     this.currentDistrictData = res.treeData
-                    this.getSystemList(data.ccode, level )
+                    this.getSystemList(data.ccode, level ).then(res => {
+                        this.initMap()
+                    })
                     this.getEventStatusData(level, data.ccode)
                     if (level === 0) {  //  level=0时 plazaId必填
                         this.queryPlazaInfoCount(data.ccode, level, data.ccode)
@@ -549,30 +555,19 @@ export default {
         * @Param data 作为判断的数据
         */
         paintColorByData(data) {
-            let color = {
-                area: '',
-                border: ''
-            }
             if (data >= 200) {
-                color.area = '#F54E45'
-                color.border = 'rgba(245,78,69,0.2)'
+                return  'level5'
             } else if (data >= 100 && data < 200) {
-                color.area = '#F58300'
-                color.border = 'rgba(245,131,0,0.2)'
+                return 'level4'
             } else if (data >= 50 && data < 100) {
-                color.area = '#FFBA6B'
-                color.border = 'rgba(255,186,107,0.2)'
+                return  'level3'
             } else if (data >= 10 && data < 50) {
-                color.area = '#0091FF'
-                color.border = 'rgba(0,145,255,0.2)'
+                return 'level2'
             } else if (data >= 1 && data < 10) {
-                color.area = '#82C7FC'
-                color.border = 'rgba(130,199,25,0.2)'
+                return 'level1'
             } else {
-                color.area = '#EEEEEE'
-                color.border = '#CCC'
+                return 'level0'
             }
-            return color
         },
         /**
         * @Description 显示当期时间
@@ -607,25 +602,27 @@ export default {
             } else {
                 params = {getParams:{ccode, level}}
             }
-            getCardList(params).then(res => {
-                if (res.result == 'success') {
-                    let result = res.data
-                    if (result && Array.isArray(result)) {
-                        result.forEach(item => {
-                            if (item.assetTypeList) {
-                                item.assetTypeList = item.assetTypeList.splice(0, 3)
-                            }
-                        })
-                        res.data.forEach(item => {
-                            item.selected = false
-                        })
-                        res.data[0].selected = true
-                        this.currentSelectedSys = res.data[0]
-                        this.currentSysId = res.data[0].smsxt
-                        this.systemList = res.data
-                        this.initMap()
+            return new Promise((resolve,reject) => {
+                getCardList(params).then(res => {
+                    if (res.result == 'success') {
+                        let result = res.data
+                        if (result && Array.isArray(result)) {
+                            result.forEach(item => {
+                                if (item.assetTypeList) {
+                                    item.assetTypeList = item.assetTypeList.splice(0, 3)
+                                }
+                            })
+                            res.data.forEach(item => {
+                                item.selected = false
+                            })
+                            res.data[0].selected = true
+                            this.currentSelectedSys = res.data[0]
+                            this.currentSysId = res.data[0].smsxt
+                            this.systemList = res.data
+                            resolve(res)
+                        }
                     }
-                }
+                })
             })
         },
         /**
@@ -682,17 +679,17 @@ export default {
             myMaps = L.map('map', {
                 center: new L.LatLng(38, 103),
                 zoom: 4,
-                // maxZoom:4,
-                // minZoom:4,
                 crs: L.CRS.EPSG3857,
                 zoomControl: false,
                 boxZoom: false,
                 attributionControl: false,
                 contextmenu: true,
                 contextmenuWidth: 140,
-                dragging: false,
                 closePopupOnClick:true,
-                doubleClickZoom:false
+                doubleClickZoom:false,
+                wheelPxPerZoomLevel:20
+                // scrollWheelZoom:false,
+                // dragging: false,
             })
             let JsonData = require('../../assets/geoData/china.json')
             let layer = L.geoJSON(JsonData.features, {
@@ -768,6 +765,7 @@ export default {
             let groupLayer = new L.layerGroup()
             let promiseAll = []
             let layerArr = []
+            this.loadingInstance = Loading.service({target:'#map', fullscreen: false, text:'数据正在加载...', background:'rgba(255,255,255,.5)'})
             data.children.forEach(item => {
                 let promise = new Promise((resolve, reject) => {
                     let params = {
@@ -781,7 +779,7 @@ export default {
                         if (res.result === 'success') {
                             let num = 0
                             let name = item.cname.substr(0, 2)
-                            if (res.data) {
+                            if (res.data ) {
                                 let equip = res.data[0]
                                 if (equip.assetTypeList) {
                                     equip.assetTypeList.forEach(item => {
@@ -797,7 +795,7 @@ export default {
                                         fullName: item.cname
                                     })
                                 }
-                                resolve(item)
+                                resolve(res)
                             }
                         }
                     })
@@ -805,14 +803,17 @@ export default {
                 promiseAll.push(promise)
             })
             Promise.all(promiseAll).then(result => {
-                layerArr.forEach(item => {
-                    let zone = this.zoneNames[item.name]
-                    let center = this.zoneCenter[zone]
-                    let contentHtml = that.createPopupHtmlContent(item.list.assetTypeList, item.fullName)
-                    if (contentHtml) {
-                        this.createPointOnMap(item.num, groupLayer, contentHtml, center, item.data, item.name , 'group', 4)
-                    }
-                })
+                this.loadingInstance.close()
+                if (this.currentLevel === 1) {
+                    layerArr.forEach(item => {
+                        let zone = this.zoneNames[item.name]
+                        let center = this.zoneCenter[zone]
+                        let contentHtml = that.createPopupHtmlContent(item.list.assetTypeList, item.fullName)
+                        if (contentHtml) {
+                            this.createPointOnMap(item.num, groupLayer, contentHtml, center, item.data, item.name , 'group', 4)
+                        }
+                    })
+                }
             })
             groupLayer.addTo(myMaps)
         },
@@ -826,45 +827,70 @@ export default {
             let name = data.cname.substr(0, 2)
             let zone = this.zoneNames[name]
             let zoom, inner, outer, offset
-            if (['xibei'].includes(zone)) {
+            if (zone === 'huadong') {
+                zoom = 8
+            } else if ( zone == 'xibei') {
                 zoom = 5
             } else {
                 zoom = 6
             }
             this.flyTo(this.zoneCenter[zone], zoom)
             let groupLayer = new L.layerGroup()
+            let promiseAll = []
+            let layerArr = []
+            this.loadingInstance = Loading.service({target:'#map', fullscreen: false, text:'数据正在返回...', background:'rgba(255,255,255,.5)'})
             data.children.forEach(item => {
-                let params = {
-                    getParams: {
-                        smsxt: this.currentSysId, 
-                        level: 3,   // 区域
-                        ccode: item.ccode
+                let promise = new Promise((resolve, reject) => {
+                    let params = {
+                        getParams: {
+                            smsxt: this.currentSysId, 
+                            level: 3,   // 区域
+                            ccode: item.ccode
+                        }
                     }
-                }
-                querySystemCard(params).then(res => {
-                    if (res.result === 'success') {
-                        let name = item.cname.split('区域')[0]
-                        let city = that.provinceCities[name]
-                        let num = 0
-                        let center = city.center
-                        if (res.data) {
-                            let equip = res.data[0]
-                            let contentHtml = that.createPopupHtmlContent(equip.assetTypeList, item.cname)
-                            if (equip.assetTypeList) {
-                                equip.assetTypeList.forEach(item => {
-                                    if (item.is_exception_num) {
-                                        num += item.is_exception_num
-                                    }
-                                })
+                    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]
+                                if (equip.assetTypeList) {
+                                    equip.assetTypeList.forEach(item => {
+                                        if (item.is_exception_num) {
+                                            num += item.is_exception_num
+                                        }
+                                    })
+                                    layerArr.push({
+                                        name,
+                                        num,
+                                        list: equip,
+                                        data: item,
+                                        fullName: item.cname
+                                    })
+                                }
                             }
-                            that.createPointOnMap(num, groupLayer, contentHtml, center, item, item.cname, 'zone', 6)
+                            resolve(res)
                         }
-                    }
+                    })
                 })
+                promiseAll.push(promise)
+            })
+            Promise.all(promiseAll).then(result => {
+                this.loadingInstance.close()
+                if (this.currentLevel === 2) {
+                    layerArr.forEach(item => {
+                        let city = that.provinceCities[item.name]
+                        let center = city.center
+                        let contentHtml = that.createPopupHtmlContent(item.list.assetTypeList, item.fullName)
+                        if (contentHtml) {
+                            that.createPointOnMap(item.num, groupLayer, contentHtml, center, item.data, item.data.cname, 'zone', zoom)
+                        }
+                    })
+                }
             })
             groupLayer.addTo(myMaps)
         },
-        
         /**
          * @Description 用于绘制项目的点
          * @Param data 数据
@@ -873,47 +899,62 @@ export default {
             this.clearAllLayers()
             let name = data.cname.split('区域')[0]
             let geo = this.provinceCities[name]
-            this.flyTo(geo.center, geo.zoom)
-            data.children.forEach(item => {
-                this.pantPlazaMap(item, geo.zoom)
-            })
-        },
-        /**
-         * @Description 用于绘制广场
-         * @Param data 数据
-         */
-        pantPlazaMap(item, zoom) {
             let that = this
+            let promiseAll = []
+            let layerArr = []
             let groupLayer = new L.layerGroup()
-            let params = {
-                getParams: {
-                    plazaId: item.cid,   // 所查对象是广场的时候plazaId必传
-                    smsxt: this.currentSysId,  
-                    level: 0,   // 广场
-                    ccode: item.ccode
-                }
-            }
-            querySystemCard(params).then(res => {
-                if (res.result === 'success') {
-                    let num = 0
-                    if (item.latitude && item.longitude) {
-                        let center = [item.latitude, item.longitude]
-                        if (res.data) {
-                            let equip = res.data[0]
-                            let contentHtml = that.createPopupHtmlContent(equip.assetTypeList, item.cname)
-                            if (equip.assetTypeList) {
-                                equip.assetTypeList.forEach(item => {
-                                    if (item.is_exception_num) {
-                                        num += item.is_exception_num
-                                    }
+            this.flyTo(geo.center, geo.zoom)
+            this.loadingInstance = Loading.service({target:'#map', fullscreen: false, text:'数据正在返回...', background:'rgba(255,255,255,.5)'})
+            data.children.forEach(item => {
+                let pormise = new Promise((resolve, reject) => {
+                    let params = {
+                        getParams: {
+                            plazaId: item.cid,   // 所查对象是广场的时候plazaId必传
+                            smsxt: this.currentSysId,  
+                            level: 0,   // 广场
+                            ccode: item.ccode
+                        }
+                    }
+                    querySystemCard(params).then(res => {
+                        if (res.result === 'success') {
+                            let num = 0
+                            if (res.data && item.latitude && item.longitude) {
+                                let equip = res.data[0]
+                                if (equip.assetTypeList) {
+                                    equip.assetTypeList.forEach(item => {
+                                        if (item.is_exception_num) {
+                                            num += item.is_exception_num
+                                        }
+                                    })
+                                }
+                                layerArr.push({
+                                    name,
+                                    num,
+                                    list: equip,
+                                    data: item,
+                                    fullName: item.cname
                                 })
                             }
-                            that.createPointOnMap(num, groupLayer, contentHtml, center, item, item.cname, 'project', zoom)
+                            resolve(res)
                         }
-                    }
+                        groupLayer.addTo(myMaps)
+                    })
+                })
+                promiseAll.push(pormise)
+            })
+            Promise.all(promiseAll).then(result => {
+                this.loadingInstance.close()
+                if (this.currentLevel === 3) {
+                    layerArr.forEach(item => {
+                        let center = [item.data.latitude, item.data.longitude]
+                        let contentHtml = that.createPopupHtmlContent(item.list.assetTypeList, item.fullName)
+                        if (contentHtml) {
+                            that.createPointOnMap(item.num, groupLayer, contentHtml, center, item.data, item.data.cname, 'project', geo.zoom)
+                        }
+                    })
                 }
-                groupLayer.addTo(myMaps)
             })
+            groupLayer.addTo(myMaps)
         },
          /**
          * @Description 用于绘制广场的点
@@ -927,26 +968,29 @@ export default {
          * @param zoom 缩放级别
          */
         createPointOnMap (num, groupLayer, contentHtml, center, data,  name, type , zoom) {
-            let popup = null
-            let marker = null
-            let outCircle = null
-            let innerCircle = null
             let color = this.paintColorByData(num)
-            let myIcon = L.divIcon({
-                html: name,
+            let textIcon = L.divIcon({
+                html: type =='group' ? name :`<div>${name}</div>`,
                 className: 'my-leaflet-div-icon',
                 iconSize: 30
             }) 
-            let sizes = this.circleSize[zoom]
+            let circleIcon = L.icon({
+                iconUrl: require(`../../assets/images/icons/${color}.png`),
+                iconSize: [24, 24],
+                iconAnchor: [16, 38],
+            });
+ 
             if (color  && center) { 
-                popup = L.popup({closeOnClick:true}).setLatLng(center).setContent(contentHtml)
-                marker = L.marker([center[0] - sizes.offset,  center[1]], { icon: myIcon }).addTo(groupLayer)
-                outCircle = L.circle(center, sizes.outer, { color: 'transparent', fillColor: color.border, fillOpacity: 1 }).bindPopup(contentHtml).addTo(groupLayer)
-                innerCircle =L.circle(center, sizes.inner, { color: 'transparent', fillColor: color.area, fillOpacity: 1 }).bindPopup(contentHtml).addTo(groupLayer)
-                let feaureGroup = L.featureGroup([marker, outCircle, innerCircle, popup])
-                feaureGroup.on('mouseover', ev => {
+                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)
+                let feaureGroup = L.featureGroup([marker, marker2 ])
+                marker2.on('mouseover', ev => {
                     popup.openOn(myMaps)
                 })
+                marker2.on('mouseout', ev => {
+                    myMaps.closePopup(popup)
+                })
                 feaureGroup.on('click', ev => {
                     this.currentZoneData = data
                     this.currentLevel = data.level
@@ -956,7 +1000,7 @@ export default {
                         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)
                     } 
@@ -975,12 +1019,9 @@ export default {
                         }
                         this.$store.commit('SETPLAZENAME', data.cname) 
                         localStorage.setItem('PLAZAID', data.ccode)
-                        this.$store.commit('STOREPLAZAID', data.ccode) 
-                        this.$store.commit('SETISGETMAP',true) 
                     }   
                 })
             }
-          
         },
         /**
          *@Description 生成弹出框HTML
@@ -1037,9 +1078,9 @@ export default {
 .selectDownUpExtendTop-leave-active {
     animation: selectDownUpExtendTop .3s reverse
 }
-.p-tree-single-panel{
-    height: 400!important;
-}
+ /deep/ .p-tree-single-panel{
+     height: 400px!important;
+ }
 .overview {
     height: 100vh;
     background: rgba(247, 249, 250, 1);
@@ -1168,11 +1209,12 @@ export default {
             }
             span:first-child {
                 display: inline-block;
-                width: 14.4rem;
-                height: 2.8rem;
+                width: auto;
+                height: 3rem;
                 margin-right: 1.2rem;
                 border: 1px solid rgba(195, 199, 203, 1);
                 border-radius: 1.4rem;
+                padding: 0 2rem;
                 text-align: center;
                 line-height: 2.8rem;
                 font-size: 14px;
@@ -1231,7 +1273,7 @@ export default {
                         .system-name {
                             display: flex;
                             align-items: center;
-                            width: 28%;
+                            width: 25%;
                             padding: 1.2rem 0 1.2rem 1rem ;  
                             border-right: 1px solid #EFF0F1;
                             .img {
@@ -1260,23 +1302,22 @@ export default {
                             }
                         }
                         .system-equipments {
-                            width: 72%;
+                            width: 75%;
                             display: flex;
                             align-items: center;
                             padding-left: 1.4rem;
                             .number {
                                 width: 33.3%;
-                                margin-right: 1.2rem;
                                 .title{
                                     display: inline-block;
                                     position: relative;
                                     p{
                                         display: inline-block;
                                         position: relative;
-                                        width: 100%;
+                                        width: 12rem;
                                         color: #1f2429;
                                         font-size: 1.4rem;
-                                        line-height: 1.6rem;
+                                        line-height: 2rem;
                                         white-space: nowrap;
                                         text-overflow: ellipsis;
                                         overflow: hidden;
@@ -1300,6 +1341,7 @@ export default {
                                     }
                                 }
                             }
+                             
                         }
                     }
                     li.selected {
@@ -1310,8 +1352,8 @@ export default {
                         border-bottom: none;
                     }
                     li:hover {
-                        border-color: #66addd;
-                        box-shadow: 0 2px 10px 0px rgba(204, 100, 77, 0.4);
+                        border-color: #E4E5E7;
+                        box-shadow: 0 2px 10px 0px rgba(195, 199, 203, 0.4);
                     }
                 }
             }
@@ -1365,7 +1407,10 @@ export default {
                 #map {
                     height: 70vh;
                     overflow: hidden;
-                    pointer-events: none;
+                    
+                    svg {
+                        pointer-events: none; 
+                    }
                 }
                 .legend {
                     position: absolute;
@@ -1427,7 +1472,7 @@ export default {
                 .list {
                     margin-top: 1.4rem;
                     overflow: hidden;
-                    height: calc(100% - 3rem);
+                    height: calc(100% - 4rem);
                     ul {
                         li {
                             display: flex;

+ 25 - 25
vue.config.js

@@ -1,17 +1,17 @@
-const CompressionPlugin = require('compression-webpack-plugin')
+const CompressionPlugin = require("compression-webpack-plugin")
 module.exports = {
     devServer: {
         port: 8090,
         proxy: {
-            '/data': {
-                target: 'http://60.205.177.43',
+            "/data": {
+                target: "http://60.205.177.43",
                 // target: 'http://10.199.143.126',
                 // target: 'http://192.168.200.11:9003', //yll
                 // target: 'http://localhost:6040/data/',
                 changeOrigin: true,
                 secure: false,
                 pathRewrite: {
-                    '^/data': '/data',
+                    "^/data": "/data",
                 },
             },
             // // 工程信息化服务
@@ -24,27 +24,27 @@ module.exports = {
             //     },
             // },
             // 万达蜂鸟服务
-            '/wdfn': {
-                target: 'http://map.wanda.cn',
+            "/wdfn": {
+                target: "http://map.wanda.cn",
                 changeOrigin: true,
                 pathRewrite: {
-                    '^/wdfn': '/editor',
+                    "^/wdfn": "/editor",
                 },
             },
             // 图例库服务
-            '/serve': {
+            "/serve": {
                 // target: 'http://192.168.200.87:8088',
-                target: 'http://60.205.177.43:8080',
+                target: "http://60.205.177.43:8080",
                 changeOrigin: true,
                 pathRewrite: {
-                    '^/serve': '',
+                    "^/serve": "",
                 },
             },
-            '/version': {
-                target: 'http://mapapp.wanda.cn/',
+            "/version": {
+                target: "http://mapapp.wanda.cn/",
                 changeOrigin: true,
                 pathRewrite: {
-                    '^/version': '/sgmap/mapversion',
+                    "^/version": "/sgmap/mapversion",
                 },
             },
         },
@@ -56,27 +56,27 @@ module.exports = {
         },
     },
     chainWebpack: (config) => {
-        const svgRule = config.module.rule('svg')
+        const svgRule = config.module.rule("svg")
         svgRule.uses.clear()
         svgRule
-            .use('babel-loader')
-            .loader('babel-loader')
+            .use("babel-loader")
+            .loader("babel-loader")
             .end()
-            .use('vue-svg-loader')
-            .loader('vue-svg-loader')
-        config.output.filename('static/js/[name].[hash].js').end()
-        config.output.chunkFilename('static/js/[name].[hash].js').end()
+            .use("vue-svg-loader")
+            .loader("vue-svg-loader")
+        config.output.filename("static/js/[name].[hash].js").end()
+        config.output.chunkFilename("static/js/[name].[hash].js").end()
     },
     lintOnSave: false,
-    publicPath: '/wandaBmGuide',
+    publicPath: "/wandaBmGuide",
     // 打包名称
-    outputDir: 'wandaBmGuide',
+    outputDir: "wandaBmGuide",
     // 放置生成的静态资源 (js、css、img、fonts) 的 (相对于 outputDir 的) 目录
-    assetsDir: 'static',
+    assetsDir: "static",
     transpileDependencies: [
-        '@saga-web', // 指定对第三方依赖包进行babel-polyfill处理
+        "@saga-web", // 指定对第三方依赖包进行babel-polyfill处理
         "@ant-design",
-        "element-ui"
+        "element-ui",
     ],
     productionSourceMap: false, //
     // CSS 相关选项