fujunwen 4 anni fa
parent
commit
9052cb36f7
42 ha cambiato i file con 1595 aggiunte e 1724 eliminazioni
  1. 0 5
      public/index.html
  2. 2 2
      public/systemConf.js
  3. 15 3
      src/api/coreDeviceReport.js
  4. 5 0
      src/api/legendLibrary.js
  5. 10 0
      src/assets/css/rotation.css
  6. 10 0
      src/assets/css/rotation.less
  7. BIN
      src/assets/imgs/nkt.jpg
  8. BIN
      src/assets/imgs/qwt.jpg
  9. 29 12
      src/components/Legend/src/legend.vue
  10. BIN
      src/components/Rotation/src/3440.jpg
  11. 36 10
      src/components/Rotation/src/rotation.vue
  12. 1 0
      src/components/floorMap/index.vue
  13. 94 94
      src/lib/items/SFHFQZoneLegendItem.js
  14. 98 94
      src/lib/items/SFHFQZoneLegendItem.ts
  15. 55 63
      src/lib/items/SLineMarkerItem.js
  16. 51 58
      src/lib/items/SLineMarkerItem.ts
  17. 96 96
      src/lib/items/SSCPZZoneLegendItem.js
  18. 98 94
      src/lib/items/SSCPZZoneLegendItem.ts
  19. 94 94
      src/lib/items/SZoneLegendItem.js
  20. 101 97
      src/lib/items/SZoneLegendItem.ts
  21. 63 63
      src/lib/items/TipelineItem.js
  22. 156 157
      src/lib/items/TipelineItem.ts
  23. 5 3
      src/main.ts
  24. 51 39
      src/router/index.js
  25. 14 8
      src/store/index.js
  26. 0 1
      src/views/analysis/CoreDeviceReport.vue
  27. 30 14
      src/views/equipment/index.vue
  28. 4 4
      src/views/equipment/table/eqDetaileDialog.vue
  29. 1 2
      src/views/equipment/table/wbTable.vue
  30. 1 1
      src/views/equipment/table/wxTable.vue
  31. 164 152
      src/views/homepage/index.vue
  32. 1 4
      src/views/legendLibrary/addForm.vue
  33. 4 1
      src/views/legendLibrary/addLegend.vue
  34. 33 34
      src/views/legendLibrary/index.vue
  35. 2 2
      src/views/legendRules/index.vue
  36. 15 5
      src/views/other/index.vue
  37. 1 1
      src/views/other/zhsxOtherTable1.vue
  38. 18 6
      src/views/other/zhsxOtherTable2.vue
  39. 17 6
      src/views/overview/index.vue
  40. 1 1
      src/views/overview/picModal.vue
  41. 4 2
      src/views/room/index.vue
  42. 215 496
      src/views/statistics/index.vue

+ 0 - 5
public/index.html

@@ -15,11 +15,6 @@
             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;
         }

+ 2 - 2
public/systemConf.js

@@ -27,8 +27,8 @@ var __systemConf = {
         editerUrl: 'http://60.205.177.43:80/wandaEditer/', // 编辑器地址
         wandaBmGuideUrl: 'http://60.205.177.43:80/wandaBmGuide/', //管理书地址
         // http://glsms.wanda-dev.cn/ 测试服
-        // editerUrl: "http://glsms.wanda-dev.cn/wandaEditer/", // 编辑器地址
-        // wandaBmGuideUrl: "http://glsms.wanda-dev.cn/wandaBmGuide/", //管理书地址
+        // editerUrl: 'http://glsms.wanda-dev.cn/wandaEditer/', // 编辑器地址
+        // wandaBmGuideUrl: 'http://glsms.wanda-dev.cn/wandaBmGuide/', //管理书地址
     },
 }
 window.__systemConf = __systemConf

+ 15 - 3
src/api/coreDeviceReport.js

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

+ 5 - 0
src/api/legendLibrary.js

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

+ 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%;

BIN
src/assets/imgs/nkt.jpg


BIN
src/assets/imgs/qwt.jpg


+ 29 - 12
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'>
+                <div v-if='showView===2'>
                     <lengend-edit
                         @handleSwich2='handleSwich2'
                         v-if='editTable.length>=0'
@@ -136,7 +137,7 @@ export default {
         }
     },
     computed: {
-        ...mapGetters(['plazaId', 'fmapID', 'floorSelect', 'isMessage', 'ssoToken'])
+        ...mapGetters(['plazaId', 'fmapID', 'floorSelect', 'isMessage', 'ssoToken', 'showView'])
     },
     props: {
         floors: {
@@ -253,19 +254,29 @@ 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.showView = !this.showView
+            this.queryView(false)
+            // if (this.showView) {
+            //     this.show2 = false
+            // }
         },
         cance() {
             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.show = false
+            // this.show2 = true
             this.queryEditNum(true)
         },
         /**
@@ -291,8 +302,14 @@ 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)

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


+ 36 - 10
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') }]
@@ -41,18 +42,43 @@ export default {
     align-items: center;
     .rotationCon {
         height: 100%;
-        display: flex;
+        width: 100%;
+        // display: flex;
     }
     img {
-        max-width: 100%;
-        max-height: 100%;
-        display: block;
-        margin: auto;
+        // max-width: 100%;
+        // max-height: 100%;
+        // display: block;
+        // margin: auto;
+        width: 100%;
+        height: 100%;
+        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;
@@ -68,7 +94,7 @@ export default {
         background-color: #d3dce6;
     }
     .el-carousel__container {
-        height: 100%;
+        height: 100% !important;
     }
     .el-carousel__button {
         height: 3px;

+ 1 - 0
src/components/floorMap/index.vue

@@ -108,6 +108,7 @@ export default {
                         this.fParser.parseData(res)
                         this.fParser.spaceList.forEach(t => {
                             this.scene.addItem(t)
+                            t.nameSize = 16
                             if (t.data.Name && this.bunkObj[t.data.Name]) {
                                 t.name = this.bunkObj[t.data.Name].detailtype
                             } else {

+ 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

+ 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)
+        }
+    }
+}

+ 5 - 3
src/main.ts

@@ -28,17 +28,19 @@ 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)
+// console.log(store.state.isrequestAuth)
 // router.beforeEach(async (to, from, next) => {
 //     if (!store.state.isrequestAuth) {
-//         // await store.dispatch('getUserInfo', username)
-//         // await store.dispatch('getFloors')
+//         await store.dispatch('getUserInfo', username)
+//         await store.dispatch('getFloors')
 //     }
 //     next()
 // })

+ 51 - 39
src/router/index.js

@@ -2,13 +2,15 @@ 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',
-    },
+    // {
+    //     path: '/',
+    //     redirect: '/home/overview',        // 只有区域,及区域以上用户才能进入总部首页这一套
+    // },
     {
         path: "/404",
         component: () => import("../components/404"),
@@ -23,8 +25,7 @@ const routes = [
         name: 'home',
         component: () => import('../views/index'),
         redirect: '/home/homepage',
-        children: [
-            {
+        children: [{
                 path: 'homepage',
                 component: () => import('../views/homepage'),
             },
@@ -72,37 +73,48 @@ const router = new VueRouter({
     routes,
 })
 //不需要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 {
-//         next()
-//         return
-//     }
-// })
+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) {
+            if (to.path === '/group' ||  to.path === '/home/overview') {
+                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/overview')
+            }
+        } 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

+ 14 - 8
src/store/index.js

@@ -32,6 +32,7 @@ export default new Vuex.Store({
         remarksText: '', //备注
         bunkObj: {}, // 铺位名称
         currentFloor: {}, //当前选中的楼层信息
+        accessLevel:0, // 
     },
     getters: {
         isPreview: (state) => state.isPreview,
@@ -108,22 +109,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') {
+                    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')
-                }
+                //     if (res.permissions.length == 0) {
+                //         router.push('/404')
+                //     }
+                //     commit('SETAUTHMSG', res)
+                // } else {
+                //     commit('SETISREQUESTtAUTH', false)
+                //     router.push('/404')
+                // }
             })
         },
         getFloors(context) {

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

@@ -107,7 +107,6 @@
         </div>
       </el-dialog>
     </div>
-  </div>
 </template>
 
 <script>

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

@@ -30,19 +30,22 @@
                         <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>
@@ -114,8 +117,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 +164,7 @@ export default {
         this.$refs.floorMap.init(this.floorInfo.gname)
     },
     computed: {
-        ...mapGetters(['floorsArr', 'plazaId'])
+        ...mapGetters(['floorsArr', 'plazaId', 'showView'])
     }
 }
 </script>
@@ -302,9 +310,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 +323,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;
+                                }
                             }
                         }
                     }

+ 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`
+                    
                 }
             }
             //下拉

+ 164 - 152
src/views/homepage/index.vue

@@ -1,50 +1,58 @@
 <template>
-    <main class="homepage">
-        <section class="homepage-cards-content">
-            <div class="cards-item" v-for="(item , index) in cardsList" :key="index" :style = itemStyle(item)>
+    <main class='homepage'>
+        <section class='homepage-cards-content'>
+            <div class='cards-item' v-for='(item , index) in cardsList' :key='index' :style='itemStyle(item)'>
                 <h4>{{item.smsxtname}}</h4>
-                <div class="equipment-list" v-if="item.assetTypeList">
-                    <div @click="navToInnerPage(item, equip)" class="equipment-item" v-for="equip in item.assetTypeList" >
-                        <div class="equip-name">
+                <div class='equipment-list' v-if='item.assetTypeList'>
+                    <div @click='navToInnerPage(item, equip)' class='equipment-item' v-for='equip in item.assetTypeList'>
+                        <div class='equip-name'>
                             <h5>{{equip.category_name}}</h5>
-                            <div class="exception-number" v-if="equip.is_exception_num">{{equip.is_exception_num}}</div>
+                            <div class='exception-number' v-if='equip.is_exception_num'>{{equip.is_exception_num}}</div>
                         </div>
                         <section>
-                            <div class="equip-statis"><span class="equip-number">{{equip.asset_num}}</span><span class="equip-unit">台</span></div>
-                            <div><em v-if="false">维保中</em></div>
+                            <div class='equip-statis'>
+                                <span class='equip-number'>{{equip.asset_num}}</span>
+                                <span class='equip-unit'>台</span>
+                            </div>
+                            <div>
+                                <em v-if='false'>维保中</em>
+                            </div>
                         </section>
                     </div>
                 </div>
-                <div v-else class="empty-content"   style="border-top:none; height:8rem;line-height:8rem;">暂无数据</div>
-                <div v-if="item.rptGlsmsStatisticsList && item.rptGlsmsStatisticsList.length" class="alert-list" @click="navToGanttPage(item, equip)">
-                    <div class="alert-item"  v-for="(option , index) in  item.rptGlsmsStatisticsList" :key="index" >
-                        <img v-if="option.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, 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>
                             </p>
-                            <p class="desc">当月未完成/总任务</p>
+                            <p class='desc'>当月未完成/总任务</p>
                         </div>
                     </div>
                 </div>
-                <div v-else class="empty-content">暂无数据</div>
+                <div v-else class='empty-content'>暂无数据</div>
             </div>
         </section>
-        <section class="homepage-nav-list">
+        <section class='homepage-nav-list'>
             <nav>
-                <div class="main-title">
+                <div class='main-title'>
                     <span>重点关注事项</span>
-                    <a @click="navToFocusItem">更多</a>
+                    <a @click='navToFocusItem'>更多</a>
                 </div>
-                <div class="table">
-                    <div class="row table-header">
+                <div class='table'>
+                    <div class='row table-header'>
                         <article>日期</article>
                         <article>政府部门</article>
                         <article>记录事项</article>
                     </div>
-                    <div class="table-body">
-                        <div class="row" v-for="(item , index) in itemsList" :key="index">
+                    <div class='table-body'>
+                        <div class='row' v-for='(item , index) in itemsList' :key='index'>
                             <article>{{item.createdate}}</article>
                             <article>{{item.department}}</article>
                             <article>{{item.recordsx}}</article>
@@ -53,18 +61,18 @@
                 </div>
             </nav>
             <nav>
-                <div class="main-title">
+                <div class='main-title'>
                     <span>说明书更新记录</span>
-                    <a @click="navToIntroduce">更多</a>
+                    <a @click='navToIntroduce'>更多</a>
                 </div>
-                <div class="table">
-                    <div class="row table-header">
+                <div class='table'>
+                    <div class='row table-header'>
                         <article>日期</article>
                         <article>事项类型</article>
                         <article>更新内容</article>
                     </div>
-                    <div class="table-body">
-                        <div class="row" v-for="(item , index) in changeList" :key="index">
+                    <div class='table-body'>
+                        <div class='row' v-for='(item , index) in changeList' :key='index'>
                             <article>{{item.changedate}}</article>
                             <article>{{item.type}}</article>
                             <article>{{item.content || '--'}}</article>
@@ -77,87 +85,93 @@
 </template>
 
 <script>
-import {getCardList, getQueryList, getChangeList} from "@/api/homePage"
+import { getCardList, getQueryList, getChangeList } from '@/api/homePage'
 import moment from 'moment'
 export default {
     data() {
         return {
-            cardsList:[],
-            itemsList:[],
-            changeList:[],
-            srcList:{
-                0:{ 
-                    1: require("../../assets/images/icons/edit_blue_b.png"),    //1.正常(蓝色) 2.警告(黄色) 3.严重(红色)
-                    2: require("../../assets/images/icons/edit_yellow_b.png"),
-                    3: require("../../assets/images/icons/edit_red_b.png")
+            cardsList: [],
+            itemsList: [],
+            changeList: [],
+            srcList: {
+                0: {
+                    1: require('../../assets/images/icons/edit_blue_b.png'), //1.正常(蓝色) 2.警告(黄色) 3.严重(红色)
+                    2: require('../../assets/images/icons/edit_yellow_b.png'),
+                    3: require('../../assets/images/icons/edit_red_b.png')
                 },
-                1:{
-                    1: require("../../assets/images/icons/fix_blue_b.png"),    
-                    2: require("../../assets/images/icons/fix_yellow_b.png"),
-                    3: require("../../assets/images/icons/fix_red_b.png")
+                1: {
+                    1: require('../../assets/images/icons/fix_blue_b.png'),
+                    2: require('../../assets/images/icons/fix_yellow_b.png'),
+                    3: require('../../assets/images/icons/fix_red_b.png')
                 },
-                2:{
-                    1: require("../../assets/images/icons/search_blue_b.png"),    
-                    2: require( "../../assets/images/icons/search_yellow_b.png"),
-                    3: require("../../assets/images/icons/search_red_b.png")
+                2: {
+                    1: require('../../assets/images/icons/search_blue_b.png'),
+                    2: require('../../assets/images/icons/search_yellow_b.png'),
+                    3: require('../../assets/images/icons/search_red_b.png')
                 }
             }
         }
     },
-    mounted () {
+    mounted() {
         this.testAjax()
         this.getItemsQuery()
         this.getInstructionList()
     },
-    methods:{
+    methods: {
         /**
          *  点击跳转进入综合事项管理页面
          */
-        navToFocusItem () {
-            this.$router.push({path:"./other", query:{module:'comprehensive'}})
+        navToFocusItem() {
+            this.$router.push({ path: './调' })
         },
         /**
          *  点击跳转进入 分析|报表 说明书更新记录页面
          */
-        navToIntroduce () {
-            this.$router.push({path:"./analysis", query:{module:'specification'}})
+        navToIntroduce() {
+            this.$router.push({ path: './analysis', query: { homepageKey: 2 } })
         },
-        itemStyle (option) {
+        itemStyle(option) {
             let num = 0
             if (option.assetTypeList) {
-                option.assetTypeList.forEach(item=>{
-                    if (typeof item.is_exception_num === "number") {
-                        num +=  item.is_exception_num
+                option.assetTypeList.forEach(item => {
+                    if (typeof item.is_exception_num === 'number') {
+                        num += item.is_exception_num
                     }
                 })
             }
             if (option.rptGlsmsStatisticsList) {
                 option.rptGlsmsStatisticsList.forEach(option => {
-                    if (typeof option.unfinished === "number") {
-                        num +=  option.unfinished
+                    if (typeof option.unfinished === 'number') {
+                        num += option.unfinished
                     }
                 })
             }
             if (num > 0) {
                 return {
-                    borderLeft:"3px solid #EF6B66"
+                    borderLeft: '3px solid #EF6B66'
                 }
             }
         },
-        navToInnerPage (item, equip) {
-            this.$router.push({path:"./analysis", query:{smsxt:item.smsxt, equipId: equip.id, module:'core'}})
+        navToInnerPage(item, equip) {
+            this.$router.push({ path: './analysis', query: { smsxt: item.smsxt, equipId: equip.id } })
+        },
+        /**
+         * 跳转到甘特图详情页
+         */
+        navToGanttPage(item, equip) {
+            this.$router.push({ path: './analysis', query: { smsxt: item.smsxt } })
         },
         /**
          * 跳转到甘特图详情页
          */
         navToGanttPage (item, equip) {
-            this.$router.push({path:"./analysis", query:{smsxt:item.smsxt, module:'gantt'}})
+            this.$router.push({path:"./analysis", query:{smsxt:item.smsxt}})
         },
         //TODO plazaId目前是写死的 后期需要更换成用户对应的ID
-        testAjax () {
+        testAjax() {
             let params = {
                 getParams: {
-                    "plazaId":1000423,
+                    plazaId: 1000423
                 }
             }
             getCardList(params).then(res => {
@@ -173,51 +187,51 @@ export default {
         /**
          * 获取说明书变更记录
          */
-        getInstructionList () {
+        getInstructionList() {
             let params = {
                 getParams: {
-                    "plazaId":1000423,
-                    "page":1,
-                    "size":10,
+                    plazaId: 1000423,
+                    page: 1,
+                    size: 10
                 }
             }
- 
+
             getChangeList(params).then(res => {
                 if (res.result == 'success') {
                     let result = res.data
-                    result.forEach(item=>{
+                    result.forEach(item => {
                         item.changedate = moment.unix(item.changedate / 1000).format('YYYY.MM.DD')
                         if (item.objtype === 0) {
-                            item.type = "专维"
-                        } else if( item.objtype === 1) {
-                            item.type = "维保"
-                        } else if( item.objtype === 2) {
-                            item.type = "第三方检测"
+                            item.type = '专维'
+                        } else if (item.objtype === 1) {
+                            item.type = '维保'
+                        } else if (item.objtype === 2) {
+                            item.type = '第三方检测'
                         } else {
-                            item.type = "重点关注"
+                            item.type = '重点关注'
                         }
                     })
-                   
+
                     if (result && Array.isArray(result)) {
                         this.changeList = result
                     }
                 }
             })
         },
-        getItemsQuery () {
+        getItemsQuery() {
             let params = {
                 getParams: {
                     // department=部门 //部门
-                    "startDate":"20200208000000", //开始时间  
-                    "endDate":"20200608000000", //结束时间  
-                    "plazaId":1000423, //广场id 必填
-                    "page":1,//页数
-                    "size":10,//条数
+                    startDate: '20200208000000', //开始时间
+                    endDate: '20200608000000', //结束时间
+                    plazaId: 1000423, //广场id 必填
+                    page: 1, //页数
+                    size: 10 //条数
                     // "orderBy":字段名,1;//排序,1正序,0,倒序
                     // keyword=关键字1:字段名11,字段名12;关键字2:字段名21,字段名22;//模糊查询参数
                 }
             }
-            getQueryList(params).then(res=>{
+            getQueryList(params).then(res => {
                 moment().format('YYYY.MM.DD HH:mm')
                 if (res.result == 'success') {
                     if (res.data && Array.isArray(res.data)) {
@@ -226,10 +240,9 @@ export default {
                         })
                         this.itemsList = res.data
                     }
-                    
                 }
             })
-        },
+        }
     }
 }
 </script>
@@ -242,179 +255,179 @@ export default {
     padding: 15px;
     background: rgba(242, 245, 247, 1);
     overflow: auto;
-    .homepage-cards-content{
+    .homepage-cards-content {
         display: flex;
         flex-wrap: wrap;
         justify-content: space-between;
-        align-content:flex-start;
+        align-content: flex-start;
         width: 70%;
-        .cards-item{
+        .cards-item {
             width: calc(50% - 5px);
             height: 24%;
-            padding:0.4rem;    
+            padding: 0.4rem;
             padding-bottom: 0;
             margin-bottom: 1rem;
             background: #fff;
             box-shadow: 0 2px 10px 0 rgba(31, 36, 41, 0.06);
             h4 {
                 color: rgba(31, 36, 41, 1);
-                padding:1rem;
+                padding: 1rem;
                 font-size: 1.6rem;
                 font-weight: bold;
             }
-            .equipment-list{
+            .equipment-list {
                 display: flex;
                 padding-bottom: 2rem;
                 margin-bottom: 0.8rem;
-                padding:1rem;
+                padding: 1rem;
                 padding-top: 0;
-                .equipment-item{
+                .equipment-item {
                     width: 33.33%;
                     padding: 0.6rem;
                     box-sizing: border-box;
                     border-radius: 4px;
                     cursor: pointer;
-                    .equip-name{
+                    .equip-name {
                         position: relative;
                         display: inline-block;
-                        h5{
+                        h5 {
                             position: relative;
-                            color: #1F2429;
+                            color: #1f2429;
                             font-size: 1.4rem;
-                            em{
+                            em {
                                 margin-left: 1rem;
-                                color: #E19E51;
+                                color: #e19e51;
                                 font-size: 1.2rem;
                             }
                         }
-                        .exception-number{
+                        .exception-number {
                             position: absolute;
                             right: -20px;
-                            top:-5px;
+                            top: -5px;
                             height: 1.6rem;
                             border-radius: 8rem;
                             padding: 0.2rem 0.4rem;
                             line-height: 1.2rem;
                             text-align: center;
                             font-size: 1.2rem;
-                            color: #F54E45;
-                            background: #FFE0DF;
+                            color: #f54e45;
+                            background: #ffe0df;
                         }
                     }
-                    section{
+                    section {
                         display: flex;
                         justify-content: flex-start;
                         align-items: center;
-                        .equip-statis{
-                            .equip-number{
+                        .equip-statis {
+                            .equip-number {
                                 font-size: 1.8rem;
                                 font-weight: bold;
-                                color:rgba(31, 36, 41, 1)
+                                color: rgba(31, 36, 41, 1);
                             }
-                            .equip-unit{
+                            .equip-unit {
                                 color: #ccc;
                                 font-size: 1.2rem;
                             }
                         }
                     }
                 }
-                .equipment-item:hover{
+                .equipment-item:hover {
                     background: #f5f6f7;
                 }
             }
-            .alert-list{
+            .alert-list {
                 display: flex;
                 align-items: center;
                 justify-content: flex-start;
                 padding-top: 2rem;
-                border-top: 1px solid #F5F6F7;
+                border-top: 1px solid #f5f6f7;
                 border-radius: 4px;
                 cursor: pointer;
-                padding:2.2rem 1.4rem;
-                &:hover{
-                    background: #F5F6F7;
+                padding: 2.2rem 1.4rem;
+                &:hover {
+                    background: #f5f6f7;
                 }
-                .alert-item{
+                .alert-item {
                     display: flex;
                     width: 33.33%;
                     align-items: center;
-                    img{
+                    img {
                         width: 4rem;
                         height: 4rem;
                         margin-right: 1.4rem;
                     }
-                    .content{
-                        border-right: 1px solid #F5F6F7;
+                    .content {
+                        border-right: 1px solid #f5f6f7;
                         padding-right: 2rem;
-                        .line{
+                        .line {
                             display: flex;
                             justify-content: space-between;
                             align-items: center;
                             line-height: 1;
-                            span:first-child{
+                            span:first-child {
                                 margin-right: 1rem;
                                 font-size: 1.2rem;
-                                color: #1F2429;
+                                color: #1f2429;
                                 font-weight: bold;
                             }
-                            em{
+                            em {
                                 font-weight: normal;
                             }
-                            em:first-child{
+                            em:first-child {
                                 font-size: 1.6rem;
                                 font-weight: bold;
                             }
                         }
-                        .desc{
+                        .desc {
                             padding-top: 0.6rem;
-                            color: #8D9399;
+                            color: #8d9399;
                             font-size: 1.2rem;
                             text-align: right;
                         }
                     }
                 }
             }
-            .empty-content{
+            .empty-content {
                 height: 9rem;
                 line-height: 9rem;
-                border-top: 1px solid #F5F6F7;
-                
+                border-top: 1px solid #f5f6f7;
+
                 text-align: center;
-                color: #8D9399;
+                color: #8d9399;
             }
         }
     }
     .homepage-nav-list {
         width: calc(30% - 10px);
-        nav:first-child{
+        nav:first-child {
             height: 320px;
         }
-        nav:last-child{
+        nav:last-child {
             height: 320px;
         }
-        nav{
+        nav {
             padding: 14px 16px;
             margin-bottom: 10px;
             background: white;
             overflow: hidden;
             box-shadow: 0 2px 10px 0 rgba(31, 36, 41, 0.06);
-            .main-title{
+            .main-title {
                 display: flex;
                 justify-content: space-between;
                 margin-bottom: 12px;
-                span:first-child{
-                    color: #1F2429;
+                span:first-child {
+                    color: #1f2429;
                     font-weight: bold;
-                    font-size:1.4rem;
+                    font-size: 1.4rem;
                 }
             }
-            .table{
-                .row{
+            .table {
+                .row {
                     display: flex;
                     align-items: center;
                     padding: 6px;
-                    border-bottom: 1px solid #E4E6E7;
-                    article{
+                    border-bottom: 1px solid #e4e6e7;
+                    article {
                         margin-right: 10px;
                     }
                     article:nth-of-type(1) {
@@ -435,33 +448,32 @@ export default {
                         -webkit-box-orient: vertical;
                     }
                 }
-                .table-header{
+                .table-header {
                     height: 3.2rem;
                     padding: 6px;
                     line-height: 3.2rem;
-                    color:#646A73;
+                    color: #646a73;
                     font-weight: 600;
                     border-bottom: none;
-                    background: #F8F9FA;
+                    background: #f8f9fa;
                 }
-                .table-body{
+                .table-body {
                     overflow: auto;
                 }
             }
         }
-        nav:first-child{
+        nav:first-child {
             height: 40%;
-            .table-body{
+            .table-body {
                 height: 27vh;
             }
         }
-        nav:last-child{
+        nav:last-child {
             height: calc(60% - 12px);
-            .table-body{
+            .table-body {
                 height: 45vh;
             }
         }
     }
-
 }
 </style>

+ 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
             }

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

@@ -69,8 +69,11 @@ export default {
             this.title = title
             this.GraphCategoryId = GraphCategoryId
             //console.log(title)
+            let getParams = {
+                categoryId: String(this.GraphCategoryId)
+            }
             if (GraphCategoryId) {
-                groupByCategory({}).then(res => {
+                groupByCategory({ getParams }).then(res => {
                     this.treeData = []
                     this.treeData = res.Data.map(i => this.getTree(i))
                 })

+ 33 - 34
src/views/legendLibrary/index.vue

@@ -140,7 +140,7 @@
 
                 <el-table-column prop='typeId' resizable label='铺位可视化typeid' width='140' show-overflow-tooltip>
                     <template slot-scope='{row}'>
-                        <span>{{row.InfoTypes.length ?row.InfoTypes.map(item => item.Name).join(' ,'):'' }}</span>
+                        <span>{{row.InfoTypes.length ?row.InfoTypes.map(item => `${item.Id }-${item.Name}`).join(' ,'):'' }}</span>
                     </template>
                 </el-table-column>
                 <el-table-column label='操作' width='100' v-if='state==1'>
@@ -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, //说明书位置
@@ -660,7 +659,7 @@ export default {
     background: #fff;
     border: 1px solid #ccc;
 }
-.p-transfer-select{
+.p-transfer-select {
     height: 44px !important;
 }
 .p-tree-node-check,

+ 2 - 2
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>
@@ -320,9 +320,9 @@ export default {
         }
         .legend-rules-right {
             padding: 16px;
-            flex: 1;
             background: #fff;
             color: #1f2429;
+            width: calc(100% - 290px);
             .img {
                 width: 28px;
                 height: 28px;

+ 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') {

+ 215 - 496
src/views/statistics/index.vue

@@ -60,25 +60,25 @@
         </section>
         <section class="map-box">
             <section class="cards-list">
-                <div class="card" @click="navToManageNumber">
+                <div class="card">
                     <div class="img">
                         <img src="../../assets/images/icons/ratio.png">
                     </div>
                     <p>上线管理说明书数量</p>
                     <strong>{{plazaInfoCount.upwcCount}}</strong>
                 </div>
-                <div class="card" @click="navToIntroduceUpdate">
+                <div class="card">
                     <div class="img">
                         <img src="../../assets/images/icons/audit.png">
                     </div>
                     <p>当月说明书更新项目数量</p>
                     <strong>{{plazaInfoCount.rptChangeCount}}</strong>
                 </div>
-                <div class="card" @click="navToFocusItems">
+                <div class="card">
                     <div class="img">
                         <img src="../../assets/images/icons/contract.png">
                     </div>
-                    <p>当月重点关注事项项目数量</p>
+                    <p>当月重点关注事项项目数量ff</p>
                     <strong>{{plazaInfoCount.zhsxChangeCount}}</strong>
                 </div>
             </section>
@@ -99,11 +99,13 @@
                         <li v-for="(option , index) in item.data" :key="index">
                             <div class="ratio">
                                 <span>{{option.cname}}</span>
-                                <span v-if="item.title === '专维'"><span>{{option.rptGlsmsStatistics.unfinished}} / </span> <span>{{option.rptGlsmsStatistics.due_num}} / </span> <span>{{option.rptGlsmsStatistics.total}}</span></span>
-                                <span v-else><span>{{option.rptGlsmsStatistics.unfinished}} / </span> <span>{{option.rptGlsmsStatistics.total}}</span></span>
+                                <span>
+                                    <span>{{option.rptGlsmsStatistics.due_num}} / </span>
+                                    <span>{{option.rptGlsmsStatistics.total}}</span>
+                                </span>
                             </div>
                             <div class="bar">
-                                <div class="inner-bar" :style="barStyle(option.rptGlsmsStatistics, item.title)"></div>
+                                <div class="inner-bar" :style="barStyle(option.rptGlsmsStatistics)"></div>
                             </div>
                         </li>
                     </ul>
@@ -160,37 +162,37 @@ export default {
                 "shandong":["青岛区域","济南区域"]
             },
             provinceCities:{
-                "青岛区域": {"province":"shandong", center: [36.06667 , 120.33333], zoom:8},
-                "北京区域": {"province":"beijing", center: [39.604882122321174,  116.43660987308282], zoom:8},
-                "天津区域": {"province":"tianjin", center:[39.130593, 117.260892],zoom:7},
-                "济南区域": {"province":"shandong", center: [36.40, 117.00] , zoom: 7},
-                "上海区域": {"province":"shanghai", center: [31.090574094954192,  121.46299249603001], zoom:10},
-                "南京区域": {"province":"jiangsu", center:[ 32.05000, 118.78333 ], zoom:7},
-                "无锡区域": {"province":"jiangsu", center: [31.57, 120.30], zoom:9},
-                "厦门区域": {"province":"fujian", center: [24.46667, 118.10000] , zoom: 9},
-                "宁波区域": {"province":"zhejiang", center: [29.52, 121.33], zoom:8},
-                "杭州区域": {"province":"zhejiang", center: [30.323100460201648,  120.50270908851112], zoom:9},
-                "福州区域": {"province":"fujian", center: [26.05, 119.18], zoom:8},
-                "合肥区域": {"province":"anhui", center: [31.52, 117.17] , zoom:7},
-                "长沙区域": {"province":"hunan", center: [28.12, 112.59], zoom:8},
-                "南昌区域": {"province":"jiangxi", center: [28.40, 115.55], zoom: 8},
-                "大连区域": {"province":"liaoning", center: [39.98974718404572, 122.66034125625548] , zoom : 8},
-                "沈阳区域": {"province":"liaoning", center: [41.72213058512578, 122.93479223528372] , zoom: 8},
-                "长春区域": {"province":"jilin", center: [42.88033923363183,  127.02188147691707] , zoom:8},
-                "东莞区域": {"province":"guangdong", center: [23.644524198573688, 114.83844948916203], zoom:8},
-                "南宁区域": {"province":"guangxi", center: [22.48, 108.19], zoom:7},
-                "广州区域": {"province":"guangdong", center: [22.755920681486405,112.01244459124548], zoom:7},
-                "太原区域": {"province":"shanxi1", center: [37.54, 112.33], zoom:7},
-                "武汉区域": {"province":"hubei", center: [31.147006308556566, 112.97898510653813], zoom: 7},
-                "郑州区域": {"province":"henan", center: [34.46, 113.40], zoom:7},
-                "哈尔滨区域": {"province":"heilongjiang", center: [46.800059446787316, 128.40505022926592] , zoom: 7},
-                "乌鲁木齐区域": {"province":"xinjiang", center: [43.45, 87.36] , zoom:8},
-                "呼和浩特区域": {"province":"neimenggu", center:[45.182036837015886, 116.82329020199336] , zoom: 5},
-                "西安区域": {"province":"shanxi2", center: [36.08462129606931,109.4527754086213] , zoom: 7},
-                "银川区域": {"province":"ningxia", center: [38.108627664321276,  102.36578196225639], zoom: 7},
-                "成都区域": {"province":"sichuan", center: [30.24957724046765, 103.4647651330231] , zoom: 7},
-                "昆明区域": {"province":"yunnan", center: [25.903703303407667,  105.10972266685498], zoom:8},
-                "重庆区域": {"province":"chongqing", center: [29.35, 106.33], zoom:8},
+                "青岛区域": {"province":"shandong", center: [36.06667 , 120.33333]},
+                "北京区域": {"province":"beijing", center: [39.91667 ,114.41667]},
+                "天津区域": {"province":"tianjin", center:[39.13333, 117.20000]},
+                "济南区域": {"province":"shandong", center: [36.40, 117.00]},
+                "上海区域": {"province":"shanghai", center: [34.50000 , 119.43333]},
+                "南京区域": {"province":"jiangsu", center:[ 32.05000, 118.78333 ]},
+                "无锡区域": {"province":"jiangsu", center: [31.34, 120.18]},
+                "厦门区域": {"province":"fujian", center: [24.46667, 118.10000]},
+                "宁波区域": {"province":"zhejiang", center: [29.52, 121.33]},
+                "杭州区域": {"province":"zhejiang", center: [30.16, 120.10]},
+                "福州区域": {"province":"fujian", center: [26.05, 119.18]},
+                "合肥区域": {"province":"anhui", center: [31.52, 117.17]},
+                "长沙区域": {"province":"hunan", center: [28.12, 112.59]},
+                "南昌区域": {"province":"jiangxi", center: [28.40, 115.55]},
+                "哈尔滨区域": {"province":"heilongjiang", center: [45.44, 126.36]},
+                "大连区域": {"province":"liaoning", center: [38.55,121.36]},
+                "沈阳区域": {"province":"liaoning", center: [41.48, 123.25]},
+                "长春区域": {"province":"jilin", center: [43.54, 125.19]},
+                "东莞区域": {"province":"guangdong", center: [23.02,113.45]},
+                "南宁区域": {"province":"guangxi", center: [22.48, 108.19]},
+                "广州区域": {"province":"guangdong", center: [23.08, 113.14]},
+                "太原区域": {"province":"shanxi1", center: [37.54, 112.33]},
+                "武汉区域": {"province":"hubei", center: [30.35, 114.17]},
+                "郑州区域": {"province":"henan", center: [34.46, 113.40]},
+                "乌鲁木齐区域": {"province":"xinjiang", center: [43.45, 87.36]},
+                "呼和浩特区域": {"province":"neimenggu", center:[40.48, 111.41]},
+                "西安区域": {"province":"shanxi2", center: [34.26667, 108.95]},
+                "银川区域": {"province":"ningxia", center: [38.27, 106.16]},
+                "成都区域": {"province":"sichuan", center: [30.40, 104.04]},
+                "昆明区域": {"province":"yunnan", center: [25.04, 102.42]},
+                "重庆区域": {"province":"chongqing", center: [29.35, 106.33]},
             },
 
             provincesCenter:{
@@ -225,16 +227,16 @@ export default {
                 "yunnan":[25.004865694004916, 101.4821386658875],
                 "zhejiang": [29.180481383933902, 120.11087647324501],
             },
-            zoneCenter:{ 
-                "dongbei":[43.161614, 124.396818],    // 取自 东北运营中心 长春区域 四平万达广场
-                "xibei":[37.999781, 106.197518],    // 西北  银川区域 吴忠万达广场     zoom 5
-                "huabei":[39.019075, 117.686953],  // 华北中心  天津区域  天津塘沽万达广场
-                "huazhong":[33.999249 , 113.872131],  // 华中 郑州 许昌万达广场
-                "huadong":[ 32.477565 , 119.923391],  // 华东 南京 泰州
+            zoneCenter:{
+                "dongbei":[46.05917927005029, 126.53664921197083],
+                "xibei":[43.2417396142428,113.41468998579546],
+                "huabei":[38.348983721228436, 117.02472809706543],
+                "huazhong":[34.20577123689604 , 112.71908762827616],
+                "huadong":[ 32.865884180878325 , 119.61413071750152],
                 "zhongnan":[28.860875644389676, 114.55131767165491],
-                "huanan":[22.635788, 110.17923],  // 华南 南宁 玉林万达广场
-                "dongnan":[26.657907, 119.545678], //东南 福州 宁德万达广场
-                "xinan":[ 28.749998, 104.648788]   // 西南 成都 宜宾万达广场
+                "huanan":[23.618261575763043,110.79063366644355 ],
+                "dongnan":[27.555323121883916, 119.00243042111592],
+                "xinan":[ 28.255078828220462, 103.33429493217788]
             },
             legendList:[
                 {color: "#FDE3E2", num:'≥200'},
@@ -244,6 +246,7 @@ export default {
                 {color: "#E1F2FF", num:'1-9'},
                 {color: "#E1F2FF", num:'0'},
             ],
+            
             plazaInfoCount:{},
             systemList:[],
             currentZone:{},   // 
@@ -253,17 +256,129 @@ export default {
             state: '',
             value: 190,
             currentPanel:'',
-            regulateDistrictData: [],
+            regulateDistrictData: [
+            ],
             projectsCode:[],
-            maintainList:[],
-            circleSize:{
-                5:{innder:15000,outer:30000, offset:0.8},
-                7:{innder:8000,outer:16000, offset:0.3},
-                8:{innder:4000,outer:8000, offset:0.14},
-                9:{innder:2000,outer:4000, offset:0.08},
-                10:{innder:1000,outer:2000, offset:0.04},
-                11:{innder:1000,outer:2000, offset:0.04},
-            }
+            maintainList:[
+                // {
+                //     title:'维保',
+                //     expand:0,
+                //     subList:[
+                //         {
+                //             name:'华南运营中心', 
+                //             num1:81,
+                //             num2:128
+                //         },
+                //         {
+                //             name:'华南运营中心', 
+                //             num1:31,
+                //             num2:128
+                //         },
+                //         {
+                //             name:'华南运营中心', 
+                //             num1:81,
+                //             num2:128
+                //         },
+                //         {
+                //             name:'华南运营中心', 
+                //             num1:11,
+                //             num2:128
+                //         },
+                //         {
+                //             name:'华南运营中心', 
+                //             num1:41,
+                //             num2:128
+                //         },
+                //         {
+                //             name:'华南运营中心', 
+                //             num1:81,
+                //             num2:128
+                //         },
+                //         {
+                //             name:'华南运营中心', 
+                //             num1:81,
+                //             num2:128
+                //         },
+                //         {
+                //             name:'华南运营中心', 
+                //             num1:81,
+                //             num2:128
+                //         },
+                //         {
+                //             name:'华南运营中心', 
+                //             num1:81,
+                //             num2:128
+                //         },
+                //         {
+                //             name:'华南运营中心', 
+                //             num1:81,
+                //             num2:128
+                //         },
+                //         {
+                //             name:'华南运营中心', 
+                //             num1:81,
+                //             num2:128
+                //         },
+                //         {
+                //             name:'华南运营中心', 
+                //             num1:81,
+                //             num2:128
+                //         },
+                //         {
+                //             name:'华南运营中心', 
+                //             num1:81,
+                //             num2:128
+                //         },
+                //     ]
+                // },
+                // {
+                //     title:'第三方检测33',
+                //     expand:0,
+                //     subList:[
+                //         {
+                //             name:'华南运营中心', 
+                //             num1:81,
+                //             num2:128
+                //         },
+                //         {
+                //             name:'华南运营中心', 
+                //             num1:81,
+                //             num2:128
+                //         },
+                //         {
+                //             name:'华南运营中心', 
+                //             num1:81,
+                //             num2:128
+                //         },
+                //     ]
+                // },
+                // {
+                //     title:'专维',
+                //     expand:0,
+                //     subList:[
+                //         {
+                //             name:'华南运营中心', 
+                //             num1:81,
+                //             num2:128
+                //         },
+                //         {
+                //             name:'华南运营中心', 
+                //             num1:81,
+                //             num2:128
+                //         },
+                //         {
+                //             name:'华南运营中心', 
+                //             num1:81,
+                //             num2:128
+                //         },
+                //         {
+                //             name:'华南运营中心', 
+                //             num1:81,
+                //             num2:128
+                //         },
+                //     ]
+                // },
+            ],
         }
     },
     computed: {
@@ -284,29 +399,10 @@ export default {
         this.getEventStatusData()
     },
     methods: {
- 
         imgSrc(code) {
             return require('../../assets/images/icons/' + code + '.png')
         },
         /**
-         * 跳转到 当月说明书更新项目数量
-         */ 
-        navToIntroduceUpdate () {
-            // this.$router.push({path:''})
-        },
-        /**
-         * 跳转到 上线管理说明书数量
-         */
-        navToManageNumber () {
-            // this.$router.push({path:''})
-        },
-        /**
-         * 跳转到 当月重点关注事项项目数量
-         */
-        navToFocusItems () {
-            // this.$router.push({path:''})
-        },
-        /**
          * 通过导航进行导航
          * 
          */
@@ -324,7 +420,6 @@ export default {
             }
             this.crumbsHtml = this.crumbsHtml.splice(0, index + 1)
         },
-<<<<<<< HEAD
         /**
          * 获取事项状态统计数据
          */
@@ -387,7 +482,7 @@ export default {
         },
         // 处理集团地图
         pantGroupMap (data, sysId) {
-            this.clearAllLayers() 
+            // this.clearAllLayers() 
             let that = this
             data.children.forEach(item=>{
                 let params = {
@@ -420,11 +515,20 @@ export default {
             
                         let center = JsonData.features[0].properties.center
 
-                        let marker = L.divIcon({
+                        // let marker3 = L.divIcon({
+                        //     center,
+                        //     html: `<div>${JsonData.features[0].properties.name}</div>`,
+                        //     iconSize:30
+                        // })
+
+                         var myIcon = L.divIcon({
                             html: JsonData.features[0].properties.name,
+                            className: 'my-leaflet-div-icon',
                             iconSize:30
-                        })
-                        // let marker = L.circle(center, {radius: 2000}).addTo(maps).bindPopup(contentHtml);
+                        });
+                        L.marker(center, { icon: myIcon }).addTo(maps);
+                        let marker2 = L.circle(center, 100000, { color:'transparent', fillColor:'blue', fillOpacity:0.4}).addTo(maps);
+                        let marker = L.circle(center, 50000, { color:'transparent', fillColor:'red', fillOpacity:1}).addTo(maps);
 
                         if (res.data) {
                             popup = L.popup().setLatLng(center).setContent(contentHtml)
@@ -611,8 +715,6 @@ export default {
             }
             this.currentZone = data
         },
-=======
->>>>>>> develop-map
          // 获取 区域/中心/项目
         selectProjectItem (ids, data) {
             this.createNavpathByData(data)
@@ -620,14 +722,25 @@ export default {
             let JSONName  = data.cname
             let level = data.level   // //1集团 2中心 3区域 0广场
             if (level === 1) {
-                this.pantGroupMap(data,this.currentSysId)
+                this.pantGroupMap(data,"1001")
             } else if (level === 2) {
-                this.pantZonesMap(data, this.currentSysId)
+                this.pantZonesMap(data, '1001')
             } else if (level === 3) {
                 let res = this.provinceCities[JSONName]
-                this.pantProjectsMap(data, this.currentSysId)
+                this.clearAllLayers()
+                let data = require(`../../assets/provinceData/${res.province}.json`)
+                let layer = L.geoJSON(data.features,{
+                    style:function(){
+                        return {
+                            'weight': 1,
+                            'color': 'black',
+                            'fillColor':'red'
+                        }
+                    }
+                }).addTo(maps);
+                this.panTo(res.center, 7)
             } else {   // 点击广场时 直接跳转到详情页  地图不用响应
-                this.pantPlazaMap(data, this.currentSysId, true)
+                // this.$router.push({path:"/"})
             }
         },
        //查询项目信息统计数量
@@ -646,9 +759,7 @@ export default {
                 }
             })
         },
-        /**
-         * 根据id 查找数据
-         */
+        //** */
         getDataByCityCcode (id) {
             return recursionFindData(this.currentDistrictData, id)
             let target = null 
@@ -698,7 +809,6 @@ export default {
                 }
             })
         },
-<<<<<<< HEAD
           //初始化地图
         initMap() {
             let that = this;
@@ -763,9 +873,6 @@ export default {
                 return 4
             }
         },
-=======
-
->>>>>>> develop-map
         toggerPanel (item) {
             this.currentPanel = item.title
             // expand 0 初始状态  1 展开状态 2 隐藏状态
@@ -795,14 +902,9 @@ export default {
         /**
          * 计算长度
          */
-        barStyle(item, title) {
+        barStyle(item) {
             let type = item.type
-            let ratio = 0
-            if (title === '专维') {
-                ratio = ( (item.unfinished + item.due_num) / item.total ) * 100 
-            } else {
-                ratio = (item.unfinished/ item.total ) * 100 
-            }
+            let ratio = (item.unfinished/ item.total ) * 100 
             let bg = ''
             if ( type === 0) {
                 bg = "linear-gradient(to right, #F54E45 , #F54E45)"
@@ -825,26 +927,28 @@ export default {
                 border:''
             }
             if (data >= 200) {
-                color.area = "#F54E45"
-                color.border = "rgba(245,78,69,0.2)"
+                color.area = "#FDE3E2"
+                color.border = "#FBBFBC"
             } else if (data >= 100 && data < 200) {
-                color.area = "#F58300"
-                color.border = "rgba(245,131,0,0.2)"
+                color.area = "#FEE9D2"
+                color.border = "#FFBA6B"
             } else if (data>=50 && data<100) {
-                color.area = "#FFBA6B"
-                color.border = "rgba(255,186,107,0.2)"
+                color.area = "#FFF6EB"
+                color.border = "#F7DC82"
             } else if (data >= 10 && data< 50) {
-                color.area = "#0091FF"
-                color.border = "rgba(0,145,255,0.2)"
+                color.area = "#CCE9FF"
+                color.border = "#4EB1FD"
             } else if (data>= 1 && data <10) {
-                color.area = "#82C7FC"
-                color.border = "rgba(130,199,25,0.2)"
+                color.area = "#E1F2FF"
+                color.border = "#82C7FC"
             } else {
                 color.area = "#EEEEEE"
                 color.border = "#CCC"
             }
             return color
         },
+        
+        
         currentTime() {
             this.times = moment().format('YYYY.MM.DD HH:mm')
             setTimeout(this.currentTime, 1000)
@@ -880,7 +984,6 @@ export default {
                         res.data.forEach(item => {
                             item.selected = false
                         })
-                        res.data[0].selected = true
                         this.currentSelectedSys = res.data[0]
                         this.currentSysId = res.data[0].smsxt
                         this.systemList = res.data
@@ -888,390 +991,6 @@ export default {
                 }
             })
         },
-        /**
-         * 获取事项状态统计数据
-         */
-        getEventStatusData () {
-            let params = {
-                getParams: {
-                    "level":1,
-                    "ccode":"0000000000",
-                }
-            }
-            queryEventStatus(params).then(res => {
-                if (res.result === "success") {
-                    let arr =[]
-                    
-                    let data = res.data
-                    for(let key in data) {
-                        let obj = {}
-                        let sortData = data[key]
-                        if (data.hasOwnProperty(key)) {
-                            
-                            // 维保,第三方检测排名按照即将到期任务数量从多到少排序,多的靠前。专维按照 逾期未完成 + 即将到期任务数据排序,多的靠前
-                             // due_num 即将到期    unfinished 逾期未完成
-                            if (key == "0") {
-                                obj.title = "专维"    
-                                sortData.forEach(item=>{
-                                    item.sort = item.rptGlsmsStatistics.due_num + item.rptGlsmsStatistics.unfinished
-                                })
-                            } else if (key == "1") {
-                                obj.title = "维保"
-                                sortData.forEach(item=>{
-                                    item.sort = item.rptGlsmsStatistics.due_num 
-                                })
-                            } else {
-                                obj.title = "第三方检测"
-                                sortData.forEach(item=>{
-                                    item.sort = item.rptGlsmsStatistics.due_num 
-                                })
-                            }
-                            let final = sortBy(sortData, (option) => {return option.sort})
-                            obj.data =  final.reverse()
-                            obj.expand = 0
-                        }
-                        arr.push(obj)
-                    }
-                    this.maintainList = arr
-                }
-            })
-        },
-          //初始化地图
-        initMap() {
-            let that = this;
-            maps = L.map("map", {        
-                center: new L.LatLng(38, 103),
-                zoom: 4,
-                crs: L.CRS.EPSG3857,
-                minZoom: 3,
-                maxZoom: 14,
-                zoomControl: false,
-                attributionControl: false,
-                contextmenu: true,
-                contextmenuWidth: 140,
-            })
-            maps.on('click', (ev)=>{
-            })
-            maps.on('zoomend', (ev)=>{
-            })
-            let JsonData = require("../../assets/geoData/china.json")
-            let layer = L.geoJSON(JsonData.features, {
-                style:function(){
-                    return {
-                        'weight': 1,
-                        'color': '#B3D2FF',
-                        'fillColor':'#DEECFF' 
-                    }
-                }
-            }).addTo(maps);
-            if(this.currentLevel === 1) {   //1集团 3区域 0广场
-                this.pantGroupMap(this.currentDistrictData[0], this.currentSysId)
-            } else if (this.currentLevel === 2) {  // 2中心 
-                this.pantZonesMap(this.currentDistrictData[0], this.currentSysId)
-            } else if (this.currentLevel === 0) {
-                this.pantProjectsMap(this.currentDistrictData[0], this.currentSysId)
-            }
-        },
-        //**清空地图 并添加全国底图*/
-        clearAllLayers(){
-            maps.eachLayer(function(layer){
-                maps.removeLayer(layer)
-            })
-            let JsonData = require("../../assets/geoData/china.json")
-            let layer = L.geoJSON(JsonData.features, {
-                style:function(){
-                    return {
-                        'weight': 1,
-                        'color': '#B3D2FF',
-                        'fillColor':'#DEECFF' 
-                    }
-                }
-            }).addTo(maps);
-        },
-        /**
-         * 移动地图到指定中心
-         */
-        panTo(center, zoom){
-            maps.setView(center, zoom)
-        },
-        /**
-         * 切换系统时 地图响应
-         * @params  system:当前选择的系统
-         */
-        getInfoOfProject (system) {
-            this.systemList.forEach(item=>{ item.selected = false})
-            system.selected = true
-            this.currentSelectedSys = system
-            this.currentSysId = system.smsxt
-            //1集团 2中心 3区域 0广场
-            if(this.currentLevel === 1) {   //1集团 3区域 0广场
-                this.pantGroupMap(this.currentDistrictData[0], system.smsxt)
-            } else if (this.currentLevel === 2) {  // 2中心 
-                this.pantZonesMap(this.currentDistrictData[0], system.smsxt)
-            } else if (this.currentLevel === 0) {
-                this.pantProjectsMap(this.currentDistrictData[0], system.smsxt)
-            }
-        },
-        // 用于绘制集团地图
-        pantGroupMap (data, sysId) {
-            maps.setView([38,103],4)
-            this.clearAllLayers() 
-            let that = this
-            let groupLayer = new L.layerGroup()
-            let promiseAll = []
-            let layerArr= [] 
-            data.children.forEach(item=>{
-                let promise = new Promise((resolve, reject) => {
-                    let params = {
-                        getParams: {
-                            // "plazaId":1000423,
-                            "smsxt":  sysId,   //TODO that.systemList[0].smsxt  
-                            "level":1,
-                            "ccode":item.ccode
-                        }
-                    }
-                    querySystemCard(params).then(res => {
-                        if (res.result === "success") {
-                            let num = 0
-                            let name = item.cname.substr(0,2)
-                            if (res.data) {
-                                let equip = res.data[0]
-                                if (equip.assetTypeList) {
-                                    equip.assetTypeList.forEach(item => {
-                                        if (item.is_exception_num) {
-                                            num += item.is_exception_num
-                                        }
-                                    })
-                                    layerArr.push({
-                                        name,
-                                        num,
-                                        list:equip,
-                                        data: item,
-                                        marker:null
-                                    })
-                                }  
-                                resolve(item)
-                            }
-                        }
-                    })
-                })
-                promiseAll.push(promise)
-            })
-            Promise.all(promiseAll).then(result=>{
-                setTimeout(()=>{
-                    layerArr.forEach(item => {
-                        let color = that.paintColorByData(item.num)
-                        let contentHtml = ''
-                        let popup = null
-                        let zone = this.zoneNames[item.name]
-                        let center = this.zoneCenter[zone]
-                      
-                        if (color && zone && center) {
-                            let myIcon = L.divIcon({
-                                html: item.name,
-                                className: 'my-leaflet-div-icon',
-                                iconSize:30
-                            })
-                            contentHtml= that.createPopupHtmlContent(item.list.assetTypeList)
-                           
-                            item.marker = L.marker([center[0]-2, center[1]], { icon: myIcon }).addTo(groupLayer)
-                            L.circle(center, 100000, { color:'transparent', fillColor:color.border, fillOpacity:0.4}).bindPopup(contentHtml).addTo(groupLayer);
-                            L.circle(center, 50000, { color:'transparent', fillColor:color.area, fillOpacity:1}).bindPopup(contentHtml).addTo(groupLayer);
-                            groupLayer.addTo(maps)
-                        
-                            item.marker.on('click', (ev)=>{
-                                groupLayer.clearLayers()
-                                this.createNavpathByData(item.data)
-                                this.pantZonesMap(item.data,sysId)
-                            })
-                        }
-                    })
-                    groupLayer.addTo(maps)
-                },200)
-            })
-        },
-       
-        /**
-         * 用于绘制中心下的地图
-         */
-        pantZonesMap (data, sysId) {
-            this.clearAllLayers()
-            let name = data.cname.substr(0,2)
-            let zone = this.zoneNames[name]
-            this.panTo(this.zoneCenter[zone], 6)
-            let that = this
-            let groupLayer = new L.layerGroup() 
-            data.children.forEach(item=>{
-                let params = {
-                    getParams: {
-                        // "plazaId":1000423,
-                        "smsxt":  sysId,   //TODO that.systemList[0].smsxt  
-                        "level": 2,
-                        "ccode":item.ccode
-                    }
-                }
-                querySystemCard(params).then(res => {
-                    if (res.result === "success") {
-                        let city = that.provinceCities[item.cname]
-                        let num = 0
-                        let contentHtml = ''
-                        let marker = null
-                        let popup = null
-                        let color = ""
-                        let center = city.center
-                        let myIcon = L.divIcon({
-                            html:  item.cname,
-                            className: 'my-leaflet-div-icon',
-                            iconSize:30
-                        })
-                        if (res.data) {
-                            let equip = res.data[0]
-                            if (equip.assetTypeList.length > 3) {
-                                equip.assetTypeList = equip.assetTypeList.splice(0,3)
-                            }
-                            contentHtml= that.createPopupHtmlContent(equip.assetTypeList)
-                            if (equip.assetTypeList) {
-                                equip.assetTypeList.forEach(item => {
-                                    if (item.is_exception_num) {
-                                        num += item.is_exception_num
-                                    }
-                                })
-                            }
-                        }
-                        color = that.paintColorByData(num)
-                        if (color && color.border && color.area && center) {
-                            marker = L.marker([center[0] -0.5, center[1]], { icon: myIcon }).addTo(groupLayer)
-                            L.circle(center, 20000, { color:'transparent', fillColor:color.border, fillOpacity:0.4}).bindPopup(contentHtml).addTo(groupLayer);
-                            L.circle(center, 10000, { color:'transparent', fillColor:color.area, fillOpacity:1}).bindPopup(contentHtml).addTo(groupLayer);
-                        }
-                        groupLayer.addTo(maps)
-                        marker.on('click', (ev)=>{
-                            groupLayer.clearLayers()
-                            this.pantProjectsMap(item,sysId)
-                            this.createNavpathByData(item)
-                            
-                        })
-                    }
-                })
-            })
-        },
-        /***
-         * 用于绘制项目的点
-         */
-        pantProjectsMap (data,sysId) {
-            this.clearAllLayers()
-            let geo = this.provinceCities[data.cname]
-            this.panTo(geo.center, geo.zoom)
-            data.children.forEach(item=>{
-                this.pantPlazaMap(item, sysId)
-            })
-        },
-        /**
-         * 用于绘制广场的点
-         */
-        pantPlazaMap (item, sysId , flag) {
-            let that = this
-            let center = [item.latitude , item.longitude]
-            if (flag) {
-                this.clearAllLayers()
-                this.panTo(center,11)
-            }
-            let params = {
-                    getParams: {
-                    // "plazaId":1000423,
-                    "smsxt":  sysId,   //TODO that.systemList[0].smsxt  
-                    "level": 0,
-                    "ccode":item.ccode
-                }
-            }
-            querySystemCard(params).then(res => {
-                if (res.result === "success") {
-                    let num = 0
-                    let contentHtml = ''
-                    let marker = null
-                    let popup = null
-                    let color = ""
-                    if (item.latitude && item.longitude) {
-                        let myIcon = L.divIcon({
-                            html:  item.cname,
-                            className: 'my-leaflet-div-icon',
-                            iconSize:30
-                        })
-                        if (res.data) {
-                            let equip = res.data[0]
-                            if (equip.assetTypeList.length > 3) {
-                                equip.assetTypeList = equip.assetTypeList.splice(0,3)
-                            }
-                            contentHtml= that.createPopupHtmlContent(equip.assetTypeList)
-                            if (equip.assetTypeList) {
-                                equip.assetTypeList.forEach(item => {
-                                    if (item.is_exception_num) {
-                                        num += item.is_exception_num
-                                    }
-                                })
-                            }
-                        }
-                       
-                        color = that.paintColorByData(num)
-                        let zoom = maps.getZoom()
-                        let size = this.circleSize[zoom]
-                        marker = L.marker([center[0]-size.offset, center[1]], { icon: myIcon }).addTo(maps)
-                        L.circle(center, size.outer, { color:'transparent', fillColor:color.border, fillOpacity:0.4}).bindPopup(contentHtml).addTo(maps);
-                        L.circle(center, size.innder, { color:'transparent', fillColor:color.area, fillOpacity:1}).bindPopup(contentHtml).addTo(maps);
-                        marker.on("click", (ev) => {
-                            // that.$router.push({path:'./'})
-                        })
-                    }
-                }
-            })
-            
-        },
-         /**
-         * 生成弹框HTML 
-         */
-        createPopupHtmlContent (data) {
-            if (Array.isArray(data) && data.length) {
-                let that = this
-                let html = ""
-                for (let i =0 ; i < data.length; i++) {
-                    let item = data[i]
-                    if (item.is_exception_num) {
-                        html += `<div class="line">
-                            <span>${item.category_name}</span> 
-                            <span>${item.asset_num || '--'}台</span>
-                            <span><span style="display: inline-block;width: 16px;height: 16px;line-height: 16px;border-radius: 8px; color: white; background : #F54E45;text-align: center;cursor: default;">!</span><em>${item.is_exception_num}</em></span>
-                        </div>`
-                    } else {
-                         html += `<div class="line">
-                            <span>${item.category_name}</span> 
-                            <span>${item.asset_num || '--'}台</span>
-                        </div>`
-                    }
-                }
-                return `<div class="leaflet-mypopup-content">
-                <div class="title"><span>${that.currentSelectedSys.smsxtname}</span>-<span>${that.currentZone.cname}</span></div>
-                   ${html}</div>`
-            } else {
-                return ""
-            }
-        },
-        /**
-         * 根据数据创建导航路径
-         */
-        createNavpathByData (data) {
-            if (data.level === 1) {
-                this.crumbsHtml = []
-            } else {
-                let pathArr = data.path.split("/")
-                let newArr = []
-                pathArr.forEach(item => {
-                    newArr.push(item.split("&"))
-                })
-                this.crumbsHtml = newArr
-            }
-            this.currentZone = data
-        },
-        
     },
     components: {}
 }