Sfoglia il codice sorgente

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

fujunwen 4 anni fa
parent
commit
a94eb4a5bc
100 ha cambiato i file con 68253 aggiunte e 2785 eliminazioni
  1. 5 0
      env.prod.js
  2. 5 0
      env.test.js
  3. 12 8
      package.json
  4. 100 30
      public/index.html
  5. 84 0
      public/indexLoading.css
  6. 11 7
      public/systemConf.js
  7. 210 165
      src/App.vue
  8. 1 1
      src/api/coreDeviceReport.js
  9. 10 10
      src/api/equipmentList.js
  10. 3 5
      src/api/homePage.js
  11. 40 25
      src/api/httputils.js
  12. 5 5
      src/api/other.js
  13. 10 2
      src/api/public.js
  14. 12 7
      src/api/room.js
  15. 11 3
      src/assets/css/rotation.css
  16. 11 3
      src/assets/css/rotation.less
  17. BIN
      src/assets/images/icons/level0.png
  18. BIN
      src/assets/images/icons/level1.png
  19. BIN
      src/assets/images/icons/level2.png
  20. BIN
      src/assets/images/icons/level3.png
  21. BIN
      src/assets/images/icons/level4.png
  22. BIN
      src/assets/images/icons/level5.png
  23. BIN
      src/assets/imgs/2020.png
  24. BIN
      src/assets/imgs/20200.png
  25. BIN
      src/assets/imgs/eye2.jpg
  26. BIN
      src/assets/imgs/zffz.png
  27. BIN
      src/assets/imgs/zy2.png
  28. 1944 0
      src/assets/provinceData/anhui.json
  29. 1413 0
      src/assets/provinceData/beijing.json
  30. 1931 0
      src/assets/provinceData/chongqing.json
  31. 2581 0
      src/assets/provinceData/fujian.json
  32. 2119 0
      src/assets/provinceData/gansu.json
  33. 2854 0
      src/assets/provinceData/guangdong.json
  34. 2213 0
      src/assets/provinceData/guangxi.json
  35. 2279 0
      src/assets/provinceData/guizhou.json
  36. 1722 0
      src/assets/provinceData/hebei.json
  37. 2225 0
      src/assets/provinceData/heilongjiang.json
  38. 2097 0
      src/assets/provinceData/henan.json
  39. 2211 0
      src/assets/provinceData/hubei.json
  40. 2126 0
      src/assets/provinceData/hunan.json
  41. 1468 0
      src/assets/provinceData/jiangsu.json
  42. 1798 0
      src/assets/provinceData/jiangxi.json
  43. 2745 0
      src/assets/provinceData/jilin.json
  44. 2587 0
      src/assets/provinceData/liaoning.json
  45. 1756 0
      src/assets/provinceData/neimenggu.json
  46. 1220 0
      src/assets/provinceData/ningxia.json
  47. 1956 0
      src/assets/provinceData/qinghai.json
  48. 2261 0
      src/assets/provinceData/shandong.json
  49. 982 0
      src/assets/provinceData/shanghai.json
  50. 1264 0
      src/assets/provinceData/shanxi1.json
  51. 813 0
      src/assets/provinceData/shanxi2.json
  52. 2039 0
      src/assets/provinceData/sichuan.json
  53. 1249 0
      src/assets/provinceData/tianjin.json
  54. 1250 0
      src/assets/provinceData/xinjiang.json
  55. 2315 0
      src/assets/provinceData/xizang.json
  56. 1814 0
      src/assets/provinceData/yunnan.json
  57. 3074 0
      src/assets/provinceData/zhejiang.json
  58. 6384 0
      src/assets/regionData/other.json
  59. 91 83
      src/components/404.vue
  60. 271 163
      src/components/Legend/src/legend.vue
  61. 83 16
      src/components/PicLarge/src/picLarge.vue
  62. BIN
      src/components/Rotation/src/3440.jpg
  63. 112 58
      src/components/Rotation/src/rotation.vue
  64. 79 33
      src/components/editLengend.vue
  65. 131 123
      src/components/floorList.vue
  66. 1 1
      src/components/floorListOther.vue
  67. 3 2
      src/components/floorMap/canvasFun.vue
  68. 518 152
      src/components/floorMap/index.vue
  69. 63 17
      src/components/legendremarks.vue
  70. 27 14
      src/components/menuList.vue
  71. 50 21
      src/components/viewLengend.vue
  72. 230 0
      src/directives/dom.js
  73. 24 0
      src/directives/repeat-click.js
  74. 6 6
      src/lib/FloorScene.js
  75. 0 86
      src/lib/items/HighlightItem.js
  76. 273 0
      src/lib/items/SCustomLegendItem.ts
  77. 0 188
      src/lib/items/SFHFQZoneLegendItem.js
  78. 142 98
      src/lib/items/SFHFQZoneLegendItem.ts
  79. 0 107
      src/lib/items/SImageLegendItem.js
  80. 130 56
      src/lib/items/SImageLegendItem.ts
  81. 0 37
      src/lib/items/SImageMarkerItem.js
  82. 25 1
      src/lib/items/SImageMarkerItem.ts
  83. 0 47
      src/lib/items/SLineLegendItem.js
  84. 4 0
      src/lib/items/SLineLegendItem.ts
  85. 0 121
      src/lib/items/SLineMarkerItem.js
  86. 60 50
      src/lib/items/SLineMarkerItem.ts
  87. 0 22
      src/lib/items/SNoneLegendItem.js
  88. 0 195
      src/lib/items/SSCPZZoneLegendItem.js
  89. 141 97
      src/lib/items/SSCPZZoneLegendItem.ts
  90. 0 51
      src/lib/items/STextMarkerItem.js
  91. 14 2
      src/lib/items/STextMarkerItem.ts
  92. 0 189
      src/lib/items/SZoneLegendItem.js
  93. 142 99
      src/lib/items/SZoneLegendItem.ts
  94. 0 159
      src/lib/items/TipelineItem.js
  95. 206 156
      src/lib/items/TipelineItem.ts
  96. 5 0
      src/lib/parsers/STopologyParser.ts
  97. 0 1
      src/main.js
  98. 13 2
      src/main.ts
  99. 189 61
      src/router/index.js
  100. 0 0
      src/shims-vue.d.ts

+ 5 - 0
env.prod.js

@@ -0,0 +1,5 @@
+'use strict'
+module.exports = {
+    NODE_ENV: '"production"',
+    VUE_APP_TITLE="production"
+}

+ 5 - 0
env.test.js

@@ -0,0 +1,5 @@
+'use strict'
+module.exports = {
+    NODE_ENV: '"production"',
+    VUE_APP_TITLE="test"
+}

+ 12 - 8
package.json

@@ -3,17 +3,19 @@
     "version": "0.1.0",
     "private": true,
     "scripts": {
-        "serve": "vue-cli-service serve --open",
-        "build": "vue-cli-service build",
+        "serve": "cross-env NODE_ENV=serve vue-cli-service serve --open",
+        "build:aly": "cross-env NODE_ENV=aly_dev vue-cli-service build",
+        "build:wanda_dev": "cross-env NODE_ENV=wanda_dev vue-cli-service build",
+        "build:wanda_build": "cross-env NODE_ENV=wanda_build vue-cli-service build",
         "lint": "vue-cli-service lint"
     },
     "dependencies": {
         "@mapbox/geojson-merge": "^1.1.1",
-        "@saga-web/base": "2.1.22",
-        "@saga-web/big": "1.0.68",
-        "@saga-web/draw": "2.1.100",
-        "@saga-web/feng-map": "1.0.19",
-        "@saga-web/graph": "2.1.102",
+        "@saga-web/base": "2.1.25",
+        "@saga-web/big": "1.0.105",
+        "@saga-web/draw": "2.1.106",
+        "@saga-web/feng-map": "1.0.35",
+        "@saga-web/graph": "2.1.121",
         "ant-design-vue": "^1.4.10",
         "axios": "^0.19.2",
         "core-js": "^3.4.4",
@@ -21,7 +23,7 @@
         "leaflet": "^1.6.0",
         "leaflet-contextmenu": "^1.4.0",
         "lodash": "^4.17.19",
-        "meri-design": "^1.3.4",
+        "meri-design": "^1.3.5",
         "moment": "^2.24.0",
         "quill": "^1.3.7",
         "vue": "^2.6.10",
@@ -43,6 +45,8 @@
         "@vue/eslint-config-typescript": "^5.0.2",
         "babel-eslint": "^10.0.3",
         "babel-plugin-component": "^1.1.1",
+        "compression-webpack-plugin": "^4.0.0",
+        "cross-env": "^7.0.2",
         "eslint": "^5.16.0",
         "eslint-plugin-vue": "^5.0.0",
         "fengmap": "^2.5.3",

File diff suppressed because it is too large
+ 100 - 30
public/index.html


+ 84 - 0
public/indexLoading.css

@@ -0,0 +1,84 @@
+.p-index-loading {
+    position: fixed;
+    left: 0;
+    top: 0;
+    background-color: white;
+    width: 100%;
+    height: 100%;
+    z-index: 9000;
+}
+.p-index-loading .p-index-loading-box {
+    position: absolute;
+    top: 50%;
+    left: 50%;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    width: 200px;
+    height: 50px;
+    transform: translate(-100px, -60px);
+    z-index: 2001;
+}
+.p-index-loading .p-index-loading-box .p-index-loading-list {
+    border-radius: 4px;
+    width: 6px;
+    height: 100%;
+    background-color: #0091ff;
+}
+.p-index-loading .p-index-loading-box .p-index-loading-list + .p-index-loading-list {
+    margin-left: 4px;
+}
+.p-index-loading .p-index-loading-box .p-index-loading-list-1 {
+    animation: indexLoading 0.8s ease-in-out 200ms infinite alternate;
+}
+.p-index-loading .p-index-loading-box .p-index-loading-list-2 {
+    animation: indexLoading 0.8s ease-in-out 400ms infinite alternate;
+}
+.p-index-loading .p-index-loading-box .p-index-loading-list-3 {
+    animation: indexLoading 0.8s ease-in-out 600ms infinite alternate;
+}
+.p-index-loading .p-index-loading-box .p-index-loading-list-4 {
+    animation: indexLoading 0.8s ease-in-out 800ms infinite alternate;
+}
+.p-index-loading .p-index-loading-box .p-index-loading-list-5 {
+    animation: indexLoading 0.8s ease-in-out 1000ms infinite alternate;
+}
+.p-index-loading .p-index-loading-box .p-index-loading-list-6 {
+    animation: indexLoading 0.8s ease-in-out 1200ms infinite alternate;
+}
+@-moz-keyframes indexLoading {
+    0%,
+    100% {
+        transform: scaleY(1);
+    }
+    50% {
+        transform: scaleY(0.4);
+    }
+}
+@-webkit-keyframes indexLoading {
+    0%,
+    100% {
+        transform: scaleY(1);
+    }
+    50% {
+        transform: scaleY(0.4);
+    }
+}
+@-o-keyframes indexLoading {
+    0%,
+    100% {
+        transform: scaleY(1);
+    }
+    50% {
+        transform: scaleY(0.4);
+    }
+}
+@keyframes indexLoading {
+    0%,
+    100% {
+        transform: scaleY(1);
+    }
+    50% {
+        transform: scaleY(0.4);
+    }
+}

+ 11 - 7
public/systemConf.js

@@ -24,13 +24,17 @@ var __systemConf = {
     systemCode: 'wandaBmGuide',
     conf: {
         // 阿里云
-        // editerUrl: 'http://60.205.177.43:80/wandaEditer/', // 编辑器地址
-        // wandaBmGuideUrl: 'http://60.205.177.43:80/wandaBmGuide/', //管理书地址
-        // http://glsms.wanda-dev.cn/ 测试服
-        editerUrl: 'http://glsms.wanda-dev.cn/wandaEditer/', // 编辑器地址
-        wandaBmGuideUrl: 'http://glsms.wanda-dev.cn/wandaBmGuide/', //管理书地址
-        // editerUrl: 'http://localhost:8091/wandaEditer/', // 编辑器地址
-        // wandaBmGuideUrl: 'http://localhost:8090/wandaBmGuide/', //管理书地址
+        aly_dev_editerUrl: 'http://60.205.177.43:80/wandaEditer/', // 编辑器地址
+        aly_dev_wandaBmGuideUrl: 'http://60.205.177.43:80/wandaBmGuide/', //管理书地址
+        //   万达内网测试服
+        wanda_dev_editerUrl: 'http://glsms.wanda-dev.cn/wandaEditer/', // 编辑器地址
+        wanda_dev_wandaBmGuideUrl: 'http://glsms.wanda-dev.cn/wandaBmGuide/', //管理书地址
+        //   万达生产服
+        wanda_build_editerUrl: 'http://glsms.wanda.cn/wandaEditer/', // 编辑器地址
+        wanda_build_wandaBmGuideUrl: 'http://glsms.wanda.cn/wandaBmGuide/', //管理书地址
+        //开发
+        serve_editerUrl: 'http://localhost:8091/wandaEditer/', // 编辑器地址
+        serve_wandaBmGuideUrl: 'http://localhost:8090/wandaBmGuide/', //管理书地址
     },
 }
 window.__systemConf = __systemConf

+ 210 - 165
src/App.vue

@@ -1,92 +1,145 @@
 <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";
-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`
-    };
-  },
-  mounted() {
-    const state = this.$store.state;
-    sessionStorage.setItem("STATE", JSON.stringify(state));
-    // 监听页面刷新事件
-    window.addEventListener("unload", this.unload);
-
-    // 页面加载完成后,移除session里的存储的信息
-    window.addEventListener("load", this.load);
-    // 请求该项目下的楼层数据
-    // this.getFengMap();
-  },
-  computed: {
-    ...mapGetters(["plazaId", "fmapID", "haveFengMap"])
-  },
-  methods: {
-    ...mapActions(["getfmapID"]),
-    ...mapMutations(["SETHAVEFENGMAP"]),
-    load () {
-      const state = this.$store.state;
-      sessionStorage.setItem("STATE", JSON.stringify(state));
+    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: '',
+        }
     },
-    unload() {
-      // const { userInfo, projectId, menuStatus,manualAutoMode } = this.$store.state;
-       sessionStorage.clear()
-      
+    /**
+     * 刷新保存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() {
-        // 监听页面刷新事件
-        window.addEventListener('unload', this.unload)
-        // 页面加载完成后,移除session里的存储的信息
-        window.addEventListener('load', this.load)
-        // 请求该项目下的楼层数据
-        this.getFengMap()
+        this.isMounted = true
+        this.plazaIds = localStorage.getItem('PLAZAID')
     },
-    getFengMap() {
-      if (!this.fmapID) {
-        this.getfmapID().then(() => {
-          this.getMap();
-        });
-        return;
-      }
-      this.getMap();
+    computed: {
+        ...mapGetters(['plazaId', 'fmapID', 'haveFengMap', 'accessLevel']),
     },
-    getMap() {
-      if (!window.fengmapData) {
-        window.fengmapData = new SFengParser(
-          `fengMap${this.id}`,
-          `${this.mapServerURL}/fmap/${this.fmapID}`,
-          this.key,
-          this.appName,
-          null,
-          this.mapthemeUrl
-        );
-        window.fengmapData.loadMap(this.fmapID, () => {
-          // 获取主题数据
-          window.fengmapData
-            .loadTheme(
-              `${this.mapServerURL}/webtheme/${this.fmapID}/${this.fmapID}.theme`
+    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
+            //   }
+
+            window.fengmapData = new SFengParser(
+                `fengMap${this.id}`,
+                `${this.mapServerURL}/fmap/${this.fmapID}`,
+                this.key,
+                this.appName,
+                null,
+                this.mapthemeUrl
             )
-            .then(res => {
-              this.SETHAVEFENGMAP();
-            });
-        });
-      }
-    }
-  }
-};
+            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
+            }
+        },
+        isMounted(isMounted) {
+            if (isMounted && this.plazaIds) {
+                this.getFengMap()
+            }
+        },
+    },
+}
 </script>
 <style lang="less">
 body,
@@ -114,8 +167,8 @@ input,
 textarea,
 th,
 td {
-  margin: 0;
-  padding: 0;
+    margin: 0;
+    padding: 0;
 }
 
 body,
@@ -123,7 +176,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,
@@ -132,7 +185,7 @@ h3,
 h4,
 h5,
 h6 {
-  font-size: 100%;
+    font-size: 100%;
 }
 
 address,
@@ -142,145 +195,133 @@ 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;
-      }
+    //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%);
     }
-  }
-  //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: calc(100% - 26px) !important;
+    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,
@@ -295,17 +336,21 @@ body {
         width: 8%;
     }
 }
-.el-dialog__header{
-  border-bottom: 1px solid rgba(239,240,241,1);
+.el-dialog__header {
+    border-bottom: 1px solid rgba(239, 240, 241, 1);
 }
-.gantt-chart .el-dialog__title{
-  font-weight: 500;
+.gantt-chart .el-dialog__title {
+    font-weight: 500;
 }
-.img-detail-container{
+.img-detail-container {
     .el-dialog__body {
         padding-top: 0;
         padding-bottom: 0;
         padding-right: 0;
     }
 }
+.el-tooltip__popper {
+    max-width: 600px !important;
+    line-height: 20px !important;
+}
 </style>

+ 1 - 1
src/api/coreDeviceReport.js

@@ -4,7 +4,7 @@ import httputils from '@/api/httputils'
  * 系统列表
  */
 export function querySystemList() {
-  return httputils.getJson(`/data/sms_systemcfg/querySmsxt`);
+    return httputils.getJson(`/data/sms_systemcfg/querySmsxt`)
 }
 /**
  * 系统下的设备

+ 10 - 10
src/api/equipmentList.js

@@ -1,42 +1,42 @@
-import httputils from "@/api/httputils"
+import httputils from '@/api/httputils'
 
 // 设备设施-主要设备清单
 export function queryEquipmentList({ data, postParams }) {
-    return httputils.fetchJson(`/data/glsms_asset/queryStatistics`, data, postParams)
+    return httputils.fetchJson(`/data/sms_asset/queryStatistics`, data, postParams)
 }
 
 // 设备设施-主要设备清单详情
 export function queryAsset({ data, postParams }) {
-    return httputils.fetchJson(`/data/glsms_asset/query`, data, postParams)
+    return httputils.fetchJson(`/data/sms_asset/query`, data, postParams)
 }
 // 设备设施-主要材料清单
 export function queryMaterialList({ getParams }) {
-    return httputils.getJson(`/data/gcglsms_material/query`, getParams)
+    return httputils.getJson(`/data/sms_material/query`, getParams)
 }
 
 // 设备设施-维保事项
 export function queryWbsms({ data, getParams }) {
-    return httputils.getJson(`/data/v_glsms_wbsms/query`, data, getParams)
+    return httputils.getJson(`/data/sms_wbsms/query`, data, getParams)
 }
 
 // 设备设施-维修事项
 export function queryWx({ data, getParams }) {
-    return httputils.getJson(`/data/v_glsms_wx/query`, data, getParams)
+    return httputils.getJson(`/data/sms_wx/query`, data, getParams)
 }
 
 // 设备设施-专维
 export function queryZw({ data, getParams }) {
-    return httputils.getJson(`/data/v_glsms_zw/query`, data, getParams)
+    return httputils.getJson(`/data/sms_zw/query`, data, getParams)
 }
 
 // 设备设施-其他事项
 export function queryQtsx({ data, getParams }) {
-    return httputils.getJson(`/data/v_glsms_qtsx/query`, data, getParams)
+    return httputils.getJson(`/data/sms_qtsx/query`, data, getParams)
 }
 
 // 设备设施-记录事项
 export function queryRecord({ getParams }) {
-    return httputils.getJson(`/data/v_gcglsms_wxwbsxline/query`, getParams)
+    return httputils.getJson(` /data/sms_wxwbsxline/query`, getParams)
 }
 
 // 设备设施=查看图纸
@@ -46,5 +46,5 @@ export function queryxxx({ getParams }) {
 
 // 设备设施-楼层电井口(间)控制商铺范围清单
 export function queryShops({ getParams }) {
-    return httputils.getJson(`/data/v_glsms_shops/query`, getParams)
+    return httputils.getJson(`/data/sms_shops/query`, getParams)
 }

+ 3 - 5
src/api/homePage.js

@@ -1,11 +1,11 @@
-import httputils from "@/api/httputils"
+import httputils from '@/api/httputils'
 
 // 查询首页系统卡片
 export function getCardList({ getParams }) {
     return httputils.getJson(`/data/home/querySystemCard`, getParams)
 }
 
- // 综合事项记录
+// 综合事项记录
 export function getQueryList({ getParams }) {
     return httputils.getJson(`/data/sms_zhsxjl/query`, getParams)
 }
@@ -15,8 +15,6 @@ export function getChangeList({ getParams }) {
     return httputils.getJson(`/data/rpt_change_record/query`, getParams)
 }
 
-
-
 // ==================== 集团首页接口 =======================
 // 查询项目信息统计数量
 export function getPlazaInfoCount({ getParams }) {
@@ -31,4 +29,4 @@ export function querySystemCard({ getParams }) {
 // 查询集团首页事项状态统计
 export function queryEventStatus({ getParams }) {
     return httputils.getJson(`/data/home/queryEventStatus`, getParams)
-}
+}

+ 40 - 25
src/api/httputils.js

@@ -1,6 +1,9 @@
 import axios from 'axios'
 import store from '@/store'
-import { MessageBox } from 'element-ui'
+import router from '@/router'
+import {
+    MessageBox
+} from 'element-ui'
 
 var CancelToken = axios.CancelToken
 var cancel
@@ -20,16 +23,13 @@ const axiosservice = axios.create({
 axiosservice.interceptors.request.use(
     (config) => {
         config.withCredentials = true // 允许携带token ,这个是解决跨域产生的相关问题
-        let token = store.getters['ssoToken']
-        console.log()
-        let isPreview = store.getters['isPreview']
-        // if (config.url.indexOf('mapapp') < 0) {
-        //     config.headers = {
-        //         'sso-token': token,
-        //         isPreview: isPreview, //默认false,当预览开启的时候是true
-        //     }
-        // }
-        // if (config.url.indexOf('/data') > -1 && config.url !== '/data/data/auth/check') {
+        let isPreview = null
+        let token = store.getters['ssoToken'];
+        if (store.getters['isPreview'] == "null" || store.getters['isPreview'] == "" || store.getters['isPreview'] == null) {
+            isPreview = false
+        } else {
+            isPreview = store.getters['isPreview']
+        }
         if (config.url.indexOf('/data') > -1) {
             config.headers = {
                 'sso-token': token,
@@ -44,26 +44,37 @@ axiosservice.interceptors.request.use(
 )
 
 axiosservice.interceptors.response.use(
-    function(res) {
+    function (res) {
         //在这里对返回的数据进行处理
-        let resp = res.data
+        let resp = res.data;
         if (resp.result === 'unauthc') {
             store.commit('logined', false)
             MessageBox.confirm('未登陆或登陆信息已失效, 是否重新登陆?', '提示', {
-                confirmButtonText: '确定',
-                cancelButtonText: '取消',
-                type: 'error',
-            })
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'error',
+                })
                 .then((resp) => {
                     window.location.reload()
                 })
-                .catch((error) => {})
-        } else if (resp.result == 'unauthorization') {
-            MessageBox.alert('无权操作', { title: '警告', type: 'error' })
+                .catch((error) => {
+                    console.log('asdfasdfsad')
+                })
+        } else if (resp.error == 'Unauthorized') {
+            MessageBox.alert('无权操作', {
+                title: '警告',
+                type: 'error'
+            })
         }
         return res
     },
-    function(err) {
+    function (err) {
+        if (err.response.status == 401) {
+            store.commit('SETISREQUESTtAUTH', 'err');
+            router.push({
+                path: '404',
+            })
+        }
         return Promise.reject(err)
     }
 )
@@ -154,7 +165,9 @@ export default {
     download(url, requestData) {
         // 响应类型:arraybuffer, blob
         axiosservice
-            .post(url, requestData, { responseType: 'blob' })
+            .post(url, requestData, {
+                responseType: 'blob'
+            })
             .then((resp) => {
                 let headers = resp.headers
                 let contentType = headers['content-type']
@@ -163,7 +176,9 @@ export default {
                     return false
                 } else {
                     //console.log("下载文件:", resp)
-                    const blob = new Blob([resp.data], { type: contentType })
+                    const blob = new Blob([resp.data], {
+                        type: contentType
+                    })
                     const contentDisposition = resp.headers['content-disposition']
                     let fileName = 'unknown'
                     if (contentDisposition) {
@@ -172,7 +187,7 @@ export default {
                     downFile(blob, fileName)
                 }
             })
-            .catch(function(error) {})
+            .catch(function (error) {})
     },
     axios: axiosservice,
-}
+}

+ 5 - 5
src/api/other.js

@@ -1,23 +1,23 @@
 import httputils from '@/api/httputils'
 // 综合事项记录
 export function queryGlams({ getParams }) {
-    return httputils.getJson(`/data/v_glsms_zhsxjl/query`, getParams)
+    return httputils.getJson(`/data/sms_zhsxjl/query`, getParams)
 }
 // 第三方检测事项
 export function queryDsfrw({ getParams }) {
-    return httputils.getJson(`/data/v_glsms_dsfrw/query`, getParams)
+    return httputils.getJson(`/data/sms_dsfrw/query`, getParams)
 }
 //综合事项管理-综合记录事项弹框
 export function queryZhsxjl({ getParams }) {
-    return httputils.getJson(`/data/v_glsms_zhsxjl/queryWindown`, getParams)
+    return httputils.getJson(`/data/sms_zhsxjl/queryWindown`, getParams)
 }
 
 // 辅助用房管理-广场辅助用房汇总统计报
 export function querygcfzyfhz({ getParams }) {
-    return httputils.getJson(`/data/v_glsms_gcfzyfhz/query`, getParams)
+    return httputils.getJson(`/data/sms_gcfzyfhz/query`, getParams)
 }
 
 // 辅助用房管理-广场辅助用房调改变更记录
 export function queryfzyfchange({ getParams }) {
-    return httputils.getJson(`/data/v_glsms_fzyfchange/query`, getParams)
+    return httputils.getJson(`/data/sms_fzyfchange/query`, getParams)
 }

+ 10 - 2
src/api/public.js

@@ -1,7 +1,7 @@
-import httputils from '@/api/httputils'
+import httputils from "@/api/httputils"
 // 查询图片
 export function queryPic({ getParams }) {
-    return httputils.getJson(`/data/glsms_proimgup/query`, getParams)
+    return httputils.getJson(`/data/sms_proimgup/query`, getParams)
 }
 
 // 查询下拉框
@@ -49,3 +49,11 @@ export function queryDraftNum(data) {
 export function queryBrand({ data, postParams }) {
     return httputils.fetchJson(`/data/tb_brand_intentiondetail/query`, data, postParams)
 }
+//记录PV/UV
+export function getPvUv(data, postParams) {
+    return httputils.fetchJson(`/data/pvuv/save`, data, postParams)
+}
+// 保存楼层缓存
+export function setFloor(data, postParams) {
+    return httputils.fetchJson(`/data/plaza/floor/set`, data, postParams)
+}

+ 12 - 7
src/api/room.js

@@ -5,37 +5,42 @@
  * @LastEditors: your name
  * @Description: In User Settings Edit
  * @FilePath: \wanda-bm-guide\src\api\room.js
- */ 
+ */
+
 import httputils from '@/api/httputils'
 
 // 机房-机房布置图
 export function xx({ getParams }) {
-    return httputils.getJson(`/data/v_glsms_zhsxjl/query`, getParams)
+    return httputils.getJson(`/data/sms_zhsxjl/query`, getParams)
 }
 
 // 机房-配电室低压柜及出线明细表
 export function queryDygjcxline({ getParams }) {
-    return httputils.getJson(`/data/glsms_dygjcxline/query`, getParams)
+    return httputils.getJson(
+        `/data/sms_dygjcxline
+/query`,
+        getParams
+    )
 }
 
 // 机房-机房内核心设备
 export function queryHxsb({ data, postParams }) {
-    return httputils.fetchJson(`/data/glsms_asset/queryStatistics`, data, postParams)
+    return httputils.fetchJson(`/data/sms_asset/queryStatistics`, data, postParams)
 }
 
 // 机房-机房内核心设备钻取表
 export function queryHxsbDetail({ data, postParams }) {
-    return httputils.fetchJson(`/data/glsms_asset/query`, data, postParams)
+    return httputils.fetchJson(`/data/sms_asset/query`, data, postParams)
 }
 
 // 机房-维修记录
 export function queryWxjf({ getParams }) {
-    return httputils.getJson(`/data/v_glsms_wx/query`, getParams)
+    return httputils.getJson(`/data/sms_wx/query`, getParams)
 }
 
 // 机房-维保记录
 export function queryWb({ data, postParams }) {
-    return httputils.fetchJson(`/data/v_glsms_wbzy/query`, data, postParams)
+    return httputils.fetchJson(`/data/sms_wbzy/query`, data, postParams)
 }
 // 查询位置属于哪个系统
 export function querySystem({ getParams }) {

+ 11 - 3
src/assets/css/rotation.css

@@ -34,7 +34,8 @@
   line-height: 22px;
   width: 106px;
   height: 32px;
-  background: linear-gradient(180deg, #369cf7 0%, #025baa 100%);
+  background: linear-gradient(180deg, #369cf7 0%, #025baa 50%);
+  opacity: 0.5;
   font-size: 14px;
   color: #ffffff;
   display: flex;
@@ -42,6 +43,7 @@
   justify-content: center;
   cursor: pointer;
   border-radius: 4px;
+  cursor: not-allowed;
 }
 .overview .view-title .view-button img {
   display: inline-block;
@@ -62,7 +64,7 @@
 }
 .overview .view-box .view-left .lb-left {
   width: 100%;
-  height: 66%;
+  height: 64%;
   flex: 1;
   margin-top: 12px;
   margin-bottom: 10px;
@@ -99,7 +101,7 @@
   object-fit: fill;
 }
 .overview .view-box .view-left .lb-bottom {
-  height: 34%;
+  height: 36%;
   background: #ffffff;
   padding: 12px 16px;
 }
@@ -185,11 +187,17 @@
   justify-content: flex-start;
 }
 .overview .view-box .view-left .lb-bottom .place-bottom .place-box .place-right span {
+  cursor: pointer;
   display: inline-block;
   font-size: 12px;
   font-family: MicrosoftYaHei;
   color: #1f2429;
   line-height: 22px;
+  width: 300px;
+  overflow: hidden;
+  white-space: nowrap;
+  text-overflow: ellipsis;
+  -o-text-overflow: ellipsis;
 }
 .overview .view-box .view-right {
   flex: 1;

+ 11 - 3
src/assets/css/rotation.less

@@ -33,7 +33,8 @@
             line-height: 22px;
             width: 106px;
             height: 32px;
-            background: linear-gradient(180deg, rgba(54, 156, 247, 1) 0%, rgba(2, 91, 170, 1) 100%);
+            background: linear-gradient(180deg, rgba(54, 156, 247, 1) 0%, rgba(2, 91, 170, 1) 50%);
+            opacity: 0.5;
             font-size: 14px;
             color: #ffffff;
             display: flex;
@@ -41,6 +42,7 @@
             justify-content: center;
             cursor: pointer;
             border-radius: 4px;
+            cursor: not-allowed;
             img {
                 display: inline-block;
                 height: 16px;
@@ -62,7 +64,7 @@
                 width: 100%;
                 // TODO: lb-left
                 // max-height: 300px;
-                height: 66%;
+                height: 64%;
                 // overflow: hidden;
                 flex: 1;
                 margin-top: 12px;
@@ -101,7 +103,7 @@
                 }
             }
             .lb-bottom {
-                height: 34%;
+                height: 36%;
                 background: #ffffff;
                 padding: 12px 16px;
                 nav {
@@ -183,11 +185,17 @@
                             flex-direction: column;
                             justify-content: flex-start;
                             span {
+                                cursor: pointer;
                                 display: inline-block;
                                 font-size: 12px;
                                 font-family: MicrosoftYaHei;
                                 color: rgba(31, 36, 41, 1);
                                 line-height: 22px;
+                                width: 300px;
+                                overflow: hidden;
+                                white-space: nowrap;
+                                text-overflow: ellipsis;
+                                -o-text-overflow: ellipsis;
                             }
                         }
                     }

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


BIN
src/assets/imgs/2020.png


BIN
src/assets/imgs/20200.png


BIN
src/assets/imgs/eye2.jpg


BIN
src/assets/imgs/zffz.png


BIN
src/assets/imgs/zy2.png


File diff suppressed because it is too large
+ 1944 - 0
src/assets/provinceData/anhui.json


File diff suppressed because it is too large
+ 1413 - 0
src/assets/provinceData/beijing.json


File diff suppressed because it is too large
+ 1931 - 0
src/assets/provinceData/chongqing.json


File diff suppressed because it is too large
+ 2581 - 0
src/assets/provinceData/fujian.json


File diff suppressed because it is too large
+ 2119 - 0
src/assets/provinceData/gansu.json


File diff suppressed because it is too large
+ 2854 - 0
src/assets/provinceData/guangdong.json


File diff suppressed because it is too large
+ 2213 - 0
src/assets/provinceData/guangxi.json


File diff suppressed because it is too large
+ 2279 - 0
src/assets/provinceData/guizhou.json


File diff suppressed because it is too large
+ 1722 - 0
src/assets/provinceData/hebei.json


File diff suppressed because it is too large
+ 2225 - 0
src/assets/provinceData/heilongjiang.json


File diff suppressed because it is too large
+ 2097 - 0
src/assets/provinceData/henan.json


File diff suppressed because it is too large
+ 2211 - 0
src/assets/provinceData/hubei.json


File diff suppressed because it is too large
+ 2126 - 0
src/assets/provinceData/hunan.json


File diff suppressed because it is too large
+ 1468 - 0
src/assets/provinceData/jiangsu.json


File diff suppressed because it is too large
+ 1798 - 0
src/assets/provinceData/jiangxi.json


File diff suppressed because it is too large
+ 2745 - 0
src/assets/provinceData/jilin.json


File diff suppressed because it is too large
+ 2587 - 0
src/assets/provinceData/liaoning.json


File diff suppressed because it is too large
+ 1756 - 0
src/assets/provinceData/neimenggu.json


File diff suppressed because it is too large
+ 1220 - 0
src/assets/provinceData/ningxia.json


File diff suppressed because it is too large
+ 1956 - 0
src/assets/provinceData/qinghai.json


File diff suppressed because it is too large
+ 2261 - 0
src/assets/provinceData/shandong.json


+ 982 - 0
src/assets/provinceData/shanghai.json

@@ -0,0 +1,982 @@
+{
+    "type": "FeatureCollection",
+    "features": [
+        {
+            "type": "Feature",
+            "properties": {
+                "adcode": "210000",
+                "name": "上海",
+                "center": [123.429096, 41.796767],
+                "centroid": [122.605788, 41.300296],
+                "childrenNum": 14,
+                "level": "province",
+                "parent": {
+                    "adcode": 100000
+                },
+                "subFeatureIndex": 5,
+                "acroutes": [100000],
+                "adchar": null
+            },
+            "geometry": {
+                "type": "MultiPolygon",
+        "coordinates": [
+            [
+                [
+                    [121.300857, 31.496747],
+                    [121.300496, 31.494537],
+                    [121.298563, 31.493713],
+                    [121.298605, 31.491515],
+                    [121.293488, 31.489807],
+                    [121.29061, 31.491694],
+                    [121.289387, 31.489031],
+                    [121.285355, 31.490679],
+                    [121.283686, 31.489795],
+                    [121.279696, 31.490404],
+                    [121.280321, 31.488672],
+                    [121.276442, 31.486654],
+                    [121.27622, 31.485376],
+                    [121.272049, 31.484337],
+                    [121.268879, 31.487466],
+                    [121.267322, 31.486224],
+                    [121.267433, 31.483357],
+                    [121.265153, 31.48313],
+                    [121.261732, 31.480777],
+                    [121.261454, 31.478854],
+                    [121.254794, 31.477635],
+                    [121.255643, 31.483632],
+                    [121.253627, 31.483082],
+                    [121.253362, 31.479809],
+                    [121.251221, 31.479606],
+                    [121.249692, 31.477623],
+                    [121.247064, 31.477062],
+                    [121.245813, 31.479881],
+                    [121.248176, 31.481876],
+                    [121.244409, 31.481183],
+                    [121.243797, 31.487311],
+                    [121.241141, 31.490906],
+                    [121.240877, 31.493701],
+                    [121.237234, 31.491957],
+                    [121.234746, 31.492686],
+                    [121.235413, 31.488099],
+                    [121.232994, 31.487896],
+                    [121.22867, 31.482127],
+                    [121.230839, 31.481111],
+                    [121.230352, 31.477432],
+                    [121.226209, 31.477683],
+                    [121.225361, 31.476022],
+                    [121.220731, 31.47607],
+                    [121.219062, 31.475222],
+                    [121.21364, 31.475939],
+                    [121.21503, 31.477528],
+                    [121.214377, 31.479128],
+                    [121.206368, 31.474995],
+                    [121.203421, 31.472331],
+                    [121.202906, 31.469356],
+                    [121.195051, 31.467827],
+                    [121.186055, 31.460814],
+                    [121.185457, 31.457468],
+                    [121.186055, 31.454362],
+                    [121.180814, 31.451458],
+                    [121.174974, 31.449295],
+                    [121.16983, 31.450024],
+                    [121.16773, 31.448315],
+                    [121.166048, 31.450168],
+                    [121.163045, 31.448865],
+                    [121.160917, 31.449678],
+                    [121.147348, 31.44393],
+                    [121.146569, 31.439006],
+                    [121.14782, 31.436186],
+                    [121.152492, 31.433604],
+                    [121.158484, 31.432254],
+                    [121.162711, 31.432218],
+                    [121.16253, 31.429565],
+                    [121.16431, 31.427222],
+                    [121.162002, 31.427951],
+                    [121.161362, 31.425776],
+                    [121.155273, 31.42574],
+                    [121.151157, 31.421796],
+                    [121.146249, 31.421078],
+                    [121.146208, 31.419704],
+                    [121.149266, 31.41913],
+                    [121.148905, 31.415867],
+                    [121.153493, 31.413679],
+                    [121.155523, 31.413835],
+                    [121.154508, 31.411575],
+                    [121.15886, 31.410117],
+                    [121.157887, 31.407893],
+                    [121.153104, 31.405837],
+                    [121.153896, 31.403685],
+                    [121.15049, 31.402215],
+                    [121.149586, 31.399381],
+                    [121.152742, 31.398174],
+                    [121.147653, 31.397325],
+                    [121.149475, 31.394503],
+                    [121.14383, 31.392327],
+                    [121.147097, 31.3899],
+                    [121.148988, 31.38691],
+                    [121.148432, 31.385404],
+                    [121.141425, 31.38355],
+                    [121.141049, 31.384531],
+                    [121.137518, 31.382785],
+                    [121.138408, 31.381147],
+                    [121.131762, 31.378815],
+                    [121.131247, 31.379664],
+                    [121.124268, 31.376722],
+                    [121.12328, 31.37848],
+                    [121.118206, 31.375837],
+                    [121.113757, 31.37445],
+                    [121.11523, 31.371137],
+                    [121.119082, 31.370563],
+                    [121.120208, 31.368674],
+                    [121.113173, 31.36688],
+                    [121.112853, 31.365133],
+                    [121.10928, 31.364703],
+                    [121.10889, 31.366509],
+                    [121.106958, 31.366593],
+                    [121.106749, 31.364535],
+                    [121.108251, 31.360457],
+                    [121.107361, 31.354763],
+                    [121.108418, 31.354034],
+                    [121.10832, 31.350649],
+                    [121.111157, 31.351534],
+                    [121.111838, 31.350517],
+                    [121.117246, 31.351689],
+                    [121.120194, 31.347562],
+                    [121.11733, 31.34712],
+                    [121.117969, 31.343447],
+                    [121.123948, 31.342753],
+                    [121.130441, 31.344213],
+                    [121.130816, 31.341509],
+                    [121.130121, 31.334702],
+                    [121.13115, 31.332106],
+                    [121.132582, 31.331962],
+                    [121.133305, 31.325585],
+                    [121.131539, 31.325441],
+                    [121.131637, 31.32324],
+                    [121.127257, 31.319315],
+                    [121.127076, 31.316934],
+                    [121.128633, 31.314265],
+                    [121.127966, 31.311884],
+                    [121.129773, 31.308306],
+                    [121.129134, 31.307528],
+                    [121.129954, 31.302597],
+                    [121.133778, 31.30207],
+                    [121.139645, 31.302992],
+                    [121.13895, 31.305625],
+                    [121.143774, 31.309706],
+                    [121.146903, 31.305936],
+                    [121.150782, 31.299018],
+                    [121.148933, 31.298875],
+                    [121.152714, 31.294075],
+                    [121.151282, 31.291933],
+                    [121.153145, 31.28997],
+                    [121.154967, 31.290209],
+                    [121.156399, 31.287408],
+                    [121.159305, 31.28766],
+                    [121.161293, 31.283985],
+                    [121.159402, 31.281579],
+                    [121.155537, 31.280765],
+                    [121.155481, 31.278442],
+                    [121.153743, 31.276646],
+                    [121.150392, 31.275437],
+                    [121.142996, 31.275473],
+                    [121.142885, 31.277664],
+                    [121.140535, 31.276491],
+                    [121.137601, 31.277592],
+                    [121.138032, 31.278753],
+                    [121.131678, 31.281363],
+                    [121.131053, 31.280106],
+                    [121.117719, 31.285684],
+                    [121.114994, 31.285265],
+                    [121.111115, 31.281746],
+                    [121.106666, 31.276706],
+                    [121.103829, 31.27533],
+                    [121.105442, 31.273654],
+                    [121.09881, 31.276251],
+                    [121.095404, 31.287001],
+                    [121.093096, 31.28821],
+                    [121.090134, 31.291909],
+                    [121.086909, 31.291717],
+                    [121.087326, 31.290664],
+                    [121.084698, 31.2876],
+                    [121.081361, 31.277257],
+                    [121.084545, 31.275713],
+                    [121.082154, 31.271535],
+                    [121.080416, 31.270158],
+                    [121.072741, 31.26914],
+                    [121.068695, 31.268098],
+                    [121.063245, 31.267907],
+                    [121.061952, 31.257945],
+                    [121.060979, 31.246486],
+                    [121.057669, 31.246749],
+                    [121.061646, 31.24524],
+                    [121.064343, 31.246138],
+                    [121.063565, 31.242222],
+                    [121.063898, 31.238438],
+                    [121.061243, 31.237827],
+                    [121.062605, 31.234689],
+                    [121.06458, 31.232965],
+                    [121.067388, 31.232929],
+                    [121.06718, 31.230917],
+                    [121.064649, 31.230785],
+                    [121.064719, 31.227275],
+                    [121.0628, 31.226964],
+                    [121.062633, 31.224664],
+                    [121.065608, 31.211871],
+                    [121.067805, 31.201005],
+                    [121.069209, 31.196524],
+                    [121.066609, 31.197183],
+                    [121.06679, 31.194966],
+                    [121.069599, 31.195314],
+                    [121.070113, 31.193612],
+                    [121.072185, 31.193169],
+                    [121.07256, 31.191527],
+                    [121.070614, 31.1913],
+                    [121.07035, 31.188735],
+                    [121.071684, 31.185955],
+                    [121.068751, 31.184889],
+                    [121.069474, 31.182888],
+                    [121.074993, 31.184386],
+                    [121.075591, 31.182852],
+                    [121.071225, 31.181462],
+                    [121.071406, 31.179472],
+                    [121.074229, 31.176225],
+                    [121.075424, 31.173444],
+                    [121.072532, 31.172701],
+                    [121.072379, 31.169609],
+                    [121.075466, 31.170316],
+                    [121.077371, 31.16454],
+                    [121.07313, 31.163257],
+                    [121.0737, 31.161711],
+                    [121.076787, 31.162622],
+                    [121.07605, 31.160536],
+                    [121.077023, 31.158451],
+                    [121.073839, 31.157072],
+                    [121.072046, 31.153512],
+                    [121.067777, 31.152289],
+                    [121.069126, 31.148705],
+                    [121.06572, 31.148597],
+                    [121.066067, 31.150947],
+                    [121.064135, 31.150839],
+                    [121.062564, 31.153129],
+                    [121.057378, 31.152781],
+                    [121.055834, 31.150659],
+                    [121.050273, 31.150719],
+                    [121.049133, 31.154615],
+                    [121.04542, 31.154028],
+                    [121.045254, 31.151582],
+                    [121.041472, 31.14982],
+                    [121.041541, 31.146931],
+                    [121.044781, 31.145528],
+                    [121.041819, 31.138899],
+                    [121.038649, 31.136909],
+                    [121.036258, 31.137376],
+                    [121.036119, 31.140325],
+                    [121.033088, 31.142208],
+                    [121.028778, 31.141249],
+                    [121.028375, 31.143874],
+                    [121.02672, 31.143766],
+                    [121.025677, 31.140769],
+                    [121.022271, 31.140457],
+                    [121.022813, 31.138311],
+                    [121.018489, 31.134103],
+                    [121.007269, 31.13342],
+                    [120.991252, 31.13318],
+                    [120.983911, 31.131705],
+                    [120.952642, 31.138251],
+                    [120.93034, 31.141404],
+                    [120.916923, 31.136189],
+                    [120.905397, 31.134211],
+                    [120.89921, 31.136057],
+                    [120.881289, 31.134727],
+                    [120.876422, 31.131489],
+                    [120.872349, 31.127161],
+                    [120.871014, 31.123804],
+                    [120.870597, 31.119715],
+                    [120.865967, 31.11475],
+                    [120.862241, 31.112508],
+                    [120.860225, 31.10933],
+                    [120.857917, 31.108526],
+                    [120.856804, 31.102829],
+                    [120.859766, 31.100287],
+                    [120.863993, 31.100299],
+                    [120.865744, 31.097624],
+                    [120.869582, 31.097216],
+                    [120.869818, 31.098943],
+                    [120.872543, 31.098884],
+                    [120.873169, 31.100323],
+                    [120.876631, 31.099939],
+                    [120.876005, 31.097864],
+                    [120.878967, 31.09838],
+                    [120.878077, 31.095753],
+                    [120.887476, 31.094074],
+                    [120.891021, 31.094302],
+                    [120.891216, 31.09718],
+                    [120.892842, 31.096533],
+                    [120.892175, 31.094194],
+                    [120.895415, 31.090703],
+                    [120.896694, 31.086649],
+                    [120.899294, 31.086937],
+                    [120.902116, 31.085653],
+                    [120.901671, 31.084094],
+                    [120.90473, 31.080495],
+                    [120.904619, 31.078528],
+                    [120.899614, 31.07836],
+                    [120.898863, 31.070514],
+                    [120.895915, 31.063075],
+                    [120.894622, 31.058659],
+                    [120.894567, 31.053896],
+                    [120.895442, 31.050332],
+                    [120.897208, 31.04822],
+                    [120.897027, 31.04558],
+                    [120.899739, 31.039603],
+                    [120.901977, 31.037647],
+                    [120.901338, 31.0255],
+                    [120.900559, 31.020423],
+                    [120.901365, 31.017494],
+                    [120.910055, 31.016942],
+                    [120.909944, 31.012644],
+                    [120.911014, 31.010555],
+                    [120.918105, 31.012788],
+                    [120.926155, 31.010423],
+                    [120.92699, 31.012068],
+                    [120.931383, 31.01178],
+                    [120.933789, 31.010027],
+                    [120.938085, 31.009007],
+                    [120.940087, 31.010027],
+                    [120.935749, 31.015381],
+                    [120.936305, 31.01711],
+                    [120.949972, 31.017638],
+                    [120.951168, 31.024012],
+                    [120.948735, 31.025068],
+                    [120.949124, 31.029953],
+                    [120.951085, 31.029077],
+                    [120.952197, 31.030254],
+                    [120.958301, 31.028573],
+                    [120.960483, 31.021659],
+                    [120.964293, 31.020771],
+                    [120.964849, 31.019751],
+                    [120.963209, 31.016594],
+                    [120.970202, 31.016149],
+                    [120.982993, 31.016089],
+                    [120.983855, 31.014445],
+                    [120.989514, 31.014397],
+                    [120.989987, 31.010495],
+                    [120.991933, 31.008154],
+                    [120.991057, 31.00747],
+                    [120.992086, 31.003424],
+                    [120.992045, 30.997109],
+                    [120.989834, 30.996664],
+                    [120.990515, 30.994551],
+                    [120.994839, 30.99526],
+                    [120.994603, 30.991922],
+                    [120.997133, 30.989232],
+                    [120.999344, 30.980106],
+                    [121.000832, 30.980466],
+                    [121.002361, 30.97762],
+                    [121.000567, 30.977007],
+                    [121.000512, 30.973933],
+                    [120.99737, 30.972444],
+                    [120.993143, 30.972119],
+                    [120.991433, 30.968372],
+                    [120.993699, 30.964024],
+                    [120.992601, 30.962835],
+                    [120.994756, 30.958703],
+                    [120.991683, 30.958211],
+                    [120.992531, 30.955028],
+                    [120.994797, 30.954824],
+                    [120.995368, 30.950367],
+                    [120.99673, 30.950307],
+                    [120.996813, 30.944625],
+                    [120.995673, 30.944336],
+                    [120.997481, 30.941141],
+                    [121.000818, 30.937729],
+                    [121.000025, 30.934701],
+                    [120.999622, 30.91395],
+                    [120.998982, 30.909527],
+                    [121.004572, 30.909299],
+                    [121.004516, 30.906955],
+                    [121.00257, 30.904852],
+                    [120.998704, 30.905946],
+                    [120.998635, 30.903386],
+                    [120.995715, 30.903723],
+                    [120.992809, 30.90216],
+                    [120.992656, 30.899732],
+                    [120.99046, 30.89579],
+                    [120.992907, 30.893915],
+                    [120.993824, 30.88966],
+                    [121.005017, 30.888794],
+                    [121.00852, 30.888121],
+                    [121.008298, 30.882964],
+                    [121.011092, 30.882219],
+                    [121.017474, 30.882724],
+                    [121.0186, 30.880716],
+                    [121.021465, 30.878793],
+                    [121.019421, 30.876665],
+                    [121.021896, 30.875162],
+                    [121.019796, 30.873996],
+                    [121.020463, 30.87188],
+                    [121.01778, 30.873359],
+                    [121.014819, 30.871027],
+                    [121.01778, 30.86938],
+                    [121.013971, 30.86439],
+                    [121.016265, 30.862851],
+                    [121.015403, 30.86053],
+                    [121.010981, 30.856033],
+                    [121.015013, 30.853604],
+                    [121.013359, 30.851692],
+                    [121.010133, 30.853135],
+                    [121.008006, 30.850574],
+                    [121.006463, 30.850454],
+                    [121.003974, 30.846101],
+                    [121.000985, 30.845632],
+                    [120.9999, 30.843335],
+                    [120.997759, 30.84408],
+                    [120.995659, 30.838572],
+                    [120.992865, 30.838392],
+                    [120.989987, 30.834724],
+                    [120.989125, 30.832318],
+                    [120.992462, 30.831572],
+                    [120.989153, 30.828698],
+                    [120.992754, 30.825691],
+                    [120.990918, 30.822708],
+                    [120.994603, 30.821493],
+                    [121.00054, 30.829431],
+                    [121.003446, 30.826304],
+                    [121.006935, 30.830779],
+                    [121.010898, 30.834615],
+                    [121.014402, 30.835818],
+                    [121.014874, 30.833954],
+                    [121.030057, 30.828553],
+                    [121.036647, 30.818449],
+                    [121.037912, 30.81389],
+                    [121.044976, 30.815526],
+                    [121.043752, 30.820013],
+                    [121.03908, 30.818582],
+                    [121.03769, 30.820266],
+                    [121.039192, 30.820867],
+                    [121.040276, 30.82438],
+                    [121.04175, 30.825378],
+                    [121.039956, 30.827218],
+                    [121.043516, 30.828157],
+                    [121.045101, 30.825907],
+                    [121.048896, 30.825186],
+                    [121.046755, 30.831091],
+                    [121.056335, 30.835602],
+                    [121.062049, 30.83779],
+                    [121.060228, 30.842793],
+                    [121.061674, 30.843383],
+                    [121.06052, 30.845187],
+                    [121.066999, 30.84877],
+                    [121.080471, 30.848746],
+                    [121.097712, 30.857103],
+                    [121.097684, 30.854927],
+                    [121.102272, 30.850261],
+                    [121.104789, 30.849335],
+                    [121.110906, 30.851416],
+                    [121.113159, 30.854049],
+                    [121.114744, 30.851476],
+                    [121.120055, 30.849119],
+                    [121.121153, 30.850165],
+                    [121.123545, 30.847267],
+                    [121.12025, 30.843299],
+                    [121.119832, 30.83773],
+                    [121.117747, 30.835301],
+                    [121.120639, 30.836335],
+                    [121.127688, 30.83565],
+                    [121.129982, 30.834892],
+                    [121.131609, 30.83601],
+                    [121.134612, 30.833028],
+                    [121.132916, 30.831608],
+                    [121.134264, 30.828505],
+                    [121.136239, 30.827868],
+                    [121.13742, 30.829985],
+                    [121.13742, 30.825029],
+                    [121.132373, 30.819279],
+                    [121.130218, 30.815574],
+                    [121.128202, 30.810221],
+                    [121.126047, 30.79304],
+                    [121.126576, 30.788998],
+                    [121.125255, 30.788179],
+                    [121.120041, 30.788552],
+                    [121.117219, 30.786073],
+                    [121.12342, 30.77895],
+                    [121.127521, 30.778673],
+                    [121.131817, 30.777313],
+                    [121.13603, 30.777337],
+                    [121.1387, 30.77842],
+                    [121.140618, 30.776928],
+                    [121.144122, 30.779479],
+                    [121.152687, 30.778974],
+                    [121.155815, 30.777205],
+                    [121.160681, 30.776579],
+                    [121.160737, 30.773221],
+                    [121.163434, 30.775279],
+                    [121.168968, 30.775953],
+                    [121.170789, 30.777084],
+                    [121.170984, 30.774677],
+                    [121.174668, 30.772018],
+                    [121.179965, 30.774376],
+                    [121.183441, 30.775038],
+                    [121.185791, 30.776651],
+                    [121.186361, 30.779034],
+                    [121.189517, 30.778974],
+                    [121.190963, 30.781092],
+                    [121.191839, 30.778853],
+                    [121.196956, 30.773354],
+                    [121.20032, 30.773618],
+                    [121.199166, 30.780755],
+                    [121.200098, 30.783294],
+                    [121.205534, 30.785905],
+                    [121.213723, 30.785929],
+                    [121.217992, 30.784954],
+                    [121.2234, 30.775977],
+                    [121.224624, 30.776976],
+                    [121.226209, 30.775087],
+                    [121.226918, 30.770826],
+                    [121.229115, 30.767974],
+                    [121.230686, 30.763737],
+                    [121.232298, 30.755817],
+                    [121.23729, 30.752651],
+                    [121.243102, 30.750533],
+                    [121.244756, 30.749185],
+                    [121.256393, 30.743948],
+                    [121.261343, 30.738217],
+                    [121.266835, 30.733498],
+                    [121.26817, 30.734931],
+                    [121.271451, 30.73227],
+                    [121.269755, 30.730729],
+                    [121.271451, 30.726948],
+                    [121.270339, 30.725864],
+                    [121.272035, 30.723252],
+                    [121.270102, 30.72047],
+                    [121.270339, 30.716894],
+                    [121.267057, 30.715039],
+                    [121.268448, 30.712149],
+                    [121.265862, 30.709488],
+                    [121.266668, 30.706296],
+                    [121.268031, 30.706103],
+                    [121.268656, 30.702129],
+                    [121.270672, 30.701563],
+                    [121.270422, 30.69807],
+                    [121.271604, 30.69689],
+                    [121.274649, 30.6774],
+                    [121.291041, 30.678328],
+                    [121.326718, 30.67593],
+                    [121.346642, 30.675593],
+                    [121.35433, 30.676991],
+                    [121.361894, 30.67952],
+                    [121.406997, 30.718086],
+                    [121.426365, 30.730283],
+                    [121.478767, 30.756347],
+                    [121.517197, 30.775387],
+                    [121.552832, 30.789395],
+                    [121.601327, 30.805084],
+                    [121.648419, 30.8162],
+                    [121.68119, 30.818401],
+                    [121.727071, 30.817716],
+                    [121.77914, 30.817222],
+                    [121.793767, 30.816862],
+                    [121.904467, 30.814155],
+                    [121.915284, 30.812892],
+                    [121.9246, 30.8066],
+                    [121.943689, 30.777096],
+                    [121.969703, 30.789202],
+                    [121.955466, 30.817138],
+                    [121.954326, 30.821409],
+                    [121.954715, 30.825811],
+                    [121.970732, 30.839077],
+                    [121.985372, 30.850694],
+                    [121.993951, 30.863055],
+                    [121.996982, 30.874898],
+                    [121.998497, 30.899961],
+                    [121.996231, 30.935458],
+                    [121.990934, 30.968432],
+                    [121.977558, 31.016101],
+                    [121.962682, 31.047284],
+                    [121.94679, 31.065883],
+                    [121.889465, 31.121705],
+                    [121.884029, 31.130638],
+                    [121.853358, 31.155346],
+                    [121.809812, 31.196907],
+                    [121.743742, 31.283207],
+                    [121.729101, 31.298288],
+                    [121.722511, 31.303518],
+                    [121.712431, 31.309407],
+                    [121.689448, 31.322462],
+                    [121.610559, 31.368195],
+                    [121.603038, 31.372656],
+                    [121.593708, 31.376411],
+                    [121.559811, 31.38361],
+                    [121.538011, 31.388489],
+                    [121.521229, 31.39479],
+                    [121.507353, 31.405933],
+                    [121.509425, 31.408288],
+                    [121.516585, 31.405287],
+                    [121.517239, 31.406303],
+                    [121.510801, 31.409973],
+                    [121.502362, 31.413404],
+                    [121.501319, 31.411982],
+                    [121.507228, 31.409722],
+                    [121.505991, 31.407021],
+                    [121.49427, 31.417851],
+                    [121.481339, 31.427294],
+                    [121.463696, 31.438277],
+                    [121.446024, 31.450717],
+                    [121.434276, 31.458496],
+                    [121.41869, 31.470682],
+                    [121.409694, 31.476321],
+                    [121.404328, 31.479212],
+                    [121.403966, 31.481494],
+                    [121.406288, 31.485388],
+                    [121.405426, 31.487215],
+                    [121.376298, 31.501106],
+                    [121.362255, 31.50679],
+                    [121.357751, 31.508259],
+                    [121.343499, 31.512057],
+                    [121.335838, 31.508295],
+                    [121.329512, 31.504247],
+                    [121.327218, 31.504247],
+                    [121.323131, 31.502288],
+                    [121.323701, 31.499649],
+                    [121.319905, 31.49972],
+                    [121.32003, 31.502993],
+                    [121.321879, 31.503399],
+                    [121.320169, 31.505883],
+                    [121.316652, 31.505775],
+                    [121.315345, 31.501273],
+                    [121.311938, 31.502909],
+                    [121.310353, 31.505919],
+                    [121.305529, 31.505333],
+                    [121.305876, 31.503435],
+                    [121.302595, 31.502599],
+                    [121.299926, 31.499756],
+                    [121.300857, 31.496747]
+                ]
+            ],
+            [
+                [
+                    [121.943244, 31.215465],
+                    [121.941826, 31.207678],
+                    [121.942619, 31.198465],
+                    [121.944843, 31.186878],
+                    [121.948027, 31.176405],
+                    [121.952629, 31.1672],
+                    [121.959637, 31.159278],
+                    [121.965685, 31.15754],
+                    [121.970773, 31.157552],
+                    [121.975862, 31.158834],
+                    [121.99573, 31.1608],
+                    [121.999554, 31.165079],
+                    [122.010593, 31.188004],
+                    [122.012011, 31.192043],
+                    [122.012609, 31.210002],
+                    [122.011038, 31.217405],
+                    [122.008563, 31.220987],
+                    [121.989655, 31.224521],
+                    [121.980659, 31.22809],
+                    [121.969188, 31.230282],
+                    [121.957259, 31.230414],
+                    [121.951044, 31.228821],
+                    [121.946595, 31.224365],
+                    [121.943244, 31.215465]
+                ]
+            ],
+            [
+                [
+                    [121.882625, 31.240857],
+                    [121.880873, 31.23633],
+                    [121.882541, 31.225611],
+                    [121.885155, 31.22052],
+                    [121.889271, 31.214997],
+                    [121.901645, 31.20146],
+                    [121.908777, 31.195266],
+                    [121.913852, 31.19384],
+                    [121.918788, 31.194319],
+                    [121.922445, 31.196859],
+                    [121.925448, 31.205438],
+                    [121.927519, 31.224017],
+                    [121.926727, 31.229731],
+                    [121.923557, 31.233863],
+                    [121.915451, 31.236558],
+                    [121.897363, 31.242115],
+                    [121.88991, 31.242594],
+                    [121.882625, 31.240857]
+                ]
+            ],
+            [
+                [
+                    [121.426671, 30.682183],
+                    [121.426796, 30.680315],
+                    [121.428589, 30.681749],
+                    [121.426671, 30.682183]
+                ]
+            ],
+            [
+                [
+                    [121.422458, 30.691482],
+                    [121.419469, 30.691626],
+                    [121.419482, 30.689856],
+                    [121.425364, 30.687374],
+                    [121.428909, 30.689109],
+                    [121.426615, 30.691277],
+                    [121.422458, 30.691482]
+                ]
+            ],
+            [
+                [
+                    [121.406775, 30.704995],
+                    [121.406622, 30.703093],
+                    [121.409291, 30.704514],
+                    [121.406775, 30.704995]
+                ]
+            ],
+            [
+                [
+                    [121.975181, 31.617034],
+                    [121.887616, 31.63638],
+                    [121.817806, 31.652025],
+                    [121.715267, 31.673842],
+                    [121.642649, 31.697454],
+                    [121.633278, 31.696167],
+                    [121.627341, 31.697776],
+                    [121.611755, 31.704283],
+                    [121.602746, 31.70694],
+                    [121.60091, 31.707],
+                    [121.599659, 31.703115],
+                    [121.593249, 31.705379],
+                    [121.592262, 31.706487],
+                    [121.578539, 31.710527],
+                    [121.565025, 31.716711],
+                    [121.551386, 31.727386],
+                    [121.549509, 31.726969],
+                    [121.540124, 31.733307],
+                    [121.539429, 31.735499],
+                    [121.528361, 31.738347],
+                    [121.526693, 31.740217],
+                    [121.514986, 31.742873],
+                    [121.51304, 31.743695],
+                    [121.498566, 31.75326],
+                    [121.487749, 31.753415],
+                    [121.476807, 31.756142],
+                    [121.464141, 31.757142],
+                    [121.455576, 31.759346],
+                    [121.449751, 31.761668],
+                    [121.445385, 31.7643],
+                    [121.431481, 31.769266],
+                    [121.425781, 31.774267],
+                    [121.420915, 31.779602],
+                    [121.410904, 31.79558],
+                    [121.416312, 31.79764],
+                    [121.411488, 31.806341],
+                    [121.405468, 31.809841],
+                    [121.399142, 31.817483],
+                    [121.395388, 31.821291],
+                    [121.385043, 31.833525],
+                    [121.376381, 31.838571],
+                    [121.369291, 31.843283],
+                    [121.323061, 31.868529],
+                    [121.315859, 31.871479],
+                    [121.310367, 31.872502],
+                    [121.3019, 31.872716],
+                    [121.291166, 31.870992],
+                    [121.281336, 31.869041],
+                    [121.265584, 31.864128],
+                    [121.252111, 31.857727],
+                    [121.242073, 31.853397],
+                    [121.225305, 31.847043],
+                    [121.200334, 31.835144],
+                    [121.181509, 31.820411],
+                    [121.149225, 31.787294],
+                    [121.118498, 31.759084],
+                    [121.142064, 31.755308],
+                    [121.145332, 31.753927],
+                    [121.179868, 31.720774],
+                    [121.289109, 31.616283],
+                    [121.345585, 31.571685],
+                    [121.37221, 31.55321],
+                    [121.395457, 31.585444],
+                    [121.403521, 31.590002],
+                    [121.414797, 31.591076],
+                    [121.43422, 31.590336],
+                    [121.471176, 31.57443],
+                    [121.547673, 31.531125],
+                    [121.608794, 31.50691],
+                    [121.617678, 31.503673],
+                    [121.625784, 31.501775],
+                    [121.638645, 31.49972],
+                    [121.670609, 31.494214],
+                    [121.682858, 31.491061],
+                    [121.72988, 31.471973],
+                    [121.763443, 31.458233],
+                    [121.819183, 31.438206],
+                    [121.834212, 31.433975],
+                    [121.845377, 31.431895],
+                    [121.857807, 31.430043],
+                    [121.87299, 31.429338],
+                    [121.882096, 31.428656],
+                    [121.89055, 31.428788],
+                    [121.901144, 31.430126],
+                    [121.918051, 31.434692],
+                    [121.934304, 31.442364],
+                    [121.967284, 31.456656],
+                    [121.981813, 31.4641],
+                    [121.991698, 31.476763],
+                    [121.995716, 31.493104],
+                    [121.993867, 31.51189],
+                    [121.98825, 31.529597],
+                    [121.975181, 31.617034]
+                ]
+            ],
+            [
+                [
+                    [121.778862, 31.310196],
+                    [121.782004, 31.310328],
+                    [121.7879, 31.312003],
+                    [121.790986, 31.314313],
+                    [121.794073, 31.319542],
+                    [121.795866, 31.329976],
+                    [121.796478, 31.33542],
+                    [121.796005, 31.345624],
+                    [121.793002, 31.355074],
+                    [121.792377, 31.363304],
+                    [121.790875, 31.367059],
+                    [121.787886, 31.37164],
+                    [121.780572, 31.380154],
+                    [121.774135, 31.386982],
+                    [121.76938, 31.390749],
+                    [121.760857, 31.395185],
+                    [121.753725, 31.400362],
+                    [121.742185, 31.407212],
+                    [121.737485, 31.408814],
+                    [121.729296, 31.410356],
+                    [121.723707, 31.412364],
+                    [121.708316, 31.419728],
+                    [121.697193, 31.423995],
+                    [121.688294, 31.425883],
+                    [121.673835, 31.427748],
+                    [121.621752, 31.444145],
+                    [121.606319, 31.449403],
+                    [121.599812, 31.450681],
+                    [121.585561, 31.454672],
+                    [121.58303, 31.456262],
+                    [121.575828, 31.463813],
+                    [121.572811, 31.469452],
+                    [121.567347, 31.4835],
+                    [121.562356, 31.486367],
+                    [121.549926, 31.489747],
+                    [121.521132, 31.493976],
+                    [121.516933, 31.494298],
+                    [121.513457, 31.493355],
+                    [121.509355, 31.489795],
+                    [121.509105, 31.485352],
+                    [121.510134, 31.482581],
+                    [121.516849, 31.477313],
+                    [121.529515, 31.471172],
+                    [121.537413, 31.466704],
+                    [121.54328, 31.462403],
+                    [121.549773, 31.457062],
+                    [121.558463, 31.448793],
+                    [121.572255, 31.436066],
+                    [121.590371, 31.427545],
+                    [121.601425, 31.421855],
+                    [121.641036, 31.401115],
+                    [121.686682, 31.376591],
+                    [121.727933, 31.354799],
+                    [121.740766, 31.346486],
+                    [121.744659, 31.343675],
+                    [121.751166, 31.337801],
+                    [121.76076, 31.320344],
+                    [121.76425, 31.315306],
+                    [121.770951, 31.31168],
+                    [121.778862, 31.310196]
+                ]
+            ],
+            [
+                [
+                    [122.242018, 31.419082],
+                    [122.243562, 31.417839],
+                    [122.247149, 31.419333],
+                    [122.245369, 31.421318],
+                    [122.242018, 31.419082]
+                ]
+            ],
+            [
+                [
+                    [121.801775, 31.356976],
+                    [121.802693, 31.342789],
+                    [121.803152, 31.332106],
+                    [121.80375, 31.328445],
+                    [121.806642, 31.324173],
+                    [121.81319, 31.316228],
+                    [121.822617, 31.307372],
+                    [121.832043, 31.301711],
+                    [121.833601, 31.299653],
+                    [121.840566, 31.29544],
+                    [121.852885, 31.292364],
+                    [121.856681, 31.292818],
+                    [121.860782, 31.294949],
+                    [121.865968, 31.294937],
+                    [121.88959, 31.292028],
+                    [121.900755, 31.291167],
+                    [121.932261, 31.283147],
+                    [121.975779, 31.279998],
+                    [122.016447, 31.282285],
+                    [122.072005, 31.266829],
+                    [122.087285, 31.257538],
+                    [122.097769, 31.255658],
+                    [122.105207, 31.262136],
+                    [122.122684, 31.307205],
+                    [122.121975, 31.315438],
+                    [122.116678, 31.321229],
+                    [122.078012, 31.323527],
+                    [122.04107, 31.323814],
+                    [122.001556, 31.329246],
+                    [121.951726, 31.337274],
+                    [121.913074, 31.350445],
+                    [121.870376, 31.366007],
+                    [121.858516, 31.369379],
+                    [121.852885, 31.371376],
+                    [121.845586, 31.374582],
+                    [121.831752, 31.375526],
+                    [121.828401, 31.376447],
+                    [121.824744, 31.378588],
+                    [121.817445, 31.380585],
+                    [121.803458, 31.381219],
+                    [121.796756, 31.381075],
+                    [121.793864, 31.380477],
+                    [121.792808, 31.377571],
+                    [121.797674, 31.369642],
+                    [121.800566, 31.363997],
+                    [121.801775, 31.356976]
+                ]
+            ],
+            [
+                [
+                    [121.627049, 31.444993],
+                    [121.631512, 31.445101],
+                    [121.634001, 31.445937],
+                    [121.636295, 31.449881],
+                    [121.635044, 31.452988],
+                    [121.631609, 31.456823],
+                    [121.625172, 31.462212],
+                    [121.61366, 31.471339],
+                    [121.608571, 31.474446],
+                    [121.602134, 31.476835],
+                    [121.595293, 31.478292],
+                    [121.586896, 31.479535],
+                    [121.577149, 31.479343],
+                    [121.575814, 31.478197],
+                    [121.57612, 31.474768],
+                    [121.577886, 31.472486],
+                    [121.58627, 31.464076],
+                    [121.594153, 31.458568],
+                    [121.613855, 31.447885],
+                    [121.616872, 31.446643],
+                    [121.627049, 31.444993]
+                ]
+            ]
+        ]
+    }
+    }]
+}

File diff suppressed because it is too large
+ 1264 - 0
src/assets/provinceData/shanxi1.json


+ 813 - 0
src/assets/provinceData/shanxi2.json

@@ -0,0 +1,813 @@
+{
+    "type": "FeatureCollection",
+    "features": [
+        {
+            "type": "Feature",
+            "properties": {
+                "adcode": "210000",
+                "name": "山西",
+                "center": [123.429096, 41.796767],
+                "centroid": [122.605788, 41.300296],
+                "childrenNum": 14,
+                "level": "province",
+                "parent": {
+                    "adcode": 100000
+                },
+                "subFeatureIndex": 5,
+                "acroutes": [100000],
+                "adchar": null
+            },
+            "geometry": {
+                "type": "MultiPolygon",
+        "coordinates": [
+            [
+            [
+                [112.624319, 40.236839],
+                [112.564175, 40.257939],
+                [112.511539, 40.26917],
+                [112.456168, 40.300059],
+                [112.418156, 40.295249],
+                [112.345558, 40.256453],
+                [112.310322, 40.256394],
+                [112.290535, 40.223403],
+                [112.299994, 40.211868],
+                [112.285501, 40.198189],
+                [112.232778, 40.169633],
+                [112.223274, 40.128801],
+                [112.209909, 40.10772],
+                [112.183916, 40.084787],
+                [112.181833, 40.061487],
+                [112.142388, 40.027329],
+                [112.13358, 40.001684],
+                [112.094786, 39.955498],
+                [112.077081, 39.920868],
+                [112.042539, 39.886161],
+                [112.035119, 39.854366],
+                [112.005872, 39.820821],
+                [111.97619, 39.79809],
+                [111.967468, 39.782652],
+                [111.970896, 39.766014],
+                [111.964518, 39.72524],
+                [111.968857, 39.710385],
+                [111.95636, 39.687737],
+                [111.923944, 39.665742],
+                [111.937874, 39.644638],
+                [111.93028, 39.611411],
+                [111.902031, 39.61717],
+                [111.878902, 39.605892],
+                [111.842538, 39.620109],
+                [111.787645, 39.589691],
+                [111.722684, 39.606012],
+                [111.707844, 39.621429],
+                [111.646528, 39.644278],
+                [111.61663, 39.633305],
+                [111.589596, 39.644938],
+                [111.568637, 39.643559],
+                [111.557615, 39.654231],
+                [111.501941, 39.663104],
+                [111.461541, 39.646377],
+                [111.438108, 39.643019],
+                [111.442751, 39.630186],
+                [111.46293, 39.624488],
+                [111.451951, 39.608112],
+                [111.443359, 39.620169],
+                [111.428952, 39.613691],
+                [111.438803, 39.601452],
+                [111.433205, 39.561841],
+                [111.422487, 39.542148],
+                [111.433986, 39.523409],
+                [111.426479, 39.503404],
+                [111.38864, 39.492167],
+                [111.364165, 39.467284],
+                [111.364079, 39.446361],
+                [111.352449, 39.426754],
+                [111.337218, 39.42092],
+                [111.289268, 39.41719],
+                [111.265184, 39.424589],
+                [111.242837, 39.419115],
+                [111.212287, 39.425612],
+                [111.172192, 39.423386],
+                [111.145331, 39.409429],
+                [111.119598, 39.377233],
+                [111.125587, 39.366458],
+                [111.155051, 39.368264],
+                [111.155398, 39.338699],
+                [111.167505, 39.337253],
+                [111.183648, 39.350924],
+                [111.195017, 39.344962],
+                [111.179438, 39.326773],
+                [111.187987, 39.314303],
+                [111.213806, 39.301288],
+                [111.24748, 39.302313],
+                [111.227171, 39.284354],
+                [111.213546, 39.257165],
+                [111.219013, 39.245648],
+                [111.163079, 39.152473],
+                [111.174144, 39.13514],
+                [111.162515, 39.108437],
+                [111.147327, 39.100521],
+                [111.138345, 39.064314],
+                [111.09417, 39.030205],
+                [111.038235, 39.020102],
+                [110.9984, 38.9985],
+                [110.983299, 38.980342],
+                [111.009899, 38.932626],
+                [111.015714, 38.896211],
+                [111.012329, 38.87833],
+                [110.996013, 38.868024],
+                [111.010116, 38.841584],
+                [110.99649, 38.825085],
+                [110.979133, 38.787705],
+                [110.956308, 38.776717],
+                [110.96503, 38.755709],
+                [110.945286, 38.729471],
+                [110.915388, 38.704256],
+                [110.916212, 38.673987],
+                [110.896425, 38.657814],
+                [110.880803, 38.626916],
+                [110.896641, 38.588276],
+                [110.919901, 38.582067],
+                [110.909443, 38.563194],
+                [110.907664, 38.521107],
+                [110.871039, 38.510201],
+                [110.87425, 38.453693],
+                [110.840707, 38.439971],
+                [110.825042, 38.449424],
+                [110.796836, 38.453449],
+                [110.777613, 38.440886],
+                [110.758953, 38.400436],
+                [110.750318, 38.369489],
+                [110.70163, 38.353309],
+                [110.668607, 38.313666],
+                [110.638839, 38.304745],
+                [110.601304, 38.308167],
+                [110.577481, 38.297228],
+                [110.567977, 38.245752],
+                [110.56724, 38.217553],
+                [110.558214, 38.210517],
+                [110.523933, 38.210517],
+                [110.507877, 38.184937],
+                [110.510611, 38.147223],
+                [110.521199, 38.124438],
+                [110.501889, 38.098092],
+                [110.508788, 38.061927],
+                [110.501411, 38.038993],
+                [110.508138, 38.012862],
+                [110.527057, 37.988133],
+                [110.518161, 37.976409],
+                [110.522501, 37.954922],
+                [110.547626, 37.940307],
+                [110.587982, 37.926611],
+                [110.607249, 37.8962],
+                [110.650599, 37.840013],
+                [110.660753, 37.808028],
+                [110.680367, 37.790061],
+                [110.735738, 37.770366],
+                [110.755699, 37.755037],
+                [110.750708, 37.736133],
+                [110.716644, 37.728681],
+                [110.703496, 37.718642],
+                [110.706577, 37.705335],
+                [110.739079, 37.689439],
+                [110.775399, 37.680873],
+                [110.796142, 37.66306],
+                [110.793321, 37.650791],
+                [110.763683, 37.63957],
+                [110.772275, 37.59269],
+                [110.794927, 37.566154],
+                [110.771103, 37.538373],
+                [110.771277, 37.520155],
+                [110.759517, 37.503477],
+                [110.758346, 37.471161],
+                [110.74498, 37.450763],
+                [110.648169, 37.438151],
+                [110.629683, 37.383659],
+                [110.641486, 37.360081],
+                [110.695034, 37.34962],
+                [110.693949, 37.325907],
+                [110.678718, 37.317918],
+                [110.690044, 37.287071],
+                [110.661925, 37.281991],
+                [110.65138, 37.256583],
+                [110.584554, 37.180681],
+                [110.540292, 37.144626],
+                [110.535562, 37.115136],
+                [110.498634, 37.089797],
+                [110.460491, 37.044749],
+                [110.425993, 37.040833],
+                [110.424084, 37.023924],
+                [110.450337, 37.016463],
+                [110.441224, 37.006141],
+                [110.412845, 37.019261],
+                [110.383207, 37.02181],
+                [110.377132, 37.010245],
+                [110.405555, 36.991464],
+                [110.424257, 36.963719],
+                [110.410545, 36.899481],
+                [110.402213, 36.886589],
+                [110.376047, 36.882291],
+                [110.377696, 36.873197],
+                [110.41406, 36.865721],
+                [110.424518, 36.855566],
+                [110.419528, 36.835001],
+                [110.407247, 36.824904],
+                [110.422912, 36.819169],
+                [110.419571, 36.798345],
+                [110.403298, 36.772963],
+                [110.388501, 36.764916],
+                [110.413192, 36.763107],
+                [110.43068, 36.752438],
+                [110.416664, 36.731908],
+                [110.42122, 36.721548],
+                [110.439966, 36.737151],
+                [110.451812, 36.726541],
+                [110.436755, 36.711248],
+                [110.438143, 36.685962],
+                [110.420048, 36.683963],
+                [110.402951, 36.697263],
+                [110.394446, 36.676844],
+                [110.422348, 36.661791],
+                [110.44743, 36.621115],
+                [110.471513, 36.595736],
+                [110.496812, 36.582231],
+                [110.489869, 36.550709],
+                [110.501281, 36.536132],
+                [110.503408, 36.48819],
+                [110.473075, 36.448487],
+                [110.492125, 36.423177],
+                [110.487005, 36.393847],
+                [110.469257, 36.369961],
+                [110.45997, 36.327877],
+                [110.473553, 36.310497],
+                [110.473943, 36.248161],
+                [110.454156, 36.223666],
+                [110.459493, 36.194575],
+                [110.447083, 36.164341],
+                [110.450467, 36.132272],
+                [110.470428, 36.09459],
+                [110.467955, 36.074641],
+                [110.492212, 36.034665],
+                [110.499676, 36.008086],
+                [110.49295, 35.995928],
+                [110.514256, 35.975701],
+                [110.515514, 35.959252],
+                [110.503234, 35.94324],
+                [110.516686, 35.921739],
+                [110.511696, 35.879729],
+                [110.551227, 35.875376],
+                [110.55075, 35.838076],
+                [110.56264, 35.826775],
+                [110.571275, 35.800695],
+                [110.563812, 35.787684],
+                [110.574009, 35.769805],
+                [110.57722, 35.73688],
+                [110.577611, 35.701476],
+                [110.592278, 35.682313],
+                [110.592365, 35.663272],
+                [110.604385, 35.657514],
+                [110.609332, 35.632138],
+                [110.603821, 35.601183],
+                [110.59384, 35.593078],
+                [110.549795, 35.505075],
+                [110.538817, 35.463606],
+                [110.51968, 35.437534],
+                [110.477588, 35.413865],
+                [110.450033, 35.327763],
+                [110.399002, 35.278574],
+                [110.383554, 35.24443],
+                [110.364721, 35.140255],
+                [110.333131, 35.045063],
+                [110.325667, 35.01503],
+                [110.287047, 34.967056],
+                [110.272119, 34.942867],
+                [110.259622, 34.936611],
+                [110.250986, 34.892552],
+                [110.258624, 34.875688],
+                [110.233716, 34.837412],
+                [110.232761, 34.803146],
+                [110.25103, 34.776926],
+                [110.259188, 34.738028],
+                [110.246821, 34.705194],
+                [110.231416, 34.701225],
+                [110.236623, 34.670426],
+                [110.269082, 34.629491],
+                [110.295508, 34.611036],
+                [110.350792, 34.606613],
+                [110.407724, 34.589242],
+                [110.48848, 34.610779],
+                [110.533176, 34.583472],
+                [110.547365, 34.583601],
+                [110.610981, 34.607318],
+                [110.65355, 34.608023],
+                [110.706403, 34.603985],
+                [110.749146, 34.652235],
+                [110.780043, 34.648648],
+                [110.812414, 34.624686],
+                [110.883493, 34.642434],
+                [110.912871, 34.684578],
+                [110.915735, 34.723245],
+                [110.935522, 34.730541],
+                [110.964032, 34.706411],
+                [110.976312, 34.706475],
+                [111.035371, 34.740908],
+                [111.066398, 34.751594],
+                [111.11821, 34.756584],
+                [111.148499, 34.807494],
+                [111.160736, 34.814591],
+                [111.177789, 34.803978],
+                [111.209423, 34.800972],
+                [111.223483, 34.789462],
+                [111.239842, 34.793555],
+                [111.255247, 34.819578],
+                [111.294128, 34.807686],
+                [111.340299, 34.83134],
+                [111.355357, 34.82303],
+                [111.395583, 34.814975],
+                [111.439367, 34.838179],
+                [111.464622, 34.826929],
+                [111.502635, 34.829933],
+                [111.527803, 34.85013],
+                [111.554447, 34.852239],
+                [111.570806, 34.843292],
+                [111.589422, 34.861887],
+                [111.591852, 34.881629],
+                [111.617672, 34.894787],
+                [111.621577, 34.916308],
+                [111.647006, 34.938654],
+                [111.681547, 34.95225],
+                [111.669614, 34.988176],
+                [111.687102, 34.988495],
+                [111.711749, 35.003613],
+                [111.739348, 35.004251],
+                [111.749111, 35.016433],
+                [111.768595, 35.015349],
+                [111.781353, 35.030016],
+                [111.809515, 35.036839],
+                [111.810426, 35.063295],
+                [111.818411, 35.068457],
+                [111.868748, 35.075723],
+                [111.885584, 35.069987],
+                [111.900078, 35.079865],
+                [111.91839, 35.071516],
+                [111.928371, 35.082032],
+                [111.963129, 35.079291],
+                [111.977926, 35.067183],
+                [112.02119, 35.068011],
+                [112.038938, 35.045509],
+                [112.062153, 35.055773],
+                [112.056252, 35.098471],
+                [112.067231, 35.136243],
+                [112.063325, 35.159802],
+                [112.041498, 35.189782],
+                [112.042062, 35.200281],
+                [112.078686, 35.219369],
+                [112.079641, 35.242395],
+                [112.058812, 35.279909],
+                [112.093918, 35.27921],
+                [112.217243, 35.253269],
+                [112.216678, 35.240232],
+                [112.242715, 35.234826],
+                [112.282811, 35.242013],
+                [112.304421, 35.25187],
+                [112.288538, 35.217524],
+                [112.367298, 35.220196],
+                [112.390731, 35.238833],
+                [112.42397, 35.23807],
+                [112.457731, 35.226366],
+                [112.489799, 35.229928],
+                [112.513492, 35.218542],
+                [112.540526, 35.222931],
+                [112.567864, 35.211734],
+                [112.575024, 35.22115],
+                [112.618982, 35.220068],
+                [112.637207, 35.225666],
+                [112.618331, 35.254032],
+                [112.636686, 35.264206],
+                [112.63916, 35.247864],
+                [112.65144, 35.259246],
+                [112.654998, 35.244239],
+                [112.682684, 35.233745],
+                [112.707418, 35.216951],
+                [112.703079, 35.201554],
+                [112.712669, 35.186981],
+                [112.720306, 35.206453],
+                [112.735364, 35.210398],
+                [112.767258, 35.204099],
+                [112.798241, 35.238642],
+                [112.822194, 35.258102],
+                [112.86906, 35.243794],
+                [112.907073, 35.245829],
+                [112.929637, 35.256894],
+                [112.93606, 35.284422],
+                [112.964699, 35.29313],
+                [112.982795, 35.287283],
+                [112.99156, 35.302346],
+                [112.985311, 35.338118],
+                [112.999545, 35.362316],
+                [113.0202, 35.356029],
+                [113.038252, 35.360602],
+                [113.067109, 35.353552],
+                [113.084076, 35.340531],
+                [113.107595, 35.340785],
+                [113.126558, 35.33221],
+                [113.148906, 35.351202],
+                [113.154634, 35.380858],
+                [113.170603, 35.38727],
+                [113.169518, 35.410883],
+                [113.185226, 35.409042],
+                [113.190043, 35.44908],
+                [113.230052, 35.453267],
+                [113.265375, 35.434615],
+                [113.304385, 35.427001],
+                [113.297356, 35.438549],
+                [113.306425, 35.460815],
+                [113.294665, 35.467284],
+                [113.312327, 35.481236],
+                [113.325909, 35.46925],
+                [113.34817, 35.468362],
+                [113.370778, 35.480094],
+                [113.39178, 35.50685],
+                [113.416645, 35.516168],
+                [113.43921, 35.507547],
+                [113.485424, 35.520731],
+                [113.5066, 35.516485],
+                [113.498529, 35.532392],
+                [113.50673, 35.565971],
+                [113.541966, 35.596181],
+                [113.556677, 35.619795],
+                [113.547998, 35.657577],
+                [113.560061, 35.660425],
+                [113.578547, 35.633531],
+                [113.624848, 35.632012],
+                [113.624978, 35.652389],
+                [113.614911, 35.683008],
+                [113.593127, 35.69142],
+                [113.60198, 35.706408],
+                [113.586792, 35.744022],
+                [113.599116, 35.775112],
+                [113.583494, 35.794253],
+                [113.604974, 35.800127],
+                [113.586141, 35.806127],
+                [113.585273, 35.825765],
+                [113.606059, 35.823744],
+                [113.623807, 35.83151],
+                [113.641208, 35.822482],
+                [113.661038, 35.837255],
+                [113.658218, 35.853919],
+                [113.644028, 35.854866],
+                [113.637389, 35.869886],
+                [113.654443, 35.917199],
+                [113.647803, 35.96713],
+                [113.636868, 35.97589],
+                [113.648888, 35.994164],
+                [113.686467, 35.986414],
+                [113.695927, 35.999897],
+                [113.680739, 36.014826],
+                [113.695146, 36.026793],
+                [113.670195, 36.029501],
+                [113.661429, 36.042913],
+                [113.685773, 36.056009],
+                [113.673796, 36.111578],
+                [113.655527, 36.125102],
+                [113.693193, 36.124222],
+                [113.713762, 36.132964],
+                [113.706862, 36.147365],
+                [113.681347, 36.150698],
+                [113.679264, 36.15994],
+                [113.651665, 36.172199],
+                [113.697923, 36.181879],
+                [113.68638, 36.195517],
+                [113.705387, 36.20067],
+                [113.698444, 36.214305],
+                [113.677311, 36.222535],
+                [113.703911, 36.237799],
+                [113.70057, 36.252306],
+                [113.716235, 36.262604],
+                [113.709075, 36.299703],
+                [113.723308, 36.304849],
+                [113.736413, 36.324677],
+                [113.728733, 36.341427],
+                [113.729601, 36.381623],
+                [113.708381, 36.423365],
+                [113.670195, 36.425119],
+                [113.629231, 36.454688],
+                [113.587226, 36.461014],
+                [113.582105, 36.482931],
+                [113.55442, 36.494701],
+                [113.559454, 36.531001],
+                [113.566961, 36.54414],
+                [113.58089, 36.541075],
+                [113.588137, 36.562719],
+                [113.569695, 36.58592],
+                [113.539753, 36.59411],
+                [113.545264, 36.616865],
+                [113.535457, 36.629239],
+                [113.486856, 36.635238],
+                [113.477049, 36.655232],
+                [113.502001, 36.681528],
+                [113.507034, 36.70488],
+                [113.477526, 36.697263],
+                [113.465376, 36.707752],
+                [113.4777, 36.726416],
+                [113.499353, 36.740583],
+                [113.536195, 36.732345],
+                [113.543528, 36.744327],
+                [113.569174, 36.758116],
+                [113.59994, 36.752875],
+                [113.655744, 36.785686],
+                [113.680956, 36.790114],
+                [113.673883, 36.807511],
+                [113.684124, 36.824779],
+                [113.67627, 36.855628],
+                [113.696925, 36.882291],
+                [113.710507, 36.887336],
+                [113.731597, 36.878616],
+                [113.731944, 36.859117],
+                [113.742055, 36.851142],
+                [113.772343, 36.871141],
+                [113.786924, 36.870082],
+                [113.792825, 36.894748],
+                [113.761669, 36.956065],
+                [113.777464, 36.968572],
+                [113.794952, 36.995009],
+                [113.771866, 37.016836],
+                [113.790178, 37.042946],
+                [113.788225, 37.059788],
+                [113.768785, 37.062523],
+                [113.758154, 37.075633],
+                [113.773515, 37.106939],
+                [113.767353, 37.144626],
+                [113.773168, 37.151888],
+                [113.831923, 37.167527],
+                [113.836566, 37.189491],
+                [113.853099, 37.215107],
+                [113.886425, 37.239165],
+                [113.886859, 37.25993],
+                [113.89901, 37.279512],
+                [113.902177, 37.309991],
+                [113.921184, 37.330675],
+                [113.959848, 37.349001],
+                [113.973864, 37.403147],
+                [113.995344, 37.421146],
+                [114.014524, 37.424609],
+                [114.025329, 37.441304],
+                [114.028323, 37.47456],
+                [114.036785, 37.49421],
+                [114.05961, 37.515893],
+                [114.123268, 37.601452],
+                [114.115371, 37.619896],
+                [114.131123, 37.648264],
+                [114.139715, 37.67588],
+                [114.128259, 37.698188],
+                [114.08825, 37.708785],
+                [114.068028, 37.721537],
+                [114.047243, 37.720243],
+                [113.996906, 37.704473],
+                [114.000811, 37.735333],
+                [114.041167, 37.756823],
+                [114.043858, 37.777444],
+                [114.01882, 37.794861],
+                [114.006669, 37.813503],
+                [113.982543, 37.812826],
+                [113.970175, 37.833986],
+                [113.971521, 37.868788],
+                [113.95924, 37.906338],
+                [113.936545, 37.923171],
+                [113.901266, 37.984818],
+                [113.872366, 37.990342],
+                [113.878354, 38.032369],
+                [113.876271, 38.05506],
+                [113.855963, 38.065912],
+                [113.854748, 38.077131],
+                [113.824199, 38.106732],
+                [113.810053, 38.112553],
+                [113.822507, 38.150468],
+                [113.833572, 38.147468],
+                [113.825457, 38.169143],
+                [113.796861, 38.162837],
+                [113.756591, 38.171653],
+                [113.731119, 38.168347],
+                [113.720618, 38.174653],
+                [113.738496, 38.189527],
+                [113.715064, 38.19375],
+                [113.711722, 38.213699],
+                [113.67909, 38.205377],
+                [113.6498, 38.229788],
+                [113.62615, 38.232541],
+                [113.598899, 38.227158],
+                [113.570346, 38.237434],
+                [113.566267, 38.252357],
+                [113.54483, 38.270516],
+                [113.546045, 38.293072],
+                [113.557284, 38.343476],
+                [113.534329, 38.365216],
+                [113.525433, 38.382981],
+                [113.538017, 38.418071],
+                [113.573166, 38.44918],
+                [113.583494, 38.465949],
+                [113.561363, 38.485762],
+                [113.555548, 38.521046],
+                [113.562057, 38.558322],
+                [113.602804, 38.586876],
+                [113.604236, 38.616087],
+                [113.612871, 38.646016],
+                [113.632616, 38.65307],
+                [113.66707, 38.646989],
+                [113.702132, 38.651672],
+                [113.713805, 38.663712],
+                [113.709987, 38.698301],
+                [113.729036, 38.711974],
+                [113.745396, 38.701522],
+                [113.775641, 38.709847],
+                [113.780415, 38.728317],
+                [113.802936, 38.7633],
+                [113.83956, 38.758381],
+                [113.836566, 38.795959],
+                [113.853663, 38.810159],
+                [113.855529, 38.828967],
+                [113.835611, 38.842555],
+                [113.80133, 38.854866],
+                [113.776205, 38.885665],
+                [113.775121, 38.919056],
+                [113.767527, 38.959637],
+                [113.776726, 38.98694],
+                [113.806798, 38.989725],
+                [113.830534, 39.011813],
+                [113.884429, 39.051676],
+                [113.898012, 39.067639],
+                [113.930297, 39.063467],
+                [113.942881, 39.087467],
+                [113.961757, 39.100823],
+                [113.984365, 39.095384],
+                [114.000464, 39.100763],
+                [114.006496, 39.122877],
+                [114.050801, 39.135864],
+                [114.065251, 39.093511],
+                [114.096798, 39.083719],
+                [114.108732, 39.052281],
+                [114.126653, 39.05089],
+                [114.157202, 39.06117],
+                [114.180895, 39.049076],
+                [114.196994, 39.050406],
+                [114.226372, 39.06649],
+                [114.300141, 39.079246],
+                [114.320797, 39.070481],
+                [114.349133, 39.076768],
+                [114.369658, 39.107531],
+                [114.360762, 39.133992],
+                [114.388187, 39.176985],
+                [114.417999, 39.171613],
+                [114.443601, 39.174148],
+                [114.453147, 39.192618],
+                [114.465601, 39.188514],
+                [114.474844, 39.219228],
+                [114.436354, 39.229604],
+                [114.415959, 39.242873],
+                [114.437656, 39.260421],
+                [114.425072, 39.285137],
+                [114.438611, 39.319424],
+                [114.466643, 39.329664],
+                [114.479704, 39.351104],
+                [114.469464, 39.355199],
+                [114.470896, 39.408767],
+                [114.496802, 39.438543],
+                [114.502313, 39.477082],
+                [114.529868, 39.485196],
+                [114.536594, 39.512897],
+                [114.557336, 39.531998],
+                [114.557336, 39.550674],
+                [114.568922, 39.573967],
+                [114.556989, 39.58141],
+                [114.515374, 39.565023],
+                [114.495804, 39.608172],
+                [114.474758, 39.613751],
+                [114.431668, 39.614051],
+                [114.408148, 39.651953],
+                [114.407107, 39.690374],
+                [114.410231, 39.761705],
+                [114.416784, 39.776189],
+                [114.390704, 39.818608],
+                [114.406716, 39.83344],
+                [114.395434, 39.867217],
+                [114.285084, 39.859686],
+                [114.286819, 39.871042],
+                [114.245509, 39.861897],
+                [114.221468, 39.86118],
+                [114.202071, 39.872297],
+                [114.204501, 39.885205],
+                [114.227717, 39.8959],
+                [114.220644, 39.914298],
+                [114.174169, 39.897632],
+                [114.102873, 39.912865],
+                [114.089942, 39.910177],
+                [114.067768, 39.922301],
+                [114.047373, 39.91615],
+                [114.02828, 39.959318],
+                [114.029451, 39.985397],
+                [114.02125, 39.991781],
+                [113.960455, 40.000908],
+                [113.932032, 40.009438],
+                [113.914631, 40.005919],
+                [113.922486, 40.026613],
+                [113.954857, 40.030847],
+                [113.975556, 40.051057],
+                [113.981024, 40.073227],
+                [113.973864, 40.097118],
+                [113.979852, 40.112306],
+                [114.019948, 40.102479],
+                [114.043815, 40.056898],
+                [114.091157, 40.075313],
+                [114.101224, 40.108733],
+                [114.089118, 40.121477],
+                [114.068028, 40.179748],
+                [114.097753, 40.193549],
+                [114.123399, 40.188672],
+                [114.123963, 40.178141],
+                [114.145095, 40.177368],
+                [114.180071, 40.191527],
+                [114.235875, 40.198308],
+                [114.240171, 40.221976],
+                [114.255229, 40.236185],
+                [114.293111, 40.230122],
+                [114.33516, 40.245399],
+                [114.362585, 40.250094],
+                [114.406412, 40.246172],
+                [114.469941, 40.268041],
+                [114.510948, 40.302969],
+                [114.526439, 40.323574],
+                [114.530605, 40.345121],
+                [114.499318, 40.354023],
+                [114.470809, 40.349691],
+                [114.446552, 40.372891],
+                [114.403722, 40.353786],
+                [114.383544, 40.354023],
+                [114.344446, 40.369569],
+                [114.314418, 40.369569],
+                [114.28708, 40.423418],
+                [114.298709, 40.445585],
+                [114.27545, 40.458029],
+                [114.267205, 40.474202],
+                [114.296409, 40.535957],
+                [114.293459, 40.551402],
+                [114.274322, 40.552881],
+                [114.282957, 40.590796],
+                [114.258223, 40.610662],
+                [114.236135, 40.606997],
+                [114.209318, 40.629754],
+                [114.216435, 40.635013],
+                [114.200075, 40.662191],
+                [114.183239, 40.671701],
+                [114.162366, 40.713562],
+                [114.139541, 40.739941],
+                [114.09324, 40.731917],
+                [114.072281, 40.72153],
+                [114.064079, 40.707128],
+                [114.072715, 40.679142],
+                [114.070458, 40.660301],
+                [114.041818, 40.608652],
+                [114.04811, 40.595882],
+                [114.076881, 40.575834],
+                [114.080178, 40.547733],
+                [114.06191, 40.528855],
+                [114.011399, 40.515892],
+                [113.970089, 40.522226],
+                [113.947784, 40.51678],
+                [113.930904, 40.493392],
+                [113.890114, 40.466442],
+                [113.863427, 40.456488],
+                [113.850973, 40.460577],
+                [113.832704, 40.487055],
+                [113.794821, 40.517964],
+                [113.790699, 40.502511],
+                [113.763448, 40.473965],
+                [113.688767, 40.448193],
+                [113.667981, 40.423773],
+                [113.647803, 40.415533],
+                [113.584145, 40.37123],
+                [113.559888, 40.348623],
+                [113.500135, 40.334497],
+                [113.457652, 40.33046],
+                [113.387615, 40.319121],
+                [113.315972, 40.32013],
+                [113.302737, 40.334675],
+                [113.291194, 40.36506],
+                [113.273967, 40.390093],
+                [113.247757, 40.412983],
+                [113.219377, 40.402844],
+                [113.170733, 40.395965],
+                [113.115362, 40.381137],
+                [113.033131, 40.368916],
+                [112.989824, 40.357405],
+                [112.89297, 40.326423],
+                [112.890453, 40.305167],
+                [112.85513, 40.218409],
+                [112.84502, 40.203899],
+                [112.750725, 40.168026],
+                [112.728594, 40.168205],
+                [112.624319, 40.236839]
+            ]
+        ]
+        ]
+    }
+    }]
+}

File diff suppressed because it is too large
+ 2039 - 0
src/assets/provinceData/sichuan.json


File diff suppressed because it is too large
+ 1249 - 0
src/assets/provinceData/tianjin.json


File diff suppressed because it is too large
+ 1250 - 0
src/assets/provinceData/xinjiang.json


File diff suppressed because it is too large
+ 2315 - 0
src/assets/provinceData/xizang.json


File diff suppressed because it is too large
+ 1814 - 0
src/assets/provinceData/yunnan.json


File diff suppressed because it is too large
+ 3074 - 0
src/assets/provinceData/zhejiang.json


File diff suppressed because it is too large
+ 6384 - 0
src/assets/regionData/other.json


+ 91 - 83
src/components/404.vue

@@ -1,97 +1,105 @@
 <template>
-    <div class='notfond'>
-        <div class='not-img'>
-            <img src='@/assets/imgs/dlsb.png' alt />
-        </div>
-        <div class='not-text' v-if='permissions && permissions.includes("GLSMS_VIEW")'>
-            <span>您的权限不足……</span>
-            <span>建议您联系管理员开通管理说明书相关权限</span>
-        </div>
-        <div class='not-text' v-else>
-            <span>您的访问出错了!</span>
-            <span>建议您稍后再试,或直接联系管理员解决</span>
-        </div>
-        <div class='not-button' @click='goLogin'>
-            <span>关闭页面</span>
-        </div>
+  <div class="notfond">
+    <div class="not-img">
+      <img src="@/assets/imgs/dlsb.png" alt />
     </div>
+    <div class="not-text" v-if="isrequestAuth=='err'">
+      <span>您的权限不足或登陆已失效</span>
+      <span>请联系管理员开通管理说明书相关权限,若已有权限请刷新!</span>
+    </div>
+    <div class="not-text" v-else>
+      <span>您的访问出错了!</span>
+      <span>建议您稍后再试,或直接联系管理员解决</span>
+    </div>
+    <div class="not-button" @click="goLogin">
+      <span>刷新页面</span>
+    </div>
+  </div>
 </template>
 <script>
-import { mapGetters } from 'vuex'
+import { mapGetters } from "vuex";
 export default {
-    data() {
-        return {}
-    },
-    computed: {
-        ...mapGetters(['permissions'])
-    },
-    mounted() {},
-    methods: {
-        goLogin() {
-            let ssoServer = 'http://oauth.wanda-dev.cn'
-            this.$store.commit('SETSSOTOKEN', null)
-            let systemcode = 'CAD156',
-                signal = new Date().getTime(),
-                version = '1.0.0'
-            window.location.href = `${ssoServer}/login?systemcode=${systemcode}&signal=${signal}&version=${version}`
-            window.open(`${window.location.href}`, true)
-        }
+  data() {
+    return {};
+  },
+  computed: {
+    ...mapGetters(["isrequestAuth"])
+  },
+  mounted() {
+    sessionStorage.setItem("SSOTOKEN", "");
+  },
+  methods: {
+    goLogin() {
+      this.$store.commit("SETSSOTOKEN", null);
+      sessionStorage.setItem("SSOTOKEN", "");
+      let ssoServer = "";
+      if (process.env.NODE_ENV == "wanda_dev") {
+        ssoServer = "http://oauth.wanda-dev.cn";
+      } else {
+        ssoServer = "http://oauth.wanda.cn";
+      }
+      let systemcode = "CAD156",
+        signal = new Date().getTime(),
+        version = "1.0.0";
+      window.location.href = `${ssoServer}/login?systemcode=${systemcode}&signal=${signal}&version=${version}`;
+      // window.open(`${window.location.href}`, true)
     }
-}
+  }
+};
 </script>
 <style lang="less" scoped>
 .notfond {
-    width: 100%;
-    height: 100%;
-    background: rgba(255, 255, 255, 1);
-    display: flex;
-    align-items: center;
-    justify-content: center;
-    flex-direction: column;
-    .not-img {
-        width: 120px;
-        height: 120px;
-        img {
-            width: 100%;
-            height: 100%;
-        }
+  width: 100%;
+  height: 100%;
+  background: rgba(255, 255, 255, 1);
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  flex-direction: column;
+  .not-img {
+    width: 120px;
+    height: 120px;
+    img {
+      width: 100%;
+      height: 100%;
+    }
+  }
+  .not-text {
+    margin-top: 8px;
+    span {
+      display: block;
+      text-align: center;
     }
-    .not-text {
-        margin-top: 8px;
-        span {
-            display: block;
-            text-align: center;
-        }
-        span:nth-of-type(1) {
-            font-size: 16px;
-            font-family: MicrosoftYaHei;
-            color: rgba(31, 36, 41, 1);
-            line-height: 21px;
-        }
-        span:nth-of-type(2) {
-            margin-top: 4px;
-            font-size: 14px;
-            font-family: MicrosoftYaHei;
-            color: rgba(100, 108, 115, 1);
-            line-height: 19px;
-        }
+    span:nth-of-type(1) {
+      font-size: 16px;
+      font-family: MicrosoftYaHei;
+      color: rgba(31, 36, 41, 1);
+      line-height: 21px;
     }
-    .not-button {
-        margin-top: 32px;
-        width: 80px;
-        height: 32px;
-        background: rgba(255, 255, 255, 1);
-        border: 1px solid rgba(195, 199, 203, 1);
-        border-radius: 4px;
-        cursor: pointer;
-        span {
-            display: block;
-            font-size: 14px;
-            font-family: MicrosoftYaHei;
-            color: rgba(31, 35, 41, 1);
-            line-height: 32px;
-            text-align: center;
-        }
+    span:nth-of-type(2) {
+      margin-top: 4px;
+      font-size: 14px;
+      font-family: MicrosoftYaHei;
+      color: rgba(100, 108, 115, 1);
+      line-height: 19px;
+    }
+  }
+  .not-button {
+    margin-top: 32px;
+    width: 80px;
+    height: 32px;
+    background: rgba(255, 255, 255, 1);
+    border: 1px solid rgba(195, 199, 203, 1);
+    border-radius: 4px;
+    cursor: pointer;
+    span {
+      display: block;
+      font-size: 14px;
+      font-family: MicrosoftYaHei;
+      color: rgba(31, 35, 41, 1);
+      line-height: 32px;
+      text-align: center;
     }
+  }
 }
 </style>

+ 271 - 163
src/components/Legend/src/legend.vue

@@ -6,15 +6,17 @@
 <template>
     <div>
         <div class='legend-container'>
-            <div :class='showView===1?"legend2":"legend"' @click='showTl' v-if='(type==1 || floors.length>0)&& isMessage && legendTable.length>0 '>图例</div>
+            <div :class='showView===1?"legend2":"legend"' @click='showTl' v-if='(type==1 || floors.length>0)&& isMessage && legendTable.length>0'>图例</div>
             <!-- 图里展示状态组件 -->
-            <el-collapse-transition v-if='(type==1 || floors.length>0)&& isMessage && legendTable.length>0 '>
+            <el-collapse-transition v-if='(type==1 || floors.length>0)&& isMessage && legendTable.length>0'>
                 <div class='legend-tab' v-if='showView===1'>
-                    <div class='legend-table2' v-if='systemName=="土建系统"'>
-                        <lengend-view @changeSwitch='handleSwich' :remarksText='remarksText' ref='viewLengend' :systemName='systemName'></lengend-view>
+                    <div class='legend-table2' v-if='systemName=="土建装饰"'>
+                        <lengend-view @changeSwitch='handleSwich' ref='viewLengend' :systemName='systemName'></lengend-view>
                     </div>
                     <div class='legend-table' v-else>
-                        <lengend-view @changeSwitch='handleSwich' :remarksText='remarksText' ref='viewLengend' :systemName='systemName'></lengend-view>
+                        <div>
+                            <lengend-view @changeSwitch='handleSwich' ref='viewLengend' :systemName='systemName'></lengend-view>
+                        </div>
                     </div>
                 </div>
             </el-collapse-transition>
@@ -22,21 +24,26 @@
             <el-collapse-transition>
                 <div v-if='showView===2'>
                     <lengend-edit
-                        @handleSwich2='handleSwich2'
+                        @changeSwitch='handleSwich'
                         v-if='editTable.length>0'
                         :loading='loading1'
                         ref='editLen'
                         :editTable='editTable'
                         @saveNum='saveNum'
-                        @cance='cance'
-                        :remarksText='remarksText'
+                        :tableHeigth='tableHeigth'
                     ></lengend-edit>
                 </div>
             </el-collapse-transition>
         </div>
 
         <!-- 单独展示新增分布图 -->
-        <el-tooltip effect='dark' v-if='floors.length==0' content='新增分布图' placement='left'>
+        <el-tooltip
+            v-show='permissions ? permissions.includes("GLSMS_PLANARGRAPH_MANAGE"):false'
+            effect='dark'
+            v-if='floors.length==0'
+            content='新增分布图'
+            placement='left'
+        >
             <div class='edit_map1' @click='addFloor'>
                 <!-- <p class='tltk' style='margin-left: -5px;'> -->
                 <img src='@/assets/imgs/bjj.png' alt />
@@ -47,16 +54,23 @@
         <div class='edit_map' v-else>
             <!-- 备注编辑器 -->
             <el-tooltip effect='dark' content='编辑备注' placement='left'>
-                <span v-if='systemName != "土建系统" && isMessage' class='bjtk' @click='legendClik'>备注</span>
+                <span v-if='systemName != "土建装饰" && isMessage' class='bjtk' @click='legendClik'>备注</span>
             </el-tooltip>
             <!-- 编辑图例 -->
             <el-tooltip effect='dark' content='编辑图例' placement='left'>
-                <p v-if='systemName != "土建系统" && isMessage' @click='editTl' class='tltk-1'>
-                    <img src='@/assets/imgs/bjtl.png' alt />
-                </p>
+                <span class='bjtk' v-if='systemName != "土建装饰" && isMessage' @click='editTl'>图例</span>
+                <!-- <p v-if='systemName != "土建装饰" && isMessage' @click='editTl' class='tltk-1'> -->
+                <!-- <img src='@/assets/imgs/bjtl.png' alt /> -->
+                <!-- </p> -->
             </el-tooltip>
             <!-- 新增分布图 -->
-            <el-tooltip effect='dark' content='新增分布图' placement='left' v-if='floorSelect.length!=floors.length && type==0'>
+            <el-tooltip
+                v-show='permissions ? permissions.includes("GLSMS_PLANARGRAPH_MANAGE"):false'
+                effect='dark'
+                content='新增分布图1'
+                placement='left'
+                v-if='floorSelect.length!=floors.length && type==0'
+            >
                 <p class='tltk' style='margin-left: -5px;' @click='addFloor'>
                     <img src='@/assets/imgs/bjj.png' alt />
                 </p>
@@ -64,28 +78,14 @@
             <!-- 编辑分布图 -->
 
             <!-- 有修改权限 -->
-            <el-tooltip
-                v-if='editPmt'
-                class='bjpmt'
-                effect='dark'
-                :content='editTips?editTips:`编辑${categoryId=="FZQZL"?"分水器支路分布图":"消防泵房引出管路分布图"}`'
-                placement='left'
-            >
-                <span class='edit-icon corner-con' @click='goToEditer'>
+            <el-tooltip class='bjpmt' effect='dark' :content='editTips?editTips:`编辑${categoryId=="FZQZL"?"分水器支路分布图":"消防泵房引出管路分布图"}`' placement='left'>
+                <span v-show='permissions ? permissions.includes("GLSMS_PLANARGRAPH_MANAGE"):false' class='edit-icon corner-con' @click='goToEditer'>
                     <img src='@/assets/imgs/bjs.png' alt />
                     <!-- 角标 -->
                     <!-- <span v-if='draftNum' class='corner' :style='{lineHeight : draftNum > 99 ?"10px":"18px"}'>{{draftNum > 99 ? '...' : draftNum}}</span> -->
                     <span v-if='draftNum' class='corner'></span>
                 </span>
             </el-tooltip>
-
-            <!-- 无修改权限 -->
-            <span v-else class='edit-icon2 corner-con'>
-                <img src='@/assets/imgs/bjs.png' alt />
-                <!-- 角标 -->
-                <!-- <span v-if='draftNum' class='corner' :style='{lineHeight : draftNum > 99 ?"10px":"18px"}'>{{draftNum > 99 ? '...' : draftNum}}</span> -->
-                <span v-if='draftNum' class='corner'></span>
-            </span>
         </div>
         <div class='select-floor' v-if='isFloor'>
             <p class='p1'>{{`请选择需要创建"${categoryId=='FZQZL'?'分水器支路分布图':'消防泵房引出管路分布图'}"的楼层`}}</p>
@@ -98,7 +98,7 @@
             </p>
         </div>
 
-        <legend-remarks @queryMarks='queryMarks' ref='EditdMarks'></legend-remarks>
+        <legend-remarks @queryView='queryView' @queryMarks='queryMarks' ref='EditdMarks'></legend-remarks>
     </div>
 </template>
 <script>
@@ -113,11 +113,8 @@ export default {
     name: 'Legend',
     data() {
         return {
-            remarksText: '', //查询出来的备注
-            text1:
-                '<p>主要设备房包括:冷源机房,热源机房,开闭站,配变电所(室),发电机房,消防水泵房,消防高位水箱间,生活水泵房,慧云机房,垃圾房</p>',
-            text2: '<p>图例后×的数字,代表此位置的数量</p>',
-            text2: '',
+            text1: '主要设备房包括:冷源机房,热源机房,开闭站,配变电所(室),发电机房,消防水泵房,消防高位水箱间,生活水泵房,慧云机房,垃圾房',
+            text2: '图例后×的数字,代表此位置的数量',
             loading: true,
             loading1: true,
             viewTable: [],
@@ -129,19 +126,30 @@ export default {
             editText: '',
             editSwitch: false,
             isFloor: false,
-            editPmt: true, //是否有跳转道图例库的权限
             floorSelectAble: [],
             floor: '', //传的楼层
             floorName: '',
-            planNum: '', //主要设备房
-            typeNum: '',
             draftNum: null, //草稿箱数量, 编辑器修改icon右上角显示
             interval: 10 * 60 * 1000, //定时器时长,默认 10分钟
-            timer: null //保存定时器
+            timer: null, //保存定时器
+            timer1: null,
+            tableHeigth: 300, // 编辑图例框得高度
         }
     },
     computed: {
-        ...mapGetters(['plazaId', 'fmapID', 'floorSelect', 'isMessage', 'ssoToken', 'showView', 'legendTable'])
+        ...mapGetters([
+            'planNum',
+            'typeNum',
+            'remarksText',
+            'plazaId',
+            'fmapID',
+            'floorSelect',
+            'isMessage',
+            'ssoToken',
+            'showView',
+            'legendTable',
+            'permissions',
+        ]),
     },
     props: {
         floors: {
@@ -149,26 +157,38 @@ export default {
             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,
+        },
+        // 弹窗组件内部传入的楼层信息
+        floorInfo: {
+            type: Object,
+            default() {
+                return {}
+            },
+        },
     },
     components: { lengendView, legendRemarks, lengendEdit },
     watch: {
@@ -183,8 +203,38 @@ export default {
                     }, this.interval)
                 }
             },
-            deep: true
-        }
+            deep: true,
+        },
+        '$store.state.categoryId': {
+            handler(newV, oldV) {
+                if (newV !== oldV) {
+                    clearInterval(this.timer1)
+                    this.getDraftNum()
+                    this.timer1 = setInterval(() => {
+                        this.getDraftNum()
+                    }, this.interval)
+                }
+            },
+            deep: true,
+        },
+        // 弹窗组件内传入floorInfo,查询 getDraftNum
+        floorInfo: {
+            handler(newV, oldV) {
+                if (newV !== oldV) {
+                    clearInterval(this.timer)
+                    this.getDraftNum()
+                    this.timer = setInterval(() => {
+                        this.getDraftNum()
+                    }, this.interval)
+                }
+            },
+            deep: true,
+        },
+    },
+    '$refs.viewLengend': {
+        handler(newV, oldV) {
+            this.$refs.viewLengend.setSelected()
+        },
     },
     methods: {
         /**
@@ -193,18 +243,20 @@ export default {
          */
         async getDraftNum() {
             let res = null,
-                // floorId = this.$cookie.get('floorMapId'),
-                floorId = this.$store.state.currentFloor.gname || this.$cookie.get('floorMapId')
+                floorId = this.$store.state.currentFloor.gname || this.$cookie.get('floorMapId'),
+                categoryId = this.categoryId || this.$cookie.get('categoryId')
+            // 弹窗组件内传入floorInfo,使用其楼层id
+            this.floorInfo.gname && (floorId = this.floorInfo.gname)
             // 增加校验 floorId,防止上传 undefined
             if (!floorId) {
                 return true
             }
             let data = {
                 Distinct: true,
-                Filters: `projectId='${this.plazaId}';isPub=false;floorId='${floorId}'`,
+                Filters: `projectId='${this.plazaId}';isPub=false;BuildingId='1';categoryId='${categoryId}';floorId='${floorId}'`,
                 PageNumber: 1,
                 PageSize: 500,
-                Projection: ['floorId']
+                Projection: ['floorId'],
             }
             try {
                 // 调用接口
@@ -221,8 +273,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
             })
         },
@@ -238,28 +290,28 @@ 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 => {
-                let remarksText = ''
-                if (res.data.Data && res.data.Data[0].Note) {
-                    let Res = res.data ? res.data.Data[0].Note : ''
+            queryRead({ data, postParams }).then((res) => {
+                // this.$store.commit('SETREMARKSTEXT', '')
+                if (res.data) {
+                    let Res = res.data.Data && res.data.Data[0] ? res.data.Data[0].Note : ''
                     if (Res) {
-                        // 返回有备注
-                        remarksText = Res
+                        this.$store.commit('SETREMARKSTEXT', Res)
                     } else {
-                        if (this.planNum > 0 && this.typeNum > 1) {
-                            remarksText = `${this.text1}${this.text2}${Res}`
-                        } else if (this.planNum > 0) {
-                            remarksText = `${this.text1}${Res}`
-                        } else if (this.typeNum > 1) {
-                            remarksText = `${this.text2}${Res}`
+                        let marks = ''
+                        if (this.planNum && this.typeNum) {
+                            marks = `<ol style="padding-left: 1.5em;"><li>${this.text1}</li><li>${this.text2}</li></ol>`
+                        } else if (this.planNum) {
+                            marks = `<ol style="padding-left: 1.5em;"><li>${this.text1}</li></ol>`
+                        } else if (this.typeNum) {
+                            marks = `<ol style="padding-left: 1.5em;" ><li>${this.text2}</li></ol>`
                         } else {
-                            remarksText = ''
+                            marks = ''
                         }
+                        this.$store.commit('SETREMARKSTEXT', marks)
                     }
-                    this.$store.commit('SETREMARKSTEXT', remarksText)
                 }
             })
         },
@@ -267,17 +319,18 @@ export default {
         showTl() {
             if (this.showView != 1) {
                 this.$store.commit('SETSHOWVIEW', 1)
+                setTimeout(() => {
+                    this.setLengedHeight()
+                })
             } else {
                 this.$store.commit('SETSHOWVIEW', 0)
             }
             this.queryView(false)
         },
-        cance() {
-            // this.show2 = false
-        },
         // 编辑图例
         editTl() {
             if (this.showView != 2) {
+                this.setLengedHeight()
                 this.$store.commit('SETSHOWVIEW', 2)
             } else {
                 this.$store.commit('SETSHOWVIEW', 0)
@@ -286,35 +339,44 @@ export default {
         },
         /**
          * @name goToEditer
-         * @description t跳转editer编辑器
+         * @description 跳转editer编辑器
          */
         goToEditer() {
-            if (this.floor) {
-                this.floorSelect.forEach(el => {
-                    if (el.id == this.floor) {
-                        this.floorName = el.name
-                    }
-                })
-            }
+            // let FloorID = this.floor ? this.floor : this.$cookie.get('floorMapId') || 'f1'
+            // let categoryId = this.categoryId ? this.categoryId : this.$cookie.get('categoryId')
+            // let floorName = this.floorName ? this.floorName : this.$cookie.get('floorNow')
+            // let seq = this.$cookie.get('currentFloorId')
 
-            let FloorID = this.floor ? this.floor : this.$cookie.get('floorMapId') || 'f1'
-            let categoryId = this.categoryId ? this.categoryId : this.$cookie.get('categoryId')
-            const { conf } = window.__systemConf,
-                { editerUrl } = conf
-            let floorName = this.floorName ? this.floorName : this.$cookie.get('floorNow')
+            //主页面(楼层功能,设备设置中的)legend, 楼层参数参数处理
+            let FloorID = this.$cookie.get('floorMapId')
+            let floorName = this.$cookie.get('floorNow')
             let seq = this.$cookie.get('currentFloorId')
+            let categoryId = this.$cookie.get('categoryId') //系统
+
+            // 弹窗组件内传入floorInfo, 楼层参数处理
+            if (this.floorInfo.gname && !this.floor) {
+                FloorID = this.floorInfo.gname
+                floorName = this.floorInfo.code
+                seq = this.floorInfo.seq
+                categoryId = this.categoryId
+            }
+            //弹窗组件点击新增楼层,确认的楼层 楼层字段处理
+            if (this.floor) {
+                // 从store中筛选出选中的楼层信息
+                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) {
+                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, true)
-        },
-        // 编辑状态取消
-        isShow2() {
-            // if (this.showView != 2) {
-            //     this.$store.commit('SETSHOWVIEW', 1)
-            // } else {
-            //     this.$store.commit('SETSHOWVIEW', 0)
-            // }
-            // this.show2 = !this.show2
+            window.open(url, 'edit')
         },
         handleSwich(val) {
             this.queryView(!val)
@@ -328,27 +390,47 @@ export default {
         // 查询图例
         queryView(flag) {
             let postParams = {}
+            let categoryId = this.categoryId || this.$cookie.get('categoryId')
             let data = {
-                categoryId: this.$cookie.get('categoryId'),
+                categoryId,
                 graphId: this.$cookie.get('graphId'),
                 projectId: this.$store.state.plazaId,
                 flag: flag,
                 buildingId: '1',
-                floorId: this.$store.state.currentFloor.gname
+                floorId: this.$store.state.currentFloor.gname,
             }
-            queryStatis({ data, postParams }).then(res => {
+            // 弹窗组件内传入floorInfo,使用其楼层id
+            this.floorInfo.gname && (data.floorId = this.floorInfo.gname)
+            queryStatis({ data, postParams }).then((res) => {
+                // this.$store.commit('SETREMARKSTEXT', '')
+                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.planNum = el.Num
+                            this.$store.commit('SETPLANNUM', el.Num)
                         }
-                        if (el.type == 'Image') {
-                            this.typeNum = el.Num
+                    })
+                    if (this.remarksText) {
+                        this.$store.commit('SETREMARKSTEXT', this.remarksText)
+                    } else {
+                        let marks = ''
+                        if (this.planNum && this.typeNum) {
+                            marks = `<ol style="padding-left: 1.5em;"><li>${this.text1}</li><li>${this.text2}</li></ol>`
+                        } else if (this.planNum) {
+                            marks = `<ol style="padding-left: 1.5em;"><li>${this.text1}</li></ol>`
+                        } else if (this.typeNum) {
+                            marks = `<ol style="padding-left: 1.5em;" ><li>${this.text2}</li></ol>`
+                        } else {
+                            marks = ''
                         }
+                        this.$store.commit('SETREMARKSTEXT', marks)
+                    }
+                    setTimeout(() => {
+                        this.setLengedHeight()
                     })
                 }
                 this.$nextTick(() => {
@@ -361,16 +443,18 @@ export default {
         // 查询编辑状态图例
         queryEditNum(flag) {
             let postParams = {}
+            let categoryId = this.categoryId || this.$cookie.get('categoryId')
             let data = {
-                categoryId: this.$cookie.get('categoryId'),
+                categoryId,
                 graphId: this.$cookie.get('graphId'),
                 projectId: this.$store.state.plazaId,
                 flag: flag,
                 buildingId: '1',
-                floorId: this.$store.state.currentFloor.gname
+                floorId: this.$store.state.currentFloor.gname,
             }
-            queryStatis({ data, postParams }).then(res => {
-                //console.log('编辑图例数', res)
+            // 弹窗组件内传入floorInfo,使用其楼层id
+            this.floorInfo.gname && (data.floorId = this.floorInfo.gname)
+            queryStatis({ data, postParams }).then((res) => {
                 this.loading1 = false
                 this.editTable = res.data.Data ? res.data.Data : []
             })
@@ -379,52 +463,56 @@ export default {
         queryEdit(val) {
             let arr = []
             if (val.length > 0) {
-                val.forEach(el => {
+                val.forEach((e) => {
                     let obj = {
                         BuildingId: '1',
-                        FloorId: this.$store.state.currentFloor.gname,
-                        ProjectId: this.plazaId,
-                        CategoryId: el.GraphCategoryId,
-                        GraphId: this.$cookie.get('graphId'),
-                        GraphElementId: el.GraphElementId,
-                        Num: el.Num
+                        Num: Number(e.Num),
+                        GraphElementId: e.GraphElementId,
+                        FloorId: this.$cookie.get('floorMapId'),
+                        ProjectId: e.ProjectId,
+                        CategoryId: e.GraphCategoryId,
                     }
                     arr.push(obj)
                 })
             }
             let params = {
                 postParams: {
-                    Content: arr
-                }
+                    Content: arr,
+                },
             }
-            updateStatis(params).then(res => {
-                if (res.Result == 'success') {
-                    //console.log('更新图例', res)
-                    this.$message({
-                        message: '操作成功',
-                        type: 'success'
-                    })
-                    this.$store.commit('SETSHOWVIEW', 1)
-                    // this.queryEditNum(this.editSwitch)
-                } else {
+            updateStatis(params)
+                .then((res) => {
+                    if (res.Result == 'success') {
+                        this.$message({
+                            message: '操作成功',
+                            type: 'success',
+                        })
+                        this.$store.commit('SETSHOWVIEW', 1)
+                    } else {
+                        this.$message({
+                            message: '操作失败',
+                            type: 'error',
+                        })
+                    }
+                })
+                .catch((err) => {
                     this.$message({
-                        message: '操作失败',
-                        type: 'error'
+                        message: err,
+                        type: 'error',
                     })
-                }
-            })
+                })
         },
         saveNum(val) {
             if (val.length > 0) {
-                val.forEach(element => {
+                val.forEach((element) => {
                     element.Modify = element.IsModify
                 })
                 this.queryEdit(val)
-                // this.isShow2()
+                this.$store.commit('SETSHOWVIEW', 1)
+                this.handleSwich(true)
             } else {
-                // this.show2 = false
-                // this.isShow2()
-                // this.queryEditNum(true)
+                this.$store.commit('SETSHOWVIEW', 1)
+                this.handleSwich(true)
             }
         },
         addFloor() {
@@ -443,32 +531,47 @@ export default {
         queryRemarksMethods() {},
         init() {
             // 图例
+            bus.$off('queryViewMethods') //解决触发多次监听
             bus.$on('queryViewMethods', () => {
                 this.queryView(false)
             })
             // 备注
-            bus.$on('queryRemarksMethods', res => {
-                let remarksText = ''
+            bus.$off('queryRemarksMethods')
+            bus.$on('queryRemarksMethods', (res) => {
+                // this.$store.commit('SETREMARKSTEXT', '')
                 if (res) {
-                    // 返回有备注
-                    remarksText = res
+                    this.$store.commit('SETREMARKSTEXT', res)
                 } else {
-                    if (this.planNum > 0 && this.typeNum > 1) {
-                        remarksText = `${this.text1}${this.text2}${res}`
-                    } else if (this.planNum > 0) {
-                        remarksText = `${this.text1}${res}`
-                    } else if (this.typeNum > 1) {
-                        remarksText = `${this.text2}${res}`
+                    let marks = ''
+                    if (this.planNum && this.typeNum) {
+                        marks = `<ol style="padding-left: 1.5em;"><li>${this.text1}</li><li>${this.text2}</li></ol>`
+                    } else if (this.planNum) {
+                        marks = `<ol style="padding-left: 1.5em;"><li>${this.text1}</li></ol>`
+                    } else if (this.typeNum) {
+                        marks = `<ol style="padding-left: 1.5em;" ><li>${this.text2}</li></ol>`
                     } else {
-                        remarksText = ''
+                        marks = ''
                     }
+                    this.$store.commit('SETREMARKSTEXT', marks)
                 }
-                this.$store.commit('SETREMARKSTEXT', remarksText)
             })
-        }
+        },
+        // 设置图例整体高度
+        setLengedHeight() {
+            let dom = document.getElementsByClassName('legend-table')[0]
+            if (!dom) {
+                return
+            }
+            if (window.screen.height > 1000) {
+                dom.style.maxHeight = '768px'
+                this.tableHeigth = '500px'
+            } else {
+                dom.style.maxHeight = '434px'
+                this.tableHeigth = '334px'
+            }
+        },
     },
     mounted() {
-        console.log('editTips', this.editTips)
         this.init()
         // 定时查询草稿箱数量
         this.getDraftNum() //首次查询
@@ -479,20 +582,23 @@ export default {
         this.$once('hook:beforeDestroy', () => {
             clearInterval(this.timer)
         })
-    }
+        // 设置图例最大高度
+        this.setLengedHeight()
+    },
 }
 </script>
 <style lang="less" scoped>
 @red: rgb(255, 0, 0); //红色
 .legend-container {
     position: relative;
-    top: -15px;
+    // top: -23px;
     .legend {
         text-align: center;
         line-height: 44px;
         width: 44px;
         height: 44px;
         font-size: 14px;
+        margin-bottom: 8px;
         font-family: MicrosoftYaHei;
         color: rgba(2, 91, 170, 1);
         background: rgba(255, 255, 255, 1);
@@ -507,6 +613,7 @@ export default {
         cursor: pointer;
         width: 44px;
         height: 44px;
+        margin-bottom: 8px;
         background: linear-gradient(180deg, rgba(54, 156, 247, 1) 0%, rgba(2, 91, 170, 1) 100%);
         border-radius: 2px;
         font-size: 14px;
@@ -520,11 +627,9 @@ export default {
         right: 47px;
         .legend-table {
             padding: 16px;
-            height: 546px;
             width: 385px;
-            // width: 420px;
+            max-height: 700px;
             overflow: auto;
-            overflow: hidden;
             overflow-y: auto;
             position: relative;
             background: rgba(255, 255, 255, 1);
@@ -537,7 +642,8 @@ export default {
         }
         .legend-table2 {
             padding: 16px;
-            height: 356px;
+            // height: 356px;
+            max-height: 700px;
             width: 385px;
             // width: 420px;
             overflow: auto;
@@ -585,11 +691,6 @@ export default {
         position: relative;
         .corner {
             position: absolute;
-            // right: -8px;
-            // top: 0;
-            // display: inline-block;
-            // width: 18px;
-            // height: 18px;
             right: 3px;
             top: 3px;
             display: inline-block;
@@ -626,6 +727,11 @@ export default {
         margin-bottom: 10px;
         display: none;
         cursor: pointer;
+    }
+    .tltk-1 {
+        margin-bottom: 10px;
+        display: none;
+        cursor: pointer;
         border: 1px solid #eee;
     }
     .tltk-1 {
@@ -636,9 +742,6 @@ export default {
     }
 }
 .edit_map:hover .tltk {
-    // display: block;
-    // position: fixed;
-    // bottom: 70px;
     margin-left: -10px;
     right: 22px;
     z-index: 1;
@@ -732,6 +835,11 @@ export default {
         }
     }
 }
+@media screen and (max-width: 1600px) {
+    .legend-container .legend-tab .legend-table {
+        max-height: 546px;
+    }
+}
 </style>
 <style lang="less">
 .legend-container {

+ 83 - 16
src/components/PicLarge/src/picLarge.vue

@@ -9,15 +9,17 @@
             <div class='pic-list'>
                 <div class='pic-left'>
                     <ul v-for='(item,index) in imgUrl' :key='index'>
-                        <li @click='getIndex(item.url)'>
-                            <img :src='item.url' />
+                        <li @click='getIndex(item)'>
+                            <img :src='item.url' v-if='typeArr.includes(item.type)' />
+                            <span v-else></span>
                         </li>
-                        <!-- <span>{{item.name}}</span> -->
+                        <span>{{item.name}}</span>
                     </ul>
                 </div>
                 <div class='pic-right'>
                     <div class='pic-right-img'>
-                        <img :src='ImgUrl' />
+                        <img :src='ImgUrl' v-if='typeArr.includes(type)' />
+                        <p v-else class='no-image'>{{`此文件类型为${this.type}类型,无法展示`}}</p>
                     </div>
                 </div>
             </div>
@@ -27,19 +29,63 @@
 <script>
 export default {
     name: 'PicLarge',
-    props: ['imgUrl'],
+    // props: ['imgUrl'],
     data() {
         return {
             dialogVisible: false,
-            ImgUrl: ''
+            ImgUrl: '',
+            type: '',
+            imgUrl: [],
+            typeArr: ['png', 'jpg', 'jpeg'] //typeArr 图片类型
         }
     },
     methods: {
-        open() {
+        /**
+         * @description 打开弹窗事件,传入展示的图片信息
+         * @param {object} data 图片信息 
+                {
+                    name: '供电系统原理图.png',
+                    url: 'http://gcgl.wanda.cn/%E7%BB%B4%E4%BF%AE%E5%B7%A5%E5%8D%95%E4%B8%80/WORKORDER_846049_2019-11-19T15-37-42-716.jpg'
+                }
+         */
+        open(data) {
             this.dialogVisible = true
+            // 处理传入进来的数据
+            this.handleData(data)
+            // this.imgUrl = data
         },
         getIndex(imgUrl) {
-            this.ImgUrl = imgUrl
+            this.ImgUrl = imgUrl.url
+            this.type = imgUrl.type
+        },
+        /**
+         * @description 处理数据 --> 返回 name,url,type格式的json数据
+            [
+                { 
+                    name: 'xxx.png',
+                    url: '---',
+                    type: 'png'
+                },
+                ...
+            ]
+         */
+        handleData(data) {
+            let patternFileExtension = /\.([0-9a-z]+)(?:[\?#]|$)/i
+            data = data.map(item => {
+                let type = item.name.match(patternFileExtension)[1]
+                let obj = {
+                    name: item.name,
+                    url: item.url,
+                    type
+                }
+                return obj
+            })
+            this.imgUrl = data
+        }
+    },
+    mounted() {
+        if (this.imgUrl.length > 0) {
+            console.log(this.imgUrl)
         }
     },
     computed: {
@@ -50,7 +96,10 @@ export default {
     watch: {
         __imgUrl: {
             handler(newV, oldV) {
-                newV.length && (this.ImgUrl = this.imgUrl[0].url)
+                if (newV.length) {
+                    this.ImgUrl = newV[0].url
+                    this.type = newV[0].type
+                }
             },
             deep: true
         }
@@ -60,6 +109,7 @@ export default {
 <style lang="less" scoped>
 .pic-list {
     width: 100%;
+    height: 100%;
     // height: 700px;
     display: flex;
     justify-content: space-between;
@@ -101,22 +151,37 @@ export default {
     }
     .pic-right {
         flex: 1;
+        width: 100%;
+        height: 100%;
         background: rgba(245, 246, 247, 1);
         border-radius: 0px 0px 4px 0px;
-        padding: 60px 50px;
-        margin: auto auto;
+        // padding: 60px 50px;
+        // margin: auto auto;
         display: flex;
         justify-content: center;
         align-items: center;
         .pic-right-img {
-            width: 720px;
-            height: 540px;
+            // width: 720px;
+            // height: 540px;
+            width: 100%;
+            height: 100%;
             text-align: center;
             img {
-                max-width: 100%;
-                max-height: 100%;
+                width: 100%;
+                height: 100%;
+                object-fit: contain;
                 display: block;
-                margin: auto;
+                margin: 0 auto;
+                position: relative;
+                top: 50%;
+                transform: translateY(-50%);
+            }
+            // 无图片样式
+            .no-image {
+                position: relative;
+                margin: 0 auto;
+                top: 50%;
+                transform: translateY(-50%);
             }
         }
     }
@@ -130,6 +195,8 @@ export default {
         margin-top: 5vh !important;
         .el-dialog__body {
             padding: 10px;
+            height: calc(100% - 50px);
+            box-sizing: border-box;
         }
     }
 }

BIN
src/components/Rotation/src/3440.jpg


+ 112 - 58
src/components/Rotation/src/rotation.vue

@@ -4,29 +4,71 @@
 *@info:图片轮播
 */
 <template>
-    <div :class='[type==1?"rotationFull":(type==3?"rotationFullYlt":"rotation")]'>
-        <div v-if='rotationImg.length==1' class='rotationCon'>
-            <!-- <img
-                src='https://ss0.bdstatic.com/94oJfD_bAAcT8t7mm9GUKT-xh_/timg?image&quality=100&size=b4000_4000&sec=1592807833&di=5adf17cda9f46c37696da5b1d0aec9dc&src=http://a3.att.hudong.com/14/75/01300000164186121366756803686.jpg'
-                alt
-            />-->
+    <div :class='[type==1?"rotationFull":(type==3?"rotationFullYlt":"rotation")]' class='wanda-rotation'>
+        <div v-if='rotationImg.length==1&&size=="height"' class='rotationConType'>
             <img :src='rotationImg[0].url' alt />
-            <!-- <img src='./3440.jpg' alt /> -->
         </div>
-        <el-carousel v-else trigger='click' style='height:100%;width:100%' :interval='5000' arrow='always' @change='changePic'>
+        <div v-else-if='rotationImg.length==1&&size=="width"' class='rotationCon'>
+            <img :src='rotationImg[0].url' alt />
+        </div>
+        <!-- <el-carousel v-else trigger='click' style='height:100%;width:100%' :interval='5000' arrow='always' @change='changePic' :loop='false'>
             <el-carousel-item v-for='(item,index) in rotationImg' :key='index'>
                 <img :src='item.url' alt />
             </el-carousel-item>
+        </el-carousel>-->
+        <!-- 不显示指示器 -->
+        <!-- :indicator-position='rotationImg.length == 1 ? "none":""' -->
+        <el-carousel
+            v-else-if='type!="5"'
+            style='height:100%;width:100%'
+            :interval='5000'
+            indicator-position='none'
+            :arrow='rotationImg.length == 1 ? "never":"always"'
+            @change='changePic'
+        >
+            <el-carousel-item v-for='(item,index) in rotationImg' :key='index'>
+                <img :src='item.url' alt style='  width: 100%; height: 100%;object-fit: container;' />
+            </el-carousel-item>
+        </el-carousel>
+        <el-carousel
+            v-else
+            style='height:100%;width:100%'
+            :interval='5000'
+            indicator-position='none'
+            :arrow='rotationImg.length == 1 ? "never":"always"'
+            @change='changePic'
+        >
+            <el-carousel-item v-for='(item,index) in rotationImg' :key='index'>
+                <img :src='item.url' alt style='  width: 100%; height: 100%;object-fit:inherit' />
+            </el-carousel-item>
         </el-carousel>
     </div>
-</template>s
+</template>
 <script>
 export default {
     name: 'Rotation',
-    props: ['rotationImg', 'type'],
+    props: ['rotationImg', 'type', 'size'],
     data() {
         return {
-            rotationImgs: [{ url: require('@/assets/images/login_back.png') }]
+            rotationImgs: [{ url: require('@/assets/images/login_back.png') }],
+            // fileList: [
+            //     {
+            //         name: 'food.jpeg',
+            //         url: require('@/assets/imgs/2020.png'),
+            //     },
+            //     {
+            //         name: 'food2.jpeg',
+            //         url: require('@/assets/imgs/20200.png'),
+            //     },
+            //     {
+            //         name: 'food.jpeg',
+            //         url: 'https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg',
+            //     },
+            //     {
+            //         name: 'food2.jpeg',
+            //         url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
+            //     },
+            // ],
         }
     },
     methods: {
@@ -34,16 +76,52 @@ export default {
             if (this.type == 2) {
                 this.$emit('scan', val + 1)
             }
+        },
+    },
+    // 解决两张图片时,轮播顺序反向
+    created() {
+        if (this.rotationImg && this.rotationImg.length === 2) {
+            this.rotationImg = [...this.rotationImg, ...this.rotationImg]
         }
     },
     mounted() {
         if (this.type == 2) {
             this.changePic(1)
         }
-    }
+    },
 }
 </script>
 <style lang="less" scoped>
+.wanda-rotation {
+    height: 100%;
+    /deep/ .el-carousel__button {
+        background-color: rgba(2, 91, 170, 1);
+    }
+    /deep/ .el-carousel__arrow {
+        background-color: #00000050;
+    }
+    /deep/ .el-carousel__container {
+        height: 100%;
+    }
+    // .rotationConType {
+    //     height: 100%;
+    //     width: 100%;
+    //     overflow: auto;
+    // }
+    /deep/ .el-carousel__item {
+        text-align: center;
+        background: #fff;
+    }
+    img {
+        width: 100%;
+        // height: 100%;
+        // object-fit: fill;
+        // min-width: 100%;
+        // width: 100%;
+        // min-height: 100%;
+    }
+}
+
 .rotation {
     width: 100%;
     height: 100%;
@@ -54,13 +132,9 @@ export default {
     .rotationCon {
         height: 100%;
         width: 100%;
-        // display: flex;
+        text-align: center;
     }
     img {
-        // max-width: 100%;
-        // max-height: 100%;
-        // display: block;
-        // margin: auto;
         width: 100%;
         height: 100%;
         object-fit: cover;
@@ -76,14 +150,13 @@ export default {
     .rotationCon {
         height: 100%;
         width: 100%;
-        // display: flex;
+        display: flex;
     }
     img {
-        // max-width: 100%;
-        // max-height: 100%;
-        // display: block;
-        // margin: auto;
-        min-width: 100%;
+        max-width: 100%;
+        max-height: 100%;
+        display: block;
+        margin: auto;
     }
 }
 .rotationFullYlt {
@@ -93,50 +166,31 @@ export default {
     display: flex;
     justify-content: center;
     align-items: center;
-    // 轮播图适配
     /deep/ .el-carousel__container {
         height: 100% !important;
     }
-    .rotationCon {
+    .rotationConType {
         height: 100%;
         width: 100%;
         overflow: auto;
     }
-    img {
-        // width: 100%;
-        // height: 100%;
-        // object-fit: fill;
-        // min-width: 100%;
-        width: 100%;
-        min-height: 100%;
-    }
-}
-</style>
-<style lang="less">
-.rotation,
-.rotationFull {
-    .el-carousel__item h3 {
-        color: #475669;
-        font-size: 14px;
-        opacity: 0.75;
-        margin: 0;
-    }
-
-    .el-carousel__item:nth-child(2n) {
-        background-color: #99a9bf;
+    /deep/ .el-carousel__item {
+        text-align: center;
+        background: #fff;
     }
-
-    .el-carousel__item:nth-child(2n + 1) {
-        background-color: #d3dce6;
+    img {
+        height: 100%;
+        height: 100%;
+        object-fit: contain;
     }
-    .el-carousel__container {
-        height: 100% !important;
+    .rotationCon {
+        height: 100%;
+        width: 100%;
+        overflow: auto;
     }
-    .el-carousel__button {
-        height: 3px;
-        width: 16px;
-        border-radius: 2px;
-        opacity: 0.5;
+    /deep/ .el-carousel__item {
+        text-align: center;
+        background: #fff;
     }
 }
-</style>
+</style>

+ 79 - 33
src/components/editLengend.vue

@@ -12,11 +12,12 @@
                         v-loading='loading'
                         :header-cell-style='{background:"rgba(2,91,170,0.1)",fontFamily:"PingFangSC-Medium,PingFang SC;",color:"rgba(0,0,0,0.85);",fontSize:"12px"}'
                         ref='multipleTable'
-                        height='430px'
+                        :max-height='tableHeigth'
                         :data='editTable'
                         tooltip-effect='dark'
                         width='100%'
                         @selection-change='handleSelectionChange'
+                        id='lenged_tab'
                     >
                         <el-table-column prop label='项目' :show-overflow-tooltip='true'>
                             <template slot-scope='{row}'>{{row.Name||'--'}}</template>
@@ -24,7 +25,7 @@
                         <el-table-column prop label='数量'>
                             <template slot-scope='{row}'>
                                 <div v-if='row.IsModify'>
-                                    <div v-if='row.Num!=row.RealNum ' class='redData'>
+                                    <div v-if='row.Num!=row.RealNum && (row.Num!=null && row.RealNum!=null)' class='redData'>
                                         <el-tooltip
                                             class='item'
                                             effect='dark'
@@ -34,6 +35,9 @@
                                             <el-input @change='changeTable(row)' v-model='row.Num' size='mini'></el-input>
                                         </el-tooltip>
                                     </div>
+                                    <div v-else-if='row.Num==null||row.RealNum==null'>
+                                        <el-input @change='changeTable(row)' v-model='row.Num' size='mini'></el-input>
+                                    </div>
                                     <div v-else-if='!row.Num' class='nullData'>
                                         <el-input @change='changeTable(row)' v-model='row.Num' size='mini'></el-input>
                                     </div>
@@ -102,11 +106,12 @@
                     </el-table>
                 </div>-->
             </div>
-
+            <div class='lengend-text'>本楼层没有的图例数据填为 0</div>
             <div class='swich'>
                 <el-switch v-model='value' @change='changeSwitch'></el-switch>
                 <span>隐藏数量为0的项目</span>
             </div>
+
             <div class='legendFoot'>
                 <el-button size='mini' @click='cancel'>取消</el-button>
                 <el-button size='mini' v-if='editNum.length==0' type='primary' disabled style='opacity: 0.5'>保存</el-button>
@@ -117,9 +122,9 @@
 </template>
 <script>
 import { updateStatis } from '@/api/public.js'
-
+import { mapGetters } from 'vuex'
 export default {
-    props: ['editTable', 'loading'],
+    props: ['editTable', 'loading', 'tableHeigth'],
     data() {
         return {
             value: false,
@@ -129,6 +134,9 @@ export default {
             editNum: []
         }
     },
+    computed: {
+        ...mapGetters(['plazaId'])
+    },
     methods: {
         handleSelectionChange(val) {
             this.multipleSelection = val
@@ -151,10 +159,10 @@ export default {
                         })
                         this.editNum = []
                         this.$emit('saveNum', this.editNum)
-                        this.$store.commit('SETSHOWVIEW', 1)
                     })
             } else {
                 this.$store.commit('SETSHOWVIEW', 1)
+                this.$emit('saveNum', this.editNum)
             }
         },
         // 编辑图里保存
@@ -163,31 +171,48 @@ export default {
         },
         // 编辑数量
         queryEdit(val) {
-            val.map(item => {
-                item.BuildingId = '1'
-                item.FloorId = this.$store.state.currentFloor.gname
-                item.ProjectId = this.$store.state.plazaId
-                item.CategoryId = this.$cookie.get('categoryId')
-            })
+            let arr = []
+            if (val.length > 0) {
+                val.forEach(e => {
+                    let obj = {
+                        BuildingId: '1',
+                        Num: e.Num == '' ? null : Number(e.Num),
+                        GraphElementId: e.GraphElementId,
+                        FloorId: this.$cookie.get('floorMapId'),
+                        ProjectId: e.ProjectId,
+                        CategoryId: e.GraphCategoryId
+                    }
+                    arr.push(obj)
+                })
+            }
             let params = {
                 postParams: {
-                    Content: val
+                    Content: arr
                 }
             }
-            updateStatis(params).then(res => {
-                if (res.Result == 'success') {
-                    this.$message({
-                        message: '操作成功',
-                        type: 'success'
-                    })
-                    this.$store.commit('SETSHOWVIEW', 1)
-                } else {
+
+            updateStatis(params)
+                .then(res => {
+                    if (res.Result == 'success') {
+                        this.$message({
+                            message: '操作成功',
+                            type: 'success'
+                        })
+                        this.$emit('changeSwitch', true)
+                        this.$store.commit('SETSHOWVIEW', 1)
+                    } else {
+                        this.$message({
+                            message: '操作失败',
+                            type: 'error'
+                        })
+                    }
+                })
+                .catch(err => {
                     this.$message({
-                        message: '操作失败',
+                        message: err,
                         type: 'error'
                     })
-                }
-            })
+                })
         },
         // 修改图例数量
         changeTable(val) {
@@ -200,6 +225,7 @@ export default {
                     obj[this.editNum[i].GraphElementId] = true
                 }
             }
+            this.editNum = result
         },
         // 修改隐藏为0的项目的开关
         changeSwitch(val) {
@@ -228,23 +254,37 @@ export default {
         //     this.tbData3 = this.tableData.slice(parseInt(len / 3) * 2, len)
         // }
         // }
-        // }
+        // },
     },
-    mounted() {}
+    mounted() {},
+    watch: {
+        editTable: {
+            handler() {
+                setTimeout(() => {
+                    let tabHeight = document.getElementById('lenged_tab').offsetHeight
+                    let dom = document.getElementsByClassName('legend-tab2')[0]
+                    let dom2 = document.getElementsByClassName('legend-table2')[0]
+                    console.log('tabHeight', tabHeight)
+                    if (!dom) {
+                        return
+                    }
+                    dom.style.height = tabHeight + 100 + 'px'
+                    dom2.style.height = tabHeight + 100 + 'px'
+                })
+            },
+            deep: true,
+            immediate: true
+        }
+    }
 }
 </script>
 <style lang="less" scoped>
 .view {
-    position: relative;
+    // position: relative;
     .legend-tab2 {
         position: absolute;
-        top: -44px;
+        top: 0;
         right: 47px;
-        width: 385px;
-        // width: 420px;
-        height: 535px;
-        // min-width: 350px;
-        // width: auto;
         background: rgba(255, 255, 255, 1);
         box-shadow: 0px 2px 8px 0px rgba(31, 36, 41, 0.06);
         border-radius: 2px;
@@ -284,6 +324,12 @@ export default {
             margin: 0 auto;
         }
     }
+    .lengend-text {
+        font-size: 12px;
+        color: red;
+        padding-left: 16px;
+        margin-top: -37px;
+    }
     .legendFoot {
         position: absolute;
         right: 16px;

+ 131 - 123
src/components/floorList.vue

@@ -7,20 +7,13 @@
     <div class='floor-box'>
         <div class='floor-list'>
             <div class='icon-top' v-if='floorsArr.length>8'>
-                <img
-                    :class='{disabled:currentFloorId == floorsArr[0].seq }'
-                    v-if='showT'
-                    @click='changeFloor(1)'
-                    @mousedown='mousedown'
-                    @mouseup='mouseup'
-                    src='@/assets/imgs/iconBlackTop.png'
-                    alt
-                />
-                <img :class='{disabled:currentFloorId == floorsArr[0].seq }' v-else src='@/assets/imgs/iconLightTop.png' alt />
+                <!-- @click='changeFloor(1,currIndex)' -->
+                <img v-show='parseInt(marginTop) !== 0' v-repeat-click='increase' src='@/assets/imgs/iconBlackTop.png' alt />
+                <img class='disabled' v-show='parseInt(marginTop) === 0' src='@/assets/imgs/iconLightTop.png' alt />
             </div>
-            <div class='floor-out'>
-                <!-- :style='{ marginTop : marginTop }' -->
-                <div class='floor-center'>
+            <div class='floor-out' :style='{ height:conHeight + "px" }'>
+                <!--  放开marginTop样式  -->
+                <div class='floor-center' :style='{ marginTop : marginTop }'>
                     <div
                         class='floor-item'
                         :class='item.seq == currentFloorId?"isActive":""'
@@ -31,14 +24,9 @@
                 </div>
             </div>
             <div class='icon-bottom' v-if='floorsArr.length>8'>
-                <img
-                    :class='{disabled:currentFloorId == floorsArr[floorsArr.length-1].seq }'
-                    v-if='showB'
-                    @click='changeFloor(-1)'
-                    src='@/assets/imgs/iconBlackBottom.png'
-                    alt
-                />
-                <img :class='{disabled:currentFloorId == floorsArr[floorsArr.length-1].seq }' v-else src='@/assets/imgs/iconLightBottom.png' alt />
+                <!-- v-repeat-click='decrease' -->
+                <img v-show='parseInt(marginTop) !== marginTopMax' v-repeat-click='decrease' src='@/assets/imgs/iconBlackBottom.png' alt />
+                <img class='disabled' v-show='parseInt(marginTop) === marginTopMax' src='@/assets/imgs/iconLightBottom.png' alt />
             </div>
         </div>
     </div>
@@ -46,7 +34,12 @@
 <script>
 import store from '../store'
 import { mapGetters } from 'vuex'
+import RepeatClick from '@/directives/repeat-click'
+
 export default {
+    directives: {
+        repeatClick: RepeatClick,
+    },
     data() {
         return {
             floorId: 'F1',
@@ -54,134 +47,132 @@ export default {
             showB: true,
             num: 0,
             floorMapIdName: '',
-            floor: {
-                code: 'F1',
-                gcode: '1F',
-                gname: 'f1',
-                name: '第1层',
-                seq: 100
-            },
+            floor: {},
             currentFloorId: null,
             marginTop: 0,
+            marginTopMax: 0,
             startTime: '',
-            endTime: ''
+            endTime: '',
+            floorObj2: {},
+            showNumber: 8, //需要展示的楼层数   //TODO:
+            height: 39, //一个楼层的高度
+            currIndex: 0, //当前楼层在 楼层数组中的下标,上下箭头使用
+            conHeight: 0, // floor-out 的高度
         }
     },
     props: {
         floorsArr: {
             type: Array,
             default: () => {
-                ;[]
-            }
-        }
+                return []
+            },
+        },
+        // 默认true,
+        // 1. 切换楼层后,是否触发 cookie,vuex数据修改,
+        // 2. 在fenbuPic组件中为false, 1)不触发cookie,vuex , 2) 选中的楼层ID,为楼层列表数组floorIdArr的第0个
+        changeDataFlag: {
+            type: Boolean,
+            default: true,
+        },
     },
     computed: {
-        ...mapGetters(['legendTable'])
+        ...mapGetters(['legendTable', 'floorObj']),
     },
     mounted() {
-        window.vm = this
         this.init()
     },
     methods: {
-        mousedown() {
-            this.startTime = new Date()
+        /**
+         * @description 点击上箭头,marginTop<0时执行楼层滚动
+         */
+        increase() {
+            let marginTop = parseInt(this.marginTop)
+            marginTop < 0 && this.changeFloor(1, this.currIndex)
         },
-        mouseup() {
-            this.endTime = new Date()
-            if (this.endTime - this.startTime < 200) {
-                return false
-            }
+        /**
+         * @description 点击下箭头,marginTop小于最大值marginTopMax时,执行楼层滚动
+         */
+        decrease() {
+            let marginTop = Math.abs(parseInt(this.marginTop)),
+                marginTopMax = Math.abs(parseInt(this.marginTopMax))
+            marginTop < marginTopMax && this.changeFloor(-1, this.currIndex)
         },
         init() {
             if (!this.floorsArr.length) {
                 return false
             }
             this.floorIdArr = []
-            this.floorsArr.map(item => {
+            this.floorsArr.map((item) => {
                 this.floorIdArr.push(item.seq)
+                if (item.seq == this.$cookie.get('currentFloorId')) {
+                    this.floor = item
+                } else {
+                    this.floor = this.floorObj
+                }
             })
-            this.currentFloorId = Number(this.$cookie.get('currentFloorId') || 100)
-            this.changeFloor(0)
+            this.currentFloorId = Number(this.$cookie.get('currentFloorId') || this.floor.seq)
+            // bug fix 修复 fenbuPic 弹窗中,楼层不能选中的问题
+            // 如果 floorIdArr 不在 floorIdArr数组中,或者changeDataFlag为false(弹窗组件中的楼层组件),使用 floorIdArr[0], 而不使用 cookie
+            let index = this.floorIdArr.findIndex((item) => item === this.currentFloorId)
+            if (index === -1 || !this.changeDataFlag) {
+                this.currentFloorId = this.floorIdArr[0]
+            }
+            // 修复在设备设施页面中,楼层组件不够 8个楼层时,出现的样式问题,
+            this.conHeight = this.floorsArr.length * 37.5
+            this.conHeight = this.conHeight >= 300 ? 300 : this.conHeight
+            this.showNumber = this.floorsArr.length > 8 ? 8 : this.floorsArr.length
+
+            this.marginTopMax = -(this.floorIdArr.length - this.showNumber) * this.height
+            this.changeFloor(0, index)
         },
         /**
          * @name changeFloor
          * @param {Number} flag 1:向上滚动楼层, -1向下滚动 , 0:进入页面初始化时,执行位置处理
          * @description 点击图例下方的,上下切换按钮
          */
-        changeFloor(flag) {
+        changeFloor(flag, index) {
             const len = this.floorIdArr.length
-            let index = this.floorIdArr.findIndex(item => item === this.currentFloorId)
+            // let index = this.floorIdArr.findIndex(item => item === this.currentFloorId)
+            this.currIndex = index
             // 点击上箭头
             if (flag === 1) {
                 index--
-                this.currentFloorId = this.floorIdArr[index]
+                this.currIndex = index
             } else if (flag === -1) {
                 //点击下箭头
                 index++
-                this.currentFloorId = this.floorIdArr[index]
+                this.currIndex = index
             }
-            // 数据处理
-            this.handleCookie()
-            // 楼层位置动画处理
-            this.handlePosition(flag, index, len)
-            // 处理上下按钮禁用逻辑
-            this.handleUpDownStatus(index, len)
-        },
-
-        /**
-         * @name handleUpDownStatus
-         * @param { Number } index 当前楼层在floorIdArr中的下标
-         * @param { Number } len    floorIdArr的长度
-         * @description 处理上下按钮禁用逻辑
-         */
-        handleUpDownStatus(index, len) {
-            switch (index) {
-                // 第一条的上箭头禁用
-                case 0:
-                    this.currentFloorId = this.floorIdArr[0]
-                    this.showT = false
-                    this.showB = true
-                    break
-                //  最后一条的 下箭头设置为禁用
-                case len - 1:
-                    this.currentFloorId = this.floorIdArr[len - 1]
-                    this.showT = true
-                    this.showB = false
-                    break
-                // 默认都可以点击
-                default:
-                    this.showT = true
-                    this.showB = true
-                    break
+            // FEAT:  点击上下箭头,不触发cookie更改 , 只有初始化时,才进行选中的楼层 状态更新
+            if (flag === 0) {
+                this.handleCookie()
             }
+            this.handlePosition(flag, index, len)
         },
-        /**
-         * @name handleCookie
-         * @description cookie数据处理
-         */
         handleCookie() {
-            // return true
-            let currentFloor = this.floorsArr.filter(item => item.seq == this.currentFloorId)[0]
+            let currentFloor = this.floorsArr.filter((item) => item.seq == this.currentFloorId)[0]
             if (currentFloor) {
-                this.$cookie.set('floorNow', currentFloor.code || '', 3)
-                this.$cookie.set('floorMapId', currentFloor.gname, 3)
-                this.$cookie.set('currentFloorId', currentFloor.seq, 3)
-                this.floorId = this.$cookie.get('floorNow') || currentFloor.code
-                this.floorMapIdName = this.$cookie.get('floorMapId') || currentFloor.gname
-                store.commit('SETCURRENTFLOOR', currentFloor)
+                // 如果 changeDataFlag为true(不是在 分布图弹窗组件中的 楼层组件),设置cookie,vuex
+                if (this.changeDataFlag) {
+                    this.$cookie.set('floorNow', currentFloor.code || '', 3)
+                    this.$cookie.set('floorMapId', currentFloor.gname, 3)
+                    this.$cookie.set('currentFloorId', currentFloor.seq, 3)
+                    this.floorId = this.$cookie.get('floorNow') || currentFloor.code
+                    this.floorMapIdName = this.$cookie.get('floorMapId') || currentFloor.gname
+                    store.commit('SETCURRENTFLOOR', currentFloor)
+                }
                 this.$emit('emitFloor', currentFloor)
             }
         },
         /**
          * @name tabFloor
-         * @param {Object} 选中的楼层信息
-         * @param {Number} 楼层信息在floorsArr数组中的位置
+         * @param {Object} item 选中的楼层信息
+         * @param {Number} index 楼层信息在floorsArr数组中的位置
          */
         tabFloor(item, index) {
             this.currentFloorId = this.floorIdArr[index]
             this.handleCookie()
-            this.handlePosition(1, index, this.floorIdArr.length)
-            this.handleUpDownStatus(index, this.floorIdArr.length)
+            this.handlePosition(2, index, this.floorIdArr.length)
             this.viewLengend()
         },
         viewLengend() {
@@ -193,40 +184,49 @@ export default {
         },
         /**
          * @description 楼层位置动画处理
-         * @param flag 是否启用动画时长 0:不启用  其他 启动
+         * @param flag 1:向上滚动楼层, -1向下滚动 , 0:进入页面初始化时,执行位置处理 2:直接点击楼层
          * @param index 楼层 在floorIdArr中的下标
          * @param len floorIdArr长度
          */
         handlePosition(flag, index, len) {
-            //楼层位置处理
-            // 页面显示5条,当第五条以上,进行marginTop修改
-            // index从0开始
-            // TODO: 需要修改可以修改这里,配置页面样式,修改showNumber和height
-            let showNumber = 5, //页面中展示的楼层条数
-                height = 32, //一个楼层的div标签高度
-                timer = 500 //动画时长
-            // flag 为0时,timer设置为0
-            flag === 0 && (timer = 0)
-            if (index >= showNumber - 1) {
-                if (index < len - 1) {
-                    this.marginTop = -height * (index - (showNumber - 2)) + 'px'
-                } else if ((index = len - 1)) {
-                    this.marginTop = -height * (index - (showNumber - 1)) + 'px'
-                }
-            } else {
-                // 前 showNumber 条的margin-top设置为0
-                this.marginTop = 0
+            // 取出当前 marginTop
+            let marginTop = parseInt(this.marginTop)
+            switch (flag) {
+                // 初始化进入页面,位置处理
+                case 0:
+                // 直接点击楼层,滚动楼层
+                case 2:
+                    // 将 marginTop 设置为对应的index 应滚动的距离
+                    marginTop = -index * this.height
+                    // marginTop 过大时,取最大值marginTopMax
+                    if (Math.abs(marginTop) >= Math.abs(this.marginTopMax)) {
+                        marginTop = parseInt(this.marginTopMax)
+                    }
+                    // marginTop>0时,取0,防止楼层上边出现空白
+                    marginTop = marginTop >= 0 ? 0 : marginTop
+                    // index为0,marginTop设置为0
+                    index == 0 && (marginTop = 0)
+                    // index为最后一个,设置为最大marginTopMax
+                    index == len - 1 && (marginTop = parseInt(this.marginTopMax))
+                    this.marginTop = marginTop + 'px'
+                    break
+                //  1:向上滚动楼层
+                case 1:
+                    this.marginTop = marginTop + this.height + 'px'
+                    break
+                // -1向下滚动楼层
+                case -1:
+                    this.marginTop = marginTop + this.height * -1 + 'px'
+                    break
+                default:
+                    break
             }
-        }
-    }
+        },
+    },
 }
 </script>
 <style lang="less" scoped>
 .floor-box {
-    position: fixed;
-    right: 32px;
-    top: 196px;
-    z-index: 2;
     .floor-list {
         width: 44px;
         // height: 212px;
@@ -237,11 +237,17 @@ export default {
         padding: 6px 4px;
         text-align: center;
         .floor-out {
+            // max-height: 300px; //TODO:
+            min-height: 38px;
             overflow: hidden;
             position: relative;
+            overflow-y: auto;
+            &::-webkit-scrollbar {
+                display: none;
+            }
 
             .floor-center {
-                transition: all linear 0.8s;
+                transition: all linear 0.5s;
                 .floor-item {
                     line-height: 28px;
                     height: 28px;
@@ -266,6 +272,7 @@ export default {
         }
 
         .icon-top {
+            cursor: pointer;
             height: 18px;
             img {
                 width: 18px;
@@ -274,6 +281,7 @@ export default {
             }
         }
         .icon-bottom {
+            cursor: pointer;
             height: 18px;
             img {
                 width: 18px;

+ 1 - 1
src/components/floorListOther.vue

@@ -205,7 +205,7 @@ export default {
 .floor-box {
     position: fixed;
     right: 32px;
-    top: 196px;
+    top: 172px;
     z-index: 2;
     .floor-list {
         width: 44px;

+ 3 - 2
src/components/floorMap/canvasFun.vue

@@ -8,7 +8,7 @@
                     </i>
                     <el-dropdown-menu slot='dropdown'>
                         <el-dropdown-item command='savePng'>保存为png</el-dropdown-item>
-                        <el-dropdown-item command='saveSvg'>保存为svg</el-dropdown-item>
+                        <!-- <el-dropdown-item command='saveSvg'>保存为svg</el-dropdown-item> -->
                     </el-dropdown-menu>
                 </el-dropdown>
             </div>
@@ -24,7 +24,7 @@
             </div>
             <div class='small-block' @click='fitToWindow'>
                 <i>
-                    <img src='../../assets/imgs/qp.png' alt />
+                    <img src='../../assets/imgs/eye2.jpg' alt />
                 </i>
             </div>
             <div class='small-size' @click='reduce'>
@@ -143,6 +143,7 @@ export default {
         margin-top: 10px;
         border-left: 1px solid #e4e5e7;
         border-right: 1px solid #e4e5e7;
+        z-index: 1;
     }
 }
 </style>

+ 518 - 152
src/components/floorMap/index.vue

@@ -8,21 +8,94 @@
             <canvasFun @fit='fit' @savePng='savePng' @saveSvg='saveSvg' @saveJson='saveJson' @scale='scale' @showText='showText' ref='canvasFun'></canvasFun>
         </div>
         <room-box ref='boxRoom'></room-box>
+        <el-popover ref="popover" placement="right" trigger="manual" v-model="visible" width="380">
+            <!-- <div style="text-align: right;margin-bottom: 10px;">
+                <span style="float: left;">对应的工程信息化信息</span>
+                <el-link icon="el-icon-close" :underline="false" @click="visible = false"></el-link>
+            </div> -->
+
+            <div v-if="equipIds.length && !tabData.pointData.length" style="margin-top: 10px;">
+                <el-table :data="tabData.tableData" max-height="235" style="width: 100%" @row-click='handleClickEquipDetail' v-loading="eqLoading">
+                    <el-table-column prop="sbjc" label="设备简称" width="164" :show-overflow-tooltip='true'></el-table-column>
+                    <el-table-column prop="sl" width="50" label="数量" :show-overflow-tooltip='true'></el-table-column>
+                    <el-table-column prop="sb_status" width="70" label="设备状态" :show-overflow-tooltip='true'></el-table-column>
+                    <el-table-column prop="sbglgs" width="70" label="管理归属" :show-overflow-tooltip='true'></el-table-column>
+                    <!-- <el-table-column prop="assetnum" width="80" label="设备内码" :show-overflow-tooltip='true'></el-table-column>
+                    <el-table-column label="" width="80" :show-overflow-tooltip='true'>
+                        <template slot-scope="scope">
+                            <span class="equip-detail-btn">台账详情</span>
+                        </template>
+                    </el-table-column> -->
+                </el-table>
+                <!-- <div style="text-align: right; margin-top: 10px;">
+                    <el-button size="mini" type="primary" @click="visible = false">关闭</el-button>
+                </div> -->
+            </div>
+
+            <div v-else-if="!equipIds.length && tabData.pointData.length" style="margin-top: 10px;">
+                <ul class="pointList">
+                    <li v-for="point in tabData.pointData" :key="point.id" @click="handleClickPointDeatil(point)">
+                        <span :title="point.name">{{point.name}}</span>
+                        <a>查看</a>
+                    </li>
+                </ul>
+                <div style="text-align: right; margin-top: 10px;">
+                    <el-button v-show="showBtnWell" size="mini" type="primary" @click="handleClickHightLight(tabData.pointData)">查看控制商铺范围</el-button>
+                    <!-- <el-button size="mini" type="primary" @click="visible = false">关闭</el-button> -->
+                </div>
+            </div>
+
+            <el-tabs v-else-if="equipIds.length && tabData.pointData.length" v-model="activeName">
+                <el-tab-pane label="设备设施" name="equip">
+                    <el-table :data="tabData.tableData" max-height="235" style="width: 100%" @row-click='handleClickEquipDetail' v-loading="eqLoading">
+                        <el-table-column prop="sbjc" label="设备简称" width="164" :show-overflow-tooltip='true'></el-table-column>
+                        <el-table-column prop="sl" width="50" label="数量" :show-overflow-tooltip='true' align="right"></el-table-column>
+                        <el-table-column prop="sb_status" width="70" label="设备状态" :show-overflow-tooltip='true'></el-table-column>
+                        <el-table-column prop="sbglgs" width="70" label="管理归属" :show-overflow-tooltip='true'></el-table-column>
+                        <!-- <el-table-column prop="assetnum" width="80" label="设备内码" :show-overflow-tooltip='true'></el-table-column>
+                        <el-table-column label="" width="80" :show-overflow-tooltip='true'>
+                            <template slot-scope="scope">
+                                <span class="equip-detail-btn">台账详情</span>
+                            </template>
+                        </el-table-column> -->
+                    </el-table>
+                    <div style="text-align: right; margin-top: 10px;">
+                        <!-- <el-button size="mini" type="primary" @click="visible = false">关闭</el-button> -->
+                    </div>
+                </el-tab-pane>
+                <el-tab-pane label="位置" name="point">
+                    <ul class="pointList">
+                        <li v-for="point in tabData.pointData" :key="point.id" @click="handleClickPointDeatil(point)">
+                            <span :title="point.name">{{point.name}}</span>
+                            <a>查看</a>
+                        </li>
+                    </ul>
+                    <div style="text-align: right; margin-top: 10px;">
+                        <el-button v-show="showBtnWell" size="mini" type="primary" @click="handleClickHightLight(tabData.pointData)">查看控制商铺范围</el-button>
+                        <!-- <el-button size="mini" type="primary" @click="visible = false">关闭</el-button> -->
+                    </div>
+                </el-tab-pane>
+            </el-tabs>
+        </el-popover>
+        <span class="popStyle" :style="popoverPosition" v-popover:popover></span>
     </div>
 </template>
 <script>
 import { SFengParser } from '@saga-web/feng-map'
-import { SFloorParser, ItemOrder } from '@saga-web/big'
+import { SFloorParser, ItemOrder, ItemColor, SPolygonItem } from '@saga-web/big'
 import { FloorView } from '@/lib/FloorView'
 import { FloorScene } from '@/lib/FloorScene'
 import RoomBox from '@/views/room/index'
 import canvasFun from '@/components/floorMap/canvasFun'
 import { readGroup, queryStatis } from '@/api/public'
-import { queryShops } from '@/api/equipmentList.js'
+import { queryShops, queryAsset } from '@/api/equipmentList.js'
 import { STopologyParser } from '@/lib/parsers/STopologyParser'
 import { mapGetters, mapActions } from 'vuex'
-import { SImageItem } from '@saga-web/graph/lib'
+import { SImageItem, SImageShowType, SGraphItem } from '@saga-web/graph/lib'
+import { SColor } from '@saga-web/draw/lib'
 import bus from '@/utils/bus.js'
+import { TipelineItem } from '../../lib/items/TipelineItem'
+import { SImageLegendItem } from '../../lib/items/SImageLegendItem'
 
 // import { uuid } from "@/components/mapClass/until";
 
@@ -41,46 +114,166 @@ export default {
             floorid: '', //楼层id
             topologyParser: null, // 解析器数据
             fParser: null, // 底图解析器
-            wellMap: {} // 电井控制商铺映射
+            wellMap: {}, // 电井控制商铺映射
+            activeName: "equip",
+            popoverPosition: {
+                top: 0,
+                left: 0
+            },
+            visible: false,
+            eqLoading: true,
+            equipIds: [],
+            tabData: {
+                tableData: [],
+                pointData: []
+            },
+            activeItem: null,
+            showBtnWell: false
         }
     },
     props: {
         id: {
             default: '1',
-            type: String
+            type: String,
         },
         categoryId: {
             default: '',
-            type: String
+            type: String,
         },
         // 弹窗高度,适配底图高度使用
         modalHeight: {
             type: [Number, undefined],
-            default: undefined
+            default: undefined,
         },
         loadName: null,
-        type: null
+        type: null,
     },
     components: { RoomBox, canvasFun },
     computed: {
-        ...mapGetters(['plazaId', 'fmapID', 'haveFengMap', 'bunkObj'])
+        ...mapGetters(['plazaId', 'fmapID', 'haveFengMap', 'bunkObj']),
     },
     methods: {
+        handleClickLegendItem(item, events) {
+            this.tabData = {tableData: [], pointData: []};
+            this.showBtnWell = false;
+            this.visible = false;
+            this.activeItem = null;
+            this.isLoading = true;
+            if (item.data.AttachObjectIds && item.data.AttachObjectIds.length) {
+                const e = events[0];
+                this.equipIds = [];
+                this.activeItem = item;
+                item.data.AttachObjectIds.forEach(v => {
+                    if (v.type == "Image") {
+                        if(v.id) { this.equipIds.push(v.id) }
+                        // this.tabData.tableData.push(v);
+                    } else if (v.type == "Zone") {
+                        this.tabData.pointData.push(v);
+                    }
+                })
+                if (this.equipIds.length) {
+                    this.eqLoading = true;
+                    let data = {
+                        plazaId: this.$store.state.plazaId,
+                        page: 1,
+                        size: this.equipIds.length
+                    }
+                    let postParams = {
+                        assetnumList: this.equipIds
+                    }
+                    queryAsset({ data, postParams }).then(res => {
+                        this.tabData.tableData = res.data.data;
+                        this.eqLoading = false;
+                    })
+                }
+                this.popoverPosition.top = `${e.clientY}px`;
+                this.popoverPosition.left = `${e.clientX}px`;
+                this.$nextTick(() => {
+                    if (
+                        item.data.GraphElementId == '100050' ||
+                        item.data.GraphElementId == '100055' ||
+                        item.data.GraphElementId == '100056' ||
+                        item.data.GraphElementId == '100057'
+                    ) { //判断是否为电井
+                        this.showBtnWell = true;
+                    }
+                    this.visible = true;
+                })
+            }
+        },
+        // 查看浮层设备详情
+        handleClickEquipDetail(row) {
+            if (row.assetuid) {
+                window.open(`http://gcgl.wanda.cn/maximo/ui/?event=loadapp&value=assetdevic&uniqueid=${row.assetuid}`)
+            }
+        },
+        // 查看浮层位置详情
+        handleClickPointDeatil(point) {
+            if (point.id && this.activeItem)
+            this.$refs.boxRoom.open({ name: this.activeItem.name, type: this.type, location: point.id });
+        },
+        handleClickHightLight(pointData) {
+            this.clearHightLight();
+            pointData.forEach(point => {
+                let location = point.id ? point.id : '';
+                if (this.wellMap.hasOwnProperty(location)) {
+                    this.wellMap[location].forEach(item => {
+                        item.highLightFlag = true;
+                        item.zOrder = 30;
+                    })
+                } else {
+                    let getParams = {
+                        plazaId: this.plazaId,
+                        floor: this.floorid,
+                        keyword: `${location}:wellnum;`
+                    }
+                    queryShops({ getParams }).then(res => {
+                        let shopsnumList = []
+                        let shopsnumItemList = []
+                        if (res.data && res.data.length) {
+                            for (let floor in res.data[0]) {
+                                if (res.data[0][floor].length) {
+                                    res.data[0][floor].forEach(v => {
+                                        shopsnumList = shopsnumList.concat(v.shopsnumList.split(','))
+                                    })
+                                }
+                            }
+                        }
+                        if (shopsnumList.length) {
+                            this.fParser.spaceList.forEach(item => {
+                                if (shopsnumList.findIndex(name => name == item.data.Name) != -1) {
+                                    item.highLightFlag = true
+                                    item.zOrder = 30
+                                    shopsnumItemList.push(item)
+                                }
+                            })
+                            this.wellMap[location] = shopsnumItemList
+                        }
+                    })
+                }
+            });
+            this.visible = false;
+        },
         ...mapActions(['getfmapID']),
         init(floorid) {
-            // this.loading = true
+            this.loading = true
             this.floorid = floorid
             this.mapSize()
             this.$refs.canvasFun.isShow = false
             setTimeout(() => {
-                if (this.haveFengMap) {
-                    this.clearGraphy()
-                    this.scene = new FloorScene()
+                this.clearGraphy()
+                this.scene = new FloorScene()
+                if (this.haveFengMap == 1) {
                     this.scene.selectContainer.connect('listChange', this, this.listChange)
                     if (this.canvasID != `canvas${this.id}`) {
                         this.canvasID = `canvas${this.id}`
                     }
                     this.parserData(floorid)
+                } else if (this.haveFengMap == 0) {
+                    this.view.scene = this.scene
+                    this.readGraph()
+                } else {
+                    this.loading = false
                 }
             }, 100)
         },
@@ -89,114 +282,168 @@ export default {
                 // 屋顶
                 if (window.fengmapData.frImg) {
                     let imgItem = new SImageItem(null, `${this.mapServerURL}/webtheme/${this.fmapID}/${window.fengmapData.frImg}`)
+                    imgItem.showType = SImageShowType.AutoFit
+                    imgItem.connect('imgLoadOver', this, () => {
+                        this.readGraph()
+                    })
                     this.scene.addItem(imgItem)
                     this.view.scene = this.scene
-                    this.view.fitSceneToView()
+                    // this.view.fitSceneToView()
+                } else {
+                    // 屋顶图不为图片
+                    this.readBaseMap(floor);
                 }
             } else {
                 if (window.fengmapData.gnameToGid[floor]) {
-                    window.fengmapData.parseData(window.fengmapData.gnameToGid[floor], res => {
-                        if (res.err) {
-                            console.log('errr', res.err)
-                            return
-                        }
-                        this.fParser = new SFloorParser(null)
-                        this.fParser.parseData(res)
-                        this.fParser.spaceList.forEach(t => {
-                            this.scene.addItem(t)
-                            t.nameSize = 16
-                            if (t.data.Name && this.bunkObj[t.data.Name]) {
-                                t.name = this.bunkObj[t.data.Name].detailtype
-                            } else {
-                                t.name = ''
-                            }
-                        })
-                        this.fParser.wallList.forEach(t => this.scene.addItem(t))
-                        this.fParser.virtualWallList.forEach(t => this.scene.addItem(t))
-                        this.fParser.doorList.forEach(t => this.scene.addItem(t))
-                        this.fParser.columnList.forEach(t => this.scene.addItem(t))
-                        this.fParser.casementList.forEach(t => this.scene.addItem(t))
-                        this.view.scene = this.scene
-                        this.view.fitSceneToView()
-                    })
+                    this.readBaseMap(floor);
                 } else {
                     console.log('楼层不正确')
                 }
             }
-            this.readGroup(this.floorid).then(data => {
-                this.loading = false
-                if (data.Result == 'failure') {
-                    this.$store.commit('SETISMESSAGE', false)
+        },// 解析底图
+        readBaseMap(floor){
+            window.fengmapData.parseData(window.fengmapData.gnameToGid[floor], res => {
+                if (res.err) {
+                    console.log('errr', res.err)
                     return
-                } else {
-                    console.log('data[0].Elements.Node', data)
-                    if (
-                        data.Data[0].Elements.Nodes.length === 0 &&
-                        data.Data[0].Elements.Markers.length === 0 &&
-                        data.Data[0].Elements.Relations.length === 0
-                    ) {
-                        this.$store.commit('SETISMESSAGE', false)
-                    } else {
-                        this.$store.commit('SETISMESSAGE', true)
-                    }
-                }
-                // 无返回Data处理
-                if (!(data.Data && data.Data.length)) {
-                    return false
-                }
-                // 请求回来的备注
-                if (data.Data && data.Data[0].Note) {
-                    let note = data.Data[0].Note
-                    bus.$emit('queryRemarksMethods', note)
-                } else {
-                    bus.$emit('queryRemarksMethods', '')
-                }
-                //土建系统的图例展示
-                if (this.$cookie.get('categoryId') == 'SCPZ') {
-                    let scpzTable = []
-                    scpzTable = data.Data[0].Elements.Nodes || []
-                    this.$store.commit('SETSCPZTABLE', scpzTable)
                 }
-                // 放到后边 $cookie graphId
-                this.$cookie.set('graphId', data.Data[0].ID, 3)
-                if (this.$cookie.get('graphId')) {
-                    // 得到graphId 就请求图例
-                    // 除土建系统之外的图例展示 包括楼层功能
-                    bus.$emit('queryViewMethods')
-                }
-                this.topologyParser = new STopologyParser(null)
-                this.topologyParser.parseData(data.Data[0].Elements)
-                // 多边形
-                this.topologyParser.zoneLegendList.forEach(t => {
-                    this.scene.addItem(t)
-                })
-                // 增加文字
-                this.topologyParser.textMarkerList.forEach(t => {
-                    this.scene.addItem(t)
-                })
-                // 增加图片
-                this.topologyParser.imageMarkerList.forEach(t => {
-                    this.scene.addItem(t)
-                })
-                // 增加直线
-                this.topologyParser.lineMarkerList.forEach(t => {
+                this.fParser = new SFloorParser(null)
+                this.fParser.parseData(res)
+                this.fParser.spaceList.forEach(t => {
                     this.scene.addItem(t)
+                    t.nameSize = 12
+                    t.nameColor = '#2a2a2a'
+                    if (t.data.Name && this.bunkObj[t.data.Name]) {
+                        t.name = this.bunkObj[t.data.Name].brandname
+                    } else {
+                        // t.name = t.data.Name
+                        t.name = ''
+                    }
                 })
-                // 增加图标类图例
-                this.topologyParser.imageLegendList.forEach(t => {
-                    this.scene.addItem(t)
+                this.fParser.wallList.forEach(t => this.scene.addItem(t))
+                this.fParser.virtualWallList.forEach(t => this.scene.addItem(t))
+                this.fParser.doorList.forEach(t => this.scene.addItem(t))
+                this.fParser.columnList.forEach(t => this.scene.addItem(t))
+                this.fParser.casementList.forEach(t => this.scene.addItem(t))
+                this.view.scene = this.scene
+                // this.view.fitSceneToView()
+                this.readGraph()
+            })
+        },
+        readGraph() {
+            this.readGroup(this.floorid)
+                .then((data) => {
+                    if (data.Result == 'failure') {
+                        this.$store.commit('SETISMESSAGE', false)
+                        this.view.fitSceneToView()
+                        this.view.minScale = this.view.scale
+                        if (this.$refs.canvasFun) {
+                            this.$refs.canvasFun.everyScale = this.view.scale
+                        }
+                        this.loading = false
+                        return
+                    } else {
+                        if (
+                            data.Data[0].Elements.Nodes.length === 0 &&
+                            data.Data[0].Elements.Markers.length === 0 &&
+                            data.Data[0].Elements.Relations.length === 0
+                        ) {
+                            this.$store.commit('SETISMESSAGE', false)
+                        } else {
+                            this.$store.commit('SETISMESSAGE', true)
+                        }
+                    }
+                    // 无返回Data处理
+                    if (!(data.Data && data.Data.length)) {
+                        this.view.fitSceneToView()
+                        this.view.minScale = this.view.scale
+                        if (this.$refs.canvasFun) {
+                            this.$refs.canvasFun.everyScale = this.view.scale
+                        }
+                        return false
+                    }
+                    // 请求回来的备注
+                    if (data.Data && data.Data[0].Note) {
+                        let note = data.Data[0].Note
+                        bus.$emit('queryRemarksMethods', note)
+                    } else {
+                        bus.$emit('queryRemarksMethods', '')
+                    }
+                    //土建装饰的图例展示
+                    if (this.$cookie.get('categoryId') == 'SCPZ') {
+                        let scpzTable = [],
+                            arr = []
+                        scpzTable = data.Data[0].Elements.Nodes || []
+                        console.log(scpzTable)
+                        if (scpzTable.length > 0) {
+                            scpzTable.forEach((e) => {
+                                if (e.Properties.ItemExplain) {
+                                    let obj = e
+                                    arr.push(obj)
+                                }
+                            })
+                        }
+                        console.log(arr)
+                        this.$store.commit('SETSCPZTABLE', arr)
+                    }
+                    if (data.Data[0].Elements.Nodes.length > 0) {
+                        this.$store.commit('SETTYPENUM', '')
+                        let Lengd = data.Data[0].Elements.Nodes
+                        Lengd.forEach((el) => {
+                            if (el.Type == 'Image' && el.Num > 1) {
+                                console.log(el.Num)
+                                this.$store.commit('SETTYPENUM', el.Num)
+                            }
+                        })
+                    }
+                    // 放到后边 $cookie graphId
+                    this.$cookie.set('graphId', data.Data[0].ID, 3)
+                    if (this.$cookie.get('graphId')) {
+                        // 得到graphId 就请求图例
+                        // 除土建装饰之外的图例展示 包括楼层功能
+                        bus.$emit('queryViewMethods')
+                    }
+                    this.topologyParser = new STopologyParser(null)
+                    this.topologyParser.parseData(data.Data[0].Elements)
+                    // 多边形
+                    this.topologyParser.zoneLegendList.forEach((t) => {
+                        this.scene.addItem(t)
+                        t.connect("legendItemClick", t, this.handleClickLegendItem);
+                    })
+                    // 增加文字
+                    this.topologyParser.textMarkerList.forEach((t) => {
+                        this.scene.addItem(t)
+                    })
+                    // 增加图片
+                    this.topologyParser.imageMarkerList.forEach((t) => {
+                        this.scene.addItem(t)
+                    })
+                    // 增加直线
+                    this.topologyParser.lineMarkerList.forEach((t) => {
+                        this.scene.addItem(t)
+                    })
+                    // 增加图标类图例
+                    this.topologyParser.imageLegendList.forEach((t) => {
+                        this.scene.addItem(t)
+                        t.connect("legendItemClick", t, this.handleClickLegendItem);
+                    })
+                    // 增加管线类
+                    // 增加图标类图例
+                    this.topologyParser.relationList.forEach((t) => {
+                        t.selectable = true
+                        this.scene.addItem(t)
+                        t.connect("legendItemClick", t, this.handleClickLegendItem);
+                    })
+                    this.view.fitSceneToView()
+                    this.view.minScale = this.view.scale
+                    if (this.$refs.canvasFun) {
+                        this.$refs.canvasFun.everyScale = this.view.scale
+                    }
+                    this.loading = false
                 })
-                // 增加管线类
-                // 增加图标类图例
-                this.topologyParser.relationList.forEach(t => {
-                    this.scene.addItem(t)
+                .catch(() => {
+                    this.loading = false
                 })
-                this.view.fitSceneToView()
-                this.view.minScale = this.view.scale
-                if (this.$refs.canvasFun) {
-                    this.$refs.canvasFun.everyScale = this.view.scale
-                }
-            })
         },
         clearGraphy() {
             if (this.view) {
@@ -206,36 +453,51 @@ export default {
             this.view = new FloorView(`canvas${this.id}`)
         },
         listChange(item, ev) {
+            // if (ev[0].length) {
+            //     let selectItem1 = ev[0][0],
+            //         location = selectItem1.data.AttachObjectIds[0] ? selectItem1.data.AttachObjectIds[0].id : ''
+            //     // 空间类型都可打开弹窗(除防火分区 编号100131,商管办公室 编号100112,铺装石材 编号100129)
+            //     if (selectItem1.data.GraphElementType == 'Zone') {
+            //         if (
+            //             selectItem1.data.GraphElementId != '100131' &&
+            //             selectItem1.data.GraphElementId != '100112' &&
+            //             selectItem1.data.GraphElementId != '100129'
+            //         ) {
+            //             if (location) {
+            //                 this.$refs.boxRoom.open({ name: selectItem1.name, type: this.type, location: location })
+            //             }
+            //         }
+            //     }
+            //     // // 选中电井设置电井关联的商铺高亮
+            //     // this.setHightLight(ev[0])
+            // } 
+            // else {
+                // this.clearHightLight()
+            // }
             if (ev[0].length) {
-                let selectItem1 = ev[0][0],
-                    name = selectItem1.data.Name,
-                    location = selectItem1.data.AttachObjectIds[0] ? selectItem1.data.AttachObjectIds[0].id : ''
-                if (name.slice(name.length - 2, name.length) == '机房') {
-                    if (location) {
-                        this.$refs.boxRoom.open({ name: name, type: this.type, location: location })
-                    }
+                if (!(ev[0][0] instanceof SPolygonItem || ev[0][0] instanceof TipelineItem || ev[0][0] instanceof SImageLegendItem)) {
+                    this.visible = false;
                 }
-                // 选中电井设置电井关联的商铺高亮
-                this.setHightLight(ev[0])
             } else {
-                this.clearHightLight()
+                this.visible = false;
             }
+            this.clearHightLight()
         },
         // 选中电井关联的商铺高亮
         setHightLight(arr) {
             this.clearHightLight()
-            arr.forEach(item => {
+            arr.forEach((item) => {
                 let location = item.data.AttachObjectIds[0] ? item.data.AttachObjectIds[0].id : ''
                 // 添加了位置类型并且选中的类型为电井类型
                 if (
                     (item.data.GraphElementId == '100050' ||
-                        item.data.GraphElementId == '100055' ||
-                        item.data.GraphElementId == '100056' ||
-                        item.data.GraphElementId == '100057') &&
+                    item.data.GraphElementId == '100055' ||
+                    item.data.GraphElementId == '100056' ||
+                    item.data.GraphElementId == '100057') &&
                     location
                 ) {
                     if (this.wellMap.hasOwnProperty(location)) {
-                        this.wellMap[location].forEach(item => {
+                        this.wellMap[location].forEach((item) => {
                             item.highLightFlag = true
                             item.zOrder = 30
                         })
@@ -243,23 +505,23 @@ export default {
                         let getParams = {
                             plazaId: this.plazaId,
                             floor: this.floorid,
-                            keyword: `${location}:wellnum;`
+                            keyword: `${location}:wellnum;`,
                         }
-                        queryShops({ getParams }).then(res => {
+                        queryShops({ getParams }).then((res) => {
                             let shopsnumList = []
                             let shopsnumItemList = []
                             if (res.data && res.data.length) {
                                 for (let floor in res.data[0]) {
                                     if (res.data[0][floor].length) {
-                                        res.data[0][floor].forEach(v => {
+                                        res.data[0][floor].forEach((v) => {
                                             shopsnumList = shopsnumList.concat(v.shopsnumList.split(','))
                                         })
                                     }
                                 }
                             }
                             if (shopsnumList.length) {
-                                this.fParser.spaceList.forEach(item => {
-                                    if (shopsnumList.findIndex(name => name == item.data.Name) != -1) {
+                                this.fParser.spaceList.forEach((item) => {
+                                    if (shopsnumList.findIndex((name) => name == item.data.Name) != -1) {
                                         item.highLightFlag = true
                                         item.zOrder = 30
                                         shopsnumItemList.push(item)
@@ -274,8 +536,9 @@ export default {
         },
         // 清除电井关联商铺的高亮状态
         clearHightLight() {
+            ItemColor.spaceHighColor = new SColor('#FBF2CC')
             for (let key in this.wellMap) {
-                this.wellMap[key].forEach(item => {
+                this.wellMap[key].forEach((item) => {
                     item.highLightFlag = false
                     item.zOrder = ItemOrder.spaceOrder
                 })
@@ -287,7 +550,8 @@ export default {
         },
         // 保存为png
         savePng() {
-            this.view.saveImage(`${this.loadName}.png`, 'png')
+            // this.view.saveImage(`${this.loadName}.png`, 'png')
+            this.view.saveImageSize(`${this.loadName}.png`, 'png', 1920 * 2, 1080 * 2)
             //console.log(`${this.loadName}.png`)
         },
         // 保存为svg
@@ -311,7 +575,7 @@ export default {
             // this.topologyParser.zoneLegendList.forEach(t => {
             //     t.showText = val
             // })
-            this.fParser.spaceList.forEach(t => {
+            this.fParser.spaceList.forEach((t) => {
                 t.showBaseName = val
             })
         },
@@ -322,7 +586,7 @@ export default {
                 FloorID: FloorID,
                 categoryId: this.categoryId ? this.categoryId : this.$cookie.get('categoryId'),
                 projectId: this.urlMsg.ProjectID,
-                Pub: true
+                Pub: true,
             }
             return readGroup(data)
         },
@@ -340,11 +604,12 @@ export default {
             }
         },
         getEvent() {
-            bus.$on('changeShow', res => {
-                this.topologyParser.zoneLegendList.forEach(t => {
-                    let id = t.data.GraphElementId
-                    t.maskFlag = !(res.indexOf(id) > -1)
-                })
+            bus.$on('changeShow', (res) => {
+                this.topologyParser &&
+                    this.topologyParser.zoneLegendList.forEach((t) => {
+                        let id = t.data.GraphElementId
+                        t.maskFlag = !(res.indexOf(id) > -1)
+                    })
                 // this.topologyParser.textMarkerList.forEach(t => {
                 //     let id = t.data.GraphElementId
                 //     t.maskFlag = !(res.indexOf(id) > -1)
@@ -357,16 +622,18 @@ export default {
                 //     let id = t.data.GraphElementId
                 //     t.maskFlag = !(res.indexOf(id) > -1)
                 // })
-                this.topologyParser.imageLegendList.forEach(t => {
-                    let id = t.data.GraphElementId
-                    t.selected = res.indexOf(id) > -1
-                })
-                this.topologyParser.relationList.forEach(t => {
-                    let id = t.data.GraphElementId
-                    t.selected = res.indexOf(id) > -1
-                })
+                this.topologyParser &&
+                    this.topologyParser.imageLegendList.forEach((t) => {
+                        let id = t.data.GraphElementId
+                        t.maskFlag = !(res.indexOf(id) > -1)
+                    })
+                this.topologyParser &&
+                    this.topologyParser.relationList.forEach((t) => {
+                        let id = t.data.GraphElementId || t.data.GraphElementID
+                        t.maskFlag = !(res.indexOf(id) > -1)
+                    })
             })
-        }
+        },
     },
     watch: {
         'view.scale': {
@@ -375,27 +642,28 @@ export default {
                     let s = (n * 10) / this.view.minScale
                     this.$refs.canvasFun.sliderVal = s > 1000 ? 1000 : s
                 }
-            }
+            },
+        },
+        haveFengMap() {
+            this.init(this.floorid)
         },
-        haveFengMap(val) {
-            if (val) {
-                this.init(this.floorid)
-            }
-        }
     },
     mounted() {
         this.mapSize()
         this.getEvent()
     },
     created() {
+        // document.addEventListener("mousedown", () => {
+        //     this.visible = false;
+        // })
         this.urlMsg = {
             categoryId: this.$cookie.get('categoryId'),
             ProjectID: this.plazaId,
             BuildingID: '1',
             FloorID: this.$cookie.get('floorMapId') || 'f1',
-            fmapID: this.fmapID
+            fmapID: this.fmapID,
         }
-    }
+    },
 }
 </script>
 <style lang="less" scoped>
@@ -414,5 +682,103 @@ export default {
         bottom: 40px;
         width: 100%;
     }
+    .popStyle {
+        position: fixed;
+    }
+}
+</style>
+<style lang="less">
+a:hover {
+    text-decoration: none;
+}
+.el-popover {
+    .el-table {
+        tr {
+            .equip-detail-btn {
+                display: none;
+            }
+        }
+        tr:hover {
+            cursor: pointer;
+            .equip-detail-btn {
+                cursor: pointer;
+                display: inline-block;
+                color: #025BAA;
+            }
+        }
+    }
+    .pointList {
+        max-height: 235px;
+        overflow-y: auto;
+        text-align: right;
+        li {
+            height: 38px;
+            line-height: 38px;
+            padding: 0 12px;
+            cursor: pointer;
+            border-bottom: 1px solid rgba(0,0,0,0.06);
+            span {
+                float: left;
+                width: 260px;
+                text-align: left;
+                overflow: hidden;
+                text-overflow: ellipsis;
+                white-space: nowrap;
+            }
+            a {
+                display: none;
+                color: #025BAA;
+                font-size: 13px;
+            }
+        }
+        li:hover {
+            background-color: #F5F6F7;
+            a {
+                display: inline-block;
+            }
+        }
+    }
+    .el-button--primary{
+         background: linear-gradient(180deg, #369cf7 0%, #025baa 100%);
+    }
+    .el-tabs--bottom .el-tabs__item.is-bottom:nth-child(2),
+    .el-tabs--bottom .el-tabs__item.is-top:nth-child(2),
+    .el-tabs--top .el-tabs__item.is-bottom:nth-child(2),
+    .el-tabs--top .el-tabs__item.is-top:nth-child(2) {
+        padding-left: 16px;
+    }
+    .el-tabs--bottom .el-tabs__item.is-bottom:last-child,
+    .el-tabs--bottom .el-tabs__item.is-top:last-child,
+    .el-tabs--top .el-tabs__item.is-bottom:last-child,
+    .el-tabs--top .el-tabs__item.is-top:last-child {
+        padding-right: 16px;
+    }
+    .el-tabs__nav-wrap::after {
+        height: 0;
+    }
+    .is-active {
+        color: #025BAA !important;
+        border-color: #025BAA !important;
+        background: rgba(2,91,170,0.15);
+    }
+    .el-tabs__item {
+        padding: 5px 16px;
+        height: 30px;
+        line-height: 20px;
+        font-size: 14px;
+        font-family: MicrosoftYaHei;
+        color: rgba(31, 36, 41, 1);
+        border: 1px solid rgba(195, 199, 203, 1);
+    }
+    .el-tabs__active-bar {
+        background-color: transparent !important;
+    }
+    /deep/ .el-tabs__item:last-child {
+        border-radius: 0px 4px 4px 0px;
+    }
+    /deep/ .el-tabs__item:nth-child(2) {
+        border-radius: 4px 0px 0px 4px;
+    }
 }
+    
 </style>

+ 63 - 17
src/components/legendremarks.vue

@@ -4,7 +4,7 @@
 *@info:楼层功能-编辑图例备注
 */
 <template>
-    <div class='editModel'>
+    <div class='editModel' v-if='visible'>
         <a-modal v-model='visible' :title='title' :closable='false' :maskClosable='false' :width='648' :footer='null'>
             <div class='edit-x' @click='handlCancel'>X</div>
             <div class='edit_container' style='width:600px;height:156px'>
@@ -28,25 +28,29 @@
 <script>
 import { updateRead } from '@/api/public.js'
 import { mapGetters } from 'vuex'
+import { queryRead } from '@/api/public.js'
+
 export default {
     name: 'EditdMarks',
     data() {
         return {
             valLen: 0, //输入字数限制
             remarksTexts: '', //展示的备注
+            text1: '主要设备房包括:冷源机房,热源机房,开闭站,配变电所(室),发电机房,消防水泵房,消防高位水箱间,生活水泵房,慧云机房,垃圾房',
+            text2: '图例后×的数字,代表此位置的数量',
             editorOption: {
                 modules: {
-                    toolbar: [['bold', 'underline'], [{ color: [] }]]
+                    toolbar: [['bold', 'underline'], [{ color: [] }], [{ list: 'ordered' }]],
                 },
                 theme: 'snow',
-                placeholder: '请输入内容...'
+                placeholder: '请输入内容...',
             },
             title: '编辑图例备注',
-            visible: false
+            visible: false,
         }
     },
     computed: {
-        ...mapGetters(['remarksText'])
+        ...mapGetters(['remarksText', 'typeNum', 'planNum']),
     },
     methods: {
         // 点击取消
@@ -55,7 +59,7 @@ export default {
                 this.$confirm('是否保存编辑后的备注?', '提示', {
                     confirmButtonText: '保存',
                     cancelButtonText: '取消',
-                    type: 'warning'
+                    type: 'warning',
                 })
                     .then(() => {
                         this.handleOk()
@@ -63,7 +67,7 @@ export default {
                     .catch(() => {
                         this.$message({
                             type: 'info',
-                            message: '已取消保存'
+                            message: '已取消保存',
                         })
                         this.visible = false
                     })
@@ -73,8 +77,53 @@ export default {
         },
         // val为传过来的备注
         showModal() {
+            // this.$emit('queryMarks')
+            // this.$emit('')
+            // return
+            this.query()
             this.visible = true
-            this.remarksTexts = this.remarksText
+            // this.remarksTexts = this.remarksText
+        },
+        query() {
+            if (this.remarksText) {
+                if (this.planNum && this.typeNum) {
+                    this.remarksTexts = `<ol style="padding-left: 1.5em;"><li>${this.text1}</li><li>${this.text2}</li></ol>`
+                } else if (this.planNum) {
+                    this.remarksTexts = `<ol style="padding-left: 1.5em;"><li>${this.text1}</li></ol>`
+                } else if (this.typeNum) {
+                    this.remarksTexts = `<ol style="padding-left: 1.5em;" ><li>${this.text2}</li></ol>`
+                } else {
+                    this.remarksTexts = ''
+                }
+                if (this.remarksText.search(`${this.text1}`) != -1) {
+                    this.remarksTexts = this.remarksText
+                } else {
+                    if (this.planNum) {
+                        this.remarksTexts = `${this.remarksText}<ol style="padding-left: 1.5em;"><li>${this.text1}</li></ol>`
+                    } else {
+                        this.remarksTexts = this.remarksText
+                    }
+                }
+                if (this.remarksText.search(`${this.text2}`) != -1) {
+                    this.remarksTexts = this.remarksText
+                } else {
+                    if (this.typeNum) {
+                        this.remarksTexts = `${this.remarksText}<ol style="padding-left: 1.5em;"><li>${this.text2}</li></ol>`
+                    } else {
+                        this.remarksTexts = this.remarksText
+                    }
+                }
+            } else {
+                if (this.planNum && this.typeNum) {
+                    this.remarksTexts = `<ol style="padding-left: 1.5em;"><li>${this.text1}</li><li>${this.text2}</li></ol>`
+                } else if (this.planNum) {
+                    this.remarksTexts = `<ol style="padding-left: 1.5em;"><li>${this.text1}</li></ol>`
+                } else if (this.typeNum) {
+                    this.remarksTexts = `<ol style="padding-left: 1.5em;" ><li>${this.text2}</li></ol>`
+                } else {
+                    this.remarksTexts = ''
+                }
+            }
         },
         // 更新底图备注
         markUpdate(val) {
@@ -82,15 +131,14 @@ export default {
                 postParams: {
                     graphId: this.$cookie.get('graphId'),
                     projectId: this.$store.state.plazaId,
-                    Note: val
-                }
+                    Note: val,
+                },
             }
-            updateRead(params).then(res => {
-                // console.log('更新备注', res)
+            updateRead(params).then((res) => {
                 this.$message({
                     showClose: true,
                     message: '更新成功',
-                    type: 'success'
+                    type: 'success',
                 })
                 this.$emit('queryMarks')
                 this.visible = false
@@ -113,9 +161,9 @@ export default {
             if (val.html) {
                 this.remarksTexts = val.html
             }
-        }
+        },
     },
-    mounted() {}
+    mounted() {},
 }
 </script>
 
@@ -136,8 +184,6 @@ export default {
 }
 </style>
 <style lang="less" scoped>
-.editModel {
-}
 .edit-x {
     position: absolute;
     width: 9px;

+ 27 - 14
src/components/menuList.vue

@@ -5,7 +5,7 @@
             <div class='downright'></div>
             <div class='home-box'>
                 <img src='@/assets/imgs/logo.png' alt />
-                <span>{{plazaName}}</span>
+                <span>{{plazaName||'万达集团'}}</span>
                 <!-- <span v-if='plazas'>{{plazas.length>0?formatter(plazaId,plazas):'--'}}</span> -->
             </div>
         </div>
@@ -18,12 +18,12 @@
             >{{ item.name }}</div>
         </div>
         <div class='home-right'>
-            <span @click='dumpLegend'>
+            <span @click='dumpLegend' v-show="permissions ? permissions.includes('GLSMS_SYMBOL_MANAGE'):false">
                 <img class='img1' src='../assets/imgs/scj.png' alt />
                 <span class='span1'>图例库</span>
             </span>
 
-            <span @click='toDrafts' class='span-out'>
+            <span @click='toDrafts' class='span-out' v-show="permissions ? permissions.includes('GLSMS_PLANARGRAPH_MANAGE'):false">
                 <img class='img2' src='../assets/imgs/cgx.png' alt />
                 <span class='span2'>草稿箱</span>
                 <span class='span2-num' v-if='draftNum && draftNum <= 99'>{{draftNum}}</span>
@@ -42,12 +42,13 @@ import { formatTime } from '@/utils/format.js'
 import { mapGetters } from 'vuex'
 import moment from 'moment'
 import { queryDraftNum } from '../../src/api/public'
+import store from '../store'
 export default {
     data() {
         return {
             state: '',
             list: [
-                { name: '首页', state: false, route: 'homepage' },
+                { name: '', state: false, route: 'homepage' },
                 { name: '项目概况', state: false, route: 'overview' },
                 { name: '楼层功能', state: false, route: 'floorFunc' }, //楼层功能
                 { name: '设备设施', state: false, route: 'equipment' }, //设备设施
@@ -72,7 +73,7 @@ export default {
         }
     },
     computed: {
-        ...mapGetters(['plazas', 'plazaId', 'fmapID', 'plazaName'])
+        ...mapGetters(['plazas', 'plazaId', 'fmapID', 'plazaName','permissions'])
     },
     watch: {
         $route: 'handleRoute'
@@ -91,7 +92,8 @@ export default {
         // 页面销毁前,清除定时器
         this.$once('hook:beforeDestroy', () => {
             clearInterval(this.timer)
-        })
+        });
+        console.log('permissions',this.permissions)
     },
     methods: {
         /**
@@ -122,11 +124,15 @@ export default {
         },
         //入草稿箱
         toDrafts() {
-            const { conf } = window.__systemConf,
-                { editerUrl } = conf
+            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)
-            window.open(url, true)
+            window.open(url, "drafts")
         },
         currentTime() {
             this.times = moment().format('YYYY.MM.DD HH:mm')
@@ -161,8 +167,10 @@ export default {
         clickEventAcitve(item) {
             if (item.name == '楼层功能') {
                 this.$cookie.set('categoryId', 'LCGN', 3)
+                store.commit('SETCATEGORYID', 'LCGN')
             } else {
                 this.$cookie.set('categoryId', 'GDXT', 3)
+                store.commit('SETCATEGORYID', 'GDXT')
             }
             this.list.forEach(ele => {
                 ele.state = false
@@ -173,9 +181,9 @@ export default {
         },
 
         dumpLegend() {
-            const { conf } = window.__systemConf,
-                { wandaBmGuideUrl } = conf
-            window.open(`${wandaBmGuideUrl}home/legendLibrary?token=${this.$store.state.ssoToken}`, true)
+            const { conf } = window.__systemConf;
+            const wandaBmGuideUrl = conf[process.env.NODE_ENV + '_wandaBmGuideUrl']
+            window.open(`${wandaBmGuideUrl}home/legendLibrary?token=${this.$store.state.ssoToken}`, "legendLibrary")
         }
     }
 }
@@ -191,7 +199,8 @@ export default {
     box-shadow: 0px 2px 10px 0px rgba(31, 35, 41, 0.1);
     // overflow: hidden;
     .home {
-        width: 265px;
+        min-width: 265px;
+        max-width: 320px;
         height: 48px;
         // line-height: 48px;
         text-align: center;
@@ -247,7 +256,11 @@ export default {
             margin: 0 8px;
             cursor: pointer;
             transition: all 0.2s;
+            &:first-child {
+                display: none;
+            }
         }
+
         .is-active {
             color: #025baa;
             font-weight: bolder;
@@ -281,7 +294,7 @@ export default {
                 border-radius: 90px;
                 font-size: 12px;
                 text-align: center;
-                line-height: 18px;
+                line-height: 16px;
                 color: #ffffff;
             }
         }

+ 50 - 21
src/components/viewLengend.vue

@@ -4,8 +4,8 @@
 *@info:图例展示状态
 */
 <template>
-    <div class='views'>
-        <div v-if='systemName=="土建系统"'>
+    <div class='views view-lengend-current'>
+        <div v-if='systemName=="土建装饰"'>
             <el-table
                 ref='dataTable'
                 :data='scpzTable'
@@ -15,7 +15,7 @@
             >
                 <el-table-column prop label='说明'>
                     <template slot-scope='{row}' v-if='row.Properties && row.Properties.ItemExplain'>
-                        <span>{{row.Properties.ItemExplain}}</span>
+                        <div>{{row.Properties.ItemExplain}}</div>
                     </template>
                 </el-table-column>
                 <el-table-column prop label='图例' width='60' align='center'>
@@ -35,11 +35,11 @@
                 @selection-change='handleSelectionChange'
                 :header-cell-style='{background:"rgba(2,91,170,0.1)",fontFamily:"PingFangSC-Medium,PingFang SC;",color:"rgba(0,0,0,0.85);",fontSize:"12px"}'
             >
-                <el-table-column type='selection' width='45' align='center'></el-table-column>
+                <el-table-column type='selection' :selectable='checkSelectable' width='45' align='center'></el-table-column>
                 <el-table-column prop='Name' :show-overflow-tooltip='true' label='项目' width='100'>
                     <template slot-scope='{row}'>{{row.Name||'--'}}</template>
                 </el-table-column>
-                <el-table-column prop='Num' label='数量'>
+                <el-table-column prop='Num' label='数量' align='right'>
                     <template slot-scope='{row}'>
                         <span v-if='row.Num || row.Num==0'>{{row.Num}}</span>
                         <span v-else-if='row.Num==null'></span>
@@ -64,7 +64,7 @@
             </div>
             <div class='remark' v-if='remarksText'>
                 <span class='remark-title'>注:</span>
-                <div :key='key' v-html='remarksText' class='remark-text'></div>
+                <div :key='Date.now()' v-html='remarksText' class='remark-text'></div>
             </div>
         </div>
     </div>
@@ -78,13 +78,21 @@ export default {
         return {
             swich: true,
             multipleSelection: [],
-            key: 0
+            key: 0,
         }
     },
     methods: {
+        // 所属分类 非图例 默认不能勾选
+        checkSelectable(row, index) {
+            let flag = false
+            if (row.Type != 'None') {
+                flag = true
+            }
+            return flag
+        },
         handleSelectionChange(val) {
             this.multipleSelection = val
-            const tempArr = val.map(t => {
+            const tempArr = val.map((t) => {
                 return t.GraphElementId
             })
             bus.$emit('changeShow', tempArr)
@@ -93,25 +101,33 @@ 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
+        // } else {
+        //     return this.remarksText
+        // }
+        // }
     },
     mounted() {},
-    watch: {
-        '$store.state.remarksText': {
-            handler(oVal, nVal) {
-                if (oVal != nVal) {
-                    this.key++
-                }
-            },
-            deep: true
-        }
-    }
+    updated() {
+        this.setSelected()
+    },
+    created() {},
 }
 </script>
 <style lang="less" scoped>
@@ -143,6 +159,7 @@ export default {
         .remark-text {
             white-space: normal;
             word-break: break-all;
+
             p {
                 padding: 0;
             }
@@ -163,6 +180,15 @@ export default {
 }
 </style>
 <style lang="less">
+.view-lengend-current {
+    ol {
+        list-style: decimal !important;
+        padding-left: 1.5em;
+        li {
+            list-style: decimal !important;
+        }
+    }
+}
 .views {
     .el-input--mini .el-input__inner {
         width: 50px;
@@ -184,6 +210,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>
 

+ 230 - 0
src/directives/dom.js

@@ -0,0 +1,230 @@
+/* istanbul ignore next */
+
+import Vue from 'vue'
+
+const isServer = Vue.prototype.$isServer
+const SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g
+const MOZ_HACK_REGEXP = /^moz([A-Z])/
+const ieVersion = isServer ? 0 : Number(document.documentMode)
+
+/* istanbul ignore next */
+const trim = function(string) {
+    return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, '')
+}
+/* istanbul ignore next */
+const camelCase = function(name) {
+    return name
+        .replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) {
+            return offset ? letter.toUpperCase() : letter
+        })
+        .replace(MOZ_HACK_REGEXP, 'Moz$1')
+}
+
+/* istanbul ignore next */
+export const on = (function() {
+    if (!isServer && document.addEventListener) {
+        return function(element, event, handler) {
+            if (element && event && handler) {
+                element.addEventListener(event, handler, false)
+            }
+        }
+    } else {
+        return function(element, event, handler) {
+            if (element && event && handler) {
+                element.attachEvent('on' + event, handler)
+            }
+        }
+    }
+})()
+
+/* istanbul ignore next */
+export const off = (function() {
+    if (!isServer && document.removeEventListener) {
+        return function(element, event, handler) {
+            if (element && event) {
+                element.removeEventListener(event, handler, false)
+            }
+        }
+    } else {
+        return function(element, event, handler) {
+            if (element && event) {
+                element.detachEvent('on' + event, handler)
+            }
+        }
+    }
+})()
+
+/* istanbul ignore next */
+export const once = function(el, event, fn) {
+    var listener = function() {
+        if (fn) {
+            fn.apply(this, arguments)
+        }
+        off(el, event, listener)
+    }
+    on(el, event, listener)
+}
+
+/* istanbul ignore next */
+export function hasClass(el, cls) {
+    if (!el || !cls) return false
+    if (cls.indexOf(' ') !== -1) throw new Error('className should not contain space.')
+    if (el.classList) {
+        return el.classList.contains(cls)
+    } else {
+        return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1
+    }
+}
+
+/* istanbul ignore next */
+export function addClass(el, cls) {
+    if (!el) return
+    var curClass = el.className
+    var classes = (cls || '').split(' ')
+
+    for (var i = 0, j = classes.length; i < j; i++) {
+        var clsName = classes[i]
+        if (!clsName) continue
+
+        if (el.classList) {
+            el.classList.add(clsName)
+        } else if (!hasClass(el, clsName)) {
+            curClass += ' ' + clsName
+        }
+    }
+    if (!el.classList) {
+        el.className = curClass
+    }
+}
+
+/* istanbul ignore next */
+export function removeClass(el, cls) {
+    if (!el || !cls) return
+    var classes = cls.split(' ')
+    var curClass = ' ' + el.className + ' '
+
+    for (var i = 0, j = classes.length; i < j; i++) {
+        var clsName = classes[i]
+        if (!clsName) continue
+
+        if (el.classList) {
+            el.classList.remove(clsName)
+        } else if (hasClass(el, clsName)) {
+            curClass = curClass.replace(' ' + clsName + ' ', ' ')
+        }
+    }
+    if (!el.classList) {
+        el.className = trim(curClass)
+    }
+}
+
+/* istanbul ignore next */
+export const getStyle =
+    ieVersion < 9
+        ? function(element, styleName) {
+              if (isServer) return
+              if (!element || !styleName) return null
+              styleName = camelCase(styleName)
+              if (styleName === 'float') {
+                  styleName = 'styleFloat'
+              }
+              try {
+                  switch (styleName) {
+                      case 'opacity':
+                          try {
+                              return element.filters.item('alpha').opacity / 100
+                          } catch (e) {
+                              return 1.0
+                          }
+                      default:
+                          return element.style[styleName] || element.currentStyle ? element.currentStyle[styleName] : null
+                  }
+              } catch (e) {
+                  return element.style[styleName]
+              }
+          }
+        : function(element, styleName) {
+              if (isServer) return
+              if (!element || !styleName) return null
+              styleName = camelCase(styleName)
+              if (styleName === 'float') {
+                  styleName = 'cssFloat'
+              }
+              try {
+                  var computed = document.defaultView.getComputedStyle(element, '')
+                  return element.style[styleName] || computed ? computed[styleName] : null
+              } catch (e) {
+                  return element.style[styleName]
+              }
+          }
+
+/* istanbul ignore next */
+export function setStyle(element, styleName, value) {
+    if (!element || !styleName) return
+
+    if (typeof styleName === 'object') {
+        for (var prop in styleName) {
+            if (styleName.hasOwnProperty(prop)) {
+                setStyle(element, prop, styleName[prop])
+            }
+        }
+    } else {
+        styleName = camelCase(styleName)
+        if (styleName === 'opacity' && ieVersion < 9) {
+            element.style.filter = isNaN(value) ? '' : 'alpha(opacity=' + value * 100 + ')'
+        } else {
+            element.style[styleName] = value
+        }
+    }
+}
+
+export const isScroll = (el, vertical) => {
+    if (isServer) return
+
+    const determinedDirection = vertical !== null || vertical !== undefined
+    const overflow = determinedDirection ? (vertical ? getStyle(el, 'overflow-y') : getStyle(el, 'overflow-x')) : getStyle(el, 'overflow')
+
+    return overflow.match(/(scroll|auto)/)
+}
+
+export const getScrollContainer = (el, vertical) => {
+    if (isServer) return
+
+    let parent = el
+    while (parent) {
+        if ([window, document, document.documentElement].includes(parent)) {
+            return window
+        }
+        if (isScroll(parent, vertical)) {
+            return parent
+        }
+        parent = parent.parentNode
+    }
+
+    return parent
+}
+
+export const isInContainer = (el, container) => {
+    if (isServer || !el || !container) return false
+
+    const elRect = el.getBoundingClientRect()
+    let containerRect
+
+    if ([window, document, document.documentElement, null, undefined].includes(container)) {
+        containerRect = {
+            top: 0,
+            right: window.innerWidth,
+            bottom: window.innerHeight,
+            left: 0,
+        }
+    } else {
+        containerRect = container.getBoundingClientRect()
+    }
+
+    return (
+        elRect.top < containerRect.bottom &&
+        elRect.bottom > containerRect.top &&
+        elRect.right > containerRect.left &&
+        elRect.left < containerRect.right
+    )
+}

+ 24 - 0
src/directives/repeat-click.js

@@ -0,0 +1,24 @@
+import { once, on } from './dom'
+
+export default {
+    bind(el, binding, vnode) {
+        let interval = null
+        let startTime
+        const handler = () => vnode.context[binding.expression].apply()
+        const clear = () => {
+            if (Date.now() - startTime < 100) {
+                handler()
+            }
+            clearInterval(interval)
+            interval = null
+        }
+
+        on(el, 'mousedown', (e) => {
+            if (e.button !== 0) return
+            startTime = Date.now()
+            once(document, 'mouseup', clear)
+            clearInterval(interval)
+            interval = setInterval(handler, 100)
+        })
+    },
+}

+ 6 - 6
src/lib/FloorScene.js

@@ -11,12 +11,12 @@ import {
 export class FloorScene extends SGraphScene {
   constructor() {
     super()
-    ItemColor.spaceColor = new SColor("#A4ABB22B")
-    ItemColor.wallColor = new SColor("#A7AEB3FF")
-    ItemColor.columnColor = new SColor("#A7AEB3FF")
-    ItemColor.virtualWallColor = new SColor("#A7AEB3FF")
-    ItemColor.selectColor = new SColor("#84A0BB2B")
-    ItemColor.spaceBorderColor = new SColor("#A7AEB3FF")
+    ItemColor.spaceColor = new SColor("#f0f0f0")
+    ItemColor.wallColor = new SColor("#d4d4d4")
+    ItemColor.columnColor = new SColor("#d4d4d4")
+    ItemColor.virtualWallColor = new SColor("#d4d4d4")
+    ItemColor.selectColor = new SColor("#f0f0f0")
+    ItemColor.spaceBorderColor = new SColor("#d4d4d4")
   }
 
   onDoubleClick() {

+ 0 - 86
src/lib/items/HighlightItem.js

@@ -1,86 +0,0 @@
-/*
- * ********************************************************************************************************************
- *
- *                      :*$@@%$*:                         ;:                ;;    ;;
- *                    :@@%!  :!@@%:                       %!             ;%%@@%$ =@@@@@@@%;     @%@@@%%%%@@@@@
- *                   :@%;       :$=                       %%$$$%$$         ;$$  ;$@=   !@$
- *                   =@!                                  %!              @ $=;%   !@@@%:      !$$$$$$$$$$$$$$=
- *                   =@*                                  %!              @ $= % %@=   =%@!      %=
- *              *$%%! @@=        ;=$%%%$*:                %!              @ $= % =%%%%%%@$      *%:         =%
- *            %@@!:    !@@@%=$@@@@%!  :*@@$:              %!              @ $= % $*     ;@      @*          :%*
- *          ;@@!          ;!!!;:         ;@%:      =======@%========*     @ $$ % $%*****$@     :@$=*********=@$
- *          $@*   ;@@@%=!:                *@*
- *          =@$    ;;;!=%@@@@=!           =@!
- *           %@$:      =@%: :*@@@*       %@=                    Copyright (c) 2016-2019.  北京上格云技术有限公司
- *            ;%@@$=$@@%*       *@@@$=%@@%;
- *               ::;::             ::;::                                              All rights reserved.
- *
- * ********************************************************************************************************************
- */
-import { SGraphItem } from "@saga-web/graph/lib";
-import { SColor, SLine, SPoint, SRect } from "@saga-web/draw/lib";
-import { ItemOrder, ItemColor } from '@saga-web/big/lib';
-/**
- * 吸附时高亮对象
- *
- * @author  郝建龙
- */
-export class HighlightItem extends SGraphItem {
-    /**
-     * 构造函数
-     *
-     * @param   parent  指向父对象
-     */
-    constructor(parent) {
-        super(parent);
-        /** 对象与鼠标位置距离   */
-        this.distance = 0;
-        /** 对象类型   */
-        this.type = 1;
-        /** 点对象数据-当吸附的为线时,此点为垂线与线段的交点   */
-        this._point = new SPoint();
-        /** 点对象数据   */
-        this._line = new SLine();
-        this.visible = false;
-        this.zOrder = ItemOrder.highLightOrder;
-    } // Constructor
-    get point() {
-        return this._point;
-    } // Get point
-    set point(v) {
-        this._point = v;
-        this.type = 1;
-        this.update();
-    } // Set point
-    get line() {
-        return this._line;
-    } // Get line
-    set line(v) {
-        this._line = v;
-        this.type = 2;
-        this.update();
-    } // Set line
-    /**
-     * Item对象边界区域
-     *
-     * @return	SRect
-     */
-    boundingRect() {
-        return new SRect(this.point.x, this.point.y, 10, 10);
-    } // Function boundingRect()
-    /**
-     * Item绘制操作
-     *
-     * @param   painter painter对象
-     */
-    onDraw(painter) {
-        if (this.type == 2) {
-            painter.pen.color = ItemColor.highLightLineColor;
-            painter.pen.lineWidth = painter.toPx(6);
-            painter.drawLine(this.line);
-        }
-        painter.pen.color = SColor.Transparent;
-        painter.brush.color = ItemColor.highLightPointColor;
-        painter.drawCircle(this.point.x, this.point.y, painter.toPx(5));
-    } // Function onDraw()
-} // Class HighlightItem

+ 273 - 0
src/lib/items/SCustomLegendItem.ts

@@ -0,0 +1,273 @@
+
+import { SGraphItem, SLineStyle, STextOrigin } from "@saga-web/graph/lib";
+import { Legend } from '../types/Legend';
+import { SPainter, SColor, SFont, SPoint, SLineCapStyle } from "@saga-web/draw";
+import { STextItem } from '@saga-web/graph/lib';
+import { hexify, uuid } from "@/components/mapClass/until"
+import { SItemStatus, ItemOrder, SPolygonItem } from '@saga-web/big/lib';
+import { SMouseEvent } from "@saga-web/base/lib";
+/**
+ * 图例节点Item(区域类型)
+ *
+ * * @author  张宇(taohuzy@163.com)
+ */
+export class SCustomLegendItem extends SPolygonItem {
+    /** 图例节点对象数据 */
+    data: Legend;
+
+    /** text item   */
+    textItem: STextItem = new STextItem(this);
+
+    get text(): string {
+        return this.textItem.text;
+    }
+    set text(v: string) {
+        this.textItem.text = v;
+        this.update();
+    }
+    get color(): SColor {
+        return this.textItem.color;
+    }
+    set color(v: SColor) {
+        this.textItem.color = v;
+    }
+    get font(): SFont {
+        return this.textItem.font;
+    }
+    set font(v: SFont) {
+        this.textItem.font = v;
+    }
+
+    get status(): SItemStatus {
+        return this._status;
+    }
+    // 编辑当前状态
+    set status(value: SItemStatus) {
+        this._status = value;
+        // 如果状态为show则需清栈
+        if (value == SItemStatus.Normal) {
+            // 切换显示状态显示文本
+            this.showText = true;
+            // 切换显示状态不可移动文本
+            this.textItem.moveable = false;
+
+            if (this.undoStack) {
+                this.undoStack.clear();
+            }
+        } else if (value == SItemStatus.Edit) {
+            // 切换编辑状态显示文本
+            this.showText = true;
+            // 切换编辑状态可移动文本
+            this.textItem.moveable = true;
+        } else if (value == SItemStatus.Create) {
+            // 切换创建状态不显示文本
+            this.showText = false;
+            // 切换创建状态不可移动文本
+            this.textItem.moveable = false;
+        }
+        this.update();
+    };
+
+    /** 是否激活  */
+    _isActive: boolean = false;
+    get isActive(): boolean {
+        return this._isActive;
+    } // Get isActive
+    set isActive(v: boolean) {
+        this._isActive = v;
+        if (v) {
+            this.cursor = "pointer";
+            this.textItem.cursor = "pointer";
+        } else {
+            this.cursor = "auto";
+            this.textItem.cursor = "auto";
+        }
+        this.update();
+    } // Set isActive
+
+    /** 是否显示文字  */
+    _showText: boolean = true;
+    get showText(): boolean {
+        return this._showText;
+    }
+    set showText(v: boolean) {
+        if (v === this._showText) {
+            return
+        }
+        this._showText = v;
+        if (v) {
+            this.textItem.show();
+        } else {
+            this.textItem.hide();
+        }
+    }
+
+    /** 是否蒙版遮罩  */
+    _maskFlag: boolean = false;
+    get maskFlag(): boolean {
+        return this._maskFlag;
+    }
+    set maskFlag(v: boolean) {
+        if (v === this._maskFlag) {
+            return
+        }
+        this._maskFlag = v;
+        this.update()
+    }
+
+    /**
+     * 构造函数
+     *
+     * @param parent    指向父对象
+     * @param data      图例节点对象数据
+     */
+    constructor(parent: SGraphItem | null, data: Legend) {
+        super(parent);
+        this.textItem.originPosition = STextOrigin.Centrum;
+        this.textItem.isTransform = false;
+        this.zOrder = ItemOrder.polygonOrder;
+        this.data = data;
+        if (!data.ID) {
+            data.ID = uuid()
+        }
+        this.id = data.ID;
+        this.name = data.Name;
+        this.text = data.Name;
+        if (data) {
+            this.setPointList = [];
+            let setPointList: SPoint[];
+            if (data.OutLine) {
+                if (data.OutLine[0] instanceof SPoint) {
+                    // @ts-ignore
+                    this.setPointList = data.OutLine;
+                } else {
+                    setPointList = data.OutLine.map(i => {
+                        return (new SPoint(i.X, i.Y))
+                    })
+                    this.setPointList = setPointList;
+                }
+            }
+            if (data.Properties.Zorder) {
+                this.zOrder = data.Properties.Zorder;
+            }
+            // 设置线宽
+            if (data.Properties.LineWidth) {
+                this.lineWidth = data.Properties.LineWidth;
+            }
+            if (data.Properties.StrokeColor) {
+                this.strokeColor = data.Properties.StrokeColor.includes('#') ? new SColor(data.Properties.StrokeColor) : new SColor(hexify(data.Properties.StrokeColor));
+            }
+            if (data.Properties.FillColor) {
+                this.fillColor = data.Properties.FillColor.includes('#') ? new SColor(data.Properties.FillColor) : new SColor(hexify(data.Properties.FillColor))
+            }
+            if (data.Properties.TextPos) {
+                this.textItem.moveTo(data.Properties.TextPos.X, data.Properties.TextPos.Y);
+            }
+            if (data.Properties.color) {
+                this.color = new SColor(data.Properties.color);
+            }
+            if (data.Properties.font) {
+                this.font = new SFont("sans-serif", data.Properties.font);
+            }
+            if (data.Properties && data.Properties.IsActive) {
+                this.isActive = data.Properties.IsActive;
+            }
+            if (data.AttachObjectIds && data.AttachObjectIds.length) {
+                this.isActive = true;
+            }
+            switch (data.Properties.LineDash) {
+                case "solid":
+                    this.lineStyle = SLineStyle.Solid;
+                    break;
+                case "dotted":
+                    this.lineStyle = SLineStyle.Dotted;
+                    break;
+                case "dashed":
+                    this.lineStyle = SLineStyle.Dashed;
+                    break;
+                default:
+                    this.lineStyle = SLineStyle.Solid;
+            }
+        }
+        // 监听多边形创建完成事件,并动态计算文本位置
+        this.connect("finishCreated", this, () => {
+            // 计算文本位置
+            let x: number = this.getPointList.reduce((pre, cur, index, arr) => {
+                return pre + (cur.x / arr.length)
+            }, 0),
+                y: number = this.getPointList.reduce((pre, cur, index, arr) => {
+                    return pre + (cur.y / arr.length)
+                }, 0);
+            this.textItem.moveTo(x, y);
+        })
+    }
+
+    /**
+     * 鼠标按下事件
+     *
+     * @param   event   保存事件参数
+     * @return  boolean
+     */
+    onMouseDown(event: SMouseEvent): boolean {
+        if (event.buttons == 1)
+        this.$emit("legendItemClick", event);
+        return super.onMouseDown(event);
+    } // Function onMouseDown()
+
+    toData(): any {
+        this.data.Pos = { X: this.x, Y: this.y };
+        this.data.Name = this.name;
+        this.data.Properties.Zorder = this.zOrder;
+        this.data.Properties.FillColor = this.fillColor.value;
+        this.data.Properties.StrokeColor = this.strokeColor.value;
+        this.data.Properties.LineWidth = this.lineWidth;
+        switch (this.lineStyle) {
+            case SLineStyle.Solid:
+                this.data.Properties.LineDash = "solid";
+                break;
+            case SLineStyle.Dotted:
+                this.data.Properties.LineDash = "dotted";
+                break;
+            case SLineStyle.Dashed:
+                this.data.Properties.LineDash = "dashed";
+                break;
+            default:
+                this.data.Properties.LineDash = "solid";
+        }
+        this.data.OutLine = this.getPointList.map(pos => {
+            return {
+                X: pos.x,
+                Y: pos.y
+            }
+        });
+        this.data.Properties.TextPos = {X: this.textItem.x, Y: this.textItem.y};
+        this.data.Properties.font =  this.font.size;
+        this.data.Properties.color =  this.color.value;
+        this.data.Properties.IsActive = this.isActive;
+        return this.data;
+    }
+
+    onDraw(painter: SPainter) {
+        if (this.maskFlag && this.status == SItemStatus.Normal) {
+            let color = new SColor(this.strokeColor)
+            color.alpha = color.alpha / 5
+            let brushcolor = new SColor(this.fillColor)
+            brushcolor.alpha = brushcolor.alpha / 5
+            painter.pen.color = color
+            painter.pen.lineCapStyle = SLineCapStyle.Square
+            painter.pen.lineWidth = painter.toPx(this.lineWidth)
+            painter.brush.color = brushcolor
+            if (this.selected) {
+                painter.pen.lineWidth = painter.toPx(this.lineWidth * 2);
+                painter.shadow.shadowBlur = 10;
+                painter.shadow.shadowColor = new SColor(`#00000033`);
+                painter.shadow.shadowOffsetX = 5;
+                painter.shadow.shadowOffsetY = 5;
+            }
+            // @ts-ignore
+            painter.drawPolygon([...this.pointList]);
+        } else {
+            super.onDraw(painter);
+        }
+    }
+} // Class SZoneLegendItem

+ 0 - 188
src/lib/items/SFHFQZoneLegendItem.js

@@ -1,188 +0,0 @@
-import { SColor, SFont, SPoint, SLineCapStyle } from '@saga-web/draw'
-import { STextItem } from '@saga-web/graph/lib'
-import { hexify } from '@/components/mapClass/until'
-import { SItemStatus, ItemOrder, SPolygonItem } from '@saga-web/big/lib'
-/**
- *图例节点Item(区域类型 --防火分区)
- *
- * * @author  张宇(taohuzy@163.com)
- */
-export class SFHFQZoneLegendItem extends SPolygonItem {
-    /**
-     * 构造函数
-     *
-     * @param parent    指向父对象
-     * @param data      图例节点对象数据
-     */
-    constructor(parent, data) {
-        super(parent)
-        /** text item   */
-        this.textItem = new STextItem(this)
-        /** 是否显示文字  */
-        this._showText = true
-        /** 是否蒙版遮罩  */
-        this._maskFlag = false
-        this.textItem.isTransform = false
-        this.zOrder = ItemOrder.polygonOrder
-        this.data = data
-        this.id = data.ID
-        this.name = data.Name
-        this.text = data.Name
-        if (data) {
-            this.setPointList = []
-            let setPointList
-            if (data.OutLine) {
-                if (data.OutLine[0] instanceof SPoint) {
-                    this.setPointList = data.OutLine
-                } else {
-                    setPointList = data.OutLine.map((i) => {
-                        return new SPoint(i.X, i.Y)
-                    })
-                    this.setPointList = setPointList
-                }
-            }
-            // 设置线宽
-            if (data.Properties.LineWidth) {
-                this.lineWidth = data.Properties.LineWidth
-            }
-            if (data.Properties.StrokeColor) {
-                this.strokeColor = data.Properties.StrokeColor.includes('#')
-                    ? new SColor(data.Properties.StrokeColor)
-                    : new SColor(hexify(data.Properties.StrokeColor))
-            }
-            if (data.Properties.FillColor) {
-                this.fillColor = data.Properties.FillColor.includes('#')
-                    ? new SColor(data.Properties.FillColor)
-                    : new SColor(hexify(data.Properties.FillColor))
-            }
-            if (data.Properties.TextPos) {
-                this.textItem.moveTo(data.Properties.TextPos.X, data.Properties.TextPos.Y)
-            }
-            if (data.Properties.color) {
-                this.color = new SColor(data.Properties.color)
-            }
-            if (data.Properties.font) {
-                this.font = new SFont('sans-serif', data.Properties.font)
-            }
-            //    if( data.Properties.LineDash){
-            //     this.LineDash =this._legend.Properties.LineDash
-            //    }
-        }
-        // 监听多边形创建完成事件,并动态计算文本位置
-        this.connect('finishCreated', this, () => {
-            // 计算文本位置
-            let x = this.getPointList.reduce((pre, cur, index, arr) => {
-                    return pre + cur.x / arr.length
-                }, 0),
-                y = this.getPointList.reduce((pre, cur, index, arr) => {
-                    return pre + cur.y / arr.length
-                }, 0)
-            this.textItem.moveTo(x, y)
-        })
-    }
-    get text() {
-        return this.textItem.text
-    }
-    set text(v) {
-        this.textItem.text = v
-        this.update()
-    }
-    get color() {
-        return this.textItem.color
-    }
-    set color(v) {
-        this.textItem.color = v
-    }
-    get font() {
-        return this.textItem.font
-    }
-    set font(v) {
-        this.textItem.font = v
-    }
-    get status() {
-        return this._status
-    }
-    // 编辑当前状态
-    set status(value) {
-        this._status = value
-        // 如果状态为show则需清栈
-        if (value == SItemStatus.Normal) {
-            // 切换显示状态显示文本
-            this.showText = true
-            // 切换显示状态不可移动文本
-            this.textItem.moveable = false
-            if (this.undoStack) {
-                this.undoStack.clear()
-            }
-        } else if (value == SItemStatus.Edit) {
-            // 切换编辑状态显示文本
-            this.showText = true
-            // 切换编辑状态可移动文本
-            this.textItem.moveable = true
-        } else if (value == SItemStatus.Create) {
-            // 切换创建状态不显示文本
-            this.showText = false
-            // 切换创建状态不可移动文本
-            this.textItem.moveable = false
-        }
-        this.update()
-    }
-    get showText() {
-        return this._showText
-    }
-    set showText(v) {
-        if (v === this._showText) {
-            return
-        }
-        this._showText = v
-        if (v) {
-            this.textItem.show()
-        } else {
-            this.textItem.hide()
-        }
-    }
-    get maskFlag() {
-        return this._maskFlag
-    }
-    set maskFlag(v) {
-        if (v === this._maskFlag) {
-            return
-        }
-        this._maskFlag = v
-        this.update()
-    }
-    toData() {
-        this.data.Pos = { X: this.x, Y: this.y }
-        this.data.Name = this.name
-        this.data.Properties.FillColor = this.fillColor.value
-        this.data.Properties.StrokeColor = this.strokeColor.value
-        this.data.Properties.LineWidth = this.lineWidth
-        this.data.OutLine = this.getPointList.map((pos) => {
-            return {
-                X: pos.x,
-                Y: pos.y,
-            }
-        })
-        this.data.Properties.TextPos = { X: this.textItem.x, Y: this.textItem.y }
-        this.data.Properties.font = this.font.size
-        this.data.Properties.color = this.color.value
-        return this.data
-    }
-    onDraw(painter) {
-        if (this.maskFlag && this.status == SItemStatus.Normal) {
-            let color = new SColor(this.strokeColor)
-            color.alpha = color.alpha / 2
-            let brushcolor = new SColor(this.fillColor)
-            brushcolor.alpha = brushcolor.alpha / 2
-            painter.pen.color = color
-            painter.pen.lineCapStyle = SLineCapStyle.Square
-            painter.pen.lineWidth = painter.toPx(this._lineWidth)
-            painter.brush.color = brushcolor
-            // @ts-ignore
-            painter.drawPolygon([...this.pointList])
-        } else {
-            this.selected = true
-            super.onDraw(painter)
-        }
-    }
-} // Class SZoneLegendItem

+ 142 - 98
src/lib/items/SFHFQZoneLegendItem.ts

@@ -1,33 +1,34 @@
-import { SGraphItem, SLineStyle } from '@saga-web/graph/lib'
-import { Legend } from '../types/Legend'
-import { SPainter, SColor, SFont, SPoint, SLineCapStyle } from '@saga-web/draw'
-import { STextItem } from '@saga-web/graph/lib'
-import { hexify } from '@/components/mapClass/until'
-import { SItemStatus, ItemOrder, SPolygonItem } from '@saga-web/big/lib'
+import { SGraphItem, SLineStyle, STextOrigin } from '@saga-web/graph/lib';
+import { Legend } from '../types/Legend';
+import { SPainter, SColor, SFont, SPoint, SLineCapStyle } from '@saga-web/draw';
+import { STextItem } from '@saga-web/graph/lib';
+import { hexify } from '@/components/mapClass/until';
+import { SItemStatus, ItemOrder, SPolygonItem } from '@saga-web/big/lib';
+import { SMouseEvent } from '@saga-web/base/lib';
 /**
- *图例节点Item(区域类型 --防火分区)
+ * 图例节点Item(区域类型 --防火分区)
  *
  * * @author  张宇(taohuzy@163.com)
  */
 export class SFHFQZoneLegendItem extends SPolygonItem {
     /** 图例节点对象数据 */
-    data: Legend
+    data: Legend;
 
     /** text item   */
-    textItem: STextItem = new STextItem(this)
+    textItem: STextItem = new STextItem(this);
 
     get text(): string {
-        return this.textItem.text
+        return this.textItem.text;
     }
     set text(v: string) {
-        this.textItem.text = v
-        this.update()
+        this.textItem.text = v;
+        this.update();
     }
     get color(): SColor {
-        return this.textItem.color
+        return this.textItem.color;
     }
     set color(v: SColor) {
-        this.textItem.color = v
+        this.textItem.color = v;
     }
     get font(): SFont {
         return this.textItem.font
@@ -37,62 +38,79 @@ export class SFHFQZoneLegendItem extends SPolygonItem {
     }
 
     get status(): SItemStatus {
-        return this._status
+        return this._status;
     }
     // 编辑当前状态
     set status(value: SItemStatus) {
-        this._status = value
+        this._status = value;
         // 如果状态为show则需清栈
         if (value == SItemStatus.Normal) {
             // 切换显示状态显示文本
-            this.showText = true
+            this.showText = true;
             // 切换显示状态不可移动文本
-            this.textItem.moveable = false
+            this.textItem.moveable = false;
 
             if (this.undoStack) {
-                this.undoStack.clear()
+                this.undoStack.clear();
             }
         } else if (value == SItemStatus.Edit) {
             // 切换编辑状态显示文本
-            this.showText = true
+            this.showText = true;
             // 切换编辑状态可移动文本
-            this.textItem.moveable = true
+            this.textItem.moveable = true;
         } else if (value == SItemStatus.Create) {
             // 切换创建状态不显示文本
-            this.showText = false
+            this.showText = false;
             // 切换创建状态不可移动文本
-            this.textItem.moveable = false
+            this.textItem.moveable = false;
         }
-        this.update()
-    }
+        this.update();
+    };
+
+    /** 是否激活  */
+    _isActive: boolean = false;
+    get isActive(): boolean {
+        return this._isActive;
+    } // Get isActive
+    set isActive(v: boolean) {
+        this._isActive = v;
+        if (v) {
+            this.cursor = "pointer";
+            this.textItem.cursor = "pointer";
+        } else {
+            this.cursor = "auto";
+            this.textItem.cursor = "auto";
+        }
+        this.update();
+    } // Set isActive
 
     /** 是否显示文字  */
-    _showText: boolean = true
+    _showText: boolean = true;
     get showText(): boolean {
-        return this._showText
+        return this._showText;
     }
     set showText(v: boolean) {
         if (v === this._showText) {
             return
         }
-        this._showText = v
+        this._showText = v;
         if (v) {
-            this.textItem.show()
+            this.textItem.show();
         } else {
-            this.textItem.hide()
+            this.textItem.hide();
         }
     }
 
     /** 是否蒙版遮罩  */
-    _maskFlag: boolean = false
+    _maskFlag: boolean = false;
     get maskFlag(): boolean {
-        return this._maskFlag
+        return this._maskFlag;
     }
     set maskFlag(v: boolean) {
         if (v === this._maskFlag) {
             return
         }
-        this._maskFlag = v
+        this._maskFlag = v;
         this.update()
     }
 
@@ -103,122 +121,148 @@ export class SFHFQZoneLegendItem extends SPolygonItem {
      * @param data      图例节点对象数据
      */
     constructor(parent: SGraphItem | null, data: Legend) {
-        super(parent)
-        this.textItem.isTransform = false
-        this.zOrder = ItemOrder.polygonOrder
-        this.data = data
-        this.id = data.ID
-        this.name = data.Name
-        this.text = data.Name
+        super(parent);
+        this.textItem.originPosition = STextOrigin.Centrum;
+        this.textItem.isTransform = false;
+        this.zOrder = ItemOrder.polygonOrder - 0.00005;
+        this.data = data;
+        this.id = data.ID;
+        this.name = data.Name;
+        this.text = data.Name;
         if (data) {
-            this.setPointList = []
-            let setPointList: SPoint[]
+            this.setPointList = [];
+            let setPointList: SPoint[];
             if (data.OutLine) {
                 if (data.OutLine[0] instanceof SPoint) {
-                    this.setPointList = data.OutLine
+                    this.setPointList = data.OutLine;
                 } else {
-                    setPointList = data.OutLine.map((i) => {
-                        return new SPoint(i.X, i.Y)
+                    setPointList = data.OutLine.map(i => {
+                        return (new SPoint(i.X, i.Y))
                     })
-                    this.setPointList = setPointList
+                    this.setPointList = setPointList;
                 }
             }
+            if (data.Properties.Zorder) {
+                this.zOrder = data.Properties.Zorder;
+            }
             // 设置线宽
             if (data.Properties.LineWidth) {
-                this.lineWidth = data.Properties.LineWidth
+                this.lineWidth = data.Properties.LineWidth;
             }
             if (data.Properties.StrokeColor) {
-                this.strokeColor = data.Properties.StrokeColor.includes('#')
-                    ? new SColor(data.Properties.StrokeColor)
-                    : new SColor(hexify(data.Properties.StrokeColor))
+                this.strokeColor = data.Properties.StrokeColor.includes('#') ? new SColor(data.Properties.StrokeColor) : new SColor(hexify(data.Properties.StrokeColor));
             }
             if (data.Properties.FillColor) {
-                this.fillColor = data.Properties.FillColor.includes('#')
-                    ? new SColor(data.Properties.FillColor)
-                    : new SColor(hexify(data.Properties.FillColor))
+                this.fillColor = data.Properties.FillColor.includes('#') ? new SColor(data.Properties.FillColor) : new SColor(hexify(data.Properties.FillColor));
             }
             if (data.Properties.TextPos) {
-                this.textItem.moveTo(data.Properties.TextPos.X, data.Properties.TextPos.Y)
+                this.textItem.moveTo(data.Properties.TextPos.X, data.Properties.TextPos.Y);
             }
             if (data.Properties.color) {
-                this.color = new SColor(data.Properties.color)
+                this.color = new SColor(data.Properties.color);
             }
             if (data.Properties.font) {
-                this.font = new SFont('sans-serif', data.Properties.font)
+                this.font = new SFont("sans-serif", data.Properties.font);
+            }
+            if (data.Properties && data.Properties.IsActive) {
+                this.isActive = data.Properties.IsActive;
+            }
+            if (data.AttachObjectIds && data.AttachObjectIds.length) {
+                this.isActive = true;
             }
             switch (data.Properties.LineDash) {
-                case 'solid':
-                    this.lineStyle = SLineStyle.Solid
-                    break
-                case 'dotted':
-                    this.lineStyle = SLineStyle.Dotted
-                    break
-                case 'dashed':
-                    this.lineStyle = SLineStyle.Dashed
-                    break
+                case "solid":
+                    this.lineStyle = SLineStyle.Solid;
+                    break;
+                case "dotted":
+                    this.lineStyle = SLineStyle.Dotted;
+                    break;
+                case "dashed":
+                    this.lineStyle = SLineStyle.Dashed;
+                    break;
                 default:
-                    this.lineStyle = SLineStyle.Solid
+                    this.lineStyle = SLineStyle.Solid;
             }
         }
         // 监听多边形创建完成事件,并动态计算文本位置
-        this.connect('finishCreated', this, () => {
+        this.connect("finishCreated", this, () => {
             // 计算文本位置
             let x: number = this.getPointList.reduce((pre, cur, index, arr) => {
-                    return pre + cur.x / arr.length
-                }, 0),
+                return pre + (cur.x / arr.length)
+            }, 0),
                 y: number = this.getPointList.reduce((pre, cur, index, arr) => {
-                    return pre + cur.y / arr.length
-                }, 0)
-            this.textItem.moveTo(x, y)
+                    return pre + (cur.y / arr.length)
+                }, 0);
+            this.textItem.moveTo(x, y);
         })
     }
 
+    /**
+     * 鼠标按下事件
+     *
+     * @param   event   保存事件参数
+     * @return  boolean
+     */
+    onMouseDown(event: SMouseEvent): boolean {
+        if (event.buttons == 1)
+        this.$emit("legendItemClick", event);
+        return super.onMouseDown(event);
+    } // Function onMouseDown()
+
     toData(): any {
-        this.data.Pos = { X: this.x, Y: this.y }
-        this.data.Name = this.name
-        this.data.Properties.FillColor = this.fillColor.value
-        this.data.Properties.StrokeColor = this.strokeColor.value
-        this.data.Properties.LineWidth = this.lineWidth
+        this.data.Pos = { X: this.x, Y: this.y };
+        this.data.Name = this.name;
+        this.data.Properties.Zorder = this.zOrder;
+        this.data.Properties.FillColor = this.fillColor.value;
+        this.data.Properties.StrokeColor = this.strokeColor.value;
+        this.data.Properties.LineWidth = this.lineWidth;
         switch (this.lineStyle) {
             case SLineStyle.Solid:
-                this.data.Properties.LineDash = 'solid'
-                break
+                this.data.Properties.LineDash = "solid";
+                break;
             case SLineStyle.Dotted:
-                this.data.Properties.LineDash = 'dotted'
-                break
+                this.data.Properties.LineDash = "dotted";
+                break;
             case SLineStyle.Dashed:
-                this.data.Properties.LineDash = 'dashed'
-                break
+                this.data.Properties.LineDash = "dashed";
+                break;
             default:
-                this.data.Properties.LineDash = 'solid'
+                this.data.Properties.LineDash = "solid";
         }
-        this.data.OutLine = this.getPointList.map((pos) => {
+        this.data.OutLine = this.getPointList.map(pos => {
             return {
                 X: pos.x,
-                Y: pos.y,
+                Y: pos.y
             }
-        })
-        this.data.Properties.TextPos = { X: this.textItem.x, Y: this.textItem.y }
-        this.data.Properties.font = this.font.size
-        this.data.Properties.color = this.color.value
-        return this.data
+        });
+        this.data.Properties.TextPos = {X: this.textItem.x, Y: this.textItem.y};
+        this.data.Properties.font =  this.font.size;
+        this.data.Properties.color =  this.color.value;
+        this.data.Properties.IsActive = this.isActive;
+        return this.data;
     }
 
     onDraw(painter: SPainter) {
         if (this.maskFlag && this.status == SItemStatus.Normal) {
             let color = new SColor(this.strokeColor)
-            color.alpha = color.alpha / 2
+            color.alpha = color.alpha / 5
             let brushcolor = new SColor(this.fillColor)
-            brushcolor.alpha = brushcolor.alpha / 2
+            brushcolor.alpha = brushcolor.alpha / 5
             painter.pen.color = color
             painter.pen.lineCapStyle = SLineCapStyle.Square
-            painter.pen.lineWidth = painter.toPx(this._lineWidth)
+            painter.pen.lineWidth = painter.toPx(this.lineWidth)
             painter.brush.color = brushcolor
+            if (this.selected) {
+                painter.pen.lineWidth = painter.toPx(this.lineWidth * 2);
+                painter.shadow.shadowBlur = 10;
+                painter.shadow.shadowColor = new SColor(`#00000033`);
+                painter.shadow.shadowOffsetX = 5;
+                painter.shadow.shadowOffsetY = 5;
+            }
             // @ts-ignore
-            painter.drawPolygon([...this.pointList])
+            painter.drawPolygon([...this.pointList]);
         } else {
-            this.selected = true
-            super.onDraw(painter)
+            super.onDraw(painter);
         }
     }
-} // Class SZoneLegendItem
+} // Class SFHFQZoneLegendItem

+ 0 - 107
src/lib/items/SImageLegendItem.js

@@ -1,107 +0,0 @@
-import { SIconTextItem } from '@saga-web/big/lib/items/SIconTextItem';
-import { ItemOrder } from '@saga-web/big/lib';
-import { SFont, SColor } from '@saga-web/draw/lib';
-/**
- * 图例节点Item(图标类型)
- *
- * * @author  张宇(taohuzy@163.com)
- */
-export class SImageLegendItem extends SIconTextItem {
-    /**
-     * 构造函数
-     *
-     * @param parent    指向父对象
-     * @param data      图例节点对象数据
-     */
-    constructor(parent, data) {
-        super(parent, data.AnchorList);
-        /** 图例数量 */
-        this._num = 1;
-        this.isTransform = false;
-        this.zOrder = ItemOrder.markOrder;
-        this.data = data;
-        this.id = data.ID;
-        this.name = data.Name;
-        this.moveTo(data.Pos.X, data.Pos.Y);
-        if (data.Num) {
-            this._num = data.Num;
-        }
-        if (data.Size) {
-            this.width = data.Size.Width;
-            this.height = data.Size.Height;
-        }
-        if (data.Num) {
-            this.text = `${data.Name}${data.Num > 1 ? ` × ${data.Num}` : ''}`;
-        }
-        if (data.Properties && data.Properties.Url) {
-            this.img.url = data.Properties.Url;
-        }
-        if (data.Properties.ImgPos) {
-            this.img.moveTo(data.Properties.ImgPos.X, data.Properties.ImgPos.Y);
-        }
-        if (data.Properties.TextPos) {
-            this.textItem.moveTo(data.Properties.TextPos.X, data.Properties.TextPos.Y);
-        }
-        if (data.Properties && data.Properties.sWidth) {
-            this.sWidth = data.Properties.sWidth;
-        }
-        if (data.Properties && data.Properties.sHeight) {
-            this.sHeight = data.Properties.sHeight;
-        }
-        if (data.Properties && data.Properties.font) {
-            this.font = new SFont("sans-serif", data.Properties.font);
-        }
-        if (data.Properties && data.Properties.color) {
-            this.color = new SColor(data.Properties.color);
-        }
-        if (data.Properties && data.Properties.IsActive) {
-            this.isActive = data.Properties.IsActive;
-        }
-        if (data.AttachObjectIds && data.AttachObjectIds.length) {
-            this.isActive = true;
-        }
-        if (data.Properties && data.Properties.FrameColor) {
-            this.activeColor = new SColor(data.Properties.FrameColor);
-        }
-    }
-    get num() {
-        return this._num;
-    }
-    set num(v) {
-        if (v) {
-            this._num = v;
-            this.data.Num = v;
-        }
-        else {
-            this._num = 1;
-            this.data.Num = 1;
-        }
-        this.data.Properties.Num = this._num;
-        this.text = `${this.data.Name}${this.data.Num > 1 ? ` × ${this.data.Num}` : ''}`;
-        this.update();
-    }
-    toData() {
-        this.data.Pos = { X: this.x, Y: this.y };
-        this.data.Size = { Width: this.width, Height: this.height };
-        this.data.Name = this.name;
-        this.data.Properties.Url = this.img.url;
-        this.data.Properties.TextPos = { X: this.textItem.x, Y: this.textItem.y };
-        this.data.Properties.ImgPos = { X: this.img.x, Y: this.img.y };
-        this.data.Properties.sWidth = this.sWidth;
-        this.data.Properties.sHeight = this.sHeight;
-        this.data.Properties.font = this.font.size;
-        this.data.Properties.color = this.color.value;
-        this.data.Properties.FrameColor = this.activeColor.value;
-        this.data.Properties.IsActive = this.isActive;
-        this.data.AnchorList = this.anchorList.map(t => {
-            return {
-                ID: t.id,
-                Pos: {
-                    X: t.x,
-                    Y: t.y
-                }
-            };
-        });
-        return this.data;
-    }
-} // Class SImageLegendItem

+ 130 - 56
src/lib/items/SImageLegendItem.ts

@@ -1,8 +1,9 @@
-import { SGraphItem } from '@saga-web/graph/lib'
-import { SIconTextItem } from '@saga-web/big/lib/items/SIconTextItem'
-import { Legend } from '../types/Legend'
-import { ItemOrder } from '@saga-web/big/lib'
-import { SFont, SColor } from '@saga-web/draw/lib'
+import { SGraphItem } from "@saga-web/graph/lib";
+import { SIconTextItem } from '@saga-web/big/lib/items/SIconTextItem';
+import { Legend } from '../types/Legend';
+import { ItemOrder, SItemStatus } from '@saga-web/big/lib';
+import { SFont, SColor, SPainter, SRect } from '@saga-web/draw/lib';
+import { SMouseEvent } from "@saga-web/base/lib";
 /**
  * 图例节点Item(图标类型)
  *
@@ -10,22 +11,50 @@ import { SFont, SColor } from '@saga-web/draw/lib'
  */
 export class SImageLegendItem extends SIconTextItem {
     /** 图例节点对象数据 */
-    data: Legend
+    data: Legend;
     /** 图例数量 */
-    _num: number = 1
+    _num: number = 1;
     get num(): number {
-        return this._num
+        return this._num;
     }
     set num(v: number) {
         if (v) {
-            this._num = v
-            this.data.Num = v
+            this._num = v;
+            this.data.Num = v;
         } else {
-            this._num = 1
-            this.data.Num = 1
+            this._num = 1;
+            this.data.Num = 1;
+        }
+        this.data.Properties.Num = this._num;
+        this.textItem.text = `${this.name}${this.num > 1 ? `×${this.num}` : ''}`;
+        this.update();
+    }
+
+    get text(): string {
+        return this.textItem.text;
+    }
+    set text(v: string) {
+        this.name = v;
+        this.data.Name = v;
+        this.textItem.text = `${this.name}${this.num > 1 ? `×${this.num}` : ''}`;
+        this.update();
+    }
+
+     /** 是否蒙版遮罩  */
+    _maskFlag: boolean = false;
+    get maskFlag(): boolean {
+        return this._maskFlag;
+    }
+    set maskFlag(v: boolean) {
+        if (v === this._maskFlag) {
+        return
+        }
+        this._maskFlag = v;
+        if (v) {
+            this.textItem.visible = false;
+        } else {
+            this.textItem.visible = true;
         }
-        this.data.Properties.Num = this._num
-        this.text = `${this.data.Name}${this.data.Num > 1 ? ` × ${this.data.Num}` : ''}`
         this.update()
     }
 
@@ -36,77 +65,122 @@ export class SImageLegendItem extends SIconTextItem {
      * @param data      图例节点对象数据
      */
     constructor(parent: SGraphItem | null, data: Legend) {
-        super(parent, data.AnchorList)
-        this.isTransform = false
-        this.zOrder = ItemOrder.markOrder
-        this.data = data
-        this.id = data.ID
-        this.name = data.Name
-        this.moveTo(data.Pos.X, data.Pos.Y)
+        super(parent, data.AnchorList);
+        this.isTransform = false;
+        this.zOrder = ItemOrder.markOrder;
+        this.data = data;
+        this.id = data.ID;
+        this.name = data.Name;
+        this.text = data.Name;
+        this.moveTo(data.Pos.X, data.Pos.Y);
         if (data.Num) {
-            this._num = data.Num
+            this.num = data.Num;
         }
         if (data.Size) {
-            this.width = data.Size.Width
-            this.height = data.Size.Height
+            this.width = data.Size.Width;
+            this.height = data.Size.Height;
         }
-        if (data.Num) {
-            this.text = `${data.Name}${data.Num > 1 ? ` × ${data.Num}` : ''}`
+        if (data.Properties.Zorder) {
+            this.zOrder = data.Properties.Zorder;
         }
         if (data.Properties && data.Properties.Url) {
-            this.img.url = data.Properties.Url
+            this.img.url = data.Properties.Url;
         }
-        if (data.Properties.ImgPos) {
-            this.img.moveTo(data.Properties.ImgPos.X, data.Properties.ImgPos.Y)
+        if (data.Properties && data.Properties.Size && data.Properties.Size.Width) {
+            this.sWidth = data.Properties.Size.Width;
         }
-        if (data.Properties.TextPos) {
-            this.textItem.moveTo(data.Properties.TextPos.X, data.Properties.TextPos.Y)
+        if (data.Properties && data.Properties.Size && data.Properties.Size.Height) {
+            this.sHeight = data.Properties.Size.Height;
         }
-        if (data.Properties && data.Properties.sWidth) {
-            this.sWidth = data.Properties.sWidth
+        if (data.Properties.ImgPos) {
+            this.img.moveTo(data.Properties.ImgPos.X, data.Properties.ImgPos.Y);
         }
-        if (data.Properties && data.Properties.sHeight) {
-            this.sHeight = data.Properties.sHeight
+        if (data.Properties && data.Properties.ImgRotate) {
+            this.img.rotate = data.Properties.ImgRotate;
         }
         if (data.Properties && data.Properties.font) {
-            this.font = new SFont('sans-serif', data.Properties.font)
+            this.font = new SFont("sans-serif", data.Properties.font);
+        }
+        if (data.Properties.TextPos) {
+            this.textItem.moveTo(data.Properties.TextPos.X, data.Properties.TextPos.Y);
+        } else {
+            // 偏移二分之一文本高度
+            this.textItem.moveTo((this.img.width * 0.5), -(this.font.size * 1.25 * 0.5));
         }
         if (data.Properties && data.Properties.color) {
-            this.color = new SColor(data.Properties.color)
+            this.color = new SColor(data.Properties.color);
         }
         if (data.Properties && data.Properties.IsActive) {
-            this.isActive = data.Properties.IsActive
+            this.isActive = data.Properties.IsActive;
         }
         if (data.AttachObjectIds && data.AttachObjectIds.length) {
-            this.isActive = true
+            this.isActive = true;
         }
         if (data.Properties && data.Properties.FrameColor) {
-            this.activeColor = new SColor(data.Properties.FrameColor)
+            this.activeColor = new SColor(data.Properties.FrameColor);
         }
     }
 
+    /**
+     * 鼠标按下事件
+     *
+     * @param   event   保存事件参数
+     * @return  boolean
+     */
+    onMouseDown(event: SMouseEvent): boolean {
+        if (event.buttons == 1)
+        this.$emit("legendItemClick", event);
+        return super.onMouseDown(event);
+    } // Function onMouseDown()
+
     toData(): Legend {
-        this.data.Pos = { X: this.x, Y: this.y }
-        this.data.Size = { Width: this.width, Height: this.height }
-        this.data.Name = this.name
-        this.data.Properties.Url = this.img.url
-        this.data.Properties.TextPos = { X: this.textItem.x, Y: this.textItem.y }
-        this.data.Properties.ImgPos = { X: this.img.x, Y: this.img.y }
-        this.data.Properties.sWidth = this.sWidth
-        this.data.Properties.sHeight = this.sHeight
-        this.data.Properties.font = this.font.size
-        this.data.Properties.color = this.color.value
-        this.data.Properties.FrameColor = this.activeColor.value
-        this.data.Properties.IsActive = this.isActive
-        this.data.AnchorList = this.anchorList.map((t) => {
+        this.data.Pos = { X: this.x, Y: this.y };
+        this.data.Size = { Width: this.width, Height: this.height };
+        this.data.Name = this.name;
+        this.data.Properties.Zorder = this.zOrder;
+        this.data.Properties.Url = this.img.url;
+        this.data.Properties.TextPos = { X: this.textItem.x, Y: this.textItem.y };
+        this.data.Properties.ImgPos = { X: this.img.x, Y: this.img.y };
+        this.data.Properties.ImgRotate = this.img.rotate;
+        this.data.Properties.Size = {
+            Width: this.sWidth,
+            Height: this.sHeight
+        };
+        this.data.Properties.font = this.font.size;
+        this.data.Properties.color = this.color.value;
+        this.data.Properties.Font = this.font.size;
+        this.data.Properties.Coler = this.color.value;
+        this.data.Properties.FrameColor = this.activeColor.value;
+        this.data.Properties.IsActive = this.isActive;
+        this.data.AnchorList = this.anchorList.map(t => {
             return {
                 ID: t.id,
                 Pos: {
                     X: t.x,
-                    Y: t.y,
-                },
+                    Y: t.y
+                }
             }
         })
-        return this.data
+        return this.data;
     }
+
+    /**
+     * Item绘制框架
+     *
+     * @param   painter       painter对象
+     * @param   rect          绘制区域
+     */
+    onPaint(painter: SPainter, rect: SRect): void {
+        super.onPaint(painter, rect);
+        if (this.maskFlag && this.status == SItemStatus.Normal) {
+            painter.pen.color = SColor.Transparent;
+            painter.brush.color = new SColor("#ffffffa1");
+            if (this.selected) {
+                painter.drawCircle(this.img.x, this.img.y, (this.sWidth / 2.0) * 1.25);
+            } else {
+                painter.drawCircle(this.img.x, this.img.y, this.sWidth / 2.0);
+            }
+        }
+    } // Function onPaint()
+    
 } // Class SImageLegendItem

+ 0 - 37
src/lib/items/SImageMarkerItem.js

@@ -1,37 +0,0 @@
-import { SImageItem } from "@saga-web/graph/lib";
-import { ItemOrder } from '@saga-web/big/lib';
-/**
- * 标识对象Item(图标类型)
- *
- * * @author  张宇(taohuzy@163.com)
- */
-export class SImageMarkerItem extends SImageItem {
-    /**
-     * 构造函数
-     *
-     * @param parent    指向父对象
-     * @param data      标识对象数据
-     */
-    constructor(parent, data) {
-        super(parent);
-        this.zOrder = ItemOrder.imageOrder;
-        this.isTransform = false;
-        this.data = data;
-        this.id = data.ID;
-        this.name = data.Name;
-        this.moveTo(data.Pos.X, data.Pos.Y);
-        if (data.Size) {
-            this.width = data.Size.Width;
-            this.height = data.Size.Height;
-        }
-        if (data.Properties && data.Properties.Url) {
-            this.url = data.Properties.Url;
-        }
-    } // Constructor
-    toData() {
-        this.data.Pos = { X: this.x, Y: this.y };
-        this.data.Size = { Width: this.width, Height: this.height };
-        this.data.Properties.Url = this.url;
-        return this.data;
-    }
-} // Class SImageMarkerItem

File diff suppressed because it is too large
+ 25 - 1
src/lib/items/SImageMarkerItem.ts


+ 0 - 47
src/lib/items/SLineLegendItem.js

@@ -1,47 +0,0 @@
-import { SPoint } from "@saga-web/draw/lib";
-import { SPolylineItem } from '@saga-web/big/lib';
-/**
- * 图例节点Item(线类型)
- *
- * * @author  张宇(taohuzy@163.com)
- */
-export class SLineLegendItem extends SPolylineItem {
-    /**
-     * 构造函数
-     *
-     * @param parent    指向父对象
-     * @param data      图例节点对象数据
-     */
-    constructor(parent, data) {
-        super(parent, []);
-        this.data = data;
-        this.id = data.ID;
-        this.name = data.Name;
-        this.moveTo(data.Pos.X, data.Pos.Y);
-        if (data.Properties && data.Properties.Line) {
-            let setPointList;
-            setPointList = data.Properties.Line.map(i => {
-                return new SPoint(i.x, i.y);
-            });
-            this.pointList = setPointList;
-        }
-        if (data.Properties && data.Properties.LineWidth) {
-            this.lineWidth = data.Properties.LineWidth;
-        }
-        if (data.Properties && data.Properties.StrokeColor) {
-            this.strokeColor = data.Properties.StrokeColor;
-        }
-    }
-    toData() {
-        this.data.Pos = { X: this.x, Y: this.y };
-        this.data.Properties.Line = this.pointList.map(pos => {
-            return {
-                X: pos.x,
-                Y: pos.y
-            };
-        });
-        this.data.Properties.LineWidth = this.lineWidth;
-        this.data.Properties.StrokeColor = this.strokeColor;
-        return this.data;
-    }
-} // Class SLineLegendItem

+ 4 - 0
src/lib/items/SLineLegendItem.ts

@@ -25,6 +25,9 @@ export class SLineLegendItem extends SPolylineItem {
         this.id = data.ID;
         this.name = data.Name;
         this.moveTo(data.Pos.X, data.Pos.Y);
+        if (data.Properties.Zorder) {
+            this.zOrder = data.Properties.Zorder;
+        }
         if (data.Properties && data.Properties.Line) {
             let setPointList: SPoint[];
             setPointList = data.Properties.Line.map(i => {
@@ -48,6 +51,7 @@ export class SLineLegendItem extends SPolylineItem {
                 Y: pos.y
             }
         });
+        this.data.Properties.Zorder = this.zOrder;
         this.data.Properties.LineWidth = this.lineWidth;
         this.data.Properties.StrokeColor = this.strokeColor;
         return this.data;

+ 0 - 121
src/lib/items/SLineMarkerItem.js

@@ -1,121 +0,0 @@
-import { SLineStyle } from '@saga-web/graph/lib'
-import { SPoint, SColor } from '@saga-web/draw/lib'
-import { ItemOrder, SLineItem, SItemStatus } from '@saga-web/big/lib'
-/**
- * 标识对象Item(线类型)
- *
- * * @author  张宇(taohuzy@163.com)
- */
-export class SLineMarkerItem extends SLineItem {
-    /**
-     * 构造函数
-     *
-     * @param parent    指向父对象
-     * @param data      标识对象数据
-     */
-    constructor(parent, data) {
-        super(parent)
-        /** 起始锚点  */
-        this.startItem = null
-        /** 结束锚点  */
-        this.endItem = null
-        /** 是否蒙版遮罩  */
-        this._maskFlag = false
-        this.zOrder = ItemOrder.lineOrder
-        this.data = data
-        this.id = data.ID
-        this.name = data.Name
-        this.moveTo(data.Pos.X, data.Pos.Y)
-        if (data.Properties && data.Properties.Line) {
-            let setPointList
-            setPointList = data.Properties.Line.map((i) => {
-                return new SPoint(i.X, i.Y)
-            })
-            this.line = setPointList
-        }
-        if (data.Properties && data.Properties.LineWidth) {
-            this.lineWidth = data.Properties.LineWidth
-        }
-        if (data.Properties && data.Properties.LineStyle) {
-            this.lineStyle = data.Properties.LineStyle
-        }
-        if (data.Properties && data.Properties.StrokeColor) {
-            this.strokeColor = new SColor(data.Properties.StrokeColor)
-        }
-    } // Constructor
-    /** 是否完成绘制  */
-    get status() {
-        return this._status
-    }
-    set status(v) {
-        this._status = v
-        if (v == SItemStatus.Edit) {
-            this.zOrder = ItemOrder.markOrder
-        } else {
-            this.zOrder = ItemOrder.lineOrder
-        }
-        this.update()
-    }
-    get maskFlag() {
-        return this._maskFlag
-    }
-    set maskFlag(v) {
-        if (v === this._maskFlag) {
-            return
-        }
-        this._maskFlag = v
-        this.update()
-    }
-    /** 接收事件作出修改  */
-    changePos() {
-        if (this.startItem) {
-            // 判断删除equip后,不移动
-            if (this.startItem.parent) {
-                let scenePoint = this.startItem.boundingRect().center()
-                this.line[0] = this.startItem.mapToScene(scenePoint.x, scenePoint.y)
-            }
-        }
-        if (this.endItem) {
-            // 删除equip后
-            if (this.endItem.parent) {
-                let scenePoint = this.endItem.boundingRect().center()
-                this.line[1] = this.endItem.mapToScene(scenePoint.x, scenePoint.y)
-            }
-        }
-    }
-    toData() {
-        this.data.Pos = { X: this.x, Y: this.y }
-        this.data.Properties.Line = this.line.map((pos) => {
-            return {
-                X: pos.x,
-                Y: pos.y,
-            }
-        })
-        this.data.Properties.LineWidth = this.lineWidth
-        this.data.Properties.StrokeColor = this.strokeColor.value
-        this.data.Properties.LineStyle = this.lineStyle
-        if (this.startItem && this.startItem.parent) {
-            this.data.Properties.StartItemId = this.startItem.id
-        }
-        if (this.endItem && this.endItem.parent) {
-            this.data.Properties.EndItemId = this.endItem.id
-        }
-        return this.data
-    }
-    onDraw(painter) {
-        if (this.maskFlag && this.status == SItemStatus.Normal) {
-            let color = new SColor(this.strokeColor)
-            color.alpha = color.alpha / 2
-            painter.pen.color = new SColor(this.strokeColor)
-            if (this.lineStyle == SLineStyle.Dashed) {
-                painter.pen.lineDash = [painter.toPx(this.lineWidth * 3), painter.toPx(this.lineWidth * 7)]
-            } else if (this.lineStyle == SLineStyle.Dotted) {
-                painter.pen.lineDash = [painter.toPx(this.lineWidth), painter.toPx(this.lineWidth)]
-            }
-            painter.drawLine(this.line[0], this.line[1])
-        } else {
-            this.selected = true
-            super.onDraw(painter)
-        }
-    }
-} // Class SLineMarkerItem

+ 60 - 50
src/lib/items/SLineMarkerItem.ts

@@ -1,7 +1,7 @@
-import { SGraphItem, SLineStyle } from '@saga-web/graph/lib'
-import { SPoint, SPainter, SColor, SLineCapStyle } from '@saga-web/draw/lib'
-import { ItemOrder, SLineItem, SItemStatus } from '@saga-web/big/lib'
-import { Marker } from '../types/Marker'
+import { SGraphItem, SLineStyle } from "@saga-web/graph/lib";
+import { SPoint, SPainter, SColor, SLineCapStyle } from "@saga-web/draw/lib";
+import { ItemOrder, SLineItem, SItemStatus } from '@saga-web/big/lib';
+import { Marker } from '../types/Marker';
 
 /**
  * 标识对象Item(线类型)
@@ -10,37 +10,37 @@ import { Marker } from '../types/Marker'
  */
 export class SLineMarkerItem extends SLineItem {
     /** 起始锚点  */
-    startItem: SGraphItem | null = null
+    startItem: SGraphItem | null = null;
     /** 结束锚点  */
-    endItem: SGraphItem | null = null
+    endItem: SGraphItem | null = null;
 
     /** 标识对象数据 */
-    data: Marker
+    data: Marker;
 
     /** 是否完成绘制  */
     get status(): SItemStatus {
-        return this._status
+        return this._status;
     }
     set status(v: SItemStatus) {
-        this._status = v
+        this._status = v;
         if (v == SItemStatus.Edit) {
-            this.zOrder = ItemOrder.markOrder
+            this.zOrder = ItemOrder.markOrder;
         } else {
-            this.zOrder = ItemOrder.lineOrder
+            this.zOrder = ItemOrder.lineOrder;
         }
-        this.update()
+        this.update();
     }
 
     /** 是否蒙版遮罩  */
-    _maskFlag: boolean = false
+    _maskFlag: boolean = false;
     get maskFlag(): boolean {
-        return this._maskFlag
+        return this._maskFlag;
     }
     set maskFlag(v: boolean) {
         if (v === this._maskFlag) {
             return
         }
-        this._maskFlag = v
+        this._maskFlag = v;
         this.update()
     }
 
@@ -51,27 +51,30 @@ export class SLineMarkerItem extends SLineItem {
      * @param data      标识对象数据
      */
     constructor(parent: SGraphItem | null, data: Marker) {
-        super(parent)
-        this.zOrder = ItemOrder.lineOrder
-        this.data = data
-        this.id = data.ID
-        this.name = data.Name
-        this.moveTo(data.Pos.X, data.Pos.Y)
+        super(parent);
+        this.zOrder = ItemOrder.lineOrder;
+        this.data = data;
+        this.id = data.ID;
+        this.name = data.Name;
+        this.moveTo(data.Pos.X, data.Pos.Y);
+        if (data.Properties.Zorder) {
+            this.zOrder = data.Properties.Zorder;
+        }
         if (data.Properties && data.Properties.Line) {
-            let setPointList: SPoint[]
-            setPointList = data.Properties.Line.map((i) => {
+            let setPointList: SPoint[];
+            setPointList = data.Properties.Line.map(i => {
                 return new SPoint(i.X, i.Y)
             })
-            this.line = setPointList
+            this.line = setPointList;
         }
         if (data.Properties && data.Properties.LineWidth) {
-            this.lineWidth = data.Properties.LineWidth
+            this.lineWidth = data.Properties.LineWidth;
         }
         if (data.Properties && data.Properties.LineStyle) {
-            this.lineStyle = data.Properties.LineStyle
+            this.lineStyle = data.Properties.LineStyle;
         }
         if (data.Properties && data.Properties.StrokeColor) {
-            this.strokeColor = new SColor(data.Properties.StrokeColor)
+            this.strokeColor = new SColor(data.Properties.StrokeColor);
         }
     } // Constructor
 
@@ -80,53 +83,60 @@ export class SLineMarkerItem extends SLineItem {
         if (this.startItem) {
             // 判断删除equip后,不移动
             if (this.startItem.parent) {
-                let scenePoint: SPoint = this.startItem.boundingRect().center()
-                this.line[0] = this.startItem.mapToScene(scenePoint.x, scenePoint.y)
+                let scenePoint: SPoint = this.startItem.boundingRect().center();
+                this.line[0] = this.startItem.mapToScene(scenePoint.x, scenePoint.y);
             }
         }
         if (this.endItem) {
             // 删除equip后
             if (this.endItem.parent) {
-                let scenePoint: SPoint = this.endItem.boundingRect().center()
-                this.line[1] = this.endItem.mapToScene(scenePoint.x, scenePoint.y)
+                let scenePoint: SPoint = this.endItem.boundingRect().center();
+                this.line[1] = this.endItem.mapToScene(scenePoint.x, scenePoint.y);
             }
         }
     }
 
     toData(): Marker {
-        this.data.Pos = { X: this.x, Y: this.y }
-        this.data.Properties.Line = this.line.map((pos) => {
+        this.data.Pos = { X: this.x, Y: this.y };
+        this.data.Properties.Line = this.line.map(pos => {
             return {
                 X: pos.x,
-                Y: pos.y,
+                Y: pos.y
             }
-        })
-        this.data.Properties.LineWidth = this.lineWidth
-        this.data.Properties.StrokeColor = this.strokeColor.value
-        this.data.Properties.LineStyle = this.lineStyle
+        });
+        this.data.Properties.Zorder = this.zOrder;
+        this.data.Properties.LineWidth = this.lineWidth;
+        this.data.Properties.StrokeColor = this.strokeColor.value;
+        this.data.Properties.LineStyle = this.lineStyle;
         if (this.startItem && this.startItem.parent) {
-            this.data.Properties.StartItemId = this.startItem.id
+            this.data.Properties.StartItemId = this.startItem.id;
         }
         if (this.endItem && this.endItem.parent) {
-            this.data.Properties.EndItemId = this.endItem.id
+            this.data.Properties.EndItemId = this.endItem.id;
         }
-        return this.data
+        return this.data;
     }
 
     onDraw(painter: SPainter) {
         if (this.maskFlag && this.status == SItemStatus.Normal) {
-            let color = new SColor(this.strokeColor)
-            color.alpha = color.alpha / 2
-            painter.pen.color = new SColor(this.strokeColor)
+            let color = new SColor(this.strokeColor);
+            color.alpha = 100;
+            painter.pen.color = new SColor(this.strokeColor);
             if (this.lineStyle == SLineStyle.Dashed) {
-                painter.pen.lineDash = [painter.toPx(this.lineWidth * 3), painter.toPx(this.lineWidth * 7)]
-            } else if (this.lineStyle == SLineStyle.Dotted) {
-                painter.pen.lineDash = [painter.toPx(this.lineWidth), painter.toPx(this.lineWidth)]
+                painter.pen.lineDash = [
+                    painter.toPx(this.lineWidth * 3),
+                    painter.toPx(this.lineWidth * 7)
+                ];
+            }
+            else if (this.lineStyle == SLineStyle.Dotted) {
+                painter.pen.lineDash = [
+                    painter.toPx(this.lineWidth),
+                    painter.toPx(this.lineWidth)
+                ];
             }
-            painter.drawLine(this.line[0], this.line[1])
+            painter.drawLine(this.line[0], this.line[1]);
         } else {
-            this.selected = true
-            super.onDraw(painter)
+            super.onDraw(painter);
         }
     }
 } // Class SLineMarkerItem

+ 0 - 22
src/lib/items/SNoneLegendItem.js

@@ -1,22 +0,0 @@
-import { SGraphItem } from "@saga-web/graph/lib";
-/**
- * 图例节点Item(非图例类型)
- *
- * * @author  张宇(taohuzy@163.com)
- */
-export class SNoneLegendItem extends SGraphItem {
-    /**
-     * 构造函数
-     *
-     * @param parent    指向父对象
-     * @param data      图例节点对象数据
-     */
-    constructor(parent, data) {
-        super(parent);
-        this.data = data;
-        this.id = data.ID;
-    }
-    toData() {
-        return this.data;
-    }
-} // Class SNoneLegendItem

+ 0 - 195
src/lib/items/SSCPZZoneLegendItem.js

@@ -1,195 +0,0 @@
-import { SColor, SFont, SPoint, SLineCapStyle } from '@saga-web/draw'
-import { STextItem } from '@saga-web/graph/lib'
-import { hexify } from '@/components/mapClass/until'
-import { SItemStatus, ItemOrder, SPolygonItem } from '@saga-web/big/lib'
-/**
- * 图例节点Item(区域类型 --石材铺装)
- *
- * * @author  张宇(taohuzy@163.com)
- */
-export class SSCPZZoneLegendItem extends SPolygonItem {
-    /**
-     * 构造函数
-     *
-     * @param parent    指向父对象
-     * @param data      图例节点对象数据
-     */
-    constructor(parent, data) {
-        super(parent)
-        /** text item   */
-        this.textItem = new STextItem(this)
-        /** 是否显示文字  */
-        this._showText = true
-        /** 是否蒙版遮罩  */
-        this._maskFlag = false
-        this.textItem.isTransform = false
-        this.zOrder = ItemOrder.polygonOrder
-        this.data = data
-        this.id = data.ID
-        this.name = data.Name
-        this.text = data.Name
-        if (data) {
-            this.setPointList = []
-            let setPointList
-            if (data.OutLine) {
-                if (data.OutLine[0] instanceof SPoint) {
-                    this.setPointList = data.OutLine
-                } else {
-                    setPointList = data.OutLine.map((i) => {
-                        return new SPoint(i.X, i.Y)
-                    })
-                    this.setPointList = setPointList
-                }
-            }
-            // 设置线宽
-            if (data.Properties.LineWidth) {
-                this.lineWidth = data.Properties.LineWidth
-            }
-            if (data.Properties.StrokeColor) {
-                this.strokeColor = data.Properties.StrokeColor.includes('#')
-                    ? new SColor(data.Properties.StrokeColor)
-                    : new SColor(hexify(data.Properties.StrokeColor))
-            }
-            if (data.Properties.FillColor) {
-                this.fillColor = data.Properties.FillColor.includes('#')
-                    ? new SColor(data.Properties.FillColor)
-                    : new SColor(hexify(data.Properties.FillColor))
-            }
-            if (data.Properties.TextPos) {
-                this.textItem.moveTo(data.Properties.TextPos.X, data.Properties.TextPos.Y)
-            }
-            if (data.Properties.color) {
-                this.color = new SColor(data.Properties.color)
-            }
-            if (data.Properties.font) {
-                this.font = new SFont('sans-serif', data.Properties.font)
-            }
-            //    if( data.Properties.LineDash){
-            //     this.LineDash =this._legend.Properties.LineDash
-            //    }
-        }
-        // 监听多边形创建完成事件,并动态计算文本位置
-        this.connect('finishCreated', this, () => {
-            // 计算文本位置
-            let x = this.getPointList.reduce((pre, cur, index, arr) => {
-                    return pre + cur.x / arr.length
-                }, 0),
-                y = this.getPointList.reduce((pre, cur, index, arr) => {
-                    return pre + cur.y / arr.length
-                }, 0)
-            this.textItem.moveTo(x, y)
-        })
-    }
-    get text() {
-        return this.textItem.text
-    }
-    set text(v) {
-        this.textItem.text = v
-        this.update()
-    }
-    get color() {
-        return this.textItem.color
-    }
-    set color(v) {
-        this.textItem.color = v
-    }
-    get font() {
-        return this.textItem.font
-    }
-    set font(v) {
-        this.textItem.font = v
-    }
-    get status() {
-        return this._status
-    }
-    // 编辑当前状态
-    set status(value) {
-        this._status = value
-        // 如果状态为show则需清栈
-        if (value == SItemStatus.Normal) {
-            // 切换显示状态显示文本
-            this.showText = true
-            // 切换显示状态不可移动文本
-            this.textItem.moveable = false
-            if (this.undoStack) {
-                this.undoStack.clear()
-            }
-        } else if (value == SItemStatus.Edit) {
-            // 切换编辑状态显示文本
-            this.showText = true
-            // 切换编辑状态可移动文本
-            this.textItem.moveable = true
-        } else if (value == SItemStatus.Create) {
-            // 切换创建状态不显示文本
-            this.showText = false
-            // 切换创建状态不可移动文本
-            this.textItem.moveable = false
-        }
-        this.update()
-    }
-    get showText() {
-        return this._showText
-    }
-    set showText(v) {
-        if (v === this._showText) {
-            return
-        }
-        this._showText = v
-        if (v) {
-            this.textItem.show()
-        } else {
-            this.textItem.hide()
-        }
-    }
-    get maskFlag() {
-        return this._maskFlag
-    }
-    set maskFlag(v) {
-        if (v === this._maskFlag) {
-            return
-        }
-        this._maskFlag = v
-        this.update()
-    }
-    /** 图例说明  */
-    set itemExplain(v) {
-        this.data.Properties.ItemExplain = v
-    }
-    get itemExplain() {
-        return this.data.Properties.ItemExplain
-    }
-    toData() {
-        this.data.Pos = { X: this.x, Y: this.y }
-        this.data.Name = this.name
-        this.data.Properties.FillColor = this.fillColor.value
-        this.data.Properties.StrokeColor = this.strokeColor.value
-        this.data.Properties.LineWidth = this.lineWidth
-        this.data.OutLine = this.getPointList.map((pos) => {
-            return {
-                X: pos.x,
-                Y: pos.y,
-            }
-        })
-        this.data.Properties.TextPos = { X: this.textItem.x, Y: this.textItem.y }
-        this.data.Properties.font = this.font.size
-        this.data.Properties.color = this.color.value
-        return this.data
-    }
-    onDraw(painter) {
-        if (this.maskFlag && this.status == SItemStatus.Normal) {
-            let color = new SColor(this.strokeColor)
-            color.alpha = color.alpha / 2
-            let brushcolor = new SColor(this.fillColor)
-            brushcolor.alpha = brushcolor.alpha / 2
-            painter.pen.color = color
-            painter.pen.lineCapStyle = SLineCapStyle.Square
-            painter.pen.lineWidth = painter.toPx(this._lineWidth)
-            painter.brush.color = brushcolor
-            // @ts-ignore
-            painter.drawPolygon([...this.pointList])
-        } else {
-            this.selected = true
-            super.onDraw(painter)
-        }
-    }
-} // Class SZoneLegendItem

+ 141 - 97
src/lib/items/SSCPZZoneLegendItem.ts

@@ -1,9 +1,10 @@
-import { SGraphItem, SLineStyle } from '@saga-web/graph/lib'
-import { Legend } from '../types/Legend'
-import { SPainter, SColor, SFont, SPoint, SLineCapStyle } from '@saga-web/draw'
-import { STextItem } from '@saga-web/graph/lib'
-import { hexify } from '@/components/mapClass/until'
-import { SItemStatus, ItemOrder, SPolygonItem } from '@saga-web/big/lib'
+import { SGraphItem, SLineStyle, STextOrigin } from '@saga-web/graph/lib';
+import { Legend } from '../types/Legend';
+import { SPainter, SColor, SFont, SPoint, SLineCapStyle } from '@saga-web/draw';
+import { STextItem } from '@saga-web/graph/lib';
+import { hexify } from '@/components/mapClass/until';
+import { SItemStatus, ItemOrder, SPolygonItem } from '@saga-web/big/lib';
+import { SMouseEvent } from '@saga-web/base/lib';
 /**
  * 图例节点Item(区域类型 --石材铺装)
  *
@@ -11,23 +12,23 @@ import { SItemStatus, ItemOrder, SPolygonItem } from '@saga-web/big/lib'
  */
 export class SSCPZZoneLegendItem extends SPolygonItem {
     /** 图例节点对象数据 */
-    data: Legend
+    data: Legend;
 
     /** text item   */
-    textItem: STextItem = new STextItem(this)
+    textItem: STextItem = new STextItem(this);
 
     get text(): string {
-        return this.textItem.text
+        return this.textItem.text;
     }
     set text(v: string) {
-        this.textItem.text = v
-        this.update()
+        this.textItem.text = v;
+        this.update();
     }
     get color(): SColor {
-        return this.textItem.color
+        return this.textItem.color;
     }
     set color(v: SColor) {
-        this.textItem.color = v
+        this.textItem.color = v;
     }
     get font(): SFont {
         return this.textItem.font
@@ -37,62 +38,79 @@ export class SSCPZZoneLegendItem extends SPolygonItem {
     }
 
     get status(): SItemStatus {
-        return this._status
+        return this._status;
     }
     // 编辑当前状态
     set status(value: SItemStatus) {
-        this._status = value
+        this._status = value;
         // 如果状态为show则需清栈
         if (value == SItemStatus.Normal) {
             // 切换显示状态显示文本
-            this.showText = true
+            this.showText = true;
             // 切换显示状态不可移动文本
-            this.textItem.moveable = false
+            this.textItem.moveable = false;
 
             if (this.undoStack) {
-                this.undoStack.clear()
+                this.undoStack.clear();
             }
         } else if (value == SItemStatus.Edit) {
             // 切换编辑状态显示文本
-            this.showText = true
+            this.showText = true;
             // 切换编辑状态可移动文本
-            this.textItem.moveable = true
+            this.textItem.moveable = true;
         } else if (value == SItemStatus.Create) {
             // 切换创建状态不显示文本
-            this.showText = false
+            this.showText = false;
             // 切换创建状态不可移动文本
-            this.textItem.moveable = false
+            this.textItem.moveable = false;
         }
-        this.update()
-    }
+        this.update();
+    };
+
+    /** 是否激活  */
+    _isActive: boolean = false;
+    get isActive(): boolean {
+        return this._isActive;
+    } // Get isActive
+    set isActive(v: boolean) {
+        this._isActive = v;
+        if (v) {
+            this.cursor = "pointer";
+            this.textItem.cursor = "pointer";
+        } else {
+            this.cursor = "auto";
+            this.textItem.cursor = "auto";
+        }
+        this.update();
+    } // Set isActive
 
     /** 是否显示文字  */
-    _showText: boolean = true
+    _showText: boolean = true;
     get showText(): boolean {
-        return this._showText
+        return this._showText;
     }
     set showText(v: boolean) {
         if (v === this._showText) {
             return
         }
-        this._showText = v
+        this._showText = v;
         if (v) {
-            this.textItem.show()
+            this.textItem.show();
         } else {
-            this.textItem.hide()
+            this.textItem.hide();
         }
     }
 
     /** 是否蒙版遮罩  */
-    _maskFlag: boolean = false
+    _maskFlag: boolean = false;
     get maskFlag(): boolean {
-        return this._maskFlag
+        return this._maskFlag;
     }
     set maskFlag(v: boolean) {
         if (v === this._maskFlag) {
             return
         }
-        this._maskFlag = v
+        this._maskFlag = v;
         this.update()
     }
 
@@ -111,122 +129,148 @@ export class SSCPZZoneLegendItem extends SPolygonItem {
      * @param data      图例节点对象数据
      */
     constructor(parent: SGraphItem | null, data: Legend) {
-        super(parent)
-        this.textItem.isTransform = false
-        this.zOrder = ItemOrder.polygonOrder
-        this.data = data
-        this.id = data.ID
-        this.name = data.Name
-        this.text = data.Name
+        super(parent);
+        this.textItem.originPosition = STextOrigin.Centrum;
+        this.textItem.isTransform = false;
+        this.zOrder = ItemOrder.polygonOrder - 0.0005;
+        this.data = data;
+        this.id = data.ID;
+        this.name = data.Name;
+        // this.text = data.Name;
         if (data) {
-            this.setPointList = []
-            let setPointList: SPoint[]
+            this.setPointList = [];
+            let setPointList: SPoint[];
             if (data.OutLine) {
                 if (data.OutLine[0] instanceof SPoint) {
-                    this.setPointList = data.OutLine
+                    this.setPointList = data.OutLine;
                 } else {
-                    setPointList = data.OutLine.map((i) => {
-                        return new SPoint(i.X, i.Y)
+                    setPointList = data.OutLine.map(i => {
+                        return (new SPoint(i.X, i.Y))
                     })
-                    this.setPointList = setPointList
+                    this.setPointList = setPointList;
                 }
             }
+            if (data.Properties.Zorder) {
+                this.zOrder = data.Properties.Zorder;
+            }
             // 设置线宽
             if (data.Properties.LineWidth) {
-                this.lineWidth = data.Properties.LineWidth
+                this.lineWidth = data.Properties.LineWidth;
             }
             if (data.Properties.StrokeColor) {
-                this.strokeColor = data.Properties.StrokeColor.includes('#')
-                    ? new SColor(data.Properties.StrokeColor)
-                    : new SColor(hexify(data.Properties.StrokeColor))
+                this.strokeColor = data.Properties.StrokeColor.includes('#') ? new SColor(data.Properties.StrokeColor) : new SColor(hexify(data.Properties.StrokeColor));
             }
             if (data.Properties.FillColor) {
-                this.fillColor = data.Properties.FillColor.includes('#')
-                    ? new SColor(data.Properties.FillColor)
-                    : new SColor(hexify(data.Properties.FillColor))
+                this.fillColor = data.Properties.FillColor.includes('#') ? new SColor(data.Properties.FillColor) : new SColor(hexify(data.Properties.FillColor))
             }
             if (data.Properties.TextPos) {
-                this.textItem.moveTo(data.Properties.TextPos.X, data.Properties.TextPos.Y)
+                this.textItem.moveTo(data.Properties.TextPos.X, data.Properties.TextPos.Y);
             }
             if (data.Properties.color) {
-                this.color = new SColor(data.Properties.color)
+                this.color = new SColor(data.Properties.color);
             }
             if (data.Properties.font) {
-                this.font = new SFont('sans-serif', data.Properties.font)
+                this.font = new SFont("sans-serif", data.Properties.font);
+            }
+            if (data.Properties && data.Properties.IsActive) {
+                this.isActive = data.Properties.IsActive;
+            }
+            if (data.AttachObjectIds && data.AttachObjectIds.length) {
+                this.isActive = true;
             }
             switch (data.Properties.LineDash) {
-                case 'solid':
-                    this.lineStyle = SLineStyle.Solid
-                    break
-                case 'dotted':
-                    this.lineStyle = SLineStyle.Dotted
-                    break
-                case 'dashed':
-                    this.lineStyle = SLineStyle.Dashed
-                    break
+                case "solid":
+                    this.lineStyle = SLineStyle.Solid;
+                    break;
+                case "dotted":
+                    this.lineStyle = SLineStyle.Dotted;
+                    break;
+                case "dashed":
+                    this.lineStyle = SLineStyle.Dashed;
+                    break;
                 default:
-                    this.lineStyle = SLineStyle.Solid
+                    this.lineStyle = SLineStyle.Solid;
             }
         }
         // 监听多边形创建完成事件,并动态计算文本位置
-        this.connect('finishCreated', this, () => {
+        this.connect("finishCreated", this, () => {
             // 计算文本位置
             let x: number = this.getPointList.reduce((pre, cur, index, arr) => {
-                    return pre + cur.x / arr.length
-                }, 0),
+                return pre + (cur.x / arr.length)
+            }, 0),
                 y: number = this.getPointList.reduce((pre, cur, index, arr) => {
-                    return pre + cur.y / arr.length
-                }, 0)
-            this.textItem.moveTo(x, y)
+                    return pre + (cur.y / arr.length)
+                }, 0);
+            this.textItem.moveTo(x, y);
         })
     }
 
+    /**
+     * 鼠标按下事件
+     *
+     * @param   event   保存事件参数
+     * @return  boolean
+     */
+    onMouseDown(event: SMouseEvent): boolean {
+        if (event.buttons == 1)
+        this.$emit("legendItemClick", event);
+        return super.onMouseDown(event);
+    } // Function onMouseDown()
+
     toData(): any {
-        this.data.Pos = { X: this.x, Y: this.y }
-        this.data.Name = this.name
-        this.data.Properties.FillColor = this.fillColor.value
-        this.data.Properties.StrokeColor = this.strokeColor.value
-        this.data.Properties.LineWidth = this.lineWidth
+        this.data.Pos = { X: this.x, Y: this.y };
+        this.data.Name = this.name;
+        this.data.Properties.Zorder = this.zOrder;
+        this.data.Properties.FillColor = this.fillColor.value;
+        this.data.Properties.StrokeColor = this.strokeColor.value;
+        this.data.Properties.LineWidth = this.lineWidth;
         switch (this.lineStyle) {
             case SLineStyle.Solid:
-                this.data.Properties.LineDash = 'solid'
-                break
+                this.data.Properties.LineDash = "solid";
+                break;
             case SLineStyle.Dotted:
-                this.data.Properties.LineDash = 'dotted'
-                break
+                this.data.Properties.LineDash = "dotted";
+                break;
             case SLineStyle.Dashed:
-                this.data.Properties.LineDash = 'dashed'
-                break
+                this.data.Properties.LineDash = "dashed";
+                break;
             default:
-                this.data.Properties.LineDash = 'solid'
+                this.data.Properties.LineDash = "solid";
         }
-        this.data.OutLine = this.getPointList.map((pos) => {
+        this.data.OutLine = this.getPointList.map(pos => {
             return {
                 X: pos.x,
-                Y: pos.y,
+                Y: pos.y
             }
-        })
-        this.data.Properties.TextPos = { X: this.textItem.x, Y: this.textItem.y }
-        this.data.Properties.font = this.font.size
-        this.data.Properties.color = this.color.value
-        return this.data
+        });
+        this.data.Properties.TextPos = {X: this.textItem.x, Y: this.textItem.y};
+        this.data.Properties.font =  this.font.size;
+        this.data.Properties.color =  this.color.value;
+        this.data.Properties.IsActive = this.isActive;
+        return this.data;
     }
 
     onDraw(painter: SPainter) {
         if (this.maskFlag && this.status == SItemStatus.Normal) {
             let color = new SColor(this.strokeColor)
-            color.alpha = color.alpha / 2
+            color.alpha = color.alpha / 5
             let brushcolor = new SColor(this.fillColor)
-            brushcolor.alpha = brushcolor.alpha / 2
+            brushcolor.alpha = brushcolor.alpha / 5
             painter.pen.color = color
             painter.pen.lineCapStyle = SLineCapStyle.Square
-            painter.pen.lineWidth = painter.toPx(this._lineWidth)
+            painter.pen.lineWidth = painter.toPx(this.lineWidth)
             painter.brush.color = brushcolor
+            if (this.selected) {
+                painter.pen.lineWidth = painter.toPx(this.lineWidth * 2);
+                painter.shadow.shadowBlur = 10;
+                painter.shadow.shadowColor = new SColor(`#00000033`);
+                painter.shadow.shadowOffsetX = 5;
+                painter.shadow.shadowOffsetY = 5;
+            }
             // @ts-ignore
-            painter.drawPolygon([...this.pointList])
+            painter.drawPolygon([...this.pointList]);
         } else {
-            this.selected = true
-            super.onDraw(painter)
+            super.onDraw(painter);
         }
     }
-} // Class SZoneLegendItem
+} // Class SSCPZZoneLegendItem

+ 0 - 51
src/lib/items/STextMarkerItem.js

@@ -1,51 +0,0 @@
-import { STextItem } from "@saga-web/graph/lib";
-import { SColor, SFont } from "@saga-web/draw";
-import { ItemOrder } from '@saga-web/big/lib';
-/**
- * 标识对象Item(文本类型)
- *
- * * @author  张宇(taohuzy@163.com)
- */
-export class STextMarkerItem extends STextItem {
-    /**
-     * 构造函数
-     *
-     * @param parent    指向父对象
-     * @param data      标识对象数据
-     */
-    constructor(parent, data) {
-        super(parent);
-        this.zOrder = ItemOrder.textOrder;
-        this.isTransform = false;
-        this.data = data;
-        this.id = data.ID;
-        this.name = data.Name;
-        this.moveTo(data.Pos.X, data.Pos.Y);
-        if (data.Size) {
-            this.width = data.Size.Width;
-            this.height = data.Size.Height;
-        }
-        if (data.Properties && data.Properties.Text) {
-            this.text = data.Properties.Text;
-        }
-        if (data.Properties && data.Properties.Color) {
-            this.color = new SColor(data.Properties.Color);
-        }
-        if (data.Properties && data.Properties.Font) {
-            this.font = new SFont("sans-serif", data.Properties.Font);
-            ;
-        }
-        if (data.Properties && data.Properties.BackgroundColor) {
-            this.backgroundColor = new SColor(data.Properties.BackgroundColor);
-        }
-    } // Constructor
-    toData() {
-        this.data.Pos = { X: this.x, Y: this.y };
-        this.data.Size = { Width: this.width, Height: this.height };
-        this.data.Properties.Text = this.text;
-        this.data.Properties.Color = this.color.value;
-        this.data.Properties.Font = this.font.size;
-        this.data.Properties.BackgroundColor = this.backgroundColor.value;
-        return this.data;
-    }
-} // Class STextMarkerItem

+ 14 - 2
src/lib/items/STextMarkerItem.ts

@@ -1,5 +1,5 @@
 import { SGraphItem, STextItem, SLineStyle } from "@saga-web/graph/lib";
-import { SPainter, SColor,SFont } from "@saga-web/draw";
+import { SPainter, SColor,SFont, SPoint } from "@saga-web/draw";
 import { Marker } from '../types/Marker';
 import { ItemOrder } from '@saga-web/big/lib';
 
@@ -20,7 +20,6 @@ export class STextMarkerItem extends STextItem {
      */
     constructor(parent: SGraphItem | null, data: Marker) {
         super(parent);
-        this.isTransform = false;
         this.zOrder = ItemOrder.textOrder;
         this.isTransform = false;
         this.data = data;
@@ -31,6 +30,9 @@ export class STextMarkerItem extends STextItem {
             this.width = data.Size.Width;
             this.height = data.Size.Height;
         }
+        if (data.Properties.Zorder) {
+            this.zOrder = data.Properties.Zorder;
+        }
         if (data.Properties && data.Properties.Text) {
             this.text = data.Properties.Text;
         }
@@ -45,9 +47,19 @@ export class STextMarkerItem extends STextItem {
         }
     } // Constructor
 
+    /**
+     * 根据换行切割文本,绘制多行并计算外轮廓宽高
+     *
+     */
+    protected drawFormatText(): void {
+        super.drawFormatText();
+        this.origin = new SPoint(this.width / 2, this.height / 2);
+    } // Function drawFormatText()
+
     toData(): Marker {
         this.data.Pos = {X: this.x, Y: this.y};
         this.data.Size = {Width: this.width, Height: this.height};
+        this.data.Properties.Zorder = this.zOrder;
         this.data.Properties.Text = this.text;
         this.data.Properties.Color = this.color.value;
         this.data.Properties.Font = this.font.size;

+ 0 - 189
src/lib/items/SZoneLegendItem.js

@@ -1,189 +0,0 @@
-import { SColor, SFont, SPoint, SLineCapStyle } from '@saga-web/draw'
-import { STextItem } from '@saga-web/graph/lib'
-import { hexify } from '@/components/mapClass/until'
-import { SItemStatus, ItemOrder, SPolygonItem } from '@saga-web/big/lib'
-/**
- * 图例节点Item(区域类型)
- *
- * * @author  张宇(taohuzy@163.com)
- */
-export class SZoneLegendItem extends SPolygonItem {
-    /**
-     * 构造函数
-     *
-     * @param parent    指向父对象
-     * @param data      图例节点对象数据
-     */
-    constructor(parent, data) {
-        super(parent)
-        /** text item   */
-        this.textItem = new STextItem(this)
-        /** 是否显示文字  */
-        this._showText = true
-        /** 是否蒙版遮罩  */
-        this._maskFlag = false
-        this.textItem.isTransform = false
-        this.zOrder = ItemOrder.polygonOrder
-        this.data = data
-        this.id = data.ID
-        this.name = data.Name
-        this.text = data.Name
-        if (data) {
-            this.setPointList = []
-            let setPointList
-            if (data.OutLine) {
-                if (data.OutLine[0] instanceof SPoint) {
-                    // @ts-ignore
-                    this.setPointList = data.OutLine
-                } else {
-                    setPointList = data.OutLine.map((i) => {
-                        return new SPoint(i.X, i.Y)
-                    })
-                    this.setPointList = setPointList
-                }
-            }
-            // 设置线宽
-            if (data.Properties.LineWidth) {
-                this.lineWidth = data.Properties.LineWidth
-            }
-            if (data.Properties.StrokeColor) {
-                this.strokeColor = data.Properties.StrokeColor.includes('#')
-                    ? new SColor(data.Properties.StrokeColor)
-                    : new SColor(hexify(data.Properties.StrokeColor))
-            }
-            if (data.Properties.FillColor) {
-                this.fillColor = data.Properties.FillColor.includes('#')
-                    ? new SColor(data.Properties.FillColor)
-                    : new SColor(hexify(data.Properties.FillColor))
-            }
-            if (data.Properties.TextPos) {
-                this.textItem.moveTo(data.Properties.TextPos.X, data.Properties.TextPos.Y)
-            }
-            if (data.Properties.color) {
-                this.color = new SColor(data.Properties.color)
-            }
-            if (data.Properties.font) {
-                this.font = new SFont('sans-serif', data.Properties.font)
-            }
-            //    if( data.Properties.LineDash){
-            //     this.LineDash =this._legend.Properties.LineDash
-            //    }
-        }
-        // 监听多边形创建完成事件,并动态计算文本位置
-        this.connect('finishCreated', this, () => {
-            // 计算文本位置
-            let x = this.getPointList.reduce((pre, cur, index, arr) => {
-                    return pre + cur.x / arr.length
-                }, 0),
-                y = this.getPointList.reduce((pre, cur, index, arr) => {
-                    return pre + cur.y / arr.length
-                }, 0)
-            this.textItem.moveTo(x, y)
-        })
-    }
-    get text() {
-        return this.textItem.text
-    }
-    set text(v) {
-        this.textItem.text = v
-        this.update()
-    }
-    get color() {
-        return this.textItem.color
-    }
-    set color(v) {
-        this.textItem.color = v
-    }
-    get font() {
-        return this.textItem.font
-    }
-    set font(v) {
-        this.textItem.font = v
-    }
-    get status() {
-        return this._status
-    }
-    // 编辑当前状态
-    set status(value) {
-        this._status = value
-        // 如果状态为show则需清栈
-        if (value == SItemStatus.Normal) {
-            // 切换显示状态显示文本
-            this.showText = true
-            // 切换显示状态不可移动文本
-            this.textItem.moveable = false
-            if (this.undoStack) {
-                this.undoStack.clear()
-            }
-        } else if (value == SItemStatus.Edit) {
-            // 切换编辑状态显示文本
-            this.showText = true
-            // 切换编辑状态可移动文本
-            this.textItem.moveable = true
-        } else if (value == SItemStatus.Create) {
-            // 切换创建状态不显示文本
-            this.showText = false
-            // 切换创建状态不可移动文本
-            this.textItem.moveable = false
-        }
-        this.update()
-    }
-    get showText() {
-        return this._showText
-    }
-    set showText(v) {
-        if (v === this._showText) {
-            return
-        }
-        this._showText = v
-        if (v) {
-            this.textItem.show()
-        } else {
-            this.textItem.hide()
-        }
-    }
-    get maskFlag() {
-        return this._maskFlag
-    }
-    set maskFlag(v) {
-        if (v === this._maskFlag) {
-            return
-        }
-        this._maskFlag = v
-        this.update()
-    }
-    toData() {
-        this.data.Pos = { X: this.x, Y: this.y }
-        this.data.Name = this.name
-        this.data.Properties.FillColor = this.fillColor.value
-        this.data.Properties.StrokeColor = this.strokeColor.value
-        this.data.Properties.LineWidth = this.lineWidth
-        this.data.OutLine = this.getPointList.map((pos) => {
-            return {
-                X: pos.x,
-                Y: pos.y,
-            }
-        })
-        this.data.Properties.TextPos = { X: this.textItem.x, Y: this.textItem.y }
-        this.data.Properties.font = this.font.size
-        this.data.Properties.color = this.color.value
-        return this.data
-    }
-    onDraw(painter) {
-        if (this.maskFlag && this.status == SItemStatus.Normal) {
-            let color = new SColor(this.strokeColor)
-            color.alpha = color.alpha / 2
-            let brushcolor = new SColor(this.fillColor)
-            brushcolor.alpha = brushcolor.alpha / 2
-            painter.pen.color = color
-            painter.pen.lineCapStyle = SLineCapStyle.Square
-            painter.pen.lineWidth = painter.toPx(this._lineWidth)
-            painter.brush.color = brushcolor
-            // @ts-ignore
-            painter.drawPolygon([...this.pointList])
-        } else {
-            this.selected = true
-            super.onDraw(painter)
-        }
-    }
-} // Class SZoneLegendItem

+ 142 - 99
src/lib/items/SZoneLegendItem.ts

@@ -1,10 +1,10 @@
-import { SGraphItem, SLineStyle } from '@saga-web/graph/lib'
-import { Legend } from '../types/Legend'
-import { SPainter, SColor, SFont, SPoint, SLineCapStyle } from '@saga-web/draw'
-import { STextItem } from '@saga-web/graph/lib'
-import { hexify } from '@/components/mapClass/until'
-import { SItemStatus, ItemOrder, SPolygonItem } from '@saga-web/big/lib'
-import { SMouseEvent } from '@saga-web/base/lib'
+import { SGraphItem, SLineStyle, STextOrigin } from '@saga-web/graph/lib';
+import { Legend } from '../types/Legend';
+import { SPainter, SColor, SFont, SPoint, SLineCapStyle } from '@saga-web/draw';
+import { STextItem } from '@saga-web/graph/lib';
+import { hexify } from '@/components/mapClass/until';
+import { SItemStatus, ItemOrder, SPolygonItem } from '@saga-web/big/lib';
+import { SMouseEvent } from '@saga-web/base/lib';
 /**
  * 图例节点Item(区域类型)
  *
@@ -12,88 +12,105 @@ import { SMouseEvent } from '@saga-web/base/lib'
  */
 export class SZoneLegendItem extends SPolygonItem {
     /** 图例节点对象数据 */
-    data: Legend
+    data: Legend;
 
     /** text item   */
-    textItem: STextItem = new STextItem(this)
+    textItem: STextItem = new STextItem(this);
 
     get text(): string {
-        return this.textItem.text
+        return this.textItem.text;
     }
     set text(v: string) {
-        this.textItem.text = v
-        this.update()
+        this.textItem.text = v;
+        this.update();
     }
     get color(): SColor {
-        return this.textItem.color
+        return this.textItem.color;
     }
     set color(v: SColor) {
-        this.textItem.color = v
+        this.textItem.color = v;
     }
     get font(): SFont {
-        return this.textItem.font
+        return this.textItem.font;
     }
     set font(v: SFont) {
-        this.textItem.font = v
+        this.textItem.font = v;
     }
 
     get status(): SItemStatus {
-        return this._status
+        return this._status;
     }
     // 编辑当前状态
     set status(value: SItemStatus) {
-        this._status = value
+        this._status = value;
         // 如果状态为show则需清栈
         if (value == SItemStatus.Normal) {
             // 切换显示状态显示文本
-            this.showText = true
+            this.showText = true;
             // 切换显示状态不可移动文本
-            this.textItem.moveable = false
+            this.textItem.moveable = false;
 
             if (this.undoStack) {
-                this.undoStack.clear()
+                this.undoStack.clear();
             }
         } else if (value == SItemStatus.Edit) {
             // 切换编辑状态显示文本
-            this.showText = true
+            this.showText = true;
             // 切换编辑状态可移动文本
-            this.textItem.moveable = true
+            this.textItem.moveable = true;
         } else if (value == SItemStatus.Create) {
             // 切换创建状态不显示文本
-            this.showText = false
+            this.showText = false;
             // 切换创建状态不可移动文本
-            this.textItem.moveable = false
+            this.textItem.moveable = false;
         }
-        this.update()
-    }
+        this.update();
+    };
+
+    /** 是否激活  */
+    _isActive: boolean = false;
+    get isActive(): boolean {
+        return this._isActive;
+    } // Get isActive
+    set isActive(v: boolean) {
+        this._isActive = v;
+        if (v) {
+            this.cursor = "pointer";
+            this.textItem.cursor = "pointer";
+        } else {
+            this.cursor = "auto";
+            this.textItem.cursor = "auto";
+        }
+        this.update();
+    } // Set isActive
 
     /** 是否显示文字  */
-    _showText: boolean = true
+    _showText: boolean = true;
     get showText(): boolean {
-        return this._showText
+        return this._showText;
     }
     set showText(v: boolean) {
         if (v === this._showText) {
             return
         }
-        this._showText = v
+        this._showText = v;
         if (v) {
-            this.textItem.show()
+            this.textItem.show();
         } else {
-            this.textItem.hide()
+            this.textItem.hide();
         }
     }
 
     /** 是否蒙版遮罩  */
-    _maskFlag: boolean = false
+    _maskFlag: boolean = false;
     get maskFlag(): boolean {
-        return this._maskFlag
+        return this._maskFlag;
     }
     set maskFlag(v: boolean) {
         if (v === this._maskFlag) {
             return
         }
-        this._maskFlag = v
+        this._maskFlag = v;
         this.update()
     }
 
@@ -104,123 +121,149 @@ export class SZoneLegendItem extends SPolygonItem {
      * @param data      图例节点对象数据
      */
     constructor(parent: SGraphItem | null, data: Legend) {
-        super(parent)
-        this.textItem.isTransform = false
-        this.zOrder = ItemOrder.polygonOrder
-        this.data = data
-        this.id = data.ID
-        this.name = data.Name
-        this.text = data.Name
+        super(parent);
+        this.textItem.originPosition = STextOrigin.Centrum;
+        this.textItem.isTransform = false;
+        this.zOrder = ItemOrder.polygonOrder;
+        this.data = data;
+        this.id = data.ID;
+        this.name = data.Name;
+        this.text = data.Name;
         if (data) {
-            this.setPointList = []
-            let setPointList: SPoint[]
+            this.setPointList = [];
+            let setPointList: SPoint[];
             if (data.OutLine) {
                 if (data.OutLine[0] instanceof SPoint) {
                     // @ts-ignore
-                    this.setPointList = data.OutLine
+                    this.setPointList = data.OutLine;
                 } else {
-                    setPointList = data.OutLine.map((i) => {
-                        return new SPoint(i.X, i.Y)
+                    setPointList = data.OutLine.map(i => {
+                        return (new SPoint(i.X, i.Y))
                     })
-                    this.setPointList = setPointList
+                    this.setPointList = setPointList;
                 }
             }
+            if (data.Properties.Zorder) {
+                this.zOrder = data.Properties.Zorder;
+            }
             // 设置线宽
             if (data.Properties.LineWidth) {
-                this.lineWidth = data.Properties.LineWidth
+                this.lineWidth = data.Properties.LineWidth;
             }
             if (data.Properties.StrokeColor) {
-                this.strokeColor = data.Properties.StrokeColor.includes('#')
-                    ? new SColor(data.Properties.StrokeColor)
-                    : new SColor(hexify(data.Properties.StrokeColor))
+                this.strokeColor = data.Properties.StrokeColor.includes('#') ? new SColor(data.Properties.StrokeColor) : new SColor(hexify(data.Properties.StrokeColor));
             }
             if (data.Properties.FillColor) {
-                this.fillColor = data.Properties.FillColor.includes('#')
-                    ? new SColor(data.Properties.FillColor)
-                    : new SColor(hexify(data.Properties.FillColor))
+                this.fillColor = data.Properties.FillColor.includes('#') ? new SColor(data.Properties.FillColor) : new SColor(hexify(data.Properties.FillColor))
             }
             if (data.Properties.TextPos) {
-                this.textItem.moveTo(data.Properties.TextPos.X, data.Properties.TextPos.Y)
+                this.textItem.moveTo(data.Properties.TextPos.X, data.Properties.TextPos.Y);
             }
             if (data.Properties.color) {
-                this.color = new SColor(data.Properties.color)
+                this.color = new SColor(data.Properties.color);
             }
             if (data.Properties.font) {
-                this.font = new SFont('sans-serif', data.Properties.font)
+                this.font = new SFont("sans-serif", data.Properties.font);
+            }
+            if (data.Properties && data.Properties.IsActive) {
+                this.isActive = data.Properties.IsActive;
+            }
+            if (data.AttachObjectIds && data.AttachObjectIds.length) {
+                this.isActive = true;
             }
             switch (data.Properties.LineDash) {
-                case 'solid':
-                    this.lineStyle = SLineStyle.Solid
-                    break
-                case 'dotted':
-                    this.lineStyle = SLineStyle.Dotted
-                    break
-                case 'dashed':
-                    this.lineStyle = SLineStyle.Dashed
-                    break
+                case "solid":
+                    this.lineStyle = SLineStyle.Solid;
+                    break;
+                case "dotted":
+                    this.lineStyle = SLineStyle.Dotted;
+                    break;
+                case "dashed":
+                    this.lineStyle = SLineStyle.Dashed;
+                    break;
                 default:
-                    this.lineStyle = SLineStyle.Solid
+                    this.lineStyle = SLineStyle.Solid;
             }
         }
         // 监听多边形创建完成事件,并动态计算文本位置
-        this.connect('finishCreated', this, () => {
+        this.connect("finishCreated", this, () => {
             // 计算文本位置
             let x: number = this.getPointList.reduce((pre, cur, index, arr) => {
-                    return pre + cur.x / arr.length
-                }, 0),
+                return pre + (cur.x / arr.length)
+            }, 0),
                 y: number = this.getPointList.reduce((pre, cur, index, arr) => {
-                    return pre + cur.y / arr.length
-                }, 0)
-            this.textItem.moveTo(x, y)
+                    return pre + (cur.y / arr.length)
+                }, 0);
+            this.textItem.moveTo(x, y);
         })
     }
 
+    /**
+     * 鼠标按下事件
+     *
+     * @param   event   保存事件参数
+     * @return  boolean
+     */
+    onMouseDown(event: SMouseEvent): boolean {
+        if (event.buttons == 1)
+        this.$emit("legendItemClick", event);
+        return super.onMouseDown(event);
+    } // Function onMouseDown()
+
     toData(): any {
-        this.data.Pos = { X: this.x, Y: this.y }
-        this.data.Name = this.name
-        this.data.Properties.FillColor = this.fillColor.value
-        this.data.Properties.StrokeColor = this.strokeColor.value
-        this.data.Properties.LineWidth = this.lineWidth
+        this.data.Pos = { X: this.x, Y: this.y };
+        this.data.Name = this.name;
+        this.data.Properties.Zorder = this.zOrder;
+        this.data.Properties.FillColor = this.fillColor.value;
+        this.data.Properties.StrokeColor = this.strokeColor.value;
+        this.data.Properties.LineWidth = this.lineWidth;
         switch (this.lineStyle) {
             case SLineStyle.Solid:
-                this.data.Properties.LineDash = 'solid'
-                break
+                this.data.Properties.LineDash = "solid";
+                break;
             case SLineStyle.Dotted:
-                this.data.Properties.LineDash = 'dotted'
-                break
+                this.data.Properties.LineDash = "dotted";
+                break;
             case SLineStyle.Dashed:
-                this.data.Properties.LineDash = 'dashed'
-                break
+                this.data.Properties.LineDash = "dashed";
+                break;
             default:
-                this.data.Properties.LineDash = 'solid'
+                this.data.Properties.LineDash = "solid";
         }
-        this.data.OutLine = this.getPointList.map((pos) => {
+        this.data.OutLine = this.getPointList.map(pos => {
             return {
                 X: pos.x,
-                Y: pos.y,
+                Y: pos.y
             }
-        })
-        this.data.Properties.TextPos = { X: this.textItem.x, Y: this.textItem.y }
-        this.data.Properties.font = this.font.size
-        this.data.Properties.color = this.color.value
-        return this.data
+        });
+        this.data.Properties.TextPos = {X: this.textItem.x, Y: this.textItem.y};
+        this.data.Properties.font =  this.font.size;
+        this.data.Properties.color =  this.color.value;
+        this.data.Properties.IsActive = this.isActive;
+        return this.data;
     }
 
     onDraw(painter: SPainter) {
         if (this.maskFlag && this.status == SItemStatus.Normal) {
             let color = new SColor(this.strokeColor)
-            color.alpha = color.alpha / 2
+            color.alpha = color.alpha / 5
             let brushcolor = new SColor(this.fillColor)
-            brushcolor.alpha = brushcolor.alpha / 2
+            brushcolor.alpha = brushcolor.alpha / 5
             painter.pen.color = color
             painter.pen.lineCapStyle = SLineCapStyle.Square
-            painter.pen.lineWidth = painter.toPx(this._lineWidth)
+            painter.pen.lineWidth = painter.toPx(this.lineWidth)
             painter.brush.color = brushcolor
+            if (this.selected) {
+                painter.pen.lineWidth = painter.toPx(this.lineWidth * 2);
+                painter.shadow.shadowBlur = 10;
+                painter.shadow.shadowColor = new SColor(`#00000033`);
+                painter.shadow.shadowOffsetX = 5;
+                painter.shadow.shadowOffsetY = 5;
+            }
             // @ts-ignore
-            painter.drawPolygon([...this.pointList])
+            painter.drawPolygon([...this.pointList]);
         } else {
-            this.selected = true
-            super.onDraw(painter)
+            super.onDraw(painter);
         }
     }
 } // Class SZoneLegendItem

+ 0 - 159
src/lib/items/TipelineItem.js

@@ -1,159 +0,0 @@
-import { SPolylineItem, ItemOrder, SItemStatus } from '@saga-web/big/lib'
-import { SColor } from '@saga-web/draw'
-import { SPoint } from '@saga-web/draw/lib'
-/**
- * 管道item
- *
- * */
-export class TipelineItem extends SPolylineItem {
-    constructor(parent, data) {
-        super(parent, [])
-        /** 起始锚点  */
-        this.startAnchor = null
-        /** 结束锚点  */
-        this.endAnchor = null
-        /** 对应的图例ID  */
-        this._graphElementId = ''
-        /** 关联节点1ID  */
-        this._node1Id = ''
-        /** 关联节点2ID  */
-        this._node2Id = ''
-        /** 关联锚点1ID  */
-        this._anchor1ID = ''
-        /** 关联锚点2ID  */
-        this._anchor2ID = ''
-        /** 是否蒙版遮罩  */
-        this._maskFlag = false
-        /** 数据存储  */
-        this.data = null
-        this.zOrder = ItemOrder.polylineOrder
-        this.pointList = data.PointList.map((item) => {
-            return new SPoint(item.X, item.Y)
-        })
-        this.data = data
-        this.name = data.Name
-        this.id = data.ID
-        if (data.GraphElementId) {
-            this._graphElementId = data.GraphElementId
-        }
-        if (data.Node1ID) {
-            this._node1Id = data.Node1ID
-        }
-        if (data.Node2ID) {
-            this._node2Id = data.Node2ID
-        }
-        if (data.Anchor1ID) {
-            this._anchor1ID = data.Anchor1ID
-        }
-        if (data.Anchor2ID) {
-            this._anchor2ID = data.Anchor2ID
-        }
-        if (data.Properties && data.Properties.Color) {
-            this.strokeColor = new SColor(data.Properties.Color)
-        }
-        // if(data.Properties && data.Properties.LineDash){
-        //   this.LineDash = data.Properties.LineDash
-        // }
-        if (data.Properties && data.Properties.LineWidth) {
-            this.lineWidth = data.Properties.LineWidth
-        }
-    }
-    get graphElementId() {
-        return this._graphElementId
-    }
-    set graphElementId(v) {
-        this._graphElementId = v
-        if (this.data) {
-            this.data.GraphElementId = this._graphElementId
-        }
-    }
-    get node1Id() {
-        return this._node1Id
-    }
-    set node1Id(v) {
-        this._node1Id = v
-        if (this.data) {
-            this.data.Node1ID = this._node1Id
-        }
-    }
-    get node2Id() {
-        return this._node2Id
-    }
-    set node2Id(v) {
-        this._node2Id = v
-        if (this.data) {
-            this.data.Node2ID = this._node2Id
-        }
-    }
-    get anchor1ID() {
-        return this._anchor1ID
-    }
-    set anchor1ID(v) {
-        this._anchor1ID = v
-        if (this.data) {
-            this.data.Anchor1ID = this._anchor1ID
-        }
-    }
-    get anchor2ID() {
-        return this._anchor2ID
-    }
-    set anchor2ID(v) {
-        this._anchor2ID = v
-        if (this.data) {
-            this.data.Anchor2ID = this._anchor2ID
-        }
-    }
-    get maskFlag() {
-        return this._maskFlag
-    }
-    set maskFlag(v) {
-        if (v === this._maskFlag) {
-            return
-        }
-        this._maskFlag = v
-        this.update()
-    }
-    /** 接收事件作出修改  */
-    changePos() {
-        if (this.startAnchor) {
-            // 判断删除equip后,不移动
-            if (this.startAnchor.parent && this.startAnchor.parent.parent) {
-                this.pointList[0] = this.startAnchor.mapToScene(0, 0)
-            }
-        }
-        if (this.endAnchor) {
-            // 删除equip后
-            if (this.endAnchor.parent && this.endAnchor.parent.parent) {
-                this.pointList[this.pointList.length - 1] = this.endAnchor.mapToScene(0, 0)
-            }
-        }
-    }
-    /** 获取data数据  */
-    toData() {
-        let pointList = this.pointList.map((item) => {
-            return {
-                X: item.x,
-                Y: item.y,
-            }
-        })
-        if (this.data) {
-            this.data.Name = this.name;
-            this.data.PointList = pointList
-            this.data.Properties.LineWidth = this.lineWidth
-            // this.data.Properties.LineDash = this.LineDash;
-            this.data.Properties.Color = this.strokeColor.value
-        }
-        return this.data
-    }
-    onDraw(painter) {
-        if (this.maskFlag && this.status == SItemStatus.Normal) {
-            let color = new SColor(this.strokeColor)
-            color.alpha = color.alpha / 2
-            painter.pen.color = color
-            painter.drawPolyline(this.pointList)
-        } else {
-            this.selected = true
-            super.onDraw(painter)
-        }
-    }
-}

+ 206 - 156
src/lib/items/TipelineItem.ts

@@ -1,170 +1,220 @@
-import { SPolylineItem, ItemOrder, SItemStatus } from '@saga-web/big/lib'
-import { SPainter, SColor } from '@saga-web/draw'
-import { SAnchorItem, SGraphItem } from '@saga-web/graph/lib'
-import { Relation } from '../types/Relation'
-import { SPoint } from '@saga-web/draw/lib'
-import { Point } from '@saga-web/big/lib/types/Point'
+import { SPolylineItem, ItemOrder, SItemStatus } from '@saga-web/big/lib';
+import { SPainter, SColor, SRect } from '@saga-web/draw';
+import { SAnchorItem, SGraphItem } from '@saga-web/graph/lib';
+import { Relation } from '../types/Relation';
+import { SPoint } from "@saga-web/draw/lib";
+import { Point } from "@saga-web/big/lib/types/Point";
+import { SMouseEvent } from '@saga-web/base/lib';
 
 /**
  * 管道item
  *
  * */
 export class TipelineItem extends SPolylineItem {
-    /** 起始锚点  */
-    startAnchor: SAnchorItem | null = null
-    /** 结束锚点  */
-    endAnchor: SAnchorItem | null = null
-    /** 对应的图例ID  */
-    _graphElementId: string = ''
-    get graphElementId(): string {
-        return this._graphElementId
-    }
-    set graphElementId(v: string) {
-        this._graphElementId = v
-        if (this.data) {
-            this.data.GraphElementId = this._graphElementId
-        }
-    }
-    /** 关联节点1ID  */
-    _node1Id: string = ''
-    get node1Id(): string {
-        return this._node1Id
-    }
-    set node1Id(v: string) {
-        this._node1Id = v
-        if (this.data) {
-            this.data.Node1ID = this._node1Id
-        }
-    }
-    /** 关联节点2ID  */
-    _node2Id: string = ''
-    get node2Id(): string {
-        return this._node2Id
-    }
-    set node2Id(v: string) {
-        this._node2Id = v
-        if (this.data) {
-            this.data.Node2ID = this._node2Id
-        }
-    }
-    /** 关联锚点1ID  */
-    _anchor1ID: string = ''
-    get anchor1ID(): string {
-        return this._anchor1ID
-    }
-    set anchor1ID(v: string) {
-        this._anchor1ID = v
-        if (this.data) {
-            this.data.Anchor1ID = this._anchor1ID
-        }
-    }
-    /** 关联锚点2ID  */
-    _anchor2ID: string = ''
-    get anchor2ID(): string {
-        return this._anchor2ID
-    }
-    set anchor2ID(v: string) {
-        this._anchor2ID = v
-        if (this.data) {
-            this.data.Anchor2ID = this._anchor2ID
-        }
-    }
+  /** 起始锚点  */
+  startAnchor: SAnchorItem | null = null;
+  /** 结束锚点  */
+  endAnchor: SAnchorItem | null = null;
+  /** 对应的图例ID  */
+  _graphElementId: string = "";
+  get graphElementId(): string {
+    return this._graphElementId;
+  }
+  set graphElementId(v: string) {
+    this._graphElementId = v;
+    if (this.data) {
+      this.data.GraphElementId = this._graphElementId;
+    }
+  }
+  /** 关联节点1ID  */
+  _node1Id: string = "";
+  get node1Id(): string {
+    return this._node1Id;
+  }
+  set node1Id(v: string) {
+    this._node1Id = v;
+    if (this.data) {
+      this.data.Node1ID = this._node1Id;
+    }
+  }
+  /** 关联节点2ID  */
+  _node2Id: string = "";
+  get node2Id(): string {
+    return this._node2Id;
+  }
+  set node2Id(v: string) {
+    this._node2Id = v;
+    if (this.data) {
+      this.data.Node2ID = this._node2Id;
+    }
+  }
+  /** 关联锚点1ID  */
+  _anchor1ID: string = "";
+  get anchor1ID(): string {
+    return this._anchor1ID;
+  }
+  set anchor1ID(v: string) {
+    this._anchor1ID = v;
+    if (this.data) {
+      this.data.Anchor1ID = this._anchor1ID;
+    }
+  }
+  /** 关联锚点2ID  */
+  _anchor2ID: string = "";
+  get anchor2ID(): string {
+    return this._anchor2ID;
+  }
+  set anchor2ID(v: string) {
+    this._anchor2ID = v;
+    if (this.data) {
+      this.data.Anchor2ID = this._anchor2ID;
+    }
+  }
 
-    /** 是否蒙版遮罩  */
-    _maskFlag: boolean = false
-    get maskFlag(): boolean {
-        return this._maskFlag
-    }
-    set maskFlag(v: boolean) {
-        if (v === this._maskFlag) {
-            return
-        }
-        this._maskFlag = v
-        this.update()
-    }
+  /** 是否蒙版遮罩  */
+  _maskFlag: boolean = false;
+  get maskFlag(): boolean {
+    return this._maskFlag;
+  }
+  set maskFlag(v: boolean) {
+    if (v === this._maskFlag) {
+      return
+    }
+    this._maskFlag = v;
+    this.update()
+  }
 
-    /** 数据存储  */
-    data: Relation | null = null
-    /** 接收事件作出修改  */
-    changePos() {
-        if (this.startAnchor) {
-            // 判断删除equip后,不移动
-            if (this.startAnchor.parent && this.startAnchor.parent.parent) {
-                this.pointList[0] = this.startAnchor.mapToScene(0, 0)
-            }
-        }
-        if (this.endAnchor) {
-            // 删除equip后
-            if (this.endAnchor.parent && this.endAnchor.parent.parent) {
-                this.pointList[this.pointList.length - 1] = this.endAnchor.mapToScene(0, 0)
-            }
-        }
-    }
+  /** 数据存储  */
+  data: Relation | null = null;
+  /** 接收事件作出修改  */
+  changePos() {
+    if (this.startAnchor) {
+      // 判断删除equip后,不移动
+      if (this.startAnchor.parent && this.startAnchor.parent.parent) {
+        this.pointList[0] = this.startAnchor.mapToScene(0, 0);
+      }
+    }
+    if (this.endAnchor) {
+      // 删除equip后
+      if (this.endAnchor.parent && this.endAnchor.parent.parent) {
+        this.pointList[
+          this.pointList.length - 1
+        ] = this.endAnchor.mapToScene(0, 0);
+      }
+    }
+  }
 
-    constructor(parent: SGraphItem | null, data: Relation) {
-        super(parent, [])
-        this.zOrder = ItemOrder.polylineOrder
-        this.pointList = data.PointList.map((item) => {
-            return new SPoint(item.X, item.Y)
-        })
-        this.data = data
-        this.name = data.Name
-        this.id = data.ID
-        if (data.GraphElementId) {
-            this._graphElementId = data.GraphElementId
-        }
-        if (data.Node1ID) {
-            this._node1Id = data.Node1ID
-        }
-        if (data.Node2ID) {
-            this._node2Id = data.Node2ID
-        }
-        if (data.Anchor1ID) {
-            this._anchor1ID = data.Anchor1ID
-        }
-        if (data.Anchor2ID) {
-            this._anchor2ID = data.Anchor2ID
-        }
-        if (data.Properties && data.Properties.Color) {
-            this.strokeColor = new SColor(data.Properties.Color)
-        }
-        // if(data.Properties && data.Properties.LineDash){
-        //   this.LineDash = data.Properties.LineDash
-        // }
-        if (data.Properties && data.Properties.LineWidth) {
-            this.lineWidth = data.Properties.LineWidth
-        }
-    }
+  constructor(parent: SGraphItem | null, data: Relation) {
+    super(parent, []);
+    this.zOrder = ItemOrder.polylineOrder;
+    this.pointList = data.PointList.map(item => {
+      return new SPoint(item.X, item.Y);
+    });
+    this.data = data;
+    this.name = data.Name;
+    this.id = data.ID;
+    if (data.GraphElementId) {
+      this._graphElementId = data.GraphElementId
+    }
+    if (data.Node1ID) {
+      this._node1Id = data.Node1ID
+    }
+    if (data.Node2ID) {
+      this._node2Id = data.Node2ID
+    }
+    if (data.Anchor1ID) {
+      this._anchor1ID = data.Anchor1ID
+    }
+    if (data.Anchor2ID) {
+      this._anchor2ID = data.Anchor2ID
+    }
+    if (data.Properties.Zorder) {
+      this.zOrder = data.Properties.Zorder;
+    }
+    if (data.Properties && data.Properties.Color) {
+      this.strokeColor = new SColor(data.Properties.Color);
+    }
+    // if(data.Properties && data.Properties.LineDash){
+    //   this.LineDash = data.Properties.LineDash
+    // }
+    if (data.Properties && data.Properties.LineWidth) {
+      this.lineWidth = data.Properties.LineWidth;
+    }
+  }
 
-    /** 获取data数据  */
-    toData(): Relation | null {
-        let pointList: Point[] = this.pointList.map((item) => {
-            return {
-                X: item.x,
-                Y: item.y,
-            }
-        })
+  /**
+     * 鼠标按下事件
+     *
+     * @param   event   保存事件参数
+     * @return  boolean
+     */
+    onMouseDown(event: SMouseEvent): boolean {
+      if (event.buttons == 1)
+      this.$emit("legendItemClick", event);
+      return super.onMouseDown(event);
+  } // Function onMouseDown()
 
-        if (this.data) {
-            this.data.Name = this.name;
-            this.data.PointList = pointList
-            this.data.Properties.LineWidth = this.lineWidth
-            // this.data.Properties.LineDash = this.LineDash;
-            this.data.Properties.Color = this.strokeColor.value
-        }
+  /** 获取data数据  */
+  toData(): Relation | null {
+    let pointList: Point[] = this.pointList.map(item => {
+      return {
+        X: item.x,
+        Y: item.y
+      }
+    });
 
-        return this.data
+    if (this.data) {
+      this.data.Name = this.name;
+      this.data.PointList = pointList;
+      this.data.Properties.Zorder = this.zOrder;
+      this.data.Properties.LineWidth = this.lineWidth;
+      // this.data.Properties.LineDash = this.LineDash;
+      this.data.Properties.Color = this.strokeColor.value;
     }
 
-    onDraw(painter: SPainter) {
-        if (this.maskFlag && this.status == SItemStatus.Normal) {
-            let color = new SColor(this.strokeColor)
-            color.alpha = color.alpha / 2
-            painter.pen.color = color
-            painter.drawPolyline(this.pointList)
-        } else {
-            this.selected = true
-            super.onDraw(painter)
-        }
-    }
-}
+    return this.data
+  }
+
+    // onDraw(painter: SPainter) {
+    //     if (this.maskFlag && this.status == SItemStatus.Normal) {
+    //         let color = new SColor(this.strokeColor)
+    //         color.alpha = color.alpha / 8
+    //         painter.pen.color = color
+
+    //         if (this.selected) {
+    //             painter.pen.lineWidth = painter.toPx(this.lineWidth * 2);
+    //             painter.shadow.shadowBlur = 10;
+    //             painter.shadow.shadowColor = new SColor(`#00000033`);
+    //             painter.shadow.shadowOffsetX = 5;
+    //             painter.shadow.shadowOffsetY = 5;
+    //         } else {
+    //             painter.pen.lineWidth = painter.toPx(this.lineWidth);
+    //             painter.shadow.shadowColor = SColor.Transparent
+    //         }
+    //         painter.drawPolyline(this.pointList)
+
+    //         painter.pen.color = new SColor('#ffffff80')
+    //         painter.drawPolyline(this.pointList)
+    //     } else {
+    //         super.onDraw(painter)
+    //     }
+    // }
+    /**
+     * Item绘制框架
+     *
+     * @param   painter       painter对象
+     * @param   rect          绘制区域
+     */
+    onPaint(painter: SPainter, rect: SRect): void {
+      super.onPaint(painter, rect);
+      if (this.maskFlag && this.status == SItemStatus.Normal) {
+          if (this.selected) {
+              painter.pen.lineWidth = painter.toPx(this.lineWidth * 2);
+          } else {
+              painter.pen.lineWidth = painter.toPx(this.lineWidth);
+          }
+          painter.pen.color = new SColor('#ffffff80')
+          painter.drawPolyline(this.pointList)
+      }
+  } // Function onPaint()
+}

+ 5 - 0
src/lib/parsers/STopologyParser.ts

@@ -17,6 +17,7 @@ import { ItemOrder } from "@saga-web/big";
 import { SItemStatus } from "@saga-web/big";
 import { SSCPZZoneLegendItem } from '../items/SSCPZZoneLegendItem';
 import { SFHFQZoneLegendItem } from '../items/SFHFQZoneLegendItem';
+import { SCustomLegendItem } from "../items/SCustomLegendItem";
 /**
  * 拓扑图信息解析器
  *
@@ -82,6 +83,10 @@ export class STopologyParser extends SParser {
                 let item = new SFHFQZoneLegendItem(null, t);
                 item.selectable = true;
                 this.zoneLegendList.push(item);
+            }  else if (t.SubType == "CUSTOM") {
+                let item = new SCustomLegendItem(null, t);
+                item.selectable = true;
+                this.zoneLegendList.push(item);
             } else {
                 let item = new SZoneLegendItem(null, t);
                 item.selectable = true;

+ 0 - 1
src/main.js

@@ -58,7 +58,6 @@ Vue.use(cookies)
 import Pui from 'meri-design'
 import 'meri-design/dist/index.css'
 Vue.use(Pui)
-
 new Vue({
     router,
     store,

+ 13 - 2
src/main.ts

@@ -3,7 +3,7 @@ import router from './router'
 import store from './store'
 import App from './App.vue'
 Vue.config.productionTip = false
-
+import {query} from "./utils/query.js"
 import design from 'ant-design-vue'
 import 'ant-design-vue/dist/antd.css'
 Vue.use(design)
@@ -31,7 +31,6 @@ import 'leaflet/dist/leaflet.css'
 
 Vue.use(Pui)
 
- 
 //////////模拟传入参数
 const username = 'lengqiang'
 /////////////////
@@ -44,6 +43,18 @@ const username = 'lengqiang'
 //     }
 //     next()
 // })
+// 注册首屏加载
+/* import { IndexLoading } from 'meri-design'
+const indexLoading = IndexLoading();
+// 注册关闭方法,需要手动关闭
+Vue.prototype.$removeIndexLoading = () => {
+    IndexLoading.remove(indexLoading)
+}
+document.addEventListener('readystatechange',()=>{
+    if (document.readyState === 'complete') {
+        IndexLoading.remove(indexLoading)
+    }
+}) */
 new Vue({
     router,
     store,

+ 189 - 61
src/router/index.js

@@ -1,111 +1,239 @@
-import Vue from 'vue'
-import store from '@/store'
-import VueRouter from 'vue-router'
-import { query } from '@/utils/query'
-
+import Vue from "vue"
+import store from "@/store"
+import VueRouter from "vue-router"
+import {
+    query
+} from "@/utils/query"
+import {
+    getPvUv
+} from "@/api/public.js"
 Vue.use(VueRouter)
 const routes = [
+    // {
+    //     path: '/',
+    //     redirect: '/home/overview', // 只有区域,及区域以上用户才能进入总部首页这一套
+    // },
     {
-        path: '/',
-        redirect: '/home/overview',        // 只有区域,及区域以上用户才能进入总部首页这一套
-    },
-    {
-        path: '/404',
-        component: () => import('../components/404'),
+        path: "/404",
+        name: "404页面",
+        component: () => import("../components/404"),
     },
     {
-        path:'/group',
-        component: () => import('../views/statistics/index')
+        path: "/group",
+        name: "集团首页",
+        component: () => import("../views/statistics/index"),
     },
     // home
     {
-        path: '/home',
-        name: 'home',
-        component: () => import('../views/index'),
-        redirect: '/home/homepage',
-        children: [
-            {
-                path: 'homepage',
-                component: () => import('../views/homepage'),
+        path: "/home",
+        name: "home",
+        component: () => import("../views/index"),
+        redirect: "/home/homepage",
+        children: [{
+                path: "homepage",
+                name: "项目首页",
+                component: () => import("../views/homepage"),
+                redirect: "/home/overview",
             },
             //概览
             {
-                path: 'overview',
-                component: () => import('../views/overview'),
+                path: "overview",
+                name: "项目概览",
+                component: () => import("../views/overview"),
             },
             // 楼层功能
             {
-                path: 'floorFunc',
-                component: () => import('../views/floorFunc'),
+                path: "floorFunc",
+                name: "楼层功能",
+                component: () => import("../views/floorFunc"),
             },
             // 设备设施
             {
-                path: 'equipment',
-                component: () => import('../views/equipment'),
+                path: "equipment",
+                name: "设备设施",
+                component: () => import("../views/equipment"),
             },
             // 其他功能
             {
-                path: 'other',
-                component: () => import('../views/other'),
+                path: "other",
+                name: "其他事项",
+                component: () => import("../views/other"),
             },
             // 分析
             {
-                path: 'analysis',
-                component: () => import('../views/analysis'),
+                path: "analysis",
+                name: "分享报表",
+                component: () => import("../views/analysis"),
             },
             //图例库管理
             {
-                path: 'legendLibrary',
-                component: () => import('../views/legendLibrary'),
+                path: "legendLibrary",
+                name: "图例管理",
+                component: () => import("../views/legendLibrary"),
             },
             //图例绘制规则
             {
-                path: 'legendRules',
-                component: () => import('../views/legendRules'),
+                path: "legendRules",
+                name: "绘制规则",
+                component: () => import("../views/legendRules"),
             },
         ],
     },
 ]
 const router = new VueRouter({
-    mode: 'history',
+    mode: "history",
     base: process.env.BASE_URL,
     routes,
 })
-//不需要token的路由
-const ignore = ['/404', '/home/legendLibrary', '/home/legendRules']
+const ignore = ["/404"]
+
 router.beforeEach(async (to, from, next) => {
+
+    // 如果路径上有plazaId就保存
+    let plazaId = to.query.plazaId ?to.query.plazaId:''
+    if (plazaId) {
+        localStorage.setItem('PLAZAID', plazaId)
+        store.commit('STOREPLAZAID', plazaId);
+    }
+    let previewUrl = to.query.isPreview ? to.query.isPreview : '';
+    if (previewUrl) {
+        sessionStorage.setItem("SETISPREVIEW", previewUrl)
+        store.commit('SETISPREVIEW', previewUrl)
+    }
+    // 取出刷新时的 ssoToken, 路由拦截时app.vue 生命周期还没有执行,store中还没有数据,
+    let beforeunload = localStorage.getItem("beforeunload"),
+        __token = null
+    beforeunload && (__token = JSON.parse(beforeunload).ssoToken)
     if (!ignore.includes(to.path)) {
-        const token = store.getters['ssoToken'] || query().token
+        //都是需要token检验的页面 首先优先获取路由上带的token
+        let token = null
+        if (to.query.token) {
+            store.commit("SETSSOTOKEN", to.query.token) //存vuex
+            sessionStorage.setItem("SSOTOKEN", to.query.token)
+            token = to.query.token
+        } else {
+            if (store.getters["ssoToken"]) {
+                token = store.getters["ssoToken"]
+            } else if (sessionStorage.getItem("SSOTOKEN")) {
+                token = sessionStorage.getItem("SSOTOKEN")
+                store.commit("SETSSOTOKEN", sessionStorage.getItem("SSOTOKEN")) //存vuex
+            } else {
+                redirectGetToken(to,from)
+            }
+        }
+        // 如果有token
         if (token) {
-            store.commit('SETSSOTOKEN', token)
-            if (to.path == '/') {
-                next('/group')
+            // 有token 将数据 isPreview赋给 vuex方便取值
+            store.commit('SETISPREVIEW', sessionStorage.getItem("SETISPREVIEW"))
+            // 如果在跳转获取token之前保存了指定的路径,则后去token后需要跳转到相关页面
+            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("getUserInfoNoPath", router)
+                }
             }
-            if (to.path == '/group' || to.path == '/home/homepage') {
-                if (store.state.accessLevel == -1) {
-                    await store.dispatch('getUserInfo', router)
-                    await store.dispatch('getBrand')
+
+            if (sessionStorage.getItem("TOURL")) {
+                // 如果去的地址等于缓存的地址
+                if (sessionStorage.getItem("TOURL") == to.path) {
+                    sessionStorage.setItem("TOURL", '')
+                    if (to.path == "/") {
+                        next("/group")
+                    }
+                    if (to.path == "/group" || to.path == "/home/homepage") {
+                        if (store.state.accessLevel == -1) {
+                            await store.dispatch("getUserInfo", router)
+                            await store.dispatch("getBrand")
+                            // await store.dispatch('getFact')
+                        }
+                    }
+                    await store.dispatch("getFloors")
+                    await store.dispatch("getBrand")
+                    next()
+                } else {
+                    next(sessionStorage.getItem("TOURL"))
+                }
+            } else {
+                if (to.path == "/") {
+                    next("/group")
                 }
+                if (to.path == "/group" || to.path == "/home/homepage") {
+                    if (store.state.accessLevel == -1) {
+                        await store.dispatch("getUserInfo", router)
+                        console.log('getUserInfo', 4)
+                        await store.dispatch("getBrand")
+                        // await store.dispatch('getFact')
+                    }
+                }
+                await store.dispatch("getFloors")
+                await store.dispatch("getBrand")
+                next()
             }
-            await store.dispatch('getFloors')
-            await store.dispatch('getBrand')
-            next()
+
+
         } else {
-            let lastRoute = {
-                path: to.path,
-                params: to.params,
-                query: to.query,
-            }
-            store.commit('SETLASTROUTER', lastRoute)
-            let ssoServer = 'http://oauth.wanda-dev.cn'
-            let systemcode = 'CAD156',
-                signal = new Date().getTime(),
-                version = '1.0.0'
-            window.location.href = `${ssoServer}/login?systemcode=${systemcode}&signal=${signal}&version=${version}`
+            redirectGetToken(to,from)
         }
     } else {
         next()
         return
     }
 })
-export default router
+// 跳入路由后要对发送pvuv
+router.afterEach((to) => {
+    let postParams = {
+        type: "router",
+        target: to.name,
+        parameter: to.path,
+    }
+    const data = {
+        plazaId: store.getters["plazaId"],
+    }
+    getPvUv(data, postParams)
+        .then((res) => {
+            console.log("pvuv", res)
+        })
+        .catch((res) => {
+            console.log("error", res)
+        })
+})
+// 重定向获取token
+function redirectGetToken (to) {
+    let lastRoute = {
+        path: to.path,
+        params: to.params,
+        query: to.query,
+    }
+    store.commit("SETLASTROUTER", lastRoute)
+    let ssoServer = "http://oauth.wanda-dev.cn"
+    if (process.env.NODE_ENV == "wanda_build") {
+        ssoServer = "http://oauth.wanda.cn"
+    }
+    let systemcode = "CAD156",
+        signal = new Date().getTime(),
+        version = "1.0.0";
+    // 获取token前需要保存跳转前路径
+    if (!ignore.includes(to.path)) {
+    let previewUrl = to.query.isPreview ? to.query.isPreview : '';
+    let plazaId = to.query.plazaId ?to.query.plazaId:''
+    if (previewUrl) {
+        sessionStorage.setItem("SETISPREVIEW", previewUrl)
+        store.commit('SETISPREVIEW', previewUrl)
+    }
+    // else{
+    //     sessionStorage.setItem("SETISPREVIEW", 'false')
+    //     store.commit('SETISPREVIEW', 'false')
+    // }
+    if (plazaId) {
+        localStorage.setItem('PLAZAID', plazaId)
+        store.commit('STOREPLAZAID', plazaId)
+    }
+        sessionStorage.setItem("TOURL", to.path)
+    } else {
+        // 如果重定向前为404则跳入/
+        sessionStorage.setItem("TOURL", '/')
+    }
+    window.location.href = `${ssoServer}/login?systemcode=${systemcode}&signal=${signal}&version=${version}`
+}
+export default router

+ 0 - 0
src/shims-vue.d.ts


Some files were not shown because too many files changed in this diff