Browse Source

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

zhulizhen1111 4 years ago
parent
commit
d27d31a3db
100 changed files with 67173 additions and 1282 deletions
  1. 0 3
      .gitignore
  2. 3 3
      package.json
  3. 0 0
      public/g.js
  4. 6 1
      public/index.html
  5. 6 0
      src/App.vue
  6. 2 7
      src/api/coreDeviceReport.js
  7. 2 1
      src/api/equipmentList.js
  8. 14 0
      src/api/ganttChart.js
  9. 6 0
      src/api/httputils.js
  10. 4 0
      src/api/legendLibrary.js
  11. 10 1
      src/api/specificationUpdateRecord.js
  12. 10 0
      src/assets/css/rotation.css
  13. 10 0
      src/assets/css/rotation.less
  14. 1 0
      src/assets/geoData/china.json
  15. BIN
      src/assets/imgs/analysis/picture.png
  16. BIN
      src/assets/imgs/analysis/report_pdf.png
  17. BIN
      src/assets/imgs/analysis/report_word.png
  18. BIN
      src/assets/imgs/nkt.jpg
  19. BIN
      src/assets/imgs/qwt.jpg
  20. 1944 0
      src/assets/provinceData/anhui.json
  21. 1413 0
      src/assets/provinceData/beijing.json
  22. 1931 0
      src/assets/provinceData/chongqing.json
  23. 2581 0
      src/assets/provinceData/fujian.json
  24. 2119 0
      src/assets/provinceData/gansu.json
  25. 2854 0
      src/assets/provinceData/guangdong.json
  26. 2213 0
      src/assets/provinceData/guangxi.json
  27. 2279 0
      src/assets/provinceData/guizhou.json
  28. 1722 0
      src/assets/provinceData/hebei.json
  29. 2225 0
      src/assets/provinceData/heilongjiang.json
  30. 2097 0
      src/assets/provinceData/henan.json
  31. 2211 0
      src/assets/provinceData/hubei.json
  32. 2126 0
      src/assets/provinceData/hunan.json
  33. 1468 0
      src/assets/provinceData/jiangsu.json
  34. 1798 0
      src/assets/provinceData/jiangxi.json
  35. 2745 0
      src/assets/provinceData/jilin.json
  36. 2587 0
      src/assets/provinceData/liaoning.json
  37. 1756 0
      src/assets/provinceData/neimenggu.json
  38. 1220 0
      src/assets/provinceData/ningxia.json
  39. 1956 0
      src/assets/provinceData/qinghai.json
  40. 2261 0
      src/assets/provinceData/shandong.json
  41. 982 0
      src/assets/provinceData/shanghai.json
  42. 1264 0
      src/assets/provinceData/shanxi1.json
  43. 813 0
      src/assets/provinceData/shanxi2.json
  44. 2039 0
      src/assets/provinceData/sichuan.json
  45. 1249 0
      src/assets/provinceData/tianjin.json
  46. 1250 0
      src/assets/provinceData/xinjiang.json
  47. 2315 0
      src/assets/provinceData/xizang.json
  48. 1814 0
      src/assets/provinceData/yunnan.json
  49. 3074 0
      src/assets/provinceData/zhejiang.json
  50. 6384 0
      src/assets/regionData/other.json
  51. 21 0
      src/assets/svg/menu.svg
  52. 16 0
      src/assets/svg/picture.svg
  53. 20 0
      src/assets/svg/plan_time.svg
  54. 18 0
      src/assets/svg/real_time.svg
  55. 19 0
      src/assets/svg/report.svg
  56. 18 0
      src/assets/svg/task.svg
  57. 30 21
      src/components/Legend/src/legend.vue
  58. BIN
      src/components/Rotation/src/3440.jpg
  59. 28 6
      src/components/Rotation/src/rotation.vue
  60. 84 50
      src/components/editLengend.vue
  61. 1 0
      src/components/floorList.vue
  62. 18 22
      src/components/floorMap/index.vue
  63. 6 2
      src/components/viewLengend.vue
  64. 94 94
      src/lib/items/SFHFQZoneLegendItem.js
  65. 98 94
      src/lib/items/SFHFQZoneLegendItem.ts
  66. 11 0
      src/lib/items/SImageLegendItem.js
  67. 12 2
      src/lib/items/SImageLegendItem.ts
  68. 55 63
      src/lib/items/SLineMarkerItem.js
  69. 51 58
      src/lib/items/SLineMarkerItem.ts
  70. 96 96
      src/lib/items/SSCPZZoneLegendItem.js
  71. 98 94
      src/lib/items/SSCPZZoneLegendItem.ts
  72. 94 94
      src/lib/items/SZoneLegendItem.js
  73. 101 97
      src/lib/items/SZoneLegendItem.ts
  74. 63 63
      src/lib/items/TipelineItem.js
  75. 156 157
      src/lib/items/TipelineItem.ts
  76. 14 0
      src/main.ts
  77. 46 34
      src/router/index.js
  78. 21 9
      src/store/index.js
  79. 153 60
      src/utils/ganttChart/GanttChart.js
  80. 438 0
      src/utils/ganttChart/GanttChart_old.js
  81. 71 21
      src/views/analysis/CoreDeviceReport.vue
  82. 253 8
      src/views/analysis/GanttChart.vue
  83. 44 9
      src/views/analysis/SpecificationUpdateRecord.vue
  84. 8 0
      src/views/analysis/index.vue
  85. 30 16
      src/views/equipment/index.vue
  86. 1 0
      src/views/equipment/table/djspTable.vue
  87. 4 4
      src/views/equipment/table/eqDetaileDialog.vue
  88. 1 2
      src/views/equipment/table/wbTable.vue
  89. 1 1
      src/views/equipment/table/wxTable.vue
  90. 27 31
      src/views/homepage/index.vue
  91. 1 4
      src/views/legendLibrary/addForm.vue
  92. 31 32
      src/views/legendLibrary/index.vue
  93. 1 1
      src/views/legendRules/index.vue
  94. 15 5
      src/views/other/index.vue
  95. 1 1
      src/views/other/zhsxOtherTable1.vue
  96. 18 6
      src/views/other/zhsxOtherTable2.vue
  97. 17 6
      src/views/overview/index.vue
  98. 1 1
      src/views/overview/picModal.vue
  99. 4 2
      src/views/room/index.vue
  100. 0 0
      src/views/statistics/index.vue

+ 0 - 3
.gitignore

@@ -1,9 +1,6 @@
 .DS_Store
 node_modules
 package-lock.json
-/src/assets/geoData
-/src/assets/regionData
-/src/assets/provinceData
 /dist
 # 忽略提交打包后的wandaBmGuide目录
 /wandaBmGuide 

+ 3 - 3
package.json

@@ -10,10 +10,10 @@
     "dependencies": {
         "@mapbox/geojson-merge": "^1.1.1",
         "@saga-web/base": "2.1.22",
-        "@saga-web/big": "1.0.67",
+        "@saga-web/big": "1.0.72",
         "@saga-web/draw": "2.1.100",
-        "@saga-web/feng-map": "1.0.19",
-        "@saga-web/graph": "2.1.102",
+        "@saga-web/feng-map": "1.0.20",
+        "@saga-web/graph": "2.1.105",
         "ant-design-vue": "^1.4.10",
         "axios": "^0.19.2",
         "core-js": "^3.4.4",

src/utils/ganttChart/g.js → public/g.js


+ 6 - 1
public/index.html

@@ -8,6 +8,7 @@
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
     <link rel="icon" href="<%= BASE_URL %>favicon.ico">
     <script src="<%= BASE_URL %>systemConf.js"></script>
+    <script src="<%= BASE_URL %>g.js"></script>
     <title>万达广场管理说明书</title>
     <style>
         .map-p-label{
@@ -15,6 +16,11 @@
             border:none!important;
             box-shadow:none!important;
         }
+        .my-leaflet-div-icon{
+            width: auto!important;
+            white-space: nowrap;
+            word-break: normal;
+        }
         .leaflet-container{
             background: #f7f9fa!important;
         }
@@ -84,7 +90,6 @@
         <strong>We're sorry but wandaspecificationofsanming doesn't work properly without JavaScript enabled. Please enable
             it to continue.</strong>
         </noscript>
-    <script src="http://localhost/g.js" type="text/JavaScript"></script>
     <div id="app"></div>
  
 </body>

+ 6 - 0
src/App.vue

@@ -268,4 +268,10 @@ body {
         width: 8%;
     }
 }
+.el-dialog__header{
+  border-bottom: 1px solid rgba(239,240,241,1);
+}
+.gantt-chart .el-dialog__title{
+  font-weight: 500;
+}
 </style>

+ 2 - 7
src/api/coreDeviceReport.js

@@ -1,19 +1,14 @@
 /*
  * @Author: your name
  * @Date: 2020-07-03 19:04:47
- * @LastEditTime: 2020-07-09 19:58:31
- * @LastEditors: your name
+ * @LastEditTime: 2020-07-12 11:15:12
+ * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: \wanda-bm-guide\src\api\coreDeviceReport.js
  */
 
 // 核心设备报表 接口
 import httputils from '@/api/httputils'
-
-// 系统列表
-// export function queryEquipmentList() {
-//     return httputils.getJson(`/data/v_glsms_systemcfg/querySmsxt`)
-// }
 /**
  * 系统列表
  */

+ 2 - 1
src/api/equipmentList.js

@@ -1,4 +1,5 @@
-import httputils from '@/api/httputils'
+ 
+import httputils from "@/api/httputils"
 
 // 设备设施-主要设备清单
 export function queryEquipmentList({ data, postParams }) {

+ 14 - 0
src/api/ganttChart.js

@@ -1,5 +1,19 @@
 import httputils from "@/api/httputils";
 
+/**
+ * 获取甘特图数据
+ * @param {*} url 
+ * @param {*} getParams 
+ */
 export function queryGanttChart(url, getParams) {
   return httputils.getJson(url, getParams);
+}
+
+/**
+ * 获取甘特图任务数据
+ * @param {*} url 
+ * @param {*} getParams 
+ */
+export function queryGanttDetail(url, getParams) {
+  return httputils.getJson(url, getParams);
 }

+ 6 - 0
src/api/httputils.js

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

+ 4 - 0
src/api/legendLibrary.js

@@ -72,10 +72,14 @@ export function graphElementSearch({ postParams }) {
 // }
 
 // 业下设备分类和位置分类树形结构
+ 
+ 
+ 
 
 export function queryDeviceAndPOsition({
     postParams
 }) {
+ 
     return httputils.postJson(`/data/t_system_wzfl/query`, postParams)
 }
 

+ 10 - 1
src/api/specificationUpdateRecord.js

@@ -1,6 +1,15 @@
 // 说明说更新记录 接口
 import httputils from "@/api/httputils";
 
+export function queryEventypes(url, param) {
+  return httputils.postJson(url, param);
+}
+
+/**
+ * 获取表数据
+ * @param {*} url 
+ * @param {*} param 
+ */
 export function getSpecificaltionData(url, param) {
   return httputils.getJson(url, param);
-}
+}

+ 10 - 0
src/assets/css/rotation.css

@@ -93,6 +93,11 @@
   right: 8px;
   cursor: pointer;
 }
+.overview .view-box .view-left .lb-left .lb-left-noImg {
+  width: 100%;
+  height: 100%;
+  object-fit: fill;
+}
 .overview .view-box .view-left .lb-bottom {
   height: 34%;
   background: #ffffff;
@@ -223,6 +228,11 @@
   right: 8px;
   cursor: pointer;
 }
+.overview .view-box .view-right .view-right-box .lb-right .lb-left-noImg {
+  width: 100%;
+  height: 100%;
+  object-fit: fill;
+}
 .overview .view-box .view-right .view-right-box .lb-right-bottom {
   height: 53%;
   background: #ffffff;

+ 10 - 0
src/assets/css/rotation.less

@@ -94,6 +94,11 @@
                     right: 8px;
                     cursor: pointer;
                 }
+                .lb-left-noImg {
+                    width: 100%;
+                    height: 100%;
+                    object-fit: fill;
+                }
             }
             .lb-bottom {
                 height: 34%;
@@ -224,6 +229,11 @@
                         right: 8px;
                         cursor: pointer;
                     }
+                    .lb-left-noImg {
+                        width: 100%;
+                        height: 100%;
+                        object-fit: fill;
+                    }
                 }
                 .lb-right-bottom {
                     height: 53%;

File diff suppressed because it is too large
+ 1 - 0
src/assets/geoData/china.json


BIN
src/assets/imgs/analysis/picture.png


BIN
src/assets/imgs/analysis/report_pdf.png


BIN
src/assets/imgs/analysis/report_word.png


BIN
src/assets/imgs/nkt.jpg


BIN
src/assets/imgs/qwt.jpg


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


+ 21 - 0
src/assets/svg/menu.svg

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="16px" height="12px" viewBox="0 0 16 12" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <!-- Generator: Sketch 64 (93537) - https://sketch.com -->
+    <title>菜单</title>
+    <desc>Created with Sketch.</desc>
+    <g id="各种首页" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="甘特图-弹窗" transform="translate(-301.000000, -563.000000)" fill-rule="nonzero">
+            <g id="编组-3">
+                <g id="菜单" transform="translate(301.000000, 561.000000)">
+                    <rect id="矩形" fill="#000000" opacity="0" x="0" y="0" width="16" height="16"></rect>
+                    <path d="M0.699333328,3.66666667 C0.699333328,4.21895142 1.14704858,4.66666667 1.69933333,4.66666667 C2.25161808,4.66666667 2.69933333,4.21895142 2.69933333,3.66666667 C2.69933333,3.11438192 2.25161808,2.66666667 1.69933333,2.66666667 C1.14704858,2.66666667 0.699333328,3.11438192 0.699333328,3.66666667 Z" id="路径" fill="#8D9399"></path>
+                    <path d="M0.666666672,8.28 C0.666666672,8.83228475 1.11438192,9.28 1.66666667,9.28 C2.21895142,9.28 2.66666667,8.83228475 2.66666667,8.28 C2.66666667,7.72771525 2.21895142,7.28 1.66666667,7.28 C1.11438192,7.28 0.666666672,7.72771525 0.666666672,8.28 Z" id="路径" fill="#8D9399"></path>
+                    <path d="M0.666666672,12.984 C0.666666672,13.5362847 1.11438192,13.984 1.66666667,13.984 C2.21895142,13.984 2.66666667,13.5362847 2.66666667,12.984 C2.66666667,12.4317153 2.21895142,11.984 1.66666667,11.984 C1.11438192,11.984 0.666666672,12.4317153 0.666666672,12.984 Z" id="路径" fill="#8D9399"></path>
+                    <path d="M4.38333333,2.988 L14.3833333,2.988 C14.8277778,2.988 15.05,3.21022222 15.05,3.65466667 L15.05,3.65466667 C15.05,4.09911112 14.8277778,4.32133333 14.3833333,4.32133333 L4.38333333,4.32133333 C3.93888888,4.32133333 3.71666667,4.09911111 3.71666667,3.65466667 L3.71666667,3.65466667 C3.71666667,3.21022222 3.93888889,2.988 4.38333333,2.988 L4.38333333,2.988 Z" id="路径" fill="#8D9399"></path>
+                    <path d="M4.38333333,7.65466667 L14.3833333,7.65466667 C14.8277778,7.65466667 15.05,7.87688889 15.05,8.32133333 L15.05,8.32133333 C15.05,8.76577778 14.8277778,8.988 14.3833333,8.988 L4.38333333,8.988 C3.93888888,8.988 3.71666667,8.76577778 3.71666667,8.32133333 L3.71666667,8.32133333 C3.71666667,7.87688888 3.93888889,7.65466667 4.38333333,7.65466667 Z" id="路径" fill="#8D9399"></path>
+                    <path d="M4.38333333,12.3213333 L14.3833333,12.3213333 C14.8277778,12.3213333 15.05,12.5435556 15.05,12.988 L15.05,12.988 C15.05,13.4324444 14.8277778,13.6546667 14.3833333,13.6546667 L4.38333333,13.6546667 C3.93888888,13.6546667 3.71666667,13.4324444 3.71666667,12.988 L3.71666667,12.988 C3.71666667,12.5435556 3.93888889,12.3213333 4.38333333,12.3213333 Z" id="路径" fill="#8D9399"></path>
+                </g>
+            </g>
+        </g>
+    </g>
+</svg>

File diff suppressed because it is too large
+ 16 - 0
src/assets/svg/picture.svg


File diff suppressed because it is too large
+ 20 - 0
src/assets/svg/plan_time.svg


File diff suppressed because it is too large
+ 18 - 0
src/assets/svg/real_time.svg


File diff suppressed because it is too large
+ 19 - 0
src/assets/svg/report.svg


File diff suppressed because it is too large
+ 18 - 0
src/assets/svg/task.svg


+ 30 - 21
src/components/Legend/src/legend.vue

@@ -6,10 +6,10 @@
 <template>
     <div>
         <div class='legend-container'>
-            <div v-show='!show' class='legend' @click='showTl' v-if='(type==1 || floors.length>0)&& isMessage'>图例</div>
-            <div v-show='show' class='legend2' @click='showTl' v-if='(type==1 || floors.length>0)&& isMessage'>图例</div>
+            <div :class='showView===1?"legend2":"legend"' @click='showTl' v-if='(type==1 || floors.length>0)&& isMessage'>图例</div>
+            <!-- 图里展示状态组件 -->
             <el-collapse-transition v-if='(type==1 || floors.length>0)&& isMessage'>
-                <div class='legend-tab' v-if='show'>
+                <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>
@@ -18,8 +18,9 @@
                     </div>
                 </div>
             </el-collapse-transition>
-            <el-collapse-transition @isShow2='isShow2'>
-                <div v-if='show2'>
+            <!-- 图例编辑状态组件 -->
+            <el-collapse-transition>
+                <div v-if='showView===2'>
                     <lengend-edit
                         @handleSwich2='handleSwich2'
                         v-if='editTable.length>=0'
@@ -111,8 +112,6 @@ export default {
                 '<p>主要设备房包括:冷源机房,热源机房,开闭站,配变电所(室),发电机房,消防水泵房,消防高位水箱间,生活水泵房,慧云机房,垃圾房</p>',
             text2: '<p>图例后×的数字,代表此位置的数量</p>',
             text2: '',
-            show: true,
-            show2: false,
             loading: true,
             loading1: true,
             viewTable: [],
@@ -136,7 +135,7 @@ export default {
         }
     },
     computed: {
-        ...mapGetters(['plazaId', 'fmapID', 'floorSelect', 'isMessage', 'ssoToken'])
+        ...mapGetters(['plazaId', 'fmapID', 'floorSelect', 'isMessage', 'ssoToken', 'showView'])
     },
     props: {
         floors: {
@@ -253,19 +252,23 @@ export default {
         },
         // 点击展示图例框
         showTl() {
-            this.show = !this.show
-            this.queryView(false)
-            if (this.show) {
-                this.show2 = false
+            if (this.showView != 1) {
+                this.$store.commit('SETSHOWVIEW', 1)
+            } else {
+                this.$store.commit('SETSHOWVIEW', 0)
             }
+            this.queryView(false)
         },
         cance() {
-            this.show2 = false
+            // this.show2 = false
         },
         // 编辑图例
         editTl() {
-            this.show = false
-            this.show2 = true
+            if (this.showView != 2) {
+                this.$store.commit('SETSHOWVIEW', 2)
+            } else {
+                this.$store.commit('SETSHOWVIEW', 0)
+            }
             this.queryEditNum(true)
         },
         /**
@@ -291,12 +294,19 @@ export default {
             let url = editerUrl + 'editer?' + encodeURIComponent(data)
             window.open(url, true)
         },
+        // 编辑状态取消
         isShow2() {
-            this.show2 = !this.show2
+            // if (this.showView != 2) {
+            //     this.$store.commit('SETSHOWVIEW', 1)
+            // } else {
+            //     this.$store.commit('SETSHOWVIEW', 0)
+            // }
+            // this.show2 = !this.show2
         },
         handleSwich(val) {
             this.queryView(!val)
         },
+        // 默认隐藏为0的项目
         handleSwich2(val) {
             this.editSwitch = val
             this.queryEditNum(!this.editSwitch)
@@ -361,9 +371,8 @@ export default {
                         message: '操作成功',
                         type: 'success'
                     })
-                    this.queryEditNum(this.editSwitch)
-                    this.show2 = false
-                    this.show = true
+                    this.$store.commit('SETSHOWVIEW', 1)
+                    // this.queryEditNum(this.editSwitch)
                 } else {
                     this.$message({
                         message: '操作失败',
@@ -378,9 +387,9 @@ export default {
                     element.Modify = element.IsModify
                 })
                 this.queryEdit(val)
-                this.isShow2()
+                // this.isShow2()
             } else {
-                this.show2 = false
+                // this.show2 = false
                 // this.isShow2()
                 // this.queryEditNum(true)
             }

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


+ 28 - 6
src/components/Rotation/src/rotation.vue

@@ -4,15 +4,16 @@
 *@info:图片轮播
 */
 <template>
-    <div class='rotation'>
+    <div :class='[type?"rotationFull":"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
             />-->
             <img :src='rotationImg[0].url' alt />
+            <!-- <img src='./3440.jpg' alt /> -->
         </div>
-        <el-carousel v-else trigger='click' style='height:100%' :interval='5000' arrow='always'>
+        <el-carousel v-else trigger='click' style='height:100%;width:100%' :interval='5000' arrow='always'>
             <el-carousel-item v-for='(item,index) in rotationImg' :key='index'>
                 <img :src='item.url' alt />
             </el-carousel-item>
@@ -22,7 +23,7 @@
 <script>
 export default {
     name: 'Rotation',
-    props: ['rotationImg'],
+    props: ['rotationImg', 'type'],
     data() {
         return {
             rotationImgs: [{ url: require('@/assets/images/login_back.png') }]
@@ -51,12 +52,33 @@ export default {
         // margin: auto;
         width: 100%;
         height: 100%;
-        object-fit: fill;
+        object-fit: cover;
+    }
+}
+.rotationFull {
+    width: 100%;
+    height: 100%;
+    overflow: auto;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    .rotationCon {
+        height: 100%;
+        width: 100%;
+        // display: flex;
+    }
+    img {
+        // max-width: 100%;
+        // max-height: 100%;
+        // display: block;
+        // margin: auto;
+        min-width: 100%;
     }
 }
 </style>
 <style lang="less">
-.rotation {
+.rotation,
+.rotationFull {
     .el-carousel__item h3 {
         color: #475669;
         font-size: 14px;
@@ -72,7 +94,7 @@ export default {
         background-color: #d3dce6;
     }
     .el-carousel__container {
-        height: 100%;
+        height: 100% !important;
     }
     .el-carousel__button {
         height: 3px;

+ 84 - 50
src/components/editLengend.vue

@@ -116,6 +116,8 @@
     </div>
 </template>
 <script>
+import { updateStatis } from '@/api/public.js'
+
 export default {
     props: ['editTable', 'loading'],
     data() {
@@ -131,64 +133,96 @@ export default {
         handleSelectionChange(val) {
             this.multipleSelection = val
         },
+        // 编辑图例取消
         cancel() {
-            this.save()
-            // this.$emit('cance')
+            if (this.editNum.length > 0) {
+                this.$confirm('图例中的数据发生变化, 是否需要保存?', {
+                    confirmButtonText: '保存',
+                    cancelButtonText: '放弃修改',
+                    type: 'warning'
+                })
+                    .then(() => {
+                        this.$emit('saveNum', this.editNum)
+                    })
+                    .catch(() => {
+                        this.$message({
+                            type: 'info',
+                            message: '已放弃修改'
+                        })
+                        this.editNum = []
+                        this.$emit('saveNum', this.editNum)
+                        this.$store.commit('SETSHOWVIEW', 1)
+                    })
+            } else {
+                this.$store.commit('SETSHOWVIEW', 1)
+            }
+        },
+        // 编辑图里保存
+        save() {
+            this.queryEdit(this.editNum)
+        },
+        // 编辑数量
+        queryEdit(val) {
+            let params = {
+                postParams: {
+                    Content: val
+                }
+            }
+            updateStatis(params).then(res => {
+                if (res.Result == 'success') {
+                    this.$message({
+                        message: '操作成功',
+                        type: 'success'
+                    })
+                    this.$store.commit('SETSHOWVIEW', 1)
+                } else {
+                    this.$message({
+                        message: '操作失败',
+                        type: 'error'
+                    })
+                }
+            })
         },
+        // 修改图例数量
         changeTable(val) {
             this.editNum.push(val)
-            var obj = {}
-            this.editNum = this.editNum.reduce(function(item, next) {
-                obj[next.key] ? '' : (obj[next.key] = true && item.push(next))
-                return item
-            }, [])
+            let result = [],
+                obj = {}
+            for (var i = 0; i < this.editNum.length; i++) {
+                if (!obj[this.editNum[i].GraphElementId]) {
+                    result.push(this.editNum[i])
+                    obj[this.editNum[i].GraphElementId] = true
+                }
+            }
         },
+        // 修改隐藏为0的项目的开关
         changeSwitch(val) {
             this.$emit('handleSwich2', val)
-        },
-        save() {
-            this.$emit('saveNum', this.editNum)
-            // this.$confirm('图例中的数据发生变化, 是否需要保存?', {
-            //     confirmButtonText: '保存',
-            //     cancelButtonText: '放弃修改',
-            //     type: 'warning'
-            // })
-            //     .then(() => {
-            //         this.$emit('saveNum', this.editNum)
-            //     })
-            //     .catch(() => {
-            //         this.$message({
-            //             type: 'info',
-            //             message: '已放弃修改'
-            //         })
-            //         this.editNum = []
-            //         this.$emit('saveNum', this.editNum)
-            //     })
-        },
-        init() {
-            this.tbData1 = []
-            this.tbData2 = []
-            this.tbData3 = []
-            if (this.editTable.length > 0) {
-                this.tbData1 = this.editTable
-                // 以下不要动 不要删
-                // let len = this.tableData.length
-                // if (len <= 10) {
-                //     this.tbData1 = this.tableData
-                // } else if (len > 10 && len <= 20) {
-                //     this.tbData1 = this.tableData.slice(0, 10)
-                //     this.tbData2 = this.tableData.slice(10, len)
-                // } else if (len > 10 && len <= 30) {
-                //     this.tbData1 = this.tableData.slice(0, 10)
-                //     this.tbData2 = this.tableData.slice(10, 20)
-                //     this.tbData3 = this.tableData.slice(20, len)
-                // } else {
-                //     this.tbData1 = this.tableData.slice(0, parseInt(len / 3))
-                //     this.tbData2 = this.tableData.slice(parseInt(len / 3), parseInt(len / 3) * 2)
-                //     this.tbData3 = this.tableData.slice(parseInt(len / 3) * 2, len)
-                // }
-            }
         }
+        // init() {
+        // this.tbData1 = []
+        // this.tbData2 = []
+        // this.tbData3 = []
+        // if (this.editTable.length > 0) {
+        //     this.tbData1 = this.editTable
+        // 以下不要动 不要删
+        // let len = this.tableData.length
+        // if (len <= 10) {
+        //     this.tbData1 = this.tableData
+        // } else if (len > 10 && len <= 20) {
+        //     this.tbData1 = this.tableData.slice(0, 10)
+        //     this.tbData2 = this.tableData.slice(10, len)
+        // } else if (len > 10 && len <= 30) {
+        //     this.tbData1 = this.tableData.slice(0, 10)
+        //     this.tbData2 = this.tableData.slice(10, 20)
+        //     this.tbData3 = this.tableData.slice(20, len)
+        // } else {
+        //     this.tbData1 = this.tableData.slice(0, parseInt(len / 3))
+        //     this.tbData2 = this.tableData.slice(parseInt(len / 3), parseInt(len / 3) * 2)
+        //     this.tbData3 = this.tableData.slice(parseInt(len / 3) * 2, len)
+        // }
+        // }
+        // }
     },
     mounted() {}
 }

+ 1 - 0
src/components/floorList.vue

@@ -173,6 +173,7 @@ export default {
          * @param {Number} 楼层信息在floorsArr数组中的位置
          */
         tabFloor(item, index) {
+            this.$store.commit('SETSHOWVIEW', 1)
             this.currentFloorId = this.floorIdArr[index]
             this.handleCookie()
             this.handlePosition(1, index, this.floorIdArr.length)

+ 18 - 22
src/components/floorMap/index.vue

@@ -91,10 +91,6 @@ export default {
                     let imgItem = new SImageItem(null, `${this.mapServerURL}/webtheme/${this.fmapID}/${window.fengmapData.frImg}`)
                     this.scene.addItem(imgItem)
                     this.view.scene = this.scene
-                    this.view.minScale = this.view.scale
-                    if (this.$refs.canvasFun) {
-                        this.$refs.canvasFun.everyScale = this.view.scale
-                    }
                     this.view.fitSceneToView()
                 }
             } else {
@@ -121,10 +117,6 @@ export default {
                         this.fParser.casementList.forEach(t => this.scene.addItem(t))
                         this.view.scene = this.scene
                         this.view.fitSceneToView()
-                        this.view.minScale = this.view.scale
-                        if (this.$refs.canvasFun) {
-                            this.$refs.canvasFun.everyScale = this.view.scale
-                        }
                     })
                 } else {
                     console.log('楼层不正确')
@@ -190,6 +182,10 @@ export default {
                     this.scene.addItem(t)
                 })
                 this.view.fitSceneToView()
+                this.view.minScale = this.view.scale
+                if (this.$refs.canvasFun) {
+                    this.$refs.canvasFun.everyScale = this.view.scale
+                }
             })
         },
         clearGraphy() {
@@ -341,25 +337,25 @@ export default {
                     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)
-                })
-                this.topologyParser.imageMarkerList.forEach(t => {
-                    let id = t.data.GraphElementId
-                    t.maskFlag = !(res.indexOf(id) > -1)
-                })
-                this.topologyParser.lineMarkerList.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)
+                // })
+                // this.topologyParser.imageMarkerList.forEach(t => {
+                //     let id = t.data.GraphElementId
+                //     t.maskFlag = !(res.indexOf(id) > -1)
+                // })
+                // this.topologyParser.lineMarkerList.forEach(t => {
+                //     let id = t.data.GraphElementId
+                //     t.maskFlag = !(res.indexOf(id) > -1)
+                // })
                 this.topologyParser.imageLegendList.forEach(t => {
                     let id = t.data.GraphElementId
-                    t.maskFlag = !(res.indexOf(id) > -1)
+                    t.selected = (res.indexOf(id) > -1)
                 })
                 this.topologyParser.relationList.forEach(t => {
                     let id = t.data.GraphElementId
-                    t.maskFlag = !(res.indexOf(id) > -1)
+                    t.selected = (res.indexOf(id) > -1)
                 })
             })
         }

+ 6 - 2
src/components/viewLengend.vue

@@ -15,12 +15,16 @@
             >
                 <el-table-column prop label='说明'>
                     <template slot-scope='{row}'>
-                        <span>{{(row.Properties && row.Properties.ItemExplain)?row.Properties.ItemExplain:'--'}}</span>
+                        <span v-if='row.Properties && row.Properties.ItemExplain'>{{row.Properties.ItemExplain}}</span>
                     </template>
                 </el-table-column>
                 <el-table-column prop label='图例' width='60' align='center'>
                     <template slot-scope='{row}'>
-                        <div class='scpz-img' :style='`background:${row.Properties.FillColor};border:1px solid ${row.Properties.StrokeColor}`'></div>
+                        <div
+                            class='scpz-img'
+                            v-if='row.Properties && row.Properties.ItemExplain'
+                            :style='`background:${row.Properties.FillColor};border:1px solid ${row.Properties.StrokeColor}`'
+                        ></div>
                     </template>
                 </el-table-column>
             </el-table>

+ 94 - 94
src/lib/items/SFHFQZoneLegendItem.js

@@ -1,7 +1,7 @@
-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';
+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(区域类型 --防火分区)
  *
@@ -15,174 +15,174 @@ export class SFHFQZoneLegendItem extends SPolygonItem {
      * @param data      图例节点对象数据
      */
     constructor(parent, data) {
-        super(parent);
+        super(parent)
         /** text item   */
-        this.textItem = new STextItem(this);
+        this.textItem = new STextItem(this)
         /** 是否显示文字  */
-        this._showText = true;
+        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;
+        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;
+            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;
+                    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;
+                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.LineDash){
             //     this.LineDash =this._legend.Properties.LineDash
             //    }
         }
         // 监听多边形创建完成事件,并动态计算文本位置
-        this.connect("finishCreated", this, () => {
+        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);
-        });
+                    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;
+        return this.textItem.text
     }
     set text(v) {
-        this.textItem.text = v;
-        this.update();
+        this.textItem.text = v
+        this.update()
     }
     get color() {
-        return this.textItem.color;
+        return this.textItem.color
     }
     set color(v) {
-        this.textItem.color = v;
+        this.textItem.color = v
     }
     get font() {
-        return this.textItem.font;
+        return this.textItem.font
     }
     set font(v) {
-        this.textItem.font = v;
+        this.textItem.font = v
     }
     get status() {
-        return this._status;
+        return this._status
     }
     // 编辑当前状态
     set status(value) {
-        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) {
+        } else if (value == SItemStatus.Edit) {
             // 切换编辑状态显示文本
-            this.showText = true;
+            this.showText = true
             // 切换编辑状态可移动文本
-            this.textItem.moveable = true;
-        }
-        else if (value == SItemStatus.Create) {
+            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()
     }
-    ;
     get showText() {
-        return this._showText;
+        return this._showText
     }
     set showText(v) {
         if (v === this._showText) {
-            return;
+            return
         }
-        this._showText = v;
+        this._showText = v
         if (v) {
-            this.textItem.show();
-        }
-        else {
-            this.textItem.hide();
+            this.textItem.show()
+        } else {
+            this.textItem.hide()
         }
     }
     get maskFlag() {
-        return this._maskFlag;
+        return this._maskFlag
     }
     set maskFlag(v) {
         if (v === this._maskFlag) {
-            return;
+            return
         }
-        this._maskFlag = v;
-        this.update();
+        this._maskFlag = v
+        this.update()
     }
     toData() {
-        this.data.Pos = { X: this.x, Y: this.y };
-        this.data.Name = this.text;
-        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 => {
+        this.data.Pos = { X: this.x, Y: this.y }
+        this.data.Name = this.text
+        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;
+                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 = 100;
-            let brushcolor = new SColor(this.fillColor);
-            brushcolor.alpha = 100;
-            painter.pen.color = color;
-            painter.pen.lineCapStyle = SLineCapStyle.Square;
-            painter.pen.lineWidth = painter.toPx(this._lineWidth);
-            painter.brush.color = brushcolor;
+            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 {
-            super.onDraw(painter);
+            painter.drawPolygon([...this.pointList])
+        } else {
+            this.selected = true
+            super.onDraw(painter)
         }
     }
 } // Class SZoneLegendItem

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

@@ -1,10 +1,9 @@
-
-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 } 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'
 /**
  *图例节点Item(区域类型 --防火分区)
  *
@@ -12,23 +11,23 @@ import { SItemStatus, ItemOrder, SPolygonItem } from '@saga-web/big/lib';
  */
 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
@@ -38,62 +37,62 @@ 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()
+    }
 
     /** 是否显示文字  */
-    _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,24 +103,24 @@ 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.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) {
-                    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
                 }
             }
             // 设置线宽
@@ -129,92 +128,97 @@ export class SFHFQZoneLegendItem extends SPolygonItem {
                 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)
             }
             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)
         })
     }
 
     toData(): any {
-        this.data.Pos = { X: this.x, Y: this.y };
-        this.data.Name = this.text;
-        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.text
+        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
+        return this.data
     }
 
     onDraw(painter: SPainter) {
         if (this.maskFlag && this.status == SItemStatus.Normal) {
             let color = new SColor(this.strokeColor)
-            color.alpha = 100;
+            color.alpha = color.alpha / 2
             let brushcolor = new SColor(this.fillColor)
-            brushcolor.alpha = 100;
-            painter.pen.color = color;
-            painter.pen.lineCapStyle = SLineCapStyle.Square;
-            painter.pen.lineWidth = painter.toPx(this._lineWidth);
-            painter.brush.color = brushcolor;
+            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]);
+            painter.drawPolygon([...this.pointList])
         } else {
-            super.onDraw(painter);
+            this.selected = true
+            super.onDraw(painter)
         }
     }
 } // Class SZoneLegendItem

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

@@ -54,6 +54,15 @@ export class SImageLegendItem extends SIconTextItem {
         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;
@@ -82,6 +91,8 @@ export class SImageLegendItem extends SIconTextItem {
         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,

+ 12 - 2
src/lib/items/SImageLegendItem.ts

@@ -1,4 +1,3 @@
-
 import { SGraphItem } from "@saga-web/graph/lib";
 import { SIconTextItem } from '@saga-web/big/lib/items/SIconTextItem';
 import { Legend } from '../types/Legend';
@@ -75,6 +74,15 @@ export class SImageLegendItem extends SIconTextItem {
         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);
+        }
     }
 
     toData(): Legend {
@@ -88,6 +96,8 @@ export class SImageLegendItem extends SIconTextItem {
         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,
@@ -99,4 +109,4 @@ export class SImageLegendItem extends SIconTextItem {
         })
         return this.data;
     }
-} // Class SImageLegendItem
+} // Class SImageLegendItem

+ 55 - 63
src/lib/items/SLineMarkerItem.js

@@ -1,6 +1,6 @@
-import { SLineStyle } from "@saga-web/graph/lib";
-import { SPoint, SColor } from "@saga-web/draw/lib";
-import { ItemOrder, SLineItem, SItemStatus } from '@saga-web/big/lib';
+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(线类型)
  *
@@ -14,116 +14,108 @@ export class SLineMarkerItem extends SLineItem {
      * @param data      标识对象数据
      */
     constructor(parent, data) {
-        super(parent);
+        super(parent)
         /** 起始锚点  */
-        this.startItem = null;
+        this.startItem = null
         /** 结束锚点  */
-        this.endItem = 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);
+        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;
+            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;
+            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
     /** 是否完成绘制  */
     get status() {
-        return this._status;
+        return this._status
     }
     set status(v) {
-        this._status = v;
+        this._status = v
         if (v == SItemStatus.Edit) {
-            this.zOrder = ItemOrder.markOrder;
+            this.zOrder = ItemOrder.markOrder
+        } else {
+            this.zOrder = ItemOrder.lineOrder
         }
-        else {
-            this.zOrder = ItemOrder.lineOrder;
-        }
-        this.update();
+        this.update()
     }
     get maskFlag() {
-        return this._maskFlag;
+        return this._maskFlag
     }
     set maskFlag(v) {
         if (v === this._maskFlag) {
-            return;
+            return
         }
-        this._maskFlag = v;
-        this.update();
+        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);
+                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);
+                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 => {
+        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;
+                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;
+            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) {
         if (this.maskFlag && this.status == SItemStatus.Normal) {
-            let color = new SColor(this.strokeColor);
-            color.alpha = 100;
-            painter.pen.color = new SColor(this.strokeColor);
+            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)
-                ];
+                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)]
             }
-            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 {
-            super.onDraw(painter);
+            painter.drawLine(this.line[0], this.line[1])
+        } else {
+            this.selected = true
+            super.onDraw(painter)
         }
     }
 } // Class SLineMarkerItem

+ 51 - 58
src/lib/items/SLineMarkerItem.ts

@@ -1,8 +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,38 +9,38 @@ import { Marker } from '../types/Marker';
  * * @author  张宇(taohuzy@163.com)
  */
 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()
     }
 
@@ -52,27 +51,27 @@ 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 && 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
 
@@ -81,59 +80,53 @@ 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.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 = 100;
-            painter.pen.color = new SColor(this.strokeColor);
+            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.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 {
-            super.onDraw(painter);
+            this.selected = true
+            super.onDraw(painter)
         }
     }
 } // Class SLineMarkerItem

+ 96 - 96
src/lib/items/SSCPZZoneLegendItem.js

@@ -1,7 +1,7 @@
-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';
+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(区域类型 --石材铺装)
  *
@@ -15,181 +15,181 @@ export class SSCPZZoneLegendItem extends SPolygonItem {
      * @param data      图例节点对象数据
      */
     constructor(parent, data) {
-        super(parent);
+        super(parent)
         /** text item   */
-        this.textItem = new STextItem(this);
+        this.textItem = new STextItem(this)
         /** 是否显示文字  */
-        this._showText = true;
+        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;
+        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;
+            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;
+                    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;
+                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.LineDash){
             //     this.LineDash =this._legend.Properties.LineDash
             //    }
         }
         // 监听多边形创建完成事件,并动态计算文本位置
-        this.connect("finishCreated", this, () => {
+        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);
-        });
+                    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;
+        return this.textItem.text
     }
     set text(v) {
-        this.textItem.text = v;
-        this.update();
+        this.textItem.text = v
+        this.update()
     }
     get color() {
-        return this.textItem.color;
+        return this.textItem.color
     }
     set color(v) {
-        this.textItem.color = v;
+        this.textItem.color = v
     }
     get font() {
-        return this.textItem.font;
+        return this.textItem.font
     }
     set font(v) {
-        this.textItem.font = v;
+        this.textItem.font = v
     }
     get status() {
-        return this._status;
+        return this._status
     }
     // 编辑当前状态
     set status(value) {
-        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) {
+        } else if (value == SItemStatus.Edit) {
             // 切换编辑状态显示文本
-            this.showText = true;
+            this.showText = true
             // 切换编辑状态可移动文本
-            this.textItem.moveable = true;
-        }
-        else if (value == SItemStatus.Create) {
+            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()
     }
-    ;
     get showText() {
-        return this._showText;
+        return this._showText
     }
     set showText(v) {
         if (v === this._showText) {
-            return;
+            return
         }
-        this._showText = v;
+        this._showText = v
         if (v) {
-            this.textItem.show();
-        }
-        else {
-            this.textItem.hide();
+            this.textItem.show()
+        } else {
+            this.textItem.hide()
         }
     }
     get maskFlag() {
-        return this._maskFlag;
+        return this._maskFlag
     }
     set maskFlag(v) {
         if (v === this._maskFlag) {
-            return;
+            return
         }
-        this._maskFlag = v;
-        this.update();
+        this._maskFlag = v
+        this.update()
     }
     /** 图例说明  */
     set itemExplain(v) {
-        this.data.Properties.ItemExplain = v;
+        this.data.Properties.ItemExplain = v
     }
     get itemExplain() {
-        return this.data.Properties.ItemExplain;
+        return this.data.Properties.ItemExplain
     }
     toData() {
-        this.data.Pos = { X: this.x, Y: this.y };
-        this.data.Name = this.text;
-        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 => {
+        this.data.Pos = { X: this.x, Y: this.y }
+        this.data.Name = this.text
+        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;
+                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 = 100;
-            let brushcolor = new SColor(this.fillColor);
-            brushcolor.alpha = 100;
-            painter.pen.color = color;
-            painter.pen.lineCapStyle = SLineCapStyle.Square;
-            painter.pen.lineWidth = painter.toPx(this._lineWidth);
-            painter.brush.color = brushcolor;
+            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 {
-            super.onDraw(painter);
+            painter.drawPolygon([...this.pointList])
+        } else {
+            this.selected = true
+            super.onDraw(painter)
         }
     }
 } // Class SZoneLegendItem

+ 98 - 94
src/lib/items/SSCPZZoneLegendItem.ts

@@ -1,10 +1,9 @@
-
-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 } 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'
 /**
  * 图例节点Item(区域类型 --石材铺装)
  *
@@ -12,23 +11,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
@@ -38,62 +37,62 @@ 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()
+    }
 
     /** 是否显示文字  */
-    _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()
     }
 
@@ -112,24 +111,24 @@ 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.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) {
-                    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
                 }
             }
             // 设置线宽
@@ -137,92 +136,97 @@ export class SSCPZZoneLegendItem extends SPolygonItem {
                 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)
             }
             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)
         })
     }
 
     toData(): any {
-        this.data.Pos = { X: this.x, Y: this.y };
-        this.data.Name = this.text;
-        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.text
+        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
+        return this.data
     }
 
     onDraw(painter: SPainter) {
         if (this.maskFlag && this.status == SItemStatus.Normal) {
             let color = new SColor(this.strokeColor)
-            color.alpha = 100;
+            color.alpha = color.alpha / 2
             let brushcolor = new SColor(this.fillColor)
-            brushcolor.alpha = 100;
-            painter.pen.color = color;
-            painter.pen.lineCapStyle = SLineCapStyle.Square;
-            painter.pen.lineWidth = painter.toPx(this._lineWidth);
-            painter.brush.color = brushcolor;
+            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]);
+            painter.drawPolygon([...this.pointList])
         } else {
-            super.onDraw(painter);
+            this.selected = true
+            super.onDraw(painter)
         }
     }
 } // Class SZoneLegendItem

+ 94 - 94
src/lib/items/SZoneLegendItem.js

@@ -1,7 +1,7 @@
-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';
+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(区域类型)
  *
@@ -15,175 +15,175 @@ export class SZoneLegendItem extends SPolygonItem {
      * @param data      图例节点对象数据
      */
     constructor(parent, data) {
-        super(parent);
+        super(parent)
         /** text item   */
-        this.textItem = new STextItem(this);
+        this.textItem = new STextItem(this)
         /** 是否显示文字  */
-        this._showText = true;
+        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;
+        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;
+            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;
+                    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;
+                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.LineDash){
             //     this.LineDash =this._legend.Properties.LineDash
             //    }
         }
         // 监听多边形创建完成事件,并动态计算文本位置
-        this.connect("finishCreated", this, () => {
+        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);
-        });
+                    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;
+        return this.textItem.text
     }
     set text(v) {
-        this.textItem.text = v;
-        this.update();
+        this.textItem.text = v
+        this.update()
     }
     get color() {
-        return this.textItem.color;
+        return this.textItem.color
     }
     set color(v) {
-        this.textItem.color = v;
+        this.textItem.color = v
     }
     get font() {
-        return this.textItem.font;
+        return this.textItem.font
     }
     set font(v) {
-        this.textItem.font = v;
+        this.textItem.font = v
     }
     get status() {
-        return this._status;
+        return this._status
     }
     // 编辑当前状态
     set status(value) {
-        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) {
+        } else if (value == SItemStatus.Edit) {
             // 切换编辑状态显示文本
-            this.showText = true;
+            this.showText = true
             // 切换编辑状态可移动文本
-            this.textItem.moveable = true;
-        }
-        else if (value == SItemStatus.Create) {
+            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()
     }
-    ;
     get showText() {
-        return this._showText;
+        return this._showText
     }
     set showText(v) {
         if (v === this._showText) {
-            return;
+            return
         }
-        this._showText = v;
+        this._showText = v
         if (v) {
-            this.textItem.show();
-        }
-        else {
-            this.textItem.hide();
+            this.textItem.show()
+        } else {
+            this.textItem.hide()
         }
     }
     get maskFlag() {
-        return this._maskFlag;
+        return this._maskFlag
     }
     set maskFlag(v) {
         if (v === this._maskFlag) {
-            return;
+            return
         }
-        this._maskFlag = v;
-        this.update();
+        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 => {
+        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;
+                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 = 100;
-            let brushcolor = new SColor(this.fillColor);
-            brushcolor.alpha = 100;
-            painter.pen.color = color;
-            painter.pen.lineCapStyle = SLineCapStyle.Square;
-            painter.pen.lineWidth = painter.toPx(this._lineWidth);
-            painter.brush.color = brushcolor;
+            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 {
-            super.onDraw(painter);
+            painter.drawPolygon([...this.pointList])
+        } else {
+            this.selected = true
+            super.onDraw(painter)
         }
     }
 } // Class SZoneLegendItem

+ 101 - 97
src/lib/items/SZoneLegendItem.ts

@@ -1,11 +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 } 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(区域类型)
  *
@@ -13,88 +12,88 @@ 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()
+    }
 
     /** 是否显示文字  */
-    _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()
     }
 
@@ -105,25 +104,25 @@ 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.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
                 }
             }
             // 设置线宽
@@ -131,92 +130,97 @@ export class SZoneLegendItem extends SPolygonItem {
                 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)
             }
             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)
         })
     }
 
     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.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
+        return this.data
     }
 
     onDraw(painter: SPainter) {
         if (this.maskFlag && this.status == SItemStatus.Normal) {
             let color = new SColor(this.strokeColor)
-            color.alpha = 100;
+            color.alpha = color.alpha / 2
             let brushcolor = new SColor(this.fillColor)
-            brushcolor.alpha = 100;
-            painter.pen.color = color;
-            painter.pen.lineCapStyle = SLineCapStyle.Square;
-            painter.pen.lineWidth = painter.toPx(this._lineWidth);
-            painter.brush.color = brushcolor;
+            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]);
+            painter.drawPolygon([...this.pointList])
         } else {
-            super.onDraw(painter);
+            this.selected = true
+            super.onDraw(painter)
         }
     }
 } // Class SZoneLegendItem

+ 63 - 63
src/lib/items/TipelineItem.js

@@ -1,158 +1,158 @@
-import { SPolylineItem, ItemOrder, SItemStatus } from '@saga-web/big/lib';
-import { SColor } from '@saga-web/draw';
-import { SPoint } from "@saga-web/draw/lib";
+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, []);
+        super(parent, [])
         /** 起始锚点  */
-        this.startAnchor = null;
+        this.startAnchor = null
         /** 结束锚点  */
-        this.endAnchor = null;
+        this.endAnchor = null
         /** 对应的图例ID  */
-        this._graphElementId = "";
+        this._graphElementId = ''
         /** 关联节点1ID  */
-        this._node1Id = "";
+        this._node1Id = ''
         /** 关联节点2ID  */
-        this._node2Id = "";
+        this._node2Id = ''
         /** 关联锚点1ID  */
-        this._anchor1ID = "";
+        this._anchor1ID = ''
         /** 关联锚点2ID  */
-        this._anchor2ID = "";
+        this._anchor2ID = ''
         /** 是否蒙版遮罩  */
-        this._maskFlag = false;
+        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;
+        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;
+            this._graphElementId = data.GraphElementId
         }
         if (data.Node1ID) {
-            this._node1Id = data.Node1ID;
+            this._node1Id = data.Node1ID
         }
         if (data.Node2ID) {
-            this._node2Id = data.Node2ID;
+            this._node2Id = data.Node2ID
         }
         if (data.Anchor1ID) {
-            this._anchor1ID = data.Anchor1ID;
+            this._anchor1ID = data.Anchor1ID
         }
         if (data.Anchor2ID) {
-            this._anchor2ID = data.Anchor2ID;
+            this._anchor2ID = data.Anchor2ID
         }
         if (data.Properties && data.Properties.Color) {
-            this.strokeColor = new SColor(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;
+            this.lineWidth = data.Properties.LineWidth
         }
     }
     get graphElementId() {
-        return this._graphElementId;
+        return this._graphElementId
     }
     set graphElementId(v) {
-        this._graphElementId = v;
+        this._graphElementId = v
         if (this.data) {
-            this.data.GraphElementId = this._graphElementId;
+            this.data.GraphElementId = this._graphElementId
         }
     }
     get node1Id() {
-        return this._node1Id;
+        return this._node1Id
     }
     set node1Id(v) {
-        this._node1Id = v;
+        this._node1Id = v
         if (this.data) {
-            this.data.Node1ID = this._node1Id;
+            this.data.Node1ID = this._node1Id
         }
     }
     get node2Id() {
-        return this._node2Id;
+        return this._node2Id
     }
     set node2Id(v) {
-        this._node2Id = v;
+        this._node2Id = v
         if (this.data) {
-            this.data.Node2ID = this._node2Id;
+            this.data.Node2ID = this._node2Id
         }
     }
     get anchor1ID() {
-        return this._anchor1ID;
+        return this._anchor1ID
     }
     set anchor1ID(v) {
-        this._anchor1ID = v;
+        this._anchor1ID = v
         if (this.data) {
-            this.data.Anchor1ID = this._anchor1ID;
+            this.data.Anchor1ID = this._anchor1ID
         }
     }
     get anchor2ID() {
-        return this._anchor2ID;
+        return this._anchor2ID
     }
     set anchor2ID(v) {
-        this._anchor2ID = v;
+        this._anchor2ID = v
         if (this.data) {
-            this.data.Anchor2ID = this._anchor2ID;
+            this.data.Anchor2ID = this._anchor2ID
         }
     }
     get maskFlag() {
-        return this._maskFlag;
+        return this._maskFlag
     }
     set maskFlag(v) {
         if (v === this._maskFlag) {
-            return;
+            return
         }
-        this._maskFlag = v;
-        this.update();
+        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);
+                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);
+                this.pointList[this.pointList.length - 1] = this.endAnchor.mapToScene(0, 0)
             }
         }
     }
     /** 获取data数据  */
     toData() {
-        let pointList = this.pointList.map(item => {
+        let pointList = this.pointList.map((item) => {
             return {
                 X: item.x,
-                Y: item.y
-            };
-        });
+                Y: item.y,
+            }
+        })
         if (this.data) {
-            this.data.PointList = pointList;
-            this.data.Properties.LineWidth = this.lineWidth;
+            this.data.PointList = pointList
+            this.data.Properties.LineWidth = this.lineWidth
             // this.data.Properties.LineDash = this.LineDash;
-            this.data.Properties.Color = this.strokeColor.value;
+            this.data.Properties.Color = this.strokeColor.value
         }
-        return this.data;
+        return this.data
     }
     onDraw(painter) {
         if (this.maskFlag && this.status == SItemStatus.Normal) {
-            let color = new SColor(this.strokeColor);
-            color.alpha = 100;
-            painter.pen.color = color;
-            painter.drawPolyline(this.pointList);
-        }
-        else {
-            super.onDraw(painter);
+            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)
         }
     }
 }

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

@@ -1,170 +1,169 @@
-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 } 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'
 
 /**
  * 管道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 && 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,
+            }
+        })
 
-  /** 获取data数据  */
-  toData(): Relation | null {
-    let pointList: Point[] = this.pointList.map(item => {
-      return {
-        X: item.x,
-        Y: item.y
-      }
-    });
+        if (this.data) {
+            this.data.PointList = pointList
+            this.data.Properties.LineWidth = this.lineWidth
+            // this.data.Properties.LineDash = this.LineDash;
+            this.data.Properties.Color = this.strokeColor.value
+        }
 
-    if (this.data) {
-      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
     }
 
-    return this.data
-  }
-
-  onDraw(painter: SPainter) {
-    if (this.maskFlag && this.status == SItemStatus.Normal) {
-      let color = new SColor(this.strokeColor)
-      color.alpha = 100;
-      painter.pen.color = color;
-      painter.drawPolyline(this.pointList);
-    } else {
-      super.onDraw(painter);
-    }
-  }
-}
+    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)
+        }
+    }
+}

+ 14 - 0
src/main.ts

@@ -28,8 +28,22 @@ Vue.use(cookies)
 import Pui from 'meri-design'
 import 'meri-design/dist/index.css'
 import 'leaflet/dist/leaflet.css'
+
 Vue.use(Pui)
 
+ 
+//////////模拟传入参数
+const username = 'lengqiang'
+/////////////////
+// 在跳入路由之前要请求获取权限信息
+// console.log(store.state.isrequestAuth)
+// router.beforeEach(async (to, from, next) => {
+//     if (!store.state.isrequestAuth) {
+//         await store.dispatch('getUserInfo', username)
+//         await store.dispatch('getFloors')
+//     }
+//     next()
+// })
 new Vue({
     router,
     store,

+ 46 - 34
src/router/index.js

@@ -2,12 +2,14 @@ import Vue from 'vue'
 import store from '@/store'
 import VueRouter from 'vue-router'
 import { query } from '@/utils/query'
+
+let level = 0
 Vue.use(VueRouter)
 const routes = [
     // 登陆页面
     {
         path: '/',
-        redirect: '/home/overview',
+        redirect: '/home/overview',        // 只有区域,及区域以上用户才能进入总部首页这一套
     },
     {
         path: '/404',
@@ -23,8 +25,7 @@ const routes = [
         name: 'home',
         component: () => import('../views/index'),
         redirect: '/home/homepage',
-        children: [
-            {
+        children: [{
                 path: 'homepage',
                 component: () => import('../views/homepage'),
             },
@@ -74,36 +75,47 @@ const router = new VueRouter({
 //不需要token的路由
 const ignore = ['/404', '/legendLibrary', '/legendRules']
 router.beforeEach(async (to, from, next) => {
-    // if (!ignore.includes(to.path)) {
-    //     const token = query().token
-    //     const ssoToken = store.getters['ssoToken']
-    //     if (ssoToken) {
-    //         store.commit('SETSSOTOKEN', ssoToken)
-    //         await store.dispatch('getUserInfo', router)
-    await store.dispatch('getFloors')
-    await store.dispatch('getBrand')
-    //         next()
-    //     } else if (token) {
-    //         store.commit('SETSSOTOKEN', token)
-    //         await store.dispatch('getUserInfo', router)
-    //         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}`
-    //     }
-    // } else {
-    //     // await store.dispatch('getBrand')
-    next()
-    //     return
-    // }
+    if (!ignore.includes(to.path)) {
+        const token = query().token
+        const ssoToken = store.getters['ssoToken']
+        if (ssoToken) {
+            // if (to.path === '/group' ||  to.path === '/home/homepage') {
+            //     next()
+            //     return
+            // } 
+            store.commit('SETSSOTOKEN', ssoToken)
+            await store.dispatch('getUserInfo', router)
+            await store.dispatch('getFloors')
+            await store.dispatch('getBrand')
+            let level =store.state.accessLevel
+            console.log(level)
+            // if (level ===0) {
+            //     next('/group')
+            // } else {
+            //     next('/home/homepage')
+            // }
+            next()
+        } else if (token) {
+            store.commit('SETSSOTOKEN', token)
+            await store.dispatch('getUserInfo', router)
+            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}`
+            
+        }
+    } else {
+        next()
+        return
+    }
 })
 export default router

+ 21 - 9
src/store/index.js

@@ -32,6 +32,8 @@ export default new Vuex.Store({
         remarksText: '', //备注
         bunkObj: {}, // 铺位名称
         currentFloor: {}, //当前选中的楼层信息
+        accessLevel: 0, //
+        showView: 1,
     },
     getters: {
         isPreview: (state) => state.isPreview,
@@ -48,8 +50,12 @@ export default new Vuex.Store({
         legendTable: (state) => state.legendTable,
         remarksText: (state) => state.remarksText,
         bunkObj: (state) => state.bunkObj,
+        showView: (state) => state.showView,
     },
     mutations: {
+        SETSHOWVIEW(state, data) {
+            state.showView = data
+        },
         SETISPREVIEW(state, data) {
             state.isPreview = data
         },
@@ -75,6 +81,7 @@ export default new Vuex.Store({
             state.isMessage = data
         },
         SETFLOORS(state, data) {
+            state.floorSelect = []
             state.floorsArr = data
             if (data.length > 0) {
                 data.forEach((e) => {
@@ -108,22 +115,27 @@ export default new Vuex.Store({
         SETCURRENTFLOOR(state, data) {
             state.currentFloor = data
         },
+        STOREACCESSLEVEL(state, data) {
+            state.accessLevel = data.level
+        },
     },
     actions: {
         // 获取项目列表、userId
         async getUserInfo({ commit }, palyload) {
             await login({}).then((res) => {
                 if (res.result == 'success') {
-                    // token校验成功 拿到权限
-                    commit('SETISREQUESTtAUTH', true)
-                    if (res.permissions.length == 0) {
-                        router.push('/404')
-                    }
-                    commit('SETAUTHMSG', res)
-                } else {
-                    commit('SETISREQUESTtAUTH', false)
-                    router.push('/404')
+                    commit('STOREACCESSLEVEL', res)
                 }
+                // token校验成功 拿到权限
+                //commit("SETISREQUESTtAUTH", true)
+                //     if (res.permissions.length == 0) {
+                //         router.push('/404')
+                //     }
+                //     commit('SETAUTHMSG', res)
+                // } else {
+                //     commit('SETISREQUESTtAUTH', false)
+                //     router.push('/404')
+                // }
             })
         },
         getFloors(context) {

+ 153 - 60
src/utils/ganttChart/GanttChart.js

@@ -1,9 +1,5 @@
 import moment from 'moment';
 /**
- * 数据定义区域
- *
- */
-/**
  * 甘特图
  * @param {} options 
  */
@@ -28,7 +24,7 @@ export function GanttChart(options) {
   // 拖动过程事件
   this.dragingEvent = null;
   // 拖动偏移量
-  this.offsetDis = options['viewWidth'] || 800;
+  this.offsetDis = (options['viewWidth']/2) || 800;
   // 拖动定时器
   this.dragTimer = null;
   // 每天的间隔宽度
@@ -42,20 +38,21 @@ export function GanttChart(options) {
   // 总天数
   this.daysCount = options['daysCount'] || 60;
   // 任务图距离顶部高度
-  this.graphTopDis = 20
+  this.graphTopDis = 40
   
   // 每像素代表的小时数
   this.timePerPix = this.cWidth/this.daysCount/24/3600
   // 当前视图开始时间,向前推N天
   this.startAt = moment().subtract(this.daysCount / 3, 'days');
   this.endAt = moment(this.startAt).add(this.daysCount, 'days');
-  this.graphDiv = document.getElementById(options['chartContainer']);
+  this.graphDiv = document.getElementById(options['chartParentContainer']);
+  this.chartContainer = options['chartContainer']
   // 图形容器组
   this.graphGroup = null;
   // 上一次拖动的事件
   this.lastDragEv = null;
-  // 回调事件
-  this.callback = options.callback || null;
+  // 当日刻度线
+  this.todayTimeLineEl = null;
 }
 
 
@@ -113,6 +110,7 @@ GanttChart.prototype.forceRefreshGraph = function() {
   this.tasks.forEach((topTask) => {
     topTask.gGroup = null;
   });
+  this.todayTimeLineEl = null
   this.gCanvas.destroy();
   this.initDrawingReady();
 }
@@ -122,17 +120,21 @@ GanttChart.prototype.forceRefreshGraph = function() {
  */
 GanttChart.prototype.initDrawingReady = function() {
   this.initCanvas();
-  this.initDragHandler();
-  this.drawTimeZone();
-  this.processData();
-  this.drawTasks();
-  this.graphGroup = null
+  setTimeout(() => {
+    this.initDragHandler();
+    this.drawTimeZone();
+    this.processData();
+    this.drawTasks();
+    this.graphGroup = null
+  }, 200);
 }
 
 /**
  * 翻页
  */
 GanttChart.prototype.pageTo = function(dir = 'next') {
+  this.draging = false;
+  this.endEvent = null;
   if (dir == 'next') {
     // 向后翻页`
     this.startAt = this.startAt.add(this.daysCount, 'days');
@@ -154,7 +156,7 @@ let lastClickAt = null;
  * 改变graphDiv 滚动距离
  * 到达边界距离后,刷新页面
  */
-GanttChart.prototype.doDrag = function(sEvent, eEvent) {
+GanttChart.prototype.doDrag = function(sEvent, eEvent) {  
   if (sEvent == null) {
     sEvent = this.startEvent;
   }
@@ -173,7 +175,7 @@ GanttChart.prototype.doDrag = function(sEvent, eEvent) {
     this.offsetDis = this.viewWidth;
     this.pageTo('prev');
   }
-  if (this.offsetDis - 20 >= 2964 ){ //cWidth - viewWidth) {
+  if ((this.offsetDis - 20) >= this.viewWidth*2.2 ){ //cWidth - viewWidth) {
     // 向后滑动,向后翻页
     console.log('此处应该向后翻页', this.startAt.format('YYYY-MM-DD'),this.endAt.format('YYYY-MM-DD'),this.offsetDis);
     this.offsetDis = this.viewWidth;
@@ -185,10 +187,9 @@ GanttChart.prototype.doDrag = function(sEvent, eEvent) {
 /**
  * 初始化抓取拖动事件
  */
-
 GanttChart.prototype.initDragHandler = function() {
   this.graphDiv.scrollLeft = this.offsetDis;
-  let _canvas = document.getElementsByTagName('canvas')[1];
+  let _canvas = this._canvas
   _canvas.addEventListener('mousedown', (ev) => {
     this.draging = true;
     this.startEvent = ev;
@@ -199,6 +200,13 @@ GanttChart.prototype.initDragHandler = function() {
     this.lastDragEv = ev;
   });
 
+
+  _canvas.addEventListener('mouseleave', (ev) => {
+    console.log('leave...恢复')
+    this.draging = false;
+    this.endEvent = ev;
+  });
+
   _canvas.addEventListener('mouseup', (ev) => {
     this.draging = false;
     this.endEvent = ev;
@@ -215,11 +223,6 @@ GanttChart.prototype.initDragHandler = function() {
       this.lastDragEv = ev;
     }
   });
-  _canvas.addEventListener('mouseleave', (ev) => {
-    console.log('leave...恢复')
-    this.draging = false;
-    this.endEvent = ev;
-  });
 }
 /**
  * 初始化画布
@@ -227,11 +230,13 @@ GanttChart.prototype.initDragHandler = function() {
  */
 
 GanttChart.prototype.initCanvas = function() {
+  console.error('初始化画布...')
   this.gCanvas = new G.Canvas({
-    container: 'ganttContainer',
+    container: this.chartContainer,
     width: this.cWidth,
-    height: 800,
+    height: this.cHeight,
   });
+  this._canvas = document.getElementsByTagName('canvas')[0];
 }
 
 /**
@@ -242,45 +247,59 @@ GanttChart.prototype.drawTimeZone = function() {
   console.log('时间段', this.startAt.format('YYYY-MM-DD'),this.endAt.format('YYYY-MM-DD'));
   let start = moment(this.startAt);
   let timeGroup = this.gCanvas.addGroup();
+  this.timeGroupEl = timeGroup
   timeGroup._tname = 'TimeGroup';
-  // 绘制第一级
-  timeGroup.addShape('text', {
-    attrs: {
-      x: 20,
-      y: 20,
-      fontSize: 12,
-      text: start.format('YYYY-MM'),
-      lineDash: [10, 10],
-      fill: '#8D9399',
-    },
-  });
-  timeGroup.addShape('text', {
-    attrs: {
-      x: 20 + this.viewWidth,
-      y: 20,
-      fontSize: 12,
-      text: start.add(this.daysCount / 3, 'days').format('YYYY-MM'),
-      lineDash: [10, 10],
-      fill: '#8D9399',
-    },
-  });
-  timeGroup.addShape('text', {
+  let startSecond = moment(this.startAt);
+
+  // 顶部底部边框
+  timeGroup.addShape('rect',{
     attrs: {
-      x: 20 + this.viewWidth * 2,
-      y: 20,
-      fontSize: 12,
-      text: start.add(this.daysCount / 3, 'days').format('YYYY-MM'),
-      lineDash: [10, 10],
-      fill: '#8D9399',
+      x: 0,
+      y: 0,
+      width: this.cWidth,
+      height: 52,
+      fill: '#F8F9FA',
+      radius: [2, 4],
     },
-  });
-  let startSecond = moment(this.startAt);
+  })
   // 绘制第二级
+  let nowAtStr = moment().format('YYYY-MM-DD')
   for (let i = 0; i < this.daysCount; i++) {
-    let timeText = startSecond.add(1, 'days').format('DD');
+    let tempAt = startSecond.add(1, 'days')
+    let timeText = tempAt.format('DD');
+    if(timeText == '01'){
+      // 第一天,顶部需要绘制年月
+      timeGroup.addShape('text', {
+        attrs: {
+          x: this.dayStep * i,
+          y: 20,
+          fontSize: 12,
+          text: tempAt.format('YYYY-MM'),
+          lineDash: [10, 10],
+          fill: '#8D9399',
+        },
+      });
+      
+    }
+    let isToday = nowAtStr == tempAt.format('YYYY-MM-DD')
+    if(isToday){
+      //是今日,需要画线
+      console.log('绘制 当日刻度线')
+      this.todayTimeLineOffsetPos = this.dayStep * i
+      timeGroup.addShape('rect',{
+        attrs: {
+          x: this.dayStep * i-10,
+          y: 25,
+          width: 30,
+          height: 16,
+          fill: '#0091FF',
+          radius: [2, 4],
+        },
+      })
+    }
     timeGroup.addShape('text', {
       attrs: {
-        x: 40 * i,
+        x: this.dayStep * i,
         y: 40,
         fontSize: 10,
         text: timeText,
@@ -288,6 +307,17 @@ GanttChart.prototype.drawTimeZone = function() {
         fill: '#8D9399',
       },
     });
+
+    timeGroup.addShape('rect', {
+      attrs: {
+        x: this.dayStep * i-10,
+        y: 20,
+        width: 1,
+        height: this.cHeight,
+        fill: '#deebeb',
+        radius: [2, 4],
+      },
+    });
   }
 }
 
@@ -364,10 +394,55 @@ GanttChart.prototype.drawTasks = function() {
       taskGroup = this.graphGroup.addGroup();
       taskGroup._tname = 'TaskGroup_' + topTask.id;
       topTask.gGroup = taskGroup;
-      // 第二层循环,用于 区分具体多少任务,例如,维保-商管1/商管2...    
-      topTask.dataList.forEach((taskP, index) => {                            
-        let taskPGroup = taskGroup.addGroup();
+
+      // 组名背景矩形
+      // let TopGroupRectEl = taskGroup.addShape('rect', {
+      //   attrs: {
+      //     x: 0,
+      //     y: topTask.renderOptions.startY,
+      //     width: this.cWidth,
+      //     height: this.taskRowHeight,
+      //     fill: '#a6ed53',
+      //     radius: [2, 4],
+      //   },
+      // });
+      // 第二层循环,用于 区分具体多少任务,例如,维保-商管1/商管2...
+      topTask.dataList.forEach((taskP, index) => {
+        let taskPGroup = taskGroup.addGroup()
         taskGroup.addGroup(taskPGroup);
+        // 任务背景矩形,主要用于Hover效果变更颜色
+        if(true){
+          let tempTaskContainerEl = taskPGroup.addShape('rect', {
+            attrs: {
+              x: 0,
+              y: topTask.renderOptions.startY + ((index+1)* (this.taskRowHeight + this.rowSpanDis))-5,
+              width: this.cWidth,
+              height: this.taskRowHeight+10,
+              fill: '#fff',
+              // stroke: 'black',
+              radius: [2, 4],
+            },
+          });
+          tempTaskContainerEl.setZIndex(1)
+          tempTaskContainerEl._pdata = taskP
+          tempTaskContainerEl.on('mouseenter',(ev)=>{
+            tempTaskContainerEl.attr({fill: '#F5F6F7'})
+            tempTaskContainerEl._pdata.tasks.forEach(_tempTask=>{
+              if(_tempTask._rectEl){
+                _tempTask._rectEl.setZIndex(5)
+              }
+            })
+          })
+          tempTaskContainerEl.on('mouseleave',(ev)=>{
+            tempTaskContainerEl.attr({fill: '#fff'})
+            tempTaskContainerEl._pdata.tasks.forEach(_tempTask=>{
+              if(_tempTask._rectEl){
+                _tempTask._rectEl.setZIndex(5)
+              }
+            })
+          })
+          taskP._containerEl = tempTaskContainerEl
+        }
         // 第三层循环,用户区分每个子任务的执行时间段,例如:维保-商管1-2020.05-2020.06 / 2020.08- 2020.09
         taskP.tasks.forEach((_taskItem, _index) => {
           let _isInView = this.isInView(_taskItem)
@@ -386,7 +461,9 @@ GanttChart.prototype.drawTasks = function() {
                 radius: [2, 4],
               },
             });
+            rectEl.setZIndex(5)
             rectEl._pdata = _taskItem;
+            _taskItem._rectEl = rectEl
             rectEl.on('mouseover', (ev) => {
               this.handleClick(ev.target, 'enter', ev);
             });
@@ -408,6 +485,22 @@ GanttChart.prototype.drawTasks = function() {
       }
     }
   });
+
+  // 画当前线条 TODO,放前面不行
+  let todayAt = new Date()
+  if(this.startAt < todayAt && this.endAt > todayAt){
+    this.todayTimeLineEl = this.gCanvas.addShape('rect',{
+      attrs: {
+        x: this.todayTimeLineOffsetPos,
+        y: 40,
+        width: 3,
+        height: this.cHeight,
+        fill: '#0091FF',
+        radius: [2, 4],
+      }
+    })
+    this.todayTimeLineEl.setZIndex(50)
+  }
 }
 
 /**

+ 438 - 0
src/utils/ganttChart/GanttChart_old.js

@@ -0,0 +1,438 @@
+import moment from 'moment';
+/**
+ * 数据定义区域
+ *
+ */
+/**
+ * 甘特图
+ * @param {} options 
+ */
+export function GanttChart(options) {
+  // 任务列表
+  this.tasks = options.tasks || [];
+  // AntVG Canvas
+  this.gCanvas = null;
+  // 视口宽度 800,可视区域
+  this.viewWidth = options['viewWidth'] || 800;
+  // 物理画布宽度 800
+  this.cWidth = options['cWidth'] || 2400;
+  this.cHeight = options['cHeight'] || 600;
+  // 画布偏移位置
+  this.startPos = 0;
+  // 是否拖动中
+  this.draging = false;
+  // 开始拖动事件
+  this.startEvent = null;
+  // 结束拖动事件
+  this.endEvent = null;
+  // 拖动过程事件
+  this.dragingEvent = null;
+  // 拖动偏移量
+  this.offsetDis = options['viewWidth'] || 800;
+  // 拖动定时器
+  this.dragTimer = null;
+  // 每天的间隔宽度
+  this.dayStep = 40;
+  // 分组标题高度
+  this.groupTitleHeight = 38;
+  // 任务矩形高度
+  this.taskRowHeight = 16;
+  // 每行任务的纵向间距
+  this.rowSpanDis = 22;
+  // 总天数
+  this.daysCount = options['daysCount'] || 60;
+  // 任务图距离顶部高度
+  this.graphTopDis = 20
+  
+  // 每像素代表的小时数
+  this.timePerPix = this.cWidth/this.daysCount/24/3600
+  // 当前视图开始时间,向前推N天
+  this.startAt = moment().subtract(this.daysCount / 3, 'days');
+  this.endAt = moment(this.startAt).add(this.daysCount, 'days');
+  this.graphDiv = document.getElementById(options['chartContainer']);
+  // 图形容器组
+  this.graphGroup = null;
+  // 上一次拖动的事件
+  this.lastDragEv = null;
+  // 回调事件
+  this.callback = options.callback || null;
+}
+
+
+/**
+ * 设置数据
+ * @param {*} _tasks 
+ */
+GanttChart.prototype.changeTasks = function(_tasks){
+  this.tasks = _tasks
+}
+
+/**
+ * 打开关闭分组
+ */
+
+GanttChart.prototype.toggle = function(index) {
+  if (this.tasks[index].open) {
+    this.tasks[index].open = false;
+  } else {
+    this.tasks[index].open = true;
+  }
+  this.processData();
+  this.drawTasks();
+}
+
+/**
+ * 预处理数据
+ */
+GanttChart.prototype.processData = function() {
+  for (let i = 0; i < this.tasks.length; i++) {
+    let currentTopTask = this.tasks[i];
+    let lastTopTask = null;
+    currentTopTask.renderOptions = {};
+    if (i != 0) {
+      // 非0个,要补上前面的数据
+      lastTopTask = this.tasks[i - 1];
+      currentTopTask.renderOptions.startY = lastTopTask.renderOptions.endY + 20;
+    } else {
+      // 第一个
+      currentTopTask.renderOptions.startY = this.graphTopDis;
+    }
+    if (currentTopTask.open) {
+      currentTopTask.renderOptions.endY =
+        currentTopTask.renderOptions.startY + this.rowSpanDis + this.groupTitleHeight + currentTopTask.dataList.length * this.taskRowHeight;
+    } else {
+      currentTopTask.renderOptions.endY = currentTopTask.renderOptions.startY + this.groupTitleHeight;
+    }
+  }
+}
+
+/**
+ * 强制清空图像,重绘
+ */
+GanttChart.prototype.forceRefreshGraph = function() {
+  this.tasks.forEach((topTask) => {
+    topTask.gGroup = null;
+  });
+  this.gCanvas.destroy();
+  this.initDrawingReady();
+}
+
+/**
+ * 准备绘制,用于初始化和强制刷新
+ */
+GanttChart.prototype.initDrawingReady = function() {
+  this.initCanvas();
+  this.initDragHandler();
+  this.drawTimeZone();
+  this.processData();
+  this.drawTasks();
+  this.graphGroup = null
+}
+
+/**
+ * 翻页
+ */
+GanttChart.prototype.pageTo = function(dir = 'next') {
+  if (dir == 'next') {
+    // 向后翻页`
+    this.startAt = this.startAt.add(this.daysCount, 'days');
+    this.offsetDis = 0
+  } else {
+    // 向前翻页
+    this.startAt = this.startAt.subtract(this.daysCount, 'days');
+    this.offsetDis = 2*this.viewWidth
+  }
+  this.endAt = moment(this.startAt).add(this.daysCount, 'days');
+  console.log('已翻页', this.startAt.format('YYYY-MM-DD'),this.endAt.format('YYYY-MM-DD'), this.offsetDis);
+  // offsetDis = viewWidth;
+  this.forceRefreshGraph();
+}
+// 上次点击时间,用于滚动时误触停止
+let lastClickAt = null;
+/**
+ * 执行拖动
+ * 改变graphDiv 滚动距离
+ * 到达边界距离后,刷新页面
+ */
+GanttChart.prototype.doDrag = function(sEvent, eEvent) {
+  if (sEvent == null) {
+    sEvent = this.startEvent;
+  }
+  
+  let sPos = sEvent.clientX;
+  let cPos = eEvent.clientX;
+  // 滚动距离
+  let dis = cPos - sPos;
+  let tempDis = this.offsetDis
+  // console.log('offsetDis before:', this.offsetDis, dis)
+  this.offsetDis = this.offsetDis - dis / 2;
+  // console.log('draging...',tempDis, this.offsetDis, dis)
+  if (this.offsetDis <= -20) {
+    // 向前滑动,向前翻页
+    console.log('此处应该向前翻页', this.startAt.format('YYYY-MM-DD'),this.endAt.format('YYYY-MM-DD'),this.offsetDis);
+    this.offsetDis = this.viewWidth;
+    this.pageTo('prev');
+  }
+  if (this.offsetDis - 20 >= 2964 ){ //cWidth - viewWidth) {
+    // 向后滑动,向后翻页
+    console.log('此处应该向后翻页', this.startAt.format('YYYY-MM-DD'),this.endAt.format('YYYY-MM-DD'),this.offsetDis);
+    this.offsetDis = this.viewWidth;
+    this.pageTo('next');
+  }
+  this.graphDiv.scrollLeft = this.offsetDis;
+}
+
+/**
+ * 初始化抓取拖动事件
+ */
+
+GanttChart.prototype.initDragHandler = function() {
+  this.graphDiv.scrollLeft = this.offsetDis;
+  let _canvas = document.querySelector('#ganttContainer>canvas');
+  _canvas.addEventListener('mousedown', (ev) => {
+    this.draging = true;
+    this.startEvent = ev;
+    this.dragingEvent = null;
+    this.endEvent = null;
+    this.lastClickAt = new Date();
+    this.lastClickAt = ev;
+    this.lastDragEv = ev;
+  });
+
+  _canvas.addEventListener('mouseup', (ev) => {
+    this.draging = false;
+    this.endEvent = ev;
+  });
+
+  _canvas.addEventListener('mousemove', (ev) => {
+    // console.log('this over', this)
+    if (this.draging) {
+      if (new Date() - this.lastClickAt < 20) {
+        return false;
+      }
+      this.dragingEvent = ev;
+      this.doDrag(this.lastDragEv, ev);
+      this.lastDragEv = ev;
+    }
+  });
+  _canvas.addEventListener('mouseleave', (ev) => {
+    console.log('leave...恢复')
+    this.draging = false;
+    this.endEvent = ev;
+  });
+}
+/**
+ * 初始化画布
+ *
+ */
+
+GanttChart.prototype.initCanvas = function() {
+  this.gCanvas = new G.Canvas({
+    container: 'ganttContainer',
+    width: this.cWidth,
+    height: 800,
+  });
+}
+
+/**
+ * 绘制时间区域
+ */
+
+GanttChart.prototype.drawTimeZone = function() {
+  console.log('时间段', this.startAt.format('YYYY-MM-DD'),this.endAt.format('YYYY-MM-DD'));
+  let start = moment(this.startAt);
+  let timeGroup = this.gCanvas.addGroup();
+  timeGroup._tname = 'TimeGroup';
+  // 绘制第一级
+  timeGroup.addShape('text', {
+    attrs: {
+      x: 20,
+      y: 20,
+      fontSize: 12,
+      text: start.format('YYYY-MM'),
+      lineDash: [10, 10],
+      fill: '#8D9399',
+    },
+  });
+  timeGroup.addShape('text', {
+    attrs: {
+      x: 20 + this.viewWidth,
+      y: 20,
+      fontSize: 12,
+      text: start.add(this.daysCount / 3, 'days').format('YYYY-MM'),
+      lineDash: [10, 10],
+      fill: '#8D9399',
+    },
+  });
+  timeGroup.addShape('text', {
+    attrs: {
+      x: 20 + this.viewWidth * 2,
+      y: 20,
+      fontSize: 12,
+      text: start.add(this.daysCount / 3, 'days').format('YYYY-MM'),
+      lineDash: [10, 10],
+      fill: '#8D9399',
+    },
+  });
+  let startSecond = moment(this.startAt);
+  // 绘制第二级
+  for (let i = 0; i < this.daysCount; i++) {
+    let timeText = startSecond.add(1, 'days').format('DD');
+    timeGroup.addShape('text', {
+      attrs: {
+        x: 40 * i,
+        y: 40,
+        fontSize: 10,
+        text: timeText,
+        lineDash: [10, 10],
+        fill: '#8D9399',
+      },
+    });
+  }
+}
+
+/**
+ * 处理点击
+ */
+GanttChart.prototype.handleClick = function(task, flag, ev) {
+  // let detailDiv = document.getElementById('detailDiv')
+  if(flag == 'enter'){
+    // detailDiv.style.display = 'block'
+    // detailDiv.style.left = ev.clientX+'px';
+    // detailDiv.style.top = ev.clientY+'px';
+    // document.getElementById('detailTaskName').textContent = task._pdata.description
+    // document.getElementById('detailTaskStatus').textContent = task._pdata.status
+    // document.getElementById('detailTaskStartDate').textContent = task._pdata.startDate
+    // document.getElementById('detailTaskEndDate').textContent = task._pdata.endDate
+    console.log('show:', task);
+  } else if (flag === 'leave'){
+    // detailDiv.style.display = 'none'
+    console.log('hide:', task);
+  } else {
+    this.callback(task);
+    console.log('click:', task);
+  }
+}
+
+
+/**
+ * 根据任务状态区分颜色
+ * 
+ */
+GanttChart.prototype.statusColor =function(task) {
+  switch (task.status) {
+    case '按时完成':
+      return 'aqua';
+      break;
+    case '计划批准':
+      return '#ff9800';
+      break;
+    case '已完成':
+      return '#19b720';
+      break;
+    default:
+      break;
+  }
+}
+
+/**
+ * 判断任务是否在视图内
+ * 
+ */ 
+GanttChart.prototype.isInView = function(task) {
+  let isLessThanEndAt = (task.endDate <= this.startAt.format('YYYY-MM-DD'))
+  let isGreaterThanStartAt = task.startDate >= this.endAt.format('YYYY-MM-DD')
+  return !(isLessThanEndAt || isGreaterThanStartAt)
+}
+
+/**
+ * 分组绘制任务块
+ *
+ */
+
+GanttChart.prototype.drawTasks = function() {
+  if (this.graphGroup) {
+    this.graphGroup.clear();
+  } else {
+    this.graphGroup = this.gCanvas.addGroup();
+    this.graphGroup._tname = 'graphGroup';
+  }
+  // 第一层循环,用于分组,例如,维保--xxxx
+  this.tasks.forEach((topTask, topIndex) => {
+    if (topTask.open) {
+      let taskGroup = null;
+      taskGroup = this.graphGroup.addGroup();
+      taskGroup._tname = 'TaskGroup_' + topTask.id;
+      topTask.gGroup = taskGroup;
+      // 第二层循环,用于 区分具体多少任务,例如,维保-商管1/商管2...    
+      topTask.dataList.forEach((taskP, index) => {                            
+        let taskPGroup = taskGroup.addGroup();
+        taskGroup.addGroup(taskPGroup);
+        // 第三层循环,用户区分每个子任务的执行时间段,例如:维保-商管1-2020.05-2020.06 / 2020.08- 2020.09
+        taskP.tasks.forEach((_taskItem, _index) => {
+          let _isInView = this.isInView(_taskItem)
+          // 在视图中才显示
+          if(_isInView){
+            let pos = this.calRectPos(_taskItem);
+            // console.log('render rect:', _taskItem, pos, topTask.renderOptions.startY + index * taskRowHeight);
+            let rectEl = taskPGroup.addShape('rect', {
+              attrs: {
+                x: pos.x,
+                y: topTask.renderOptions.startY + (index* (this.taskRowHeight + this.rowSpanDis)),
+                width: pos.width,
+                height: this.taskRowHeight,
+                fill: this.statusColor(_taskItem),
+                stroke: 'black',
+                radius: [2, 4],
+              },
+            });
+            rectEl._pdata = _taskItem;
+            rectEl.on('mouseover', (ev) => {
+              this.handleClick(ev.target, 'enter', ev);
+            });
+            rectEl.on('mouseleave', (ev) => {
+              this.handleClick(ev.target, 'leave', ev);
+            });
+            rectEl.on('click', (ev) => {
+              this.handleClick(ev.target, 'click', ev);
+            });
+          }
+        });
+      });
+
+      taskGroup.show();
+    } else {
+      if (topTask.gGroup) {
+        // topTask.gGroup.hide()
+        topTask.gGroup = null;
+      }
+    }
+  });
+}
+
+/**
+ * 根据 Task 计算矩形位置
+ *
+ */
+GanttChart.prototype.calRectPos = function(taskItem) {
+  let duraStartAt = new Date(taskItem.startDate) - new Date(this.startAt.format('YYYY-MM-DD'));
+  let secondsStartAt = duraStartAt/1000
+
+  let duraEndAt = new Date(taskItem.endDate) - new Date(taskItem.startDate);        
+  let secondsEndAt = duraEndAt/1000
+  return {
+    x: secondsStartAt * this.timePerPix,
+    y: 0,
+    width: secondsEndAt * this.timePerPix,
+    height: 0,
+  };
+}
+
+/**
+ * 主函数
+ *
+ */
+
+GanttChart.prototype.main = function() {  
+  this.initDrawingReady();
+}

+ 71 - 21
src/views/analysis/CoreDeviceReport.vue

@@ -28,12 +28,12 @@
     </div>
     <div class="main-right">
       <div class="search-container">
-        <Input iconType="search" v-model="searchKey" placeholder="搜索" width="192"/>
+        <Input iconType="search" v-model="searchKey" placeholder="搜索" width="192" @pressEnter="getTableData" @clear="getTableData"/>
       </div>
       <el-table :data="tableData" style="width: 100%;margin-bottom: 63px;" @row-click="showEquipmentStatus">
         <el-table-column label="序号" type="index" :index="indexMethod"></el-table-column>
         <el-table-column prop="sbjc" label="设备简称"></el-table-column>
-        <el-table-column prop="assetnum" label="设备编号"></el-table-column>
+        <el-table-column prop="sbjbm" label="设备编号"></el-table-column>
         <el-table-column prop="is_exception" label="状态">
           <template slot-scope="scope">
             <span style="display: inline-block;width: 6px;height:6px;border-radius: 3px;background: #0091FF;" :style="{'background': !scope.row.is_exception?'#0091FF' : '#F54E45'}"></span>
@@ -102,11 +102,14 @@
       <el-dialog :title="detailTitle" :visible.sync="showDetail" width="1260px">
         <div class="detail-container">
           <div class="pictures-menu">
-
+            <div v-for="(item) in pictureList" :key="'id_' + item.id" class="item">
+              <img :src="item.url" alt="">
+            </div>
           </div>
         </div>
       </el-dialog>
     </div>
+  </div>
 </template>
 
 <script>
@@ -120,11 +123,11 @@ export default {
       systemId: '', // 当前系统Id
       systemList: [], // 系统
       systemContentData: [
-        {id: 1, name: '高压配电柜', isMaintenance: true, num: 95, statusNum: 0, abnormal: false, isActive: true},
-        {id: 2, name: '变压器', isMaintenance: false, num: 256, statusNum: 12, abnormal: true, isActive: false},
-        {id: 3, name: '低压配电柜', isMaintenance: false, num: 354, statusNum: 0, abnormal: false, isActive: false},
-        {id: 4, name: '直流屏', isMaintenance: false, num: 175, statusNum: 0, abnormal: false, isActive: false},
-        {id: 5, name: '柴油发电机组', isMaintenance: false, num: 186, status: 0, abnormal: false, isActive: false},
+        // {id: 1, name: '高压配电柜', isMaintenance: true, num: 95, statusNum: 0, abnormal: false, isActive: true},
+        // {id: 2, name: '变压器', isMaintenance: false, num: 256, statusNum: 12, abnormal: true, isActive: false},
+        // {id: 3, name: '低压配电柜', isMaintenance: false, num: 354, statusNum: 0, abnormal: false, isActive: false},
+        // {id: 4, name: '直流屏', isMaintenance: false, num: 175, statusNum: 0, abnormal: false, isActive: false},
+        // {id: 5, name: '柴油发电机组', isMaintenance: false, num: 186, status: 0, abnormal: false, isActive: false},
       ], // 系统下的各种组成
       searchKey: '', // 搜索关键字
       tableData: [
@@ -149,6 +152,7 @@ export default {
 
       showDetail: false, // 显示照片、报告详情
       detailTitle: '图片预览', // 弹窗名称
+      pictureList: [], // 图片列表
     }
   },
 
@@ -161,8 +165,8 @@ export default {
 
   mounted() {
     this.getSystemList();
-    this.getEquipmentOfSystem();
-    this.getTableData();
+    // this.getEquipmentOfSystem();
+    
   },
 
   methods: {
@@ -181,6 +185,13 @@ export default {
             })
           })
           this.systemList = newData;
+          const { query } = this.$route;
+          if (!_.isEmpty(query)) {
+            this.systemId = query.smsxt || newData[0].id;
+          } else {
+            this.systemId = newData[0].id;
+          }
+          this.getEquipmentOfSystem();
         }
       })
     },
@@ -189,6 +200,7 @@ export default {
      */
     changeCurSystem(val) {
       console.log('val', val)
+      this.getEquipmentOfSystem();
     },
     /**
      * 获取系统下的设备
@@ -197,28 +209,52 @@ export default {
       let param = {
         plazaId: 1000423,
         ccode: 1002347,
-      }
-      if (this.systemId !== '') {
-        param.smsxt = this.systemId;
+        smsxt: this.systemId
       }
       queryEquipmentList('/data/home/querySystemCard', param).then((res) => {
-        console.log('res', res)
+        const { result, data } = res;
+        if (result === 'success') {
+          let newData = [];
+          _.forEach(data[0].assetTypeList, (item, index) => {
+            newData.push({
+              id: item.id,
+              name: item.category_name,
+              isMaintenance: item.is_detecting,
+              statusNum: item.is_exception_num,
+              num: item.asset_num,
+              abnormal: item.is_exception_num !== 0,
+              isActive: index === 0,
+              category_code: item.category_code
+            })
+          })
+          this.systemContentData = newData;
+          const { query } = this.$route;
+          if (!_.isEmpty(query) && query.equipId) {
+            _.map(this.systemContentData, (o) => {return o.isActive = o.id == query.equipId});
+          }
+          this.getTableData();
+        }
       })
     },
     /**
      * 切换系统下的设备
      */
     changeEquipment(id) {
-      _.map(this.systemContentData, (o) => {return o.isActive = o.id === id})
+      _.map(this.systemContentData, (o) => {return o.isActive = o.id === id});
+      this.getTableData();
     },
     /**
      * 获取表数据
      */
     getTableData() {
       let query = {
-        category_code: 'gdc'
+        category_code: _.find(this.systemContentData, (o) => {return o.isActive}).category_code
+      }
+      let url = `/data/glsms_asset/query?plazaId=1000423&page=${this.curPage}&size=${this.pageSize}`;
+      if (_.trim(this.searchKey) !== '') {
+        url = `${url}&keyword=${this.searchKey}:sbjc,sbjbm`
       }
-      queryTableData(`/data/glsms_asset/query?plazaId=1000423&page=${this.curPage}&size=${this.pageSize}`, query).then((res) => {
+      queryTableData(url, query).then((res) => {
         const { result, count, data } = res;
         if (result === 'success') {
           this.tatol = count;
@@ -334,13 +370,24 @@ export default {
      */
     getDetailData(val) {
       let param = {
-        file_type: 1, // val.file_type
-        file_type_id: 2467908, // val.file_type_id
+        file_type: 0, // val.file_type
+        file_type_id: 1144, // val.file_type_id
         type: this.detailTitle === '图片预览'? 0 : 1
       }
 
       queryDetailData('/data/base/queryFileDetails', param).then((res) => {
         console.log('res', res)
+        const { result, data } = res;
+        if (result === 'success') {
+          let newData = [];
+          _.forEach(data, (item) => {
+            newData.push({
+              id: item.id,
+              url: item.urlname
+            })
+          })
+          this.pictureList = newData;
+        }
       })
     }
   }
@@ -458,8 +505,11 @@ export default {
     .pictures-menu{
       margin-right: 21px;
       width: 180px;
+      .item{
+        >img{
+          width: 180px;
+        }
+      }
     }
-
   }
-
 </style>

+ 253 - 8
src/views/analysis/GanttChart.vue

@@ -29,27 +29,104 @@
     <div class="main-gantt-container">
       <div class="task-title">
         <div class="title">任务标题</div>
-        <Tree :data="treeData" @openNode="toggleNode" />
+        <div>
+          <Tree :data="treeData" @openNode="toggleNode" />
+        </div>
       </div>
       <div class="chart-container" id="chartContainer" ref="chartContainer">
         <div id="ganttContainer"></div>
       </div>
       <el-dialog :title="detailTitle" :visible.sync="showDetail" width="840px">
-
+        <div class="dialog-container">
+          <div class="row task-status">
+            <div>
+              <Task class="icon"/>
+              <div class="title">任务状态</div>
+            </div>
+            <div>进行中</div>
+          </div>
+          <div class="row">
+            <div>
+              <PlanTime class="icon" />
+              <div class="title">计划时间</div>
+            </div>
+            <div class="info">{{this.ganttDetail.planTime}}</div>
+          </div>
+          <div class="row">
+            <div>
+              <RealTime class="icon" />
+              <div class="title">实际执行时间</div>
+            </div>
+            <div class="info">{{this.ganttDetail.realTime}}</div>
+          </div>
+          <div class="row picture">
+            <div>
+              <Picture class="icon" />
+              <div class="title">照片</div>
+            </div>
+            <div>
+              <div>
+                <div class="num">12张</div>
+                <div class="more">查看更多</div>
+              </div>
+              <div class="pictrue-container">
+                <div v-for="(item) in pictures" :key="'id_' + item.id">
+                  <img :src="item.imgSrc" alt="" />
+                  <div class="info">{{item.title}}</div>
+                </div>
+              </div>
+            </div>
+          </div>
+          <div class="row picture">
+            <div>
+              <Report class="icon" />
+              <div class="title">报告</div>
+            </div>
+            <div>
+              <div>
+                <div class="num">2张</div>
+              </div>
+              <div class="pictrue-container">
+                <div v-for="(item) in reports" :key="'id_' + item.id">
+                  <img :src="item.imgSrc" alt="" />
+                  <div class="info">{{item.title}}</div>
+                </div>
+              </div>
+            </div>
+          </div>
+          <div class="row test-content">
+            <div>
+              <Menu class="icon" />
+              <div class="title">检测内容</div>
+            </div>
+            <el-table :data="tableData">
+              <el-table-column property="time" label="设备简称"></el-table-column>
+              <el-table-column property="evenType" label="设备编号"></el-table-column>
+              <el-table-column property="objid" label="设备数"></el-table-column>
+              <el-table-column property="content" label="空间位置"></el-table-column>
+            </el-table>
+          </div>
+        </div>
       </el-dialog>
     </div>
   </div>
 </template>
 
 <script>
-import { queryGanttChart } from '../../api/ganttChart';
-import { querySystemList } from '../../api/coreDeviceReport';
+import { queryGanttChart, queryGanttDetail } from '../../api/ganttChart';
+import { querySystemList, queryDetailData } from '../../api/coreDeviceReport';
 import { Tree } from 'meri-design';
 import _ from 'lodash';
 import moment from 'moment';
 // import '../../utils/ganttChart/g.js';
 import { GanttChart } from '../../utils/ganttChart/GanttChart.js';
 import { parse } from 'path';
+import Task from '../../assets/svg/task.svg';
+import PlanTime from '../../assets/svg/plan_time.svg';
+import RealTime from '../../assets/svg/real_time.svg';
+import Picture from '../../assets/svg/picture.svg';
+import Report from '../../assets/svg/report.svg';
+import Menu from '../../assets/svg/menu.svg';
 export default {
   data () {
     return {
@@ -67,10 +144,27 @@ export default {
       // 弹窗相关
       showDetail: false, // 弹框显示状态
       detailTitle: '', // 弹窗标题
+      pictures: [
+        {id: 1, imgSrc: require('../../assets/imgs/analysis/picture.png'), title: '2019年5月高压用具检测报告.jpg'},
+        {id: 2, imgSrc: require('../../assets/imgs/analysis/picture.png'), title: '2019年5月高压用具检测报告.jpg'},
+      ], // 照片
+      reports: [
+        {id: 1, imgSrc: require('../../assets/imgs/analysis/report_pdf.png'), title: '2019年5月高压用具检测报告.pdf'},
+        {id: 2, imgSrc: require('../../assets/imgs/analysis/report_word.png'), title: '2019年5月高压用具检测报告.docx'},
+      ], // 报告
+      ganttDetail: {}, // 甘特图明细
+      tableData: [], // 表数据
     }
   },
 
-  components: {},
+  components: {
+    Task,
+    PlanTime,
+    RealTime,
+    Picture,
+    Report,
+    Menu
+  },
 
   computed: {},
 
@@ -93,8 +187,13 @@ export default {
               name: item.name
             })
           })
-          this.systemId = newData[0].id;
           this.systemList = newData;
+          const { query } = this.$route;
+          if (!_.isEmpty(query) && query.smsxt) {
+            this.systemId = query.smsxt;
+          } else {
+            this.systemId = newData[0].id;
+          }
           this.getGanttChartData();
         }
       })
@@ -143,7 +242,8 @@ export default {
               id: index + 1,
               name: name[index],
               open: true,
-              children: name[index] === '专维'?[] : this.disGanttData(dsfList)
+              // children: name[index] === '专维'?[] : this.disGanttData(dsfList)
+              children: this.disGanttData(data[index])
             })
           })
           
@@ -166,10 +266,11 @@ export default {
           console.log('taskData', taskData)
           let width = this.$refs.chartContainer.offsetWidth;
           window.gc = new GanttChart({
+            chartParentContainer: 'chartContainer',
+            chartContainer: 'ganttContainer',
             viewWidth: width,
             cWidth: 3*width,
             tasks: taskData,
-            chartContainer: 'chartContainer',
             daysCount: parseInt(3*width/40),
             callback: this.showDialog
           });
@@ -202,6 +303,7 @@ export default {
      */
     toggleNode(status) {
       console.log('status', status)
+
     },
     /**
      * 显示弹窗
@@ -209,6 +311,54 @@ export default {
     showDialog(task) {
       this.showDetail = true;
       this.detailTitle = task._pdata.description;
+      this.getGanttDetailData();
+      this.getPictureOrReportData(0);
+      this.getPictureOrReportData(1);
+    },
+    /**
+     * 获取甘特图详情
+     */
+    getGanttDetailData() {
+      let param = {
+        plazaId: 1000423,
+        type: 2,
+        id: 1078467
+      }
+      queryGanttDetail('/data/base/queryGanttChartDetails', param).then((res) => {
+        const { result, data } = res;
+        if (result === 'success') {
+          const { status, planStartDate, planEndDate, realStartDate, realEndDate } = data;
+          let newData = {
+            status,
+            color: '',
+            planTime: this.dealDetailTime(planStartDate, planEndDate),
+            realTime: this.dealDetailTime(realStartDate, realEndDate)
+          }
+          this.ganttDetail = newData;
+        }
+      })
+    },
+    /**
+     * 处理时间
+     */
+    dealDetailTime(startTime, endTime) {
+      let start = moment.unix(startTime / 1000).format('YYYY.MM.DD HH:mm:ss'),
+          end = moment.unix(endTime / 1000).format('YYYY.MM.DD HH:mm:ss');
+      return `${start}-${end}`
+    },
+    /**
+     * 获取甘特图的图片/报告详情
+     */
+    getPictureOrReportData(type) {
+      let param = {
+        file_type: 1,
+        file_type_id: 1985,
+        type: type
+      }
+      queryDetailData('/data/base/queryFileDetails', param).then((res) => {
+        console.log('photo', res)
+
+      })
     }
   }
 }
@@ -272,10 +422,105 @@ export default {
         line-height: 19px;
         border-bottom: 1px solid #EFF0F1;
       }
+      >div:nth-of-type(2){
+        max-height: calc(100% - 50px);
+        overflow: auto;
+      }
     }
     .chart-container{
       flex: 1;
       overflow: hidden;
+      background: #fff;
+    }
+  }
+  .dialog-container{
+    max-height: 580px;
+    overflow: auto ;
+    .row{
+      display: flex;
+      >div:first-child{
+        margin-right: 24px;
+        display: flex;
+        align-items: center;
+      }
+      &:not(:last-of-type){
+        margin-bottom: 14px;
+      }
+      .info{
+        font-size: 14px;
+        color: #1F2429;
+        line-height: 22px;
+      }
+    }
+    .icon{
+      margin-right: 6px;
+      width: 16px;
+    }
+    .title{
+      width: 84px;
+      font-size: 14px;
+      color: #646C73;
+      line-height: 22px;
+      font-weight: 400;
+    }
+    .task-status>div:nth-of-type(2){
+      width: 58px;
+      height: 24px;
+      background: rgba(91,143,249,0.2);
+      border-radius: 2px;
+      color: #5B8FF9;
+      line-height: 24px;
+      text-align: center;
+    }
+    .picture{
+      margin-bottom: 19px!important;
+      >div:first-child{
+        align-items: baseline;
+      }
+      >div:nth-of-type(2){
+        flex: 1;
+      }
+      >div:nth-of-type(2)>div:first-child{
+        margin-bottom: 12px;
+        display: flex;
+      }
+      .num,
+      .more{
+        font-size: 14px;
+        line-height: 22px;
+        font-weight: 400;
+      }
+      .num{
+        margin-right: 22px;
+        color: #1F2429;
+      }
+      .more{
+        color: #025BAA;
+        cursor: pointer;
+      }
+    }
+    .pictrue-container{
+      >div{
+        padding: 10px 16px;
+        width: 100%;
+        border-radius:4px;
+        border:1px solid rgba(233,233,233,1);
+        display: flex;
+        align-items: center;
+        >img{
+          width: 24px;
+          margin-right: 15px;
+        }
+      }
+      >div:not(:last-child){
+        margin-bottom: 8px;
+      }
+    }
+    .test-content{
+      display: block;
+      >div:first-child{
+        margin-bottom: 13px;
+      }
     }
   }
 }

+ 44 - 9
src/views/analysis/SpecificationUpdateRecord.vue

@@ -43,20 +43,22 @@
 </template>
 
 <script>
-import { getSpecificaltionData } from '../../api/specificationUpdateRecord';
+import { getSpecificaltionData, queryEventypes } from '../../api/specificationUpdateRecord';
 import moment from 'moment';
 import _ from 'lodash';
 export default {
   data () {
     return {
-      incidentList: [
+      incidentList: [], // 事件列表
+      oraginIncidentList: [
+        {id: 'all', name: '全部'},
         {id: 0, name: '专维'},
         {id: 1, name: '维保'},
         {id: 2, name: '第三方检测'},
         {id: 3, name: '重点关注'},
-      ], // 事件列表
-      incidentType: '', // 事件类型
-      timeVal: '', // 时间
+      ], // 事件列表字典表
+      incidentType: 'all', // 事件类型
+      timeVal: null, // 时间
       tableData: [], // 表数据
       curPage: 1, // 当前页码
       pageSize: 10, // 每页条数
@@ -71,11 +73,45 @@ export default {
   computed: {},
 
   mounted() {
-    this.getTableData();
+    this.initTimePicker();
+    this.getEvenType();
   },
 
   methods: {
     /**
+     * 初始化时间
+     */
+    initTimePicker() {
+      let endTime = new Date(),
+          startTime = new Date(endTime.getTime() - 1000*60*60*24*30);
+      this.timeVal = [startTime, endTime];
+    },
+    /**
+     * 获取事件类型
+     */
+    getEvenType() {
+      let query = {
+        tableName: 'rpt_change_record',
+        columnName: {
+          objtype: 'objtype'
+        }
+      }
+      queryEventypes(`/data/base/queryOptions?plazaId=1000423`, [query]).then((res) => {
+        const { result, data } = res;
+        if (result === 'success') {
+          let newData = [this.oraginIncidentList[0]];
+          _.forEach(data.rpt_change_record.objtype, (item) => {
+            newData.push({
+              id: item.key,
+              name: _.find(this.oraginIncidentList, (o) => {return item.key === o.id}).name
+            })
+          })
+          this.incidentList = newData;
+          this.getTableData();
+        }
+      })
+    },
+    /**
      * 获取表数据
      */
     getTableData() {
@@ -92,7 +128,7 @@ export default {
       if (this.endTime !== '') {
         param.changeDateEndDate = this.endTime;
       }
-      if (this.incidentType !== '') {
+      if (this.incidentType !== 'all') {
         param.objtype = this.incidentType;
       }
       getSpecificaltionData('/data/rpt_change_record/query', param).then((res) => {
@@ -125,8 +161,7 @@ export default {
         this.startTime = moment.unix(new Date(this.timeVal[0]).getTime() / 1000).format('YYYYMMDDHHmmss');
         this.endTime = moment.unix(new Date(this.timeVal[1]).getTime() / 1000).format('YYYYMMDDHHmmss');
       } else {
-        this.startTime = 20171027000000;
-        this.endTime = 20171028000000;
+        this.initTimePicker();
       }
       this.getTableData();
     }

+ 8 - 0
src/views/analysis/index.vue

@@ -46,6 +46,14 @@ export default {
 		GanttChart
 	},
 	mounted() {
+		const { query } = this.$route;
+		if (!_.isEmpty(query)) {
+			if (query.module === 'specification') {
+				_.map(this.navList, (o) => {return o.isActive = o.id === 2});
+			} else if (query.module === 'gantt') {
+				_.map(this.navList, (o) => {return o.isActive = o.id === 3});
+			}
+		}
 		this.findCurModule();
 	},
 	methods: {

+ 30 - 16
src/views/equipment/index.vue

@@ -28,21 +28,23 @@
                             <Legend :systemName='systemName' :floors='floorsArr' type='1' :editTips='`编辑${floorInfo.code}层${systemName}平面图`'></Legend>
                         </div>
                         <floorMap ref='floorMap' :id='"equip"' :loadName='loadName' :type='"system"'></floorMap>
-                        <!--  -->
                         <div class='additional-box' v-if='fqPic.length>0'>
-                            <div class='additional' @click='additionalColl' v-if='!show'>
-                                <img src='../../assets/imgs/bg.png' alt />
-                            </div>
-                            <div class='additional2' @click='additionalColl' v-else>
+                            <div class='additional2' @click='additionalColl' v-if='showView===3'>
                                 <img src='../../assets/imgs/bg2.png' alt />
                             </div>
+                            <div class='additional' @click='additionalColl' v-else>
+                                <img src='../../assets/imgs/bg.png' alt />
+                            </div>
                             <el-collapse-transition>
-                                <div v-if='show' class='add-img'>
-                                    <img :src='fqPic[0].url' alt />
+                                <div v-if='showView===3' class='add-img-container'>
+                                    <div class='add-img'>
+                                        <img :src='fqPic[0].url' alt />
+                                    </div>
                                 </div>
                             </el-collapse-transition>
                         </div>
                     </div>
+
                     <floor-list v-if='floorsArr.length>0' :floorsArr='floorsArr' @emitFloor='emitFloor' id='system'></floor-list>
                 </div>
             </div>
@@ -76,7 +78,6 @@ export default {
             dialogInfo: {},
             brand: [], //品牌
             manufacturer: [],
-            show: false,
             fqPic: [],
             loadName: '',
             type: '',
@@ -114,8 +115,13 @@ export default {
         dialogVisible(eve) {
             this.$refs.dialog.showModal(eve)
         },
+        //附加数据图片查看 showView为3展示状态
         additionalColl() {
-            this.show = !this.show
+            if (this.showView != 3) {
+                this.$store.commit('SETSHOWVIEW', 3)
+            } else {
+                this.$store.commit('SETSHOWVIEW', 0)
+            }
         },
         // 查询附加数据图片
         queryTable(system) {
@@ -156,7 +162,7 @@ export default {
         this.$refs.floorMap.init(this.floorInfo.gname)
     },
     computed: {
-        ...mapGetters(['floorsArr', 'plazaId'])
+        ...mapGetters(['floorsArr', 'plazaId', 'showView'])
     }
 }
 </script>
@@ -302,9 +308,10 @@ export default {
                             background: linear-gradient(180deg, rgba(54, 156, 247, 1) 0%, rgba(2, 91, 170, 1) 100%);
                             box-shadow: 0px 2px 15px 0px rgba(31, 36, 41, 0.08);
                         }
-                        .add-img {
+                        .add-img-container {
                             width: 560px;
                             height: 360px;
+                            overflow: hidden;
                             background: #ffffff;
                             -webkit-box-shadow: 0px 2px 8px 0px rgba(31, 36, 41, 0.06);
                             box-shadow: 0px 2px 8px 0px rgba(31, 36, 41, 0.06);
@@ -314,11 +321,18 @@ export default {
                             right: 77px;
                             bottom: 381px;
                             z-index: 2;
-                            img {
-                                max-width: 100%;
-                                max-height: 100%;
-                                display: block;
-                                margin: 0 auto;
+                            padding: 20px;
+                            .add-img {
+                                // padding: 0;
+                                width: 100%;
+                                height: 100%;
+                                overflow: scroll;
+                                img {
+                                    width: 100%;
+                                    // max-height: 100%;
+                                    display: block;
+                                    margin: 0 auto;
+                                }
                             }
                         }
                     }

+ 1 - 0
src/views/equipment/table/djspTable.vue

@@ -137,6 +137,7 @@ export default {
         }
     },
     mounted() {
+        this.floor = this.$cookie.get('floorMapId')
         this.getList()
     }
 }

+ 4 - 4
src/views/equipment/table/eqDetaileDialog.vue

@@ -49,11 +49,11 @@
         </div>
         <el-table :data='tableData' :border='true' style='width: 100%;amrgin-bottom:30px'>
             <el-table-column type='index' label='序号' width='60' :index='indexMethod'></el-table-column>
-            <el-table-column prop='sbjc' label='设备名称' show-overflow-tooltip resizable min-width='150'>
+            <el-table-column prop='sbjc' label='设备名称' show-overflow-tooltip resizable width='230'>
                 <template slot-scope='{row}'>{{row.sbjc || '--'}}</template>
             </el-table-column>
-            <el-table-column prop='assetnum' label='设备编号' show-overflow-tooltip resizable width='80'>
-                <template slot-scope='{row}'>{{row.assetnum || '--'}}</template>
+            <el-table-column prop='sbjbm' label='设备编号' show-overflow-tooltip resizable width='80'>
+                <template slot-scope='{row}'>{{row.sbjbm || '--'}}</template>
             </el-table-column>
             <el-table-column prop='sl' label='数量' width='80'>
                 <template slot-scope='{row}'>{{row.sl>=0?row.sl:'--'}}</template>
@@ -79,7 +79,7 @@
             <el-table-column prop='manufacturer' label='生产厂商' show-overflow-tooltip resizable min-width='150'>
                 <template slot-scope='{row}'>{{row.manufacturer || '--'}}</template>
             </el-table-column>
-            <el-table-column prop='fws' label='服务商' show-overflow-tooltip resizable>
+            <el-table-column prop='fws' label='服务商' show-overflow-tooltip resizable width='200'>
                 <template slot-scope='{row}'>{{row.fws || '--'}}</template>
             </el-table-column>
         </el-table>

+ 1 - 2
src/views/equipment/table/wbTable.vue

@@ -206,8 +206,7 @@ export default {
                     diff: this.diff,
                     plazaId: this.$store.state.plazaId,
                     page: this.currentPage,
-                    size: this.size,
-                    orderBy: `wb_gzglid,0;sbjbm,1;reportdate,0;`
+                    size: this.size
                 }
             }
             //下拉

+ 1 - 1
src/views/equipment/table/wxTable.vue

@@ -190,7 +190,7 @@ export default {
                     plazaId: this.$store.state.plazaId,
                     page: this.currentPage,
                     size: this.size,
-                    orderBy: `sbjbm,0;sjjssj,1`
+                    
                 }
             }
             //下拉

+ 27 - 31
src/views/homepage/index.vue

@@ -20,17 +20,14 @@
                         </section>
                     </div>
                 </div>
-                <div v-else class='empty-content' style='border-top:none; height:8rem;line-height:8rem;'>暂无数据</div>
-                <div v-if='item.rptGlsmsStatisticsList && item.rptGlsmsStatisticsList.length' class='alert-list' @click='navToGanttPage(item, equip)'>
-                    <div class='alert-item' v-for='(option , index) in  item.rptGlsmsStatisticsList' :key='index'>
-                        <img v-if='option.total' :src='srcList[option.type][option.level]' />
-                        <div class='content' v-if='option.total'>
-                            <p class='line'>
-                                <span>{{option.type === 1 ? '维保': option.type === 0 ? '专维' : '第三方检测' }}</span>
-                                <span>
-                                    <em :style='{color:item.level == 1? "#646C73": item.level == 2 ? "#E07A04 " :"#C13830"}'>{{option.unfinished}}</em>/
-                                    <em>{{option.total}}</em>
-                                </span>
+                <div v-else class="empty-content"   style="border-top:none; height:8rem;line-height:8rem;">暂无数据</div>
+                <div v-if="item.rptGlsmsStatisticsList && item.rptGlsmsStatisticsList.length" class="alert-list" @click="navToGanttPage(item)">
+                    <div class="alert-item"  v-for="(option , index) in  item.rptGlsmsStatisticsList" :key="index" >
+                        <img v-if="option.total"  :src="srcList[option.type][option.level]" > 
+                        <div  class="content" v-if="option.total">
+                            <p class="line">
+                                <span >{{option.type === 1 ? '维保': option.type === 0 ? '专维' :  '第三方检测' }}</span>
+                                <span><em :style="{color:item.level == 1? '#646C73': item.level == 2 ? '#E07A04 ' :'#C13830'}">{{option.unfinished}}</em>/<em>{{option.total}}</em></span>
                             </p>
                             <p class='desc'>当月未完成/总任务</p>
                         </div>
@@ -118,17 +115,17 @@ export default {
         this.getInstructionList()
     },
     methods: {
-        /**
+          /**
          *  点击跳转进入综合事项管理页面
          */
-        navToFocusItem() {
-            this.$router.push({ path: './调' })
+        navToFocusItem () {
+            this.$router.push({path:"./other", query:{module:'comprehensive'}})
         },
         /**
          *  点击跳转进入 分析|报表 说明书更新记录页面
          */
-        navToIntroduce() {
-            this.$router.push({ path: './analysis', query: { homepageKey: 2 } })
+        navToIntroduce () {
+            this.$router.push({path:"./analysis", query:{module:'specification'}})
         },
         itemStyle(option) {
             let num = 0
@@ -152,14 +149,15 @@ export default {
                 }
             }
         },
-        navToInnerPage(item, equip) {
-            this.$router.push({ path: './analysis', query: { smsxt: item.smsxt, equipId: equip.id } })
+        navToInnerPage (item, equip) {
+            this.$router.push({path:"./analysis", query:{smsxt:item.smsxt, equipId: equip.id, module:'core'}})
         },
+         
         /**
          * 跳转到甘特图详情页
          */
-        navToGanttPage(item, equip) {
-            this.$router.push({ path: './analysis', query: { smsxt: item.smsxt } })
+        navToGanttPage (item) {
+            this.$router.push({path:"./analysis", query:{smsxt:item.smsxt, module:'gantt'}})
         },
         //TODO plazaId目前是写死的 后期需要更换成用户对应的ID
         testAjax() {
@@ -172,7 +170,6 @@ export default {
                 if (res.result == 'success') {
                     let result = res.data
                     if (result && Array.isArray(result)) {
-                        result[0].is_exception_num = 12
                         this.cardsList = result
                     }
                 }
@@ -254,7 +251,7 @@ export default {
         flex-wrap: wrap;
         justify-content: space-between;
         align-content: flex-start;
-        width: 70%;
+        width: 75%;
         .cards-item {
             width: calc(50% - 5px);
             height: 24%;
@@ -271,10 +268,7 @@ export default {
             }
             .equipment-list {
                 display: flex;
-                padding-bottom: 2rem;
-                margin-bottom: 0.8rem;
-                padding: 1rem;
-                padding-top: 0;
+                padding:0 1rem 1.2rem;
                 .equipment-item {
                     width: 33.33%;
                     padding: 0.6rem;
@@ -296,7 +290,7 @@ export default {
                         }
                         .exception-number {
                             position: absolute;
-                            right: -20px;
+                            right: -20%;
                             top: -5px;
                             height: 1.6rem;
                             border-radius: 8rem;
@@ -333,11 +327,10 @@ export default {
                 display: flex;
                 align-items: center;
                 justify-content: flex-start;
-                padding-top: 2rem;
                 border-top: 1px solid #f5f6f7;
+                height: 44%;
                 border-radius: 4px;
                 cursor: pointer;
-                padding: 2.2rem 1.4rem;
                 &:hover {
                     background: #f5f6f7;
                 }
@@ -348,7 +341,7 @@ export default {
                     img {
                         width: 4rem;
                         height: 4rem;
-                        margin-right: 1.4rem;
+                        margin:0 1rem;
                     }
                     .content {
                         border-right: 1px solid #f5f6f7;
@@ -363,6 +356,7 @@ export default {
                                 font-size: 1.2rem;
                                 color: #1f2429;
                                 font-weight: bold;
+                                white-space: nowrap;
                             }
                             em {
                                 font-weight: normal;
@@ -377,6 +371,7 @@ export default {
                             color: #8d9399;
                             font-size: 1.2rem;
                             text-align: right;
+                            white-space: nowrap;
                         }
                     }
                 }
@@ -392,7 +387,7 @@ export default {
         }
     }
     .homepage-nav-list {
-        width: calc(30% - 10px);
+        width: calc(25% - 10px);
         nav:first-child {
             height: 320px;
         }
@@ -429,6 +424,7 @@ export default {
                     }
                     article:nth-of-type(2) {
                         width: 30%;
+                        padding-left: 1.2rem;
                         white-space: nowrap;
                         overflow: hidden;
                         text-overflow: ellipsis;

+ 1 - 4
src/views/legendLibrary/addForm.vue

@@ -175,17 +175,14 @@ export default {
                 {
                     id: 'solid',
                     src: require('@/assets/imgs/1pxlines.png')
-                    // src: require('@/assets/imgs/1pxline.jpg')
                 },
                 {
                     id: 'dashed',
                     src: require('@/assets/imgs/dashedLines.png')
-                    // src: require('@/assets/imgs/dashedLine.jpg')
                 },
                 {
                     id: 'dotted',
                     src: require('@/assets/imgs/dotLines.png')
-                    // src: require('@/assets/imgs/dotLine.jpg')
                 }
             ],
             linepxOption: [
@@ -356,7 +353,6 @@ export default {
         },
         //线条类型改变
         changeLineType(val) {
-            this.$set(this.ruleForm, 'LineDash', val)
             this.borderLineOptionObject = val && this.borderLineOption.find(item => item.id == val)
             if (this.$refs.select1 && this.$refs.select1.$el) {
                 this.$refs.select1.$el.children[0].children[0].setAttribute(
@@ -364,6 +360,7 @@ export default {
                     'background:#ffffff url(' + this.borderLineOptionObject.src + ')  10px center no-repeat;color:transparent;'
                 )
             }
+            this.$set(this.ruleForm, 'LineDash', val)
             if (this.view) {
                 this.view.lineType = val
             }

+ 31 - 32
src/views/legendLibrary/index.vue

@@ -165,7 +165,7 @@
                 ></el-pagination>
             </div>
         </div>
-        <add-legend ref='addLegend' @updateSuccess='updateSuccess' @addSuccess='addSuccess' @cancal='cancal'></add-legend>
+        <add-legend ref='addLegend' @updateSuccess='updateSuccess' @addSuccess='addSuccess' @cancal='cancal' :key='Date.now()'></add-legend>
         <Modal :show='modalStatusTip' title='确定要作废图例吗?' mode='tip' type='error' @close='modalStatusTip=false'>
             <template #content>作废后则不可更改</template>
             <template #handle>
@@ -189,6 +189,7 @@ import {
     getVisualization,
     queryRelation
 } from '@/api/legendLibrary.js'
+import { Container } from 'element-ui'
 
 function hexToRgba(hex) {
     let opacity = '',
@@ -304,9 +305,38 @@ export default {
         initQueryDeviceAndPOsition() {
             let postParams = {}
             queryDeviceAndPOsition({ postParams }).then(res => {
+                // let data = res.data
+                // data.forEach(data => {
+                //     const map = {
+                //         1: [],
+                //         2: []
+                //     }
+                //     data.children.forEach(child => map[child.type].push(child))
+                //     data.children = [
+                //         {
+                //             id: `1--${data.id}`,
+                //             name: '位置类型',
+                //             children: map[1]
+                //         },
+                //         {
+                //             id: `2--${data.id}`,
+                //             name: '设备类型',
+                //             children: map[2]
+                //         }
+                //     ]
+                // })
+                // data.map(i => {
+                //     i.children.map(i => {
+                //         console.log(i)
+                //         if (!i.children.length) {
+                //             i.disabled = true
+                //         }
+                //     })
+                // })
                 this.deviceList = res.data
             })
         },
+
         //说明书位置
         instruction() {
             let getParams = {}
@@ -390,34 +420,6 @@ export default {
         deleteClick(row) {
             this.deleteObject = row
             this.modalStatusTip = true
-            // this.$confirm('作废后则不可更改', '确定要作废图例吗?', {
-            //     confirmButtonText: '作废',
-            //     cancelButtonText: '取消',
-            //     type: 'warning',
-            //     center: true
-            // })
-            //     .then(() => {
-            //         let postParams = [
-            //             {
-            //                 Id: row.Id
-            //             }
-            //         ]
-            //         deleteLegend({ postParams }).then(res => {
-            //             if (res.Result == 'success') {
-            //                 this.$message({
-            //                     type: 'success',
-            //                     message: '作废成功!'
-            //                 })
-            //                 this.getTableList()
-            //             }
-            //         })
-            //     })
-            //     .catch(() => {
-            //         this.$message({
-            //             type: 'info',
-            //             message: '已取消删除'
-            //         })
-            //     })
         },
         pageChanged(page, size) {
             this.currentPage = page
@@ -452,9 +454,6 @@ export default {
             return arr
         },
         getTableList() {
-            // if (this.GraphCategoryIds || this.InfoLocals || this.InfoSystems || this.keyword) {
-            //     this.currentPage = 1
-            // }
             let postParams = {
                 Deleted: this.state == 1 ? false : true,
                 GraphCategoryIds: this.GraphCategoryIds.length ? this.GraphCategoryIds : undefined, //说明书位置

+ 1 - 1
src/views/legendRules/index.vue

@@ -15,7 +15,7 @@
             <div style='float: left;  padding-left: 20px;  padding-right:7px; display: inline-block;'>
                 <img src='@/assets/imgs/go-back.png' @click='goBack' alt style='cursor: pointer;' />
             </div>
-            <span style='float: left;display: inline-block;font-size:14px;padding-top: 2px;color:#1F2429'>返回</span>
+            <span style='float: left;display: inline-block;font-size:14px;padding-top: 2px;color:#1F2429;cursor: pointer;' @click='goBack'>返回</span>
             图例绘制规则
             <el-button type='primary' class='rules-button' size='small' @click='add'>添加图例</el-button>
         </div>

+ 15 - 5
src/views/other/index.vue

@@ -59,7 +59,8 @@ export default {
             picFloor: '',
             picFloorImg: [],
             dialogInfo: {},
-            floorData: []
+            floorData: [],
+            module: ''
         }
     },
     components: { floorListOther, OtherDialog, ZhsxOther, GcfzDialog },
@@ -130,6 +131,8 @@ export default {
                 //console.log('查询哪几层楼有图', res)
                 this.floorData = []
                 let data = res.data.data
+                console.log('data', data)
+
                 data.forEach(el => {
                     if (el.count > 0) {
                         let obj = {
@@ -155,6 +158,10 @@ export default {
         ...mapGetters(['floorsArr', 'plazaId'])
     },
     mounted() {
+        let module = window.location.href.split('=')[1]
+        if (module == 'comprehensive ') {
+            this.matterId = 1
+        }
         this.everySystem = this.matter[0].children
         this.tabSize()
     }
@@ -241,10 +248,13 @@ export default {
             margin: 0 auto;
             margin-top: 200px;
             img {
-                max-width: 100%;
-                max-height: 100%;
-                display: block;
-                margin: 0 auto;
+                width: 100%;
+                height: 100%;
+                object-fit: cover;
+                // max-width: 100%;
+                // max-height: 100%;
+                // display: block;
+                // margin: 0 auto;
             }
         }
         .fzyfwtp {

+ 1 - 1
src/views/other/zhsxOtherTable1.vue

@@ -41,7 +41,7 @@
             <el-table-column prop sortable label='日期' width='100' resizable>
                 <template slot-scope='{row}'>{{formatter(row.createdate)||'--'}}</template>
             </el-table-column>
-            <el-table-column prop label='政府部门' width='80'>
+            <el-table-column prop label='政府部门' width='160'>
                 <template slot-scope='{row}'>{{row.department||'--'}}</template>
             </el-table-column>
             <el-table-column prop label='记录事项' :show-overflow-tooltip='true' min-width='700'>

+ 18 - 6
src/views/other/zhsxOtherTable2.vue

@@ -20,19 +20,31 @@
                 :selectdata='status2'
                 :placeholder='"请选择"'
                 @change='dsfjc'
+                style='margin-right:12px'
             ></Select>
-            <Select
+            <!-- <Select
                 @change='dsfjc'
                 width='200'
                 tipPlace='top'
                 caption='部门:'
                 v-if='zgbm.length>0'
                 size='small'
+                style='margin-right:12px'
                 v-model='bmdsf'
                 :selectdata='zgbm'
                 :placeholder='"请选择"'
-            ></Select>
-            <Select
+            ></Select>-->
+            <el-input
+                clearable
+                @change='dsfjc'
+                placeholder='搜索部门'
+                size='small'
+                prefix-icon='el-icon-search'
+                v-model='bmdsf'
+                style='width:200px;margin-right:12px'
+            ></el-input>
+            <el-input clearable @change='dsfjc' placeholder='搜索检测结论' size='small' prefix-icon='el-icon-search' v-model='jcjldsf' style='width:200px'></el-input>
+            <!-- <Select
                 @change='dsfjc'
                 width='200'
                 tipPlace='top'
@@ -42,7 +54,7 @@
                 :selectdata='conclusion'
                 :placeholder='"请选择"'
                 v-model='jcjldsf'
-            ></Select>
+            ></Select>-->
         </div>
         <el-table
             row-key='id'
@@ -122,10 +134,10 @@ export default {
                 getParams.status2 = this.ztdsf
             }
             if (this.bmdsf) {
-                getParams.status2 = this.bmdsf
+                getParams.keyword = `${this.bmdsf}:zgbm`
             }
             if (this.jcjldsf) {
-                getParams.conclusion = this.jcjldsf
+                getParams.keyword = `${this.jcjldsf}:conclusion`
             }
             queryDsfrw({ getParams }).then(res => {
                 if (res.result == 'success') {

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

@@ -18,9 +18,12 @@
         <div class='view-box'>
             <div class='view-left'>
                 <div class='lb-left'>
-                    <rotation :rotationImg='pic2'></rotation>
-                    <div class='lb-icon' @click='picClick("2")'></div>
-                    <img class='lb-img' @click='picClick("2")' src='../../assets/imgs/zk.png' alt />
+                    <div v-if='pic2.length>0' style='height:100%'>
+                        <rotation :rotationImg='pic2'></rotation>
+                        <div class='lb-icon' @click='picClick("2")'></div>
+                        <img class='lb-img' @click='picClick("2")' src='../../assets/imgs/zk.png' alt />
+                    </div>
+                    <img v-else class='lb-left-noImg' src='@/assets/imgs/nkt.jpg' alt />
                 </div>
                 <div class='lb-bottom'>
                     <nav>
@@ -74,9 +77,12 @@
             <div class='view-right'>
                 <div class='view-right-box'>
                     <div class='lb-right'>
-                        <rotation :rotationImg='pic1'></rotation>
-                        <div class='lb-icon' @click='picClick("1")'></div>
-                        <img class='lb-img' @click='picClick("1")' src='../../assets/imgs/zk.png' alt />
+                        <div v-if='pic1.length>0' style='height:100%'>
+                            <rotation :rotationImg='pic1'></rotation>
+                            <div class='lb-icon' @click='picClick("1")'></div>
+                            <img class='lb-img' @click='picClick("1")' src='../../assets/imgs/zk.png' alt />
+                        </div>
+                        <img v-else class='lb-left-noImg' src='@/assets/imgs/qwt.jpg' alt />
                     </div>
                     <div class='lb-right-bottom'>
                         <nav>
@@ -219,6 +225,11 @@ export default {
             queryFact(params).then(res => {
                 if (res.result == 'success') {
                     this.loading = false
+                    this.pic1 = []
+                    this.pic2 = []
+                    this.build = {}
+                    this.constructions = []
+                    this.shuzihuayijiao = ''
                     this.pic1 = res.pic1 ? res.pic1 : []
                     this.pic2 = res.pic2 ? res.pic2 : []
                     this.build = res.build ? res.build : {}

+ 1 - 1
src/views/overview/picModal.vue

@@ -5,7 +5,7 @@
                 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
             />-->
-            <rotation v-if='rotationImg.length>0' :rotationImg='rotationImg' style='height:100%;'></rotation>
+            <rotation :type='1' v-if='rotationImg.length>0' :rotationImg='rotationImg' style='height:100%;width:100%'></rotation>
             <span class='close' @click='close'>X</span>
         </el-dialog>
     </div>

+ 4 - 2
src/views/room/index.vue

@@ -7,7 +7,7 @@
     <div class='compute-box'>
         <el-dialog :title='`${systemName}`||"机房"' :visible.sync='visible' :fullscreen='true'>
             <div class='compute-span'></div>
-            <el-tooltip class='item' effect='dark' :content='content' placement='top' v-if='smsxtArr.length>0'>
+            <el-tooltip class='item' effect='dark' :content='content' placement='top' v-if='(type=="floor" && smsxtArr.length>0)||type=="system"'>
                 <div class='compute-zf' @click='jumpFloor'></div>
             </el-tooltip>
 
@@ -493,7 +493,8 @@ export default {
             rwwcrq: '',
             ycgdtbsj: '',
             ycgdyssj: '',
-            smsxtArr: { smsx: '1001', smsxtname: '供电系统' }
+            smsxtArr: { smsx: '1001', smsxtname: '供电系统' },
+            type: ''
         }
     },
     components: {
@@ -844,6 +845,7 @@ export default {
             this.visible = true
             this.systemName = name.name
             this.location = name.location
+            this.type = name.type
             if (name.type == 'floor') {
                 this.init()
             } else if (name.type == 'system') {

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


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