Explorar o código

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

yunxing %!s(int64=4) %!d(string=hai) anos
pai
achega
af96b814fd
Modificáronse 35 ficheiros con 410 adicións e 1530 borrados
  1. 1 0
      public/systemConf.js
  2. 4 0
      src/api/public.js
  3. 28 10
      src/components/Legend/src/legend.vue
  4. 2 2
      src/components/floorMap/canvasFun.vue
  5. 40 24
      src/components/floorMap/index.vue
  6. 0 650
      src/components/mapClass/SPolygonItem.js
  7. 0 704
      src/components/mapClass/SPolygonItem.ts
  8. 42 6
      src/components/menuList.vue
  9. 16 10
      src/components/viewLengend.vue
  10. 1 1
      src/lib/GraphView.js
  11. 2 3
      src/lib/items/SFHFQZoneLegendItem.js
  12. 2 3
      src/lib/items/SFHFQZoneLegendItem.ts
  13. 36 0
      src/lib/items/SImageMarkerItem.js
  14. 47 0
      src/lib/items/SLineLegendItem.js
  15. 22 0
      src/lib/items/SNoneLegendItem.js
  16. 2 3
      src/lib/items/SSCPZZoneLegendItem.js
  17. 2 3
      src/lib/items/SSCPZZoneLegendItem.ts
  18. 6 0
      src/store/index.js
  19. 5 5
      src/utils/plugins/components.js
  20. 22 13
      src/views/equipment/eqDialog.vue
  21. 20 13
      src/views/equipment/fenbuPic.vue
  22. 4 2
      src/views/equipment/index.vue
  23. 2 2
      src/views/equipment/table/djspTable.vue
  24. 6 12
      src/views/equipment/table/eqListTable.vue
  25. 1 1
      src/views/equipment/table/otherTable.vue
  26. 5 5
      src/views/equipment/table/standTable.vue
  27. 4 4
      src/views/equipment/table/tjTable.vue
  28. 2 2
      src/views/equipment/table/wbTable.vue
  29. 1 1
      src/views/equipment/table/wxTable.vue
  30. 4 4
      src/views/equipment/table/zwTable.vue
  31. 1 1
      src/views/floorFunc/index.vue
  32. 29 28
      src/views/legendLibrary/addForm.vue
  33. 24 1
      src/views/legendLibrary/addLegend.vue
  34. 12 12
      src/views/legendLibrary/index.vue
  35. 15 5
      src/views/legendRules/index.vue

+ 1 - 0
public/systemConf.js

@@ -26,6 +26,7 @@ var __systemConf = {
         // 阿里云
         editerUrl: 'http://60.205.177.43:80/wandaEditer/', // 编辑器地址
         wandaBmGuideUrl: 'http://60.205.177.43:80/wandaBmGuide/', //管理书地址
+        // wandaBmGuideUrl: 'http://192.168.200.100:8090/wandaBmGuide/', //管理书地址
     },
 }
 window.__systemConf = __systemConf

+ 4 - 0
src/api/public.js

@@ -41,3 +41,7 @@ export function updateRead({ postParams }) {
 export function readGroup(postParams) {
     return httputils.postJson(`/serve/topology-wanda/graph/read`, postParams)
 }
+// 查询草稿箱数量
+export function queryDraftNum(data) {
+    return httputils.postJson(`/serve/topology-wanda/graph/query`, data)
+}

+ 28 - 10
src/components/Legend/src/legend.vue

@@ -65,7 +65,7 @@
                 </p>
             </el-tooltip>
             <!-- 编辑分布图 -->
-            <el-tooltip v-if='editPmt' class='bjpmt' effect='dark' content='编辑分布图' placement='left'>
+            <el-tooltip v-if='editPmt' class='bjpmt' effect='dark' :content='editTips' placement='left'>
                 <span class='edit-icon' @click='goToEditer'>
                     <i class='el-icon-edit' style='color:#fff;font-size:16px;'></i>
                 </span>
@@ -102,7 +102,8 @@ export default {
             remarksText: '', //查询出来的备注
             text1:
                 '<p>1.主要设备房包括:冷源机房,热源机房,开闭站,配变电所(室),发电机房,消防水泵房,消防高位水箱间,生活水泵房,慧云机房,垃圾房。</p>',
-            text2: '<p>2.图例后×的数字,代表此位置的数量。</p>',
+            // text2: '<p>2.图例后×的数字,代表此位置的数量。</p>',
+            text2: '',
             show: false,
             show2: false,
             loading: true,
@@ -119,7 +120,9 @@ export default {
             editPmt: true, //是否有跳转道图例库的权限
             floorSelectAble: [],
             floor: '', //传的楼层
-            floorName: ''
+            floorName: '',
+            planNum: '', //主要设备房
+            typeNum: ''
         }
     },
     computed: {
@@ -128,7 +131,7 @@ export default {
     props: {
         floors: {
             default: () => {
-                ;[]
+                []
             },
             type: Array
         },
@@ -143,6 +146,10 @@ export default {
         categoryId: {
             default: '',
             type: String
+        },
+        editTips: {
+            type: String,
+            default: ''
         }
     },
     components: { lengendView, legendRemarks, lengendEdit },
@@ -167,11 +174,17 @@ export default {
                 BuildingID: '1',
                 FloorID: this.$cookie.get('floorNow')
             }
-
             let data = {}
             queryRead({ data, postParams }).then(res => {
                 if (res.data.Data && res.data.Data[0].Note) {
                     let note = res.data.Data[0].Note
+                    console.log('notenotenote', note)
+                    if (this.planNum > 0) {
+                        this.remarksText = `${this.text1}${note}`
+                    }
+                    if (this.typeNum > 1) {
+                        this.remarksText = `${this.text2}${note}`
+                    }
                     if (note.search(this.text1) != -1 && note.search(this.text2) != -1) {
                         this.remarksText = `${note}`
                     } else if (note.search(this.text1) != -1) {
@@ -247,6 +260,14 @@ export default {
                 this.loading = false
                 //console.log('图例', res)
                 this.viewTable = res.data.Data ? res.data.Data : []
+                if (this.viewTable.length > 0) {
+                    this.viewTable.forEach(el => {
+                        console.log(el)
+                        if (el.Name == '主要设备房') {
+                            this.planNum = el.Num
+                        }
+                    })
+                }
                 this.$nextTick(() => {
                     if (this.$refs.viewLengend) {
                         this.$refs.viewLengend.setSelected()
@@ -305,6 +326,7 @@ export default {
         },
         addFloor() {
             this.isFloor = true
+            this.formatFloor()
         },
         // 新增楼层取消
         cancel() {
@@ -316,11 +338,7 @@ export default {
             this.goToEditer()
         }
     },
-    mounted() {
-        if (this.floors.length > 0) {
-            this.formatFloor()
-        }
-    }
+    mounted() {}
 }
 </script>
 <style lang="less" scoped>

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

@@ -22,7 +22,7 @@
                     </el-tooltip>
                 </i>
             </div>
-            <div class='small-block' @click='showText'>
+            <div class='small-block' @click='fitToWindow'>
                 <i>
                     <img src='../../assets/imgs/qp.png' alt />
                 </i>
@@ -49,7 +49,7 @@ export default {
             max: 1000,
             everyScale: 1, // 每份的放大倍数
             isSwitch: false, // 是否开启吸附
-            isShow: true
+            isShow: false
         }
     },
 

+ 40 - 24
src/components/floorMap/index.vue

@@ -31,14 +31,15 @@ export default {
             appName: '万达可视化系统',
             key: '23f30a832a862c58637a4aadbf50a566',
             mapServerURL: `/wdfn`,
-            canvasWidth: 1100,
+            canvasWidth: 600,
             canvasHeight: 800,
             loading: false, // 限制重复查询
             view: null,
             urlMsg: {},
             canvasID: 'canvas',
             floorid: '', //楼层id
-            topologyParser: null // 解析器数据
+            topologyParser: null, // 解析器数据
+            fParser: null // 底图解析器
         }
     },
     props: {
@@ -50,7 +51,11 @@ export default {
             default: '',
             type: String
         },
-
+        // 弹窗高度,适配底图高度使用
+        modalHeight: {
+            type: [Number, undefined],
+            default: undefined
+        },
         loadName: null,
         type: null
     },
@@ -63,6 +68,7 @@ export default {
         init(floorid) {
             this.loading = true
             this.floorid = floorid
+            this.mapSize()
             setTimeout(() => {
                 if (this.haveFengMap) {
                     this.clearGraphy()
@@ -95,24 +101,23 @@ export default {
                             console.log('errr', res.err)
                             return
                         }
-                        const fParser = new SFloorParser(null)
-                        fParser.parseData(res)
-                        fParser.spaceList.forEach(t => {
+                        this.fParser = new SFloorParser(null)
+                        this.fParser.parseData(res)
+                        this.fParser.spaceList.forEach(t => {
                             //   t.selectable = true;
                             this.scene.addItem(t)
                         })
-                        fParser.wallList.forEach(t => this.scene.addItem(t))
-                        fParser.virtualWallList.forEach(t => this.scene.addItem(t))
-                        fParser.doorList.forEach(t => this.scene.addItem(t))
-                        fParser.columnList.forEach(t => this.scene.addItem(t))
-                        fParser.casementList.forEach(t => this.scene.addItem(t))
+                        this.fParser.wallList.forEach(t => this.scene.addItem(t))
+                        this.fParser.virtualWallList.forEach(t => this.scene.addItem(t))
+                        this.fParser.doorList.forEach(t => this.scene.addItem(t))
+                        this.fParser.columnList.forEach(t => this.scene.addItem(t))
+                        this.fParser.casementList.forEach(t => this.scene.addItem(t))
                         this.view.scene = this.scene
                         this.view.minScale = this.view.scale
                         if (this.$refs.canvasFun) {
                             this.$refs.canvasFun.everyScale = this.view.scale
                         }
                         this.view.fitSceneToView()
-                        //console.log('success')
                     })
                 } else {
                     console.log('楼层不正确')
@@ -121,19 +126,23 @@ export default {
             this.readGroup(this.floorid).then(data => {
                 this.loading = false
                 if (data.Result == 'failure') {
-                    this.$message({
-                        message: data.Message,
-                        type: 'warning'
-                    })
                     this.$store.commit('SETISMESSAGE', false)
-                    //    一会回来存这个
+                    return
                 } else {
                     this.$store.commit('SETISMESSAGE', true)
                 }
-                if (data.Data.length > 0) {
-                    //console.log(data.data.Data[0].ID)
-                    this.$cookie.set('graphId', data.Data[0].ID, 3)
+                // 无返回Data处理
+                if (!(data.Data && data.Data.length)) {
+                    return false
                 }
+                if (this.$cookie.get('categoryId') == 'SCPZ') {
+                    let scpzTable = []
+                    scpzTable = data.Data[0].Elements.Nodes || []
+                    console.log(scpzTable)
+                    this.$store.commit('SETSCPZTABLE', scpzTable)
+                }
+                // 放到后边 $cookie graphId
+                this.$cookie.set('graphId', data.Data[0].ID, 3)
                 this.topologyParser = new STopologyParser(null)
                 this.topologyParser.parseData(data.Data[0].Elements)
                 // 多边形
@@ -203,8 +212,11 @@ export default {
             this.view.scaleByPoint(val / scale, this.canvasWidth / 2, this.canvasHeight / 2)
         },
         showText(val) {
-            this.topologyParser.zoneLegendList.forEach(t => {
-                t.showText = val
+            // this.topologyParser.zoneLegendList.forEach(t => {
+            //     t.showText = val
+            // })
+            this.fParser.spaceList.forEach(t => {
+                t.showBaseName = val
             })
         },
         // 读取数据
@@ -219,13 +231,16 @@ export default {
         },
         // 地图尺寸
         mapSize() {
+            this.canvasWidth = this.$refs.graphy.offsetWidth
             if (window.screen.height == '768') {
-                this.canvasWidth = this.$refs.graphy.offsetWidth
                 this.canvasHeight = this.$refs.graphy.offsetHeight - 100
             } else {
-                this.canvasWidth = this.$refs.graphy.offsetWidth
                 this.canvasHeight = 900
             }
+            // 弹窗中底图高度适配
+            if (this.modalHeight) {
+                this.canvasHeight = this.modalHeight
+            }
         },
         getEvent() {
             bus.$on('changeShow', res => {
@@ -289,6 +304,7 @@ export default {
 <style lang="less" scoped>
 #floor_base {
     position: relative;
+    height: 100%;
     .fengMap {
         position: fixed;
         width: 100px;

+ 0 - 650
src/components/mapClass/SPolygonItem.js

@@ -1,650 +0,0 @@
-/*
- * ********************************************************************************************************************
- *
- *                      :*$@@%$*:                         ;:                ;;    ;;
- *                    :@@%!  :!@@%:                       %!             ;%%@@%$ =@@@@@@@%;     @%@@@%%%%@@@@@
- *                   :@%;       :$=                       %%$$$%$$         ;$$  ;$@=   !@$
- *                   =@!                                  %!              @ $=;%   !@@@%:      !$$$$$$$$$$$$$$=
- *                   =@*                                  %!              @ $= % %@=   =%@!      %=
- *              *$%%! @@=        ;=$%%%$*:                %!              @ $= % =%%%%%%@$      *%:         =%
- *            %@@!:    !@@@%=$@@@@%!  :*@@$:              %!              @ $= % $*     ;@      @*          :%*
- *          ;@@!          ;!!!;:         ;@%:      =======@%========*     @ $$ % $%*****$@     :@$=*********=@$
- *          $@*   ;@@@%=!:                *@*
- *          =@$    ;;;!=%@@@@=!           =@!
- *           %@$:      =@%: :*@@@*       %@=                    Copyright (c) 2016-2019.  北京上格云技术有限公司
- *            ;%@@$=$@@%*       *@@@$=%@@%;
- *               ::;::             ::;::                                              All rights reserved.
- *
- * ********************************************************************************************************************
- */
-import { SGraphItem, SGraphPointListInsert, SGraphPointListDelete, SGraphPointListUpdate } from "@saga-web/graph/lib";
-import { SUndoStack } from "@saga-web/base/";
-;
-import { SColor, SLineCapStyle, SPoint, SRect, SLine, SPolygonUtil } from "@saga-web/draw";
-import { SMathUtil } from "@saga-web/big/lib/utils/SMathUtil";
-import { SItemStatus } from "@saga-web/big";
-/**
- * 编辑多边形
- *
- * @author  韩耀龙
- */
-export class SPolygonItem extends SGraphItem {
-    /**
-    * 构造函数
-    *
-    * @param parent    指向父对象
-    * @param data      PolygonData数据
-    */
-    constructor(parent) {
-        super(parent);
-        /** X坐标最小值  */
-        this.minX = Number.MAX_SAFE_INTEGER;
-        /** X坐标最大值  */
-        this.maxX = Number.MIN_SAFE_INTEGER;
-        /** Y坐标最小值  */
-        this.minY = Number.MAX_SAFE_INTEGER;
-        /** Y坐标最大值  */
-        this.maxY = Number.MIN_SAFE_INTEGER;
-        /** 轮廓线坐标  */
-        this.pointList = [];
-        /** 是否闭合    */
-        this.closeFlag = false;
-        // 当前状态
-        this._status = SItemStatus.Normal;
-        this.data = null;
-        /** 边框颜色 */
-        this._strokeColor = new SColor("#0091FF");
-        /** 填充颜色 */
-        this._fillColor = new SColor("#1EE887");
-        /** 边框的宽 只可输入像素宽*/
-        this._lineWidth = 4;
-        /** 鼠标移动点  */
-        this.lastPoint = null;
-        /** 当前鼠标获取顶点对应索引 */
-        this.curIndex = -1;
-        /** 当前鼠标获取顶点对应坐标 */
-        this.curPoint = null;
-        /** 灵敏像素 */
-        this.len = 10;
-        /** 场景像素 内部将灵敏像素换算为场景实际距离  */
-        this.scenceLen = 15;
-        /** 场景像素  */
-        this.isAlt = false;
-        /** undoredo堆栈 */
-        this.undoStack = new SUndoStack();
-    }
-    // 获取当前状态
-    get getPointList() {
-        return this.pointList;
-    }
-    // 编辑当前状态
-    set setPointList(arr) {
-        this.pointList = arr;
-        this.update();
-    }
-    ;
-    // 获取当前状态
-    get status() {
-        return this._status;
-    }
-    // 编辑当前状态
-    set status(value) {
-        this._status = value;
-        // 如果状态为show则需清栈
-        if (value == SItemStatus.Normal) {
-            if (this.undoStack) {
-                this.undoStack.clear();
-            }
-        }
-        this.update();
-    }
-    ;
-    /**  画笔颜色 */
-    get strokeColor() {
-        return this._strokeColor;
-    }
-    ;
-    set strokeColor(v) {
-        this._strokeColor = v;
-        this.update();
-    }
-    get fillColor() {
-        return this._fillColor;
-    }
-    ;
-    set fillColor(v) {
-        this._fillColor = v;
-        this.update();
-    }
-    get lineWidth() {
-        return this._lineWidth;
-    }
-    set lineWidth(v) {
-        this._lineWidth = v;
-        this.update();
-    }
-    ;
-    //////////////////
-    //  以下为对pointList 数组的操作方法
-    /**
-     * 储存新的多边形顶点
-     *
-     * @param x   点位得x坐标
-     * @param y   点位得y坐标
-     * @param i   储存所在索引
-     * @return SPoint。添加的顶点
-     */
-    insertPoint(x, y, i = null) {
-        const point = new SPoint(x, y);
-        if (i == null) {
-            this.pointList.push(point);
-        }
-        else {
-            this.pointList.splice(i, 0, point);
-        }
-        this.update();
-        return point;
-    }
-    /**
-     * 删除点位
-     *
-     * @param i   删除点所在的索引
-     * @return    SPoint|null。索引不在数组范围则返回null
-     */
-    deletePoint(i = null) {
-        let point = null;
-        if (i != null) {
-            if (i >= (this.pointList.length) || i < 0) {
-                point = null;
-            }
-            else {
-                point = new SPoint(this.pointList[i].x, this.pointList[i].y);
-                this.pointList.splice(i, 1);
-            }
-        }
-        else {
-            if (this.pointList.length) {
-                point = this.pointList[this.pointList.length - 1];
-                this.pointList.pop();
-            }
-            else {
-                point = null;
-            }
-        }
-        this.update();
-        return point;
-    }
-    /**
-     * 多边形顶点的移动位置
-     *
-     * @param x   点位得x坐标
-     * @param y   点位得y坐标
-     * @param i   点位得i坐标
-     * @return    移动对应得点。如果索引无法找到移动顶点,则返回null
-     */
-    movePoint(x, y, i) {
-        let point = null;
-        if (i >= (this.pointList.length) || i < 0) {
-            return null;
-        }
-        if (this.pointList.length) {
-            this.pointList[i].x = x;
-            this.pointList[i].y = y;
-        }
-        point = this.pointList[i];
-        return point;
-    }
-    /**
-     * 打印出多边形数组
-     *
-     * @return  顶点数组
-     */
-    PrintPointList() {
-        return this.pointList;
-    }
-    ////////////
-    //  以下为三种状态下的绘制多边形方法
-    /**
-     * 展示状态 --绘制多边形数组
-     *
-     * @param painter      绘制类
-     * @param pointList    绘制多边形数组
-     */
-    drawShowPolygon(painter, pointList) {
-        painter.save();
-        painter.pen.lineCapStyle = SLineCapStyle.Square;
-        painter.pen.color = this._strokeColor;
-        painter.pen.lineWidth = painter.toPx(this._lineWidth);
-        painter.brush.color = this._fillColor;
-        if (this.selected) {
-            painter.shadow.shadowBlur = 10;
-            painter.shadow.shadowColor = new SColor(`#00000060`);
-            painter.shadow.shadowOffsetX = 5;
-            painter.shadow.shadowOffsetY = 5;
-        }
-        else {
-            painter.shadow.shadowColor = SColor.Transparent;
-        }
-        painter.drawPolygon([...pointList]);
-        painter.restore();
-    }
-    /**
-     * 创建状态 --绘制多边形数组
-     *
-     * @param painter      绘制类
-     * @param pointList    绘制多边形数组
-     */
-    drawCreatePolygon(painter, pointList) {
-        painter.pen.lineCapStyle = SLineCapStyle.Square;
-        painter.pen.color = this._strokeColor;
-        painter.pen.lineWidth = painter.toPx(this._lineWidth);
-        if (this.lastPoint && pointList.length) {
-            painter.drawLine(pointList[pointList.length - 1].x, pointList[pointList.length - 1].y, this.lastPoint.x, this.lastPoint.y);
-        }
-        painter.drawPolyline(pointList);
-        painter.pen.color = SColor.Transparent;
-        painter.brush.color = new SColor(this._fillColor.value + "80");
-        painter.pen.lineWidth = painter.toPx(this._lineWidth);
-        if (this.lastPoint) {
-            painter.drawPolygon([...pointList, this.lastPoint]);
-            // 绘制顶点块
-            painter.pen.color = SColor.Black;
-            painter.brush.color = SColor.White;
-            pointList.forEach((item, index) => {
-                painter.drawCircle(item.x, item.y, painter.toPx(this.len / 2));
-            });
-        }
-        else {
-            painter.drawPolygon(pointList);
-        }
-    }
-    /**
-     *
-     * 编辑状态 --绘制多边形数组
-     *
-     * @param painter    绘制类
-     * @param pointList    绘制多边形数组
-     */
-    drawEditPolygon(painter, pointList) {
-        // 展示多边形
-        painter.pen.lineCapStyle = SLineCapStyle.Square;
-        painter.pen.color = this._strokeColor;
-        painter.pen.lineWidth = painter.toPx(this._lineWidth);
-        painter.brush.color = new SColor(this._fillColor.value + "80");
-        painter.drawPolygon([...pointList]);
-        // 绘制顶点块
-        painter.pen.color = SColor.Black;
-        painter.brush.color = SColor.White;
-        pointList.forEach((item, index) => {
-            painter.drawCircle(item.x, item.y, painter.toPx(this.len / 2));
-        });
-    }
-    /**
-     * 编辑状态操作多边形数组
-     *
-     * @param event    鼠标事件
-     *
-     *
-     */
-    editPolygonPoint(event) {
-        //  判断是否为删除状态 isAlt = true为删除状态
-        if (this.isAlt) {
-            // 1 判断是否点击在多边形顶点
-            let lenIndex = -1; // 当前点击到的点位索引;
-            let curenLen = this.scenceLen; // 当前的灵敏度
-            this.pointList.forEach((item, index) => {
-                let dis = SMathUtil.pointDistance(event.x, event.y, item.x, item.y);
-                if (dis < curenLen) {
-                    curenLen = dis;
-                    lenIndex = index;
-                }
-            });
-            // 若点击到,对该索引对应的点做删除
-            if (lenIndex != -1) {
-                if (this.pointList.length <= 3) {
-                    return;
-                }
-                const delePoint = new SPoint(this.pointList[lenIndex].x, this.pointList[lenIndex].y);
-                this.deletePoint(lenIndex);
-                // 记录顶点操作记录压入堆栈
-                this.recordAction(SGraphPointListDelete, [this.pointList, delePoint, lenIndex]);
-            }
-        }
-        else {
-            // 1 判断是否点击在多边形顶点
-            this.curIndex = -1;
-            this.curPoint = null;
-            let lenIndex = -1; // 当前点击到的点位索引;
-            let curenLen = this.scenceLen; // 当前的灵敏度
-            this.pointList.forEach((item, index) => {
-                let dis = SMathUtil.pointDistance(event.x, event.y, item.x, item.y);
-                if (dis < curenLen) {
-                    curenLen = dis;
-                    lenIndex = index;
-                }
-            });
-            this.curIndex = lenIndex;
-            // 2判断是否点击在多边形得边上
-            if (-1 == lenIndex) {
-                let len = SMathUtil.pointToLine(new SPoint(event.x, event.y), new SLine(this.pointList[0], this.pointList[1])), index = 0;
-                if (this.pointList.length > 2) {
-                    for (let i = 1; i < this.pointList.length; i++) {
-                        let dis = SMathUtil.pointToLine(new SPoint(event.x, event.y), new SLine(this.pointList[i], this.pointList[i + 1]));
-                        if ((i + 1) == this.pointList.length) {
-                            dis = SMathUtil.pointToLine(new SPoint(event.x, event.y), new SLine(this.pointList[i], this.pointList[0]));
-                        }
-                        if (dis.MinDis < len.MinDis) {
-                            len = dis;
-                            index = i;
-                        }
-                    }
-                }
-                // 判断是否有点
-                if (len.Point) {
-                    console.log(index, len.Point);
-                    // 点在了多边形的边上
-                    if (len.MinDis <= this.scenceLen) {
-                        this.pointList.splice(index + 1, 0, len.Point);
-                        // 记录新增顶点操作记录压入堆栈
-                        this.recordAction(SGraphPointListInsert, [this.pointList, len.Point, index + 1]);
-                    }
-                    else { //没点在多边形边上也没点在多边形顶点上
-                        super.onMouseDown(event);
-                    }
-                }
-            }
-            else {
-                // 当捕捉到顶点后 ,记录当前点的xy坐标,用于undo、redo操作
-                this.curPoint = new SPoint(this.pointList[this.curIndex].x, this.pointList[this.curIndex].y);
-            }
-            // 刷新视图
-            this.update();
-        }
-    }
-    /////////////////////
-    // undo、redo相关操作
-    /**
-     * 记录相关动作并推入栈中
-     * @param	SGraphCommand         相关命令类
-     * @param	any                    对应传入参数
-     */
-    recordAction(SGraphCommand, any) {
-        // 记录相关命令并推入堆栈中
-        const sgraphcommand = new SGraphCommand(this, ...any);
-        if (this.undoStack) {
-            this.undoStack.push(sgraphcommand);
-        }
-    }
-    /**
-     * 执行取消操作执行
-     */
-    undo() {
-        if (this.status == SItemStatus.Normal) {
-            return;
-        }
-        if (this.undoStack) {
-            this.undoStack.undo();
-        }
-    }
-    /**
-     * 执行重做操作执行
-     */
-    redo() {
-        if (this.status == SItemStatus.Normal) {
-            return;
-        }
-        if (this.undoStack) {
-            this.undoStack.redo();
-        }
-    }
-    ///////////////////////////////
-    // 以下为鼠标事件
-    /**
-     * 鼠标双击事件
-     *
-     * @param	event         事件参数
-     * @return	boolean
-     */
-    onDoubleClick(event) {
-        console.log(event);
-        // 如果位show状态 双击改对象则需改为编辑状态
-        if (SItemStatus.Normal == this.status) {
-            this.status = SItemStatus.Edit;
-            this.grabItem(this);
-        }
-        else if (SItemStatus.Edit == this.status) {
-            this.status = SItemStatus.Normal;
-            this.releaseItem();
-            if (this.undoStack) {
-                this.undoStack.clear();
-            }
-        }
-        this.update();
-        return true;
-    } // Function onDoubleClick()
-    /**
-     * 键盘事件
-     *
-     * @param	event         事件参数
-     * @return	boolean
-     */
-    onKeyDown(event) {
-        if (this.status == SItemStatus.Normal) {
-            return false;
-        }
-        else if (this.status == SItemStatus.Create) {
-            if (event.code == 'Enter') {
-                // 当顶点大于二个时才又条件执行闭合操作并清空堆栈
-                if (this.pointList.length > 2) {
-                    this.status = SItemStatus.Normal;
-                    //3 传递完成事件状态
-                    this.$emit('finishCreated');
-                    //1 grabItem 置为null
-                    this.releaseItem();
-                    //2 清空undo
-                    if (this.undoStack) {
-                        this.undoStack.clear();
-                    }
-                }
-            }
-        }
-        else if (this.status == SItemStatus.Edit) {
-            if (event.key == 'Alt') {
-                this.isAlt = true;
-            }
-        }
-        this.update();
-        return true;
-    } // Function onKeyDown()
-    /**
-     * 键盘键抬起事件
-     *
-     * @param	event         事件参数
-     * @return	boolean
-     */
-    onKeyUp(event) {
-        if (this.status == SItemStatus.Edit) {
-            if (event.key == 'Alt') {
-                this.isAlt = false;
-            }
-        }
-        this.update();
-    } // Function onKeyUp()
-    /**
-     * 鼠标按下事件
-     *
-     * @param	event         事件参数
-     * @return	boolean
-     */
-    onMouseDown(event) {
-        // 如果状态为编辑状态则添加点
-        if (this.status == SItemStatus.Create) {
-            // 新增顶点
-            this.insertPoint(event.x, event.y);
-            // 记录新增顶点操作记录压入堆栈
-            let pos = new SPoint(event.x, event.y);
-            this.recordAction(SGraphPointListInsert, [this.pointList, pos]);
-        }
-        else if (this.status == SItemStatus.Edit) {
-            // 对多边形数组做编辑操作
-            this.editPolygonPoint(event);
-        }
-        else {
-            return super.onMouseDown(event);
-        }
-        return true;
-    } // Function onMouseDown()
-    /**
-     * 鼠标移入事件
-     *
-     * @param	event         事件参数
-     * @return	boolean
-     */
-    onMouseEnter(event) {
-        return true;
-    } // Function onMouseEnter()
-    /**
-     * 鼠标移出事件
-     *
-     * @param	event         事件参数
-     * @return	boolean
-     */
-    onMouseLeave(event) {
-        return true;
-    } // Function onMouseLeave()
-    /**
-     * 鼠标移动事件
-     *
-     * @param	event         事件参数
-     * @return	boolean
-     */
-    onMouseMove(event) {
-        if (this.status == SItemStatus.Create) {
-            this.lastPoint = new SPoint;
-            this.lastPoint.x = event.x;
-            this.lastPoint.y = event.y;
-            this.update();
-        }
-        else if (this.status == SItemStatus.Edit) {
-            if (-1 != this.curIndex) {
-                this.pointList[this.curIndex].x = event.x;
-                this.pointList[this.curIndex].y = event.y;
-            }
-            this.update();
-        }
-        else {
-            // return super.onMouseMove(event)
-        }
-        return true;
-    } // Function onMouseMove()
-    /**
-     * 鼠标抬起事件
-     *
-     * @param	event         事件参数
-     * @return	boolean
-     */
-    onMouseUp(event) {
-        if (this.status == SItemStatus.Edit) {
-            if (-1 != this.curIndex) {
-                const pos = new SPoint(this.pointList[this.curIndex].x, this.pointList[this.curIndex].y);
-                this.recordAction(SGraphPointListUpdate, [this.pointList, this.curPoint, pos, this.curIndex]);
-            }
-            this.curIndex = -1;
-            this.curPoint = null;
-        }
-        else {
-            // return super.onMouseUp(event)
-        }
-        return true;
-    } // Function onMouseUp()
-    /**
-     * 适配事件
-     *
-     * @param	event         事件参数
-     * @return	boolean
-     */
-    onResize(event) {
-        return true;
-    } // Function onResize()
-    /**
-     * 取消操作
-     *
-     * @param   painter       painter对象
-     */
-    cancelOperate() {
-        // 当状态为展示状态
-        if (this.status == SItemStatus.Create) {
-            // 闭合多边形
-            this.parent = null;
-        }
-        else if (this.status == SItemStatus.Edit) {
-            // 编辑状态
-            this.status = SItemStatus.Normal;
-        }
-        this.update();
-    } // Function cancelOperate()
-    /**
-     * Item对象边界区域
-     *
-     * @return SRect
-     */
-    boundingRect() {
-        if (this.pointList.length) {
-            this.minX = this.pointList[0].x;
-            this.maxX = this.pointList[0].x;
-            this.minY = this.pointList[0].y;
-            this.maxY = this.pointList[0].y;
-            this.pointList.forEach(it => {
-                let x = it.x, y = it.y;
-                if (x < this.minX) {
-                    this.minX = x;
-                }
-                if (y < this.minY) {
-                    this.minY = y;
-                }
-                if (x > this.maxX) {
-                    this.maxX = x;
-                }
-                if (y > this.maxY) {
-                    this.maxY = y;
-                }
-            });
-        }
-        ;
-        return new SRect(this.minX, this.minY, this.maxX - this.minX, this.maxY - this.minY);
-    } // Function boundingRect()
-    /**
-     * 判断点是否在区域内
-     *
-     * @param x
-     * @param y
-     */
-    contains(x, y) {
-        let arr = this.pointList;
-        if (arr.length < 3 || !SPolygonUtil.pointIn(x, y, arr)) {
-            return false;
-        }
-        return true;
-    } // Function contains()
-    /**
-     * Item绘制操作
-     *
-     * @param   painter       painter对象
-     */
-    onDraw(painter) {
-        this.scenceLen = painter.toPx(this.len);
-        // 当状态为展示状态
-        if (this.status == SItemStatus.Normal) {
-            // 闭合多边形
-            this.drawShowPolygon(painter, this.pointList);
-        }
-        else if (this.status == SItemStatus.Create) {
-            // 创建状态
-            this.drawCreatePolygon(painter, this.pointList);
-        }
-        else {
-            // 编辑状态
-            this.drawEditPolygon(painter, this.pointList);
-        }
-    } // Function onDraw()
-}

+ 0 - 704
src/components/mapClass/SPolygonItem.ts

@@ -1,704 +0,0 @@
-/*
- * ********************************************************************************************************************
- *
- *                      :*$@@%$*:                         ;:                ;;    ;;
- *                    :@@%!  :!@@%:                       %!             ;%%@@%$ =@@@@@@@%;     @%@@@%%%%@@@@@
- *                   :@%;       :$=                       %%$$$%$$         ;$$  ;$@=   !@$
- *                   =@!                                  %!              @ $=;%   !@@@%:      !$$$$$$$$$$$$$$=
- *                   =@*                                  %!              @ $= % %@=   =%@!      %=
- *              *$%%! @@=        ;=$%%%$*:                %!              @ $= % =%%%%%%@$      *%:         =%
- *            %@@!:    !@@@%=$@@@@%!  :*@@$:              %!              @ $= % $*     ;@      @*          :%*
- *          ;@@!          ;!!!;:         ;@%:      =======@%========*     @ $$ % $%*****$@     :@$=*********=@$
- *          $@*   ;@@@%=!:                *@*
- *          =@$    ;;;!=%@@@@=!           =@!
- *           %@$:      =@%: :*@@@*       %@=                    Copyright (c) 2016-2019.  北京上格云技术有限公司
- *            ;%@@$=$@@%*       *@@@$=%@@%;
- *               ::;::             ::;::                                              All rights reserved.
- *
- * ********************************************************************************************************************
- */
-import { SGraphItem, SGraphPointListInsert, SGraphPointListDelete, SGraphPointListUpdate } from "@saga-web/graph/lib";
-import { SMouseEvent, SUndoStack } from "@saga-web/base/";;
-import {
-    SColor,
-    SLineCapStyle,
-    SPainter,
-    SPoint,
-    SRect,
-    SLine,
-    SPolygonUtil
-} from "@saga-web/draw";
-import { SMathUtil } from "@saga-web/big/lib/utils/SMathUtil";
-import { SItemStatus } from "@saga-web/big";
-
-/**
- * 编辑多边形
- *
- * @author  韩耀龙
- */
-export class SPolygonItem extends SGraphItem {
-    /** X坐标最小值  */
-    private minX = Number.MAX_SAFE_INTEGER;
-    /** X坐标最大值  */
-    private maxX = Number.MIN_SAFE_INTEGER;
-    /** Y坐标最小值  */
-    private minY = Number.MAX_SAFE_INTEGER;
-    /** Y坐标最大值  */
-    private maxY = Number.MIN_SAFE_INTEGER;
-    /** 轮廓线坐标  */
-    private pointList: SPoint[] = [];
-    // 获取当前状态
-    get getPointList(): SPoint[] {
-        return this.pointList;
-    }
-    // 编辑当前状态
-    set setPointList(arr: SPoint[]) {
-        this.pointList = arr;
-        this.update();
-    };
-    /** 是否闭合    */
-    closeFlag: boolean = false;
-    // 当前状态
-    protected _status: number = SItemStatus.Normal;
-    // 获取当前状态
-    get status(): SItemStatus {
-        return this._status;
-    }
-    // 编辑当前状态
-    set status(value: SItemStatus) {
-        this._status = value;
-        // 如果状态为show则需清栈
-        if (value == SItemStatus.Normal) {
-            if (this.undoStack) {
-                this.undoStack.clear();
-            }
-        }
-        this.update();
-    };
-    data: any | null = null;
-    /** 边框颜色 */
-    _strokeColor: SColor = new SColor("#0091FF");
-    /**  画笔颜色 */
-    get strokeColor(): SColor {
-        return this._strokeColor
-    };
-    set strokeColor(v: SColor) {
-        this._strokeColor = v;
-        this.update()
-    }
-    /** 填充颜色 */
-    _fillColor: SColor = new SColor("#1EE887");
-    get fillColor(): SColor {
-        return this._fillColor
-    };
-    set fillColor(v: SColor) {
-        this._fillColor = v;
-        this.update()
-    }
-
-    /** 边框的宽 只可输入像素宽*/
-    _lineWidth: number = 4;
-    get lineWidth(): number {
-        return this._lineWidth
-    }
-    set lineWidth(v: number) {
-        this._lineWidth = v;
-        this.update();
-    };
-    /** 鼠标移动点  */
-    private lastPoint: SPoint | null = null;
-    /** 当前鼠标获取顶点对应索引 */
-    private curIndex: number = -1;
-    /** 当前鼠标获取顶点对应坐标 */
-    private curPoint: null | SPoint = null
-    /** 灵敏像素 */
-    private len: number = 10;
-    /** 场景像素 内部将灵敏像素换算为场景实际距离  */
-    private scenceLen: number = 15;
-    /** 场景像素  */
-    private isAlt: boolean = false;
-    /** undoredo堆栈 */
-    protected undoStack: SUndoStack | null = new SUndoStack();
-
-    /**
-    * 构造函数
-    *
-    * @param parent    指向父对象
-    * @param data      PolygonData数据
-    */
-    constructor(parent: SGraphItem | null) {
-        super(parent);
-    }
-
-    //////////////////
-    //  以下为对pointList 数组的操作方法
-
-    /**
-     * 储存新的多边形顶点
-     *
-     * @param x   点位得x坐标
-     * @param y   点位得y坐标
-     * @param i   储存所在索引
-     * @return SPoint。添加的顶点
-     */
-    insertPoint(x: number, y: number, i: number | null = null): SPoint {
-        const point = new SPoint(x, y);
-        if (i == null) {
-            this.pointList.push(point)
-        } else {
-            this.pointList.splice(i, 0, point);
-        }
-        this.update()
-        return point
-    }
-
-    /**
-     * 删除点位
-     *
-     * @param i   删除点所在的索引
-     * @return    SPoint|null。索引不在数组范围则返回null
-     */
-    deletePoint(i: number | null = null): SPoint | null {
-        let point = null;
-        if (i != null) {
-            if (i >= (this.pointList.length) || i < 0) {
-                point = null
-            } else {
-                point = new SPoint(this.pointList[i].x, this.pointList[i].y);
-                this.pointList.splice(i, 1);
-            }
-        } else {
-            if (this.pointList.length) {
-                point = this.pointList[this.pointList.length - 1];
-                this.pointList.pop();
-            } else {
-                point = null
-            }
-        }
-        this.update()
-        return point
-    }
-
-    /**
-     * 多边形顶点的移动位置
-     *
-     * @param x   点位得x坐标
-     * @param y   点位得y坐标
-     * @param i   点位得i坐标
-     * @return    移动对应得点。如果索引无法找到移动顶点,则返回null
-     */
-    movePoint(x: number, y: number, i: number, ): SPoint | null {
-        let point = null;
-        if (i >= (this.pointList.length) || i < 0) {
-            return null
-        }
-        if (this.pointList.length) {
-            this.pointList[i].x = x;
-            this.pointList[i].y = y;
-        }
-        point = this.pointList[i];
-        return point
-    }
-
-    /**
-     * 打印出多边形数组
-     *
-     * @return  顶点数组
-     */
-    PrintPointList(): SPoint[] {
-        return this.pointList
-    }
-
-    ////////////
-    //  以下为三种状态下的绘制多边形方法
-
-    /**
-     * 展示状态 --绘制多边形数组
-     *
-     * @param painter      绘制类
-     * @param pointList    绘制多边形数组
-     */
-    protected drawShowPolygon(painter: SPainter, pointList: SPoint[]): void {
-        painter.save();
-        painter.pen.lineCapStyle = SLineCapStyle.Square;
-        painter.pen.color = this._strokeColor;
-        painter.pen.lineWidth = painter.toPx(this._lineWidth);
-        painter.brush.color = this._fillColor;
-        if (this.selected) {
-            painter.shadow.shadowBlur = 10;
-            painter.shadow.shadowColor = new SColor(`#00000060`);
-            painter.shadow.shadowOffsetX = 5;
-            painter.shadow.shadowOffsetY = 5;
-        } else {
-            painter.shadow.shadowColor = SColor.Transparent;
-        }
-        painter.drawPolygon([...pointList]);
-        painter.restore();
-    }
-
-
-    /**
-     * 创建状态 --绘制多边形数组
-     *
-     * @param painter      绘制类
-     * @param pointList    绘制多边形数组
-     */
-    protected drawCreatePolygon(painter: SPainter, pointList: SPoint[]): void {
-        painter.pen.lineCapStyle = SLineCapStyle.Square;
-        painter.pen.color = this._strokeColor;
-        painter.pen.lineWidth = painter.toPx(this._lineWidth);
-        if (this.lastPoint && pointList.length) {
-            painter.drawLine(pointList[pointList.length - 1].x, pointList[pointList.length - 1].y, this.lastPoint.x, this.lastPoint.y);
-        }
-        painter.drawPolyline(pointList);
-        painter.pen.color = SColor.Transparent;
-        painter.brush.color = new SColor(this._fillColor.value + "80");
-        painter.pen.lineWidth = painter.toPx(this._lineWidth);
-
-        if (this.lastPoint) {
-            painter.drawPolygon([...pointList, this.lastPoint]);
-            // 绘制顶点块
-            painter.pen.color = SColor.Black;
-            painter.brush.color = SColor.White;
-            pointList.forEach((item, index) => {
-                painter.drawCircle(item.x, item.y, painter.toPx(this.len / 2))
-            });
-        } else {
-            painter.drawPolygon(pointList);
-        }
-
-    }
-
-    /**
-     *
-     * 编辑状态 --绘制多边形数组
-     *
-     * @param painter    绘制类
-     * @param pointList    绘制多边形数组
-     */
-    protected drawEditPolygon(painter: SPainter, pointList: SPoint[]): void {
-        // 展示多边形
-        painter.pen.lineCapStyle = SLineCapStyle.Square;
-        painter.pen.color = this._strokeColor;
-        painter.pen.lineWidth = painter.toPx(this._lineWidth);
-        painter.brush.color = new SColor(this._fillColor.value + "80");
-        painter.drawPolygon([...pointList]);
-        // 绘制顶点块
-        painter.pen.color = SColor.Black;
-        painter.brush.color = SColor.White;
-        pointList.forEach((item, index) => {
-            painter.drawCircle(item.x, item.y, painter.toPx(this.len / 2))
-        })
-    }
-
-    /**
-     * 编辑状态操作多边形数组
-     *
-     * @param event    鼠标事件
-     *
-     *
-     */
-    protected editPolygonPoint(event: SMouseEvent): void {
-        //  判断是否为删除状态 isAlt = true为删除状态
-        if (this.isAlt) {
-            // 1 判断是否点击在多边形顶点
-            let lenIndex = -1;  // 当前点击到的点位索引;
-            let curenLen = this.scenceLen; // 当前的灵敏度
-            this.pointList.forEach((item, index) => {
-                let dis = SMathUtil.pointDistance(
-                    event.x,
-                    event.y,
-                    item.x,
-                    item.y
-                );
-                if (dis < curenLen) {
-                    curenLen = dis;
-                    lenIndex = index;
-                }
-            });
-            // 若点击到,对该索引对应的点做删除
-            if (lenIndex != -1) {
-                if (this.pointList.length <= 3) {
-                    return
-                }
-                const delePoint = new SPoint(this.pointList[lenIndex].x, this.pointList[lenIndex].y)
-                this.deletePoint(lenIndex);
-                // 记录顶点操作记录压入堆栈
-                this.recordAction(SGraphPointListDelete, [this.pointList, delePoint, lenIndex]);
-            }
-        } else {
-            // 1 判断是否点击在多边形顶点
-            this.curIndex = -1;
-            this.curPoint = null;
-            let lenIndex = -1;  // 当前点击到的点位索引;
-            let curenLen = this.scenceLen; // 当前的灵敏度
-            this.pointList.forEach((item, index) => {
-                let dis = SMathUtil.pointDistance(
-                    event.x,
-                    event.y,
-                    item.x,
-                    item.y
-                );
-                if (dis < curenLen) {
-                    curenLen = dis;
-                    lenIndex = index;
-                }
-            });
-            this.curIndex = lenIndex;
-            // 2判断是否点击在多边形得边上
-            if (-1 == lenIndex) {
-                let len = SMathUtil.pointToLine(
-                    new SPoint(event.x, event.y),
-                    new SLine(this.pointList[0], this.pointList[1])
-                ),
-                    index = 0;
-                if (this.pointList.length > 2) {
-                    for (let i = 1; i < this.pointList.length; i++) {
-                        let dis = SMathUtil.pointToLine(
-                            new SPoint(event.x, event.y),
-                            new SLine(this.pointList[i], this.pointList[i + 1])
-                        );
-                        if ((i + 1) == this.pointList.length) {
-                            dis = SMathUtil.pointToLine(
-                                new SPoint(event.x, event.y),
-                                new SLine(this.pointList[i], this.pointList[0])
-                            );
-                        }
-                        if (dis.MinDis < len.MinDis) {
-                            len = dis;
-                            index = i;
-                        }
-                    }
-                }
-                // 判断是否有点
-                if (len.Point) {
-                    console.log(index,len.Point);
-                    // 点在了多边形的边上
-                    if (len.MinDis <= this.scenceLen) {
-                        this.pointList.splice(index + 1, 0, len.Point);
-                        // 记录新增顶点操作记录压入堆栈
-                        this.recordAction(SGraphPointListInsert, [this.pointList, len.Point, index + 1]);
-                    } else { //没点在多边形边上也没点在多边形顶点上
-                        super.onMouseDown(event);
-                    }
-                }
-            } else {
-                // 当捕捉到顶点后 ,记录当前点的xy坐标,用于undo、redo操作
-                this.curPoint = new SPoint(this.pointList[this.curIndex].x, this.pointList[this.curIndex].y);
-            }
-            // 刷新视图
-            this.update();
-        }
-
-    }
-
-    /////////////////////
-    // undo、redo相关操作
-
-    /**
-     * 记录相关动作并推入栈中
-     * @param	SGraphCommand         相关命令类
-     * @param	any                    对应传入参数
-     */
-    protected recordAction(SGraphCommand: any, any: any[]): void {
-        // 记录相关命令并推入堆栈中
-        const sgraphcommand = new SGraphCommand(this, ...any);
-        if (this.undoStack) {
-            this.undoStack.push(sgraphcommand);
-        }
-    }
-
-    /**
-     * 执行取消操作执行
-     */
-    undo(): void {
-        if (this.status == SItemStatus.Normal) {
-            return
-        }
-        if (this.undoStack) {
-            this.undoStack.undo();
-        }
-    }
-
-    /**
-     * 执行重做操作执行
-     */
-    redo(): void {
-        if (this.status == SItemStatus.Normal) {
-            return
-        }
-        if (this.undoStack) {
-            this.undoStack.redo();
-        }
-    }
-
-    ///////////////////////////////
-    // 以下为鼠标事件
-
-    /**
-     * 鼠标双击事件
-     *
-     * @param	event         事件参数
-     * @return	boolean
-     */
-    onDoubleClick(event: SMouseEvent): boolean {
-        console.log(event)
-        // 如果位show状态 双击改对象则需改为编辑状态
-        if (SItemStatus.Normal == this.status) {
-            this.status = SItemStatus.Edit;
-            this.grabItem(this);
-        } else if (SItemStatus.Edit == this.status) {
-            this.status = SItemStatus.Normal;
-            this.releaseItem();
-            if (this.undoStack) {
-                this.undoStack.clear()
-            }
-        }
-        this.update()
-        return true;
-    } // Function onDoubleClick()
-
-
-    /**
-     * 键盘事件
-     *
-     * @param	event         事件参数
-     * @return	boolean
-     */
-
-    onKeyDown(event: KeyboardEvent): boolean {
-        if (this.status == SItemStatus.Normal) {
-            return false;
-        } else if (this.status == SItemStatus.Create) {
-            if (event.code == 'Enter') {
-                // 当顶点大于二个时才又条件执行闭合操作并清空堆栈
-                if (this.pointList.length > 2) {
-                    this.status = SItemStatus.Normal;
-                    //3 传递完成事件状态
-                    this.$emit('finishCreated')
-                    //1 grabItem 置为null
-                    this.releaseItem();
-                    //2 清空undo
-                    if (this.undoStack) {
-                        this.undoStack.clear();
-                    }
-                }
-            }
-        } else if (this.status == SItemStatus.Edit) {
-            if (event.key == 'Alt') {
-                this.isAlt = true;
-            }
-        }
-        this.update();
-        return true;
-    } // Function onKeyDown()
-
-
-    /**
-     * 键盘键抬起事件
-     *
-     * @param	event         事件参数
-     * @return	boolean
-     */
-    onKeyUp(event: KeyboardEvent): void {
-        if (this.status == SItemStatus.Edit) {
-            if (event.key == 'Alt') {
-                this.isAlt = false;
-            }
-        }
-        this.update()
-    } // Function onKeyUp()
-
-    /**
-     * 鼠标按下事件
-     *
-     * @param	event         事件参数
-     * @return	boolean
-     */
-    onMouseDown(event: SMouseEvent): boolean {
-        // 如果状态为编辑状态则添加点
-        if (this.status == SItemStatus.Create) {
-            // 新增顶点
-            this.insertPoint(event.x, event.y);
-            // 记录新增顶点操作记录压入堆栈
-            let pos = new SPoint(event.x, event.y);
-            this.recordAction(SGraphPointListInsert, [this.pointList, pos]);
-        } else if (this.status == SItemStatus.Edit) {
-            // 对多边形数组做编辑操作
-            this.editPolygonPoint(event);
-        } else {
-            return super.onMouseDown(event)
-        }
-        return true;
-
-    } // Function onMouseDown()
-
-    /**
-     * 鼠标移入事件
-     *
-     * @param	event         事件参数
-     * @return	boolean
-     */
-    onMouseEnter(event: SMouseEvent): boolean {
-        return true;
-    } // Function onMouseEnter()
-
-
-    /**
-     * 鼠标移出事件
-     *
-     * @param	event         事件参数
-     * @return	boolean
-     */
-
-    onMouseLeave(event: SMouseEvent): boolean {
-        return true;
-    } // Function onMouseLeave()
-
-    /**
-     * 鼠标移动事件
-     *
-     * @param	event         事件参数
-     * @return	boolean
-     */
-
-    onMouseMove(event: SMouseEvent): boolean {
-        if (this.status == SItemStatus.Create) {
-            this.lastPoint = new SPoint
-            this.lastPoint.x = event.x;
-            this.lastPoint.y = event.y;
-            this.update();
-        } else if (this.status == SItemStatus.Edit) {
-            if (-1 != this.curIndex) {
-                this.pointList[this.curIndex].x = event.x;
-                this.pointList[this.curIndex].y = event.y;
-            }
-            this.update()
-        } else {
-            // return super.onMouseMove(event)
-        }
-
-        return true;
-    } // Function onMouseMove()
-
-
-    /**
-     * 鼠标抬起事件
-     *
-     * @param	event         事件参数
-     * @return	boolean
-     */
-    onMouseUp(event: SMouseEvent): boolean {
-        if (this.status == SItemStatus.Edit) {
-            if (-1 != this.curIndex) {
-                const pos = new SPoint(this.pointList[this.curIndex].x, this.pointList[this.curIndex].y)
-                this.recordAction(SGraphPointListUpdate, [this.pointList, this.curPoint, pos, this.curIndex])
-            }
-            this.curIndex = -1;
-            this.curPoint = null;
-        } else {
-            // return super.onMouseUp(event)
-        }
-        return true;
-    } // Function onMouseUp()
-
-    /**
-     * 适配事件
-     *
-     * @param	event         事件参数
-     * @return	boolean
-     */
-
-    onResize(event: SMouseEvent): boolean {
-        return true;
-    } // Function onResize()
-
-    /**
-     * 取消操作
-     *
-     * @param   painter       painter对象
-     */
-    cancelOperate(): void {
-        // 当状态为展示状态
-        if (this.status == SItemStatus.Create) {
-            // 闭合多边形
-            this.parent = null
-        } else if (this.status == SItemStatus.Edit) {
-            // 编辑状态
-            this.status = SItemStatus.Normal
-        }
-        this.update()
-    } // Function cancelOperate()
-
-    /**
-     * Item对象边界区域
-     *
-     * @return SRect
-     */
-    boundingRect(): SRect {
-        if (this.pointList.length) {
-            this.minX = this.pointList[0].x;
-            this.maxX = this.pointList[0].x;
-            this.minY = this.pointList[0].y;
-            this.maxY = this.pointList[0].y;
-            this.pointList.forEach(it => {
-                let x = it.x,
-                    y = it.y;
-                if (x < this.minX) {
-                    this.minX = x;
-                }
-                if (y < this.minY) {
-                    this.minY = y;
-                }
-                if (x > this.maxX) {
-                    this.maxX = x;
-                }
-                if (y > this.maxY) {
-                    this.maxY = y;
-                }
-            });
-        };
-        return new SRect(
-            this.minX,
-            this.minY,
-            this.maxX - this.minX,
-            this.maxY - this.minY
-        );
-    } // Function boundingRect()
-
-    /**
-     * 判断点是否在区域内
-     *
-     * @param x
-     * @param y
-     */
-    contains(x: number, y: number): boolean {
-        let arr = this.pointList;
-        if (arr.length < 3 || !SPolygonUtil.pointIn(x, y, arr)) {
-            return false;
-        }
-        return true;
-    } // Function contains()
-
-    /**
-     * Item绘制操作
-     *
-     * @param   painter       painter对象
-     */
-    onDraw(painter: SPainter): void {
-        this.scenceLen = painter.toPx(this.len)
-        // 当状态为展示状态
-        if (this.status == SItemStatus.Normal) {
-            // 闭合多边形
-            this.drawShowPolygon(painter, this.pointList);
-        } else if (this.status == SItemStatus.Create) {
-            // 创建状态
-            this.drawCreatePolygon(painter, this.pointList)
-        } else {
-            // 编辑状态
-            this.drawEditPolygon(painter, this.pointList);
-        }
-    } // Function onDraw()
-
-
-}

+ 42 - 6
src/components/menuList.vue

@@ -25,8 +25,8 @@
             <span @click='toDrafts' class='span-out'>
                 <img class='img2' src='../assets/imgs/cgx.png' alt />
                 <span class='span2'>草稿箱</span>
-                <span class='span2-num' v-if='value<=99'>{{value}}</span>
-                <span class='span2-num' style='line-height:10px' v-else>...</span>
+                <span class='span2-num' v-if='draftNum && draftNum <= 99'>{{draftNum}}</span>
+                <span class='span2-num' style='line-height:10px' v-else-if='draftNum && draftNum > 99'>...</span>
             </span>
             <span>
                 <img class='img3' src='../assets/imgs/clock.png' alt />
@@ -40,6 +40,7 @@
 import { formatTime } from '@/utils/format.js'
 import { mapGetters } from 'vuex'
 import moment from 'moment'
+import { queryDraftNum } from '../../src/api/public'
 export default {
     data() {
         return {
@@ -55,7 +56,9 @@ export default {
             times: `${new Date().getFullYear()}.${formatTime(new Date().getMonth() + 1)}.${formatTime(new Date().getDate())} ${formatTime(
                 new Date().getHours()
             )}:${formatTime(new Date().getMinutes())}`,
-            value: 190,
+            draftNum: null, //草稿箱数量
+            interval: 10 * 60 * 1000, //定时器时长,默认 10分钟
+            timer: null, //保存定时器
             // 路由词典
             dict: {
                 first: 1,
@@ -77,12 +80,45 @@ export default {
         this.currentTime()
     },
     mounted() {
-        window.vm = this
         this.handleRoute(this.$route)
-        console.log(this.fmapID)
+        // console.log(this.fmapID)
+        // 定时查询草稿箱数量
+        this.getDraftNum() //首次查询
+        this.timer = setInterval(() => {
+            this.getDraftNum()
+        }, this.interval)
+    },
+    // 页面关闭时,清除定时器
+    beforeDestroy() {
+        clearInterval(this.timer)
     },
-
     methods: {
+        /**
+         * @name getDraftNum
+         * @description 查询草稿箱数量
+         */
+        async getDraftNum() {
+            let res = null,
+                data = {
+                    Distinct: true,
+                    Filters: `projectId=${this.plazaId};isPub=false`,
+                    PageNumber: 1,
+                    PageSize: 500,
+                    Projection: ['floorId']
+                }
+            try {
+                // 调用接口
+                res = await queryDraftNum(data)
+            } catch (error) {
+                console.error(error)
+            }
+            if (!res) {
+                this.draftNum = null
+                return false
+            }
+            // 草稿箱总条数使用 res.Total, 不使用 Content数组的长度
+            this.draftNum = res.Total || null
+        },
         //入草稿箱
         toDrafts() {
             const { conf } = window.__systemConf,

+ 16 - 10
src/components/viewLengend.vue

@@ -5,26 +5,22 @@
 */
 <template>
     <div class='view'>
-        <div v-if='systemName=="土建系统"'>
+        <div v-if='systemName=="土建系统"' style='height:300px'>
             <el-table
-                v-loading='loading'
                 ref='dataTable'
-                :data='viewTable'
+                :data='scpzTable'
                 tooltip-effect='dark'
                 style='width:100%;'
                 :header-cell-style='{background:"rgba(2,91,170,0.1)",fontFamily:"PingFangSC-Medium,PingFang SC;",color:"rgba(0,0,0,0.85);",fontSize:"12px"}'
             >
                 <el-table-column prop label='说明'>
                     <template slot-scope='{row}'>
-                        <span>{{'--'}}</span>
+                        <span>{{(row.Properties && row.Properties.ItemExplain)?row.Properties.ItemExplain:'--'}}</span>
                     </template>
                 </el-table-column>
                 <el-table-column prop label='图例' width='60'>
                     <template slot-scope='{row}'>
-                        <div v-if='row.Url' class='Url-img'>
-                            <img :src='`/serve/topology-wanda/Picture/query/${row.Url}`' alt />
-                        </div>
-                        <div v-else>{{'--'}}</div>
+                        <div class='scpz-img' :style='`background:${row.Properties.FillColor};border:1px solid ${row.Properties.StrokeColor}`'></div>
                     </template>
                 </el-table-column>
             </el-table>
@@ -73,7 +69,8 @@
     </div>
 </template>
 <script>
-import bus from "@/utils/bus.js"
+import bus from '@/utils/bus.js'
+import { mapGetters } from 'vuex'
 export default {
     props: ['viewTable', 'loading', 'remarksText', 'systemName'],
     data() {
@@ -99,6 +96,9 @@ export default {
             })
         }
     },
+    computed: {
+        ...mapGetters(['scpzTable'])
+    },
     mounted() {}
 }
 </script>
@@ -115,6 +115,10 @@ export default {
             margin-left: 8px;
         }
     }
+    .scpz-img {
+        width: 32px;
+        height: 16px;
+    }
     .remark {
         font-size: 12px;
         font-family: MicrosoftYaHeiSemibold;
@@ -142,4 +146,6 @@ export default {
         }
     }
 }
-</style>
+</style>
+
+

+ 1 - 1
src/lib/GraphView.js

@@ -52,7 +52,7 @@ export class GraphView extends SCanvasView {
         canvas.clearRect(0, 0, this.width, this.height);
         canvas.pen.lineWidth = this.lineWidth;
         if (this.lineType == 'dashed') {
-            canvas.pen.lineDash = [10, 10];
+            canvas.pen.lineDash = [10, 2];
         }
         if (this.lineType == 'dotted') {
             canvas.pen.lineDash = [this.lineWidth, this.lineWidth];

+ 2 - 3
src/lib/items/SFHFQZoneLegendItem.js

@@ -1,8 +1,7 @@
-import { SPolygonItem } from "@/components/mapClass/SPolygonItem";
 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 } from '@saga-web/big/lib';
+import { SItemStatus, ItemOrder, SPolygonItem } from '@saga-web/big/lib';
+import { hexify } from "../../components/mapClass/until";
 /**
  *图例节点Item(区域类型 --防火分区)
  *

+ 2 - 3
src/lib/items/SFHFQZoneLegendItem.ts

@@ -1,11 +1,10 @@
 
 import { SGraphItem } from "@saga-web/graph/lib";
-import { SPolygonItem } from "@/components/mapClass/SPolygonItem";
 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 } from '@saga-web/big/lib';
+import { SItemStatus, ItemOrder, SPolygonItem } from '@saga-web/big/lib';
+import { hexify } from "../../components/mapClass/until";
 /**
  *图例节点Item(区域类型 --防火分区)
  *

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

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

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

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

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

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

+ 2 - 3
src/lib/items/SSCPZZoneLegendItem.js

@@ -1,8 +1,7 @@
-import { SPolygonItem } from "@/components/mapClass/SPolygonItem";
 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 } from '@saga-web/big/lib';
+import { SItemStatus, ItemOrder, SPolygonItem } from '@saga-web/big/lib';
+import { hexify } from "../../components/mapClass/until";
 /**
  * 图例节点Item(区域类型 --石材铺装)
  *

+ 2 - 3
src/lib/items/SSCPZZoneLegendItem.ts

@@ -1,11 +1,10 @@
 
 import { SGraphItem } from "@saga-web/graph/lib";
-import { SPolygonItem } from "@/components/mapClass/SPolygonItem";
 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 } from '@saga-web/big/lib';
+import { SItemStatus, ItemOrder, SPolygonItem } from '@saga-web/big/lib';
+import { hexify } from "../../components/mapClass/until";
 /**
  * 图例节点Item(区域类型 --石材铺装)
  *

+ 6 - 0
src/store/index.js

@@ -19,6 +19,7 @@ export default new Vuex.Store({
         fmapID: '',
         haveFengMap: false, //是否有蜂鸟地图的数据
         isMessage: true,
+        scpzTable: [],
     },
     getters: {
         floorsArr: (state) => state.floorsArr,
@@ -28,6 +29,7 @@ export default new Vuex.Store({
         fmapID: (state) => state.fmapID,
         haveFengMap: (state) => state.haveFengMap,
         isMessage: (state) => state.isMessage,
+        scpzTable: (state) => state.scpzTable,
     },
     mutations: {
         // 设置是否登陆校验
@@ -63,6 +65,10 @@ export default new Vuex.Store({
         SETHAVEFENGMAP(state) {
             state.haveFengMap = true
         },
+        // 土建的图例
+        SETSCPZTABLE(state, data) {
+            state.scpzTable = data
+        },
     },
     actions: {
         // 获取项目列表、userId

+ 5 - 5
src/utils/plugins/components.js

@@ -300,16 +300,16 @@ var system = [
                     label: "系统原理图",
                     children: [
                         {
-                            label: "视频监控系统原理图",
-                            id: "RDYL1",
-                            param: { tab_code: "1572", type_code: "2018" },
-                        },
-                        {
                             label: "门禁管理系统原理图",
                             id: "RDYL2",
                             param: { tab_code: "rd01", type_code: "2019" },
                         },
                         {
+                            label: "视频监控系统原理图",
+                            id: "RDYL1",
+                            param: { tab_code: "1572", type_code: "2018" },
+                        },
+                        {
                             label: "BA楼宇智能化系统原理图",
                             id: "RDYL3",
                             param: { tab_code: "1574", type_code: "2010" },

+ 22 - 13
src/views/equipment/eqDialog.vue

@@ -13,7 +13,7 @@
                 />
             </div>
             <!-- 没有tab的页面 -->
-            <div v-if='Object.keys(dialogInfo).length>0 && dialogInfo.children.length==0' style='margin:16px 24px 0 24px'>
+            <div v-if='Object.keys(dialogInfo).length>0 && dialogInfo.children.length==0' style='margin:16px 0 0 24px'>
                 <!-- 原理图 -->
                 <div v-if='dialogInfo.id.slice(2,4)=="YL"' style='width:90%;overflow:hidden'>
                     <rotation :rotationImg='rotationImg'></rotation>
@@ -29,7 +29,7 @@
                 <look-page v-else-if='dialogInfo.id.slice(2,4)=="TZ"' param major></look-page>
             </div>
             <!-- 有tab的页面 -->
-            <div v-else style='margin:16px 24px 0 24px;'>
+            <div v-else style='margin:16px 0 0 24px;height:100%;'>
                 <el-tabs v-model='activeName' @tab-click='handleClick' v-if='Object.keys(dialogInfo).length>0 && dialogInfo.children.length>0'>
                     <el-tab-pane
                         v-for='(value,index) in dialogInfo.children'
@@ -117,7 +117,6 @@ export default {
     methods: {
         //打开弹窗
         showModal(item) {
-            console.log(item)
             this.visible = true
             this.dialogInfo = item
             if (Object.keys(this.dialogInfo).length > 0 && this.dialogInfo.children.length > 0) {
@@ -138,7 +137,6 @@ export default {
                     this.initImage(this.typecode)
                 }
             }
-            //console.log(this.dialogInfo)
             this.param = this.activeName
         },
         //点击tab函数
@@ -154,12 +152,17 @@ export default {
                 this.typecode = this.dialogInfo.children[`${tab.index}`].param.type_code
                 this.diff = this.dialogInfo.children[`${tab.index}`].param.diff
             }
-            if (this.dialogInfo.children[0].id.slice(2, 4) == 'YL' && this.typecode != 'FBT') {
+            if (this.dialogInfo.children[0].id.slice(2, 4) == 'YL' && this.typecode.slice(0, 3) != 'FBT') {
                 this.initImage(this.typecode)
             }
-           
+            if (this.dialogInfo.children[0].id.slice(2, 4) == 'YL' && this.typecode.slice(0, 3) == 'FBT') {
+                this.$nextTick(() => {
+                    this.$refs.fenbutu[0] && this.$refs.fenbutu[0].openFloorMap()
+                })
+            }
             this.tabLabel = tab.label
         },
+
         visibalBox() {
             this.$refs.Dialog.open(this.dialogInfo.id)
         },
@@ -200,7 +203,6 @@ export default {
             if (this.systemName == '供电系统') {
                 getParams.system = '1001'
             }
-            console.log(getParams)
             queryPic({ getParams }).then(res => {
                 this.rotationImg = res.data || []
             })
@@ -236,7 +238,6 @@ export default {
             }
             queryTab({ data, postParams }).then(res => {
                 this.tabCount = []
-                console.log('res', res)
                 let data = res.data.data || []
                 data.forEach(el => {
                     this.tabCount.push({
@@ -298,6 +299,10 @@ export default {
     .el-tabs__nav-wrap::after {
         height: 0;
     }
+    .el-tabs,
+    .el-tabs__content {
+        height: calc(100% - 45px);
+    }
     .el-tabs__item {
         padding: 5px 16px;
         height: 30px;
@@ -308,12 +313,9 @@ export default {
         border: 1px solid rgba(195, 199, 203, 1);
     }
     .el-tab-pane {
-        height: 60% !important;
-    }
-    .el-tabs,
-    .el-tabs__content {
-        height: 700px;
+        height: 100% !important;
     }
+
     .el-tabs__active-bar {
         background-color: transparent !important;
     }
@@ -370,4 +372,11 @@ export default {
         }
     }
 }
+@media screen and (max-width: 1366px) {
+    /*当屏幕尺寸小于1366px时,应用下面的CSS样式*/
+    .el-tabs,
+    .el-tabs__content {
+        height: 700px;
+    }
+}
 </style>

+ 20 - 13
src/views/equipment/fenbuPic.vue

@@ -5,8 +5,8 @@
             <Legend :floors='floors' type='0' :categoryId='`${typecode=="FBT1"?"FZQZL":"XFBFYCFL"}`'></Legend>
         </div>
         <floor-list v-if='floors.length>0' :floorsArr='floors' :type='1' @emitFloor='emitFloor' :id='"floor"'></floor-list>
-        <div v-if='floors.length>0'>
-            <floorMap ref='floorMap' :loadName='""' :categoryId='`${typecode=="FBT1"?"FZQZL":"XFBFYCFL"}`' :type='"floor"'></floorMap>
+        <div v-show='floors.length>0' class='canvas-box'>
+            <floorMap ref='floorMap' :modalHeight='modalHeight' :loadName='""' :categoryId='`${typecode=="FBT1"?"FZQZL":"XFBFYCFL"}`' :type='"floor"'></floorMap>
         </div>
         <div class='nodata' v-show='floors.length==0'>
             <img class='img1' src='@/assets/imgs/wtp.png' alt />
@@ -30,16 +30,23 @@ export default {
             },
             loadName: '',
             type: '',
-            floors: []
+            floors: [],
+            modalHeight: 500,   //适配底图
         }
     },
     props: ['typecode'],
     computed: {
         ...mapGetters(['floorsArr'])
     },
+    mounted() {
+        if (window.screen.width > 1366) {
+            this.modalHeight = 700
+        } else {
+            this.modalHeight = 500
+        }
+    },
     methods: {
         emitFloor(item) {
-            console.log(item)
             this.floorInfo = item
             this.$refs.floorMap.init(this.floorInfo.gname)
         },
@@ -60,8 +67,8 @@ export default {
                 postParams.Filters = `projectId =${this.$store.state.plazaId};categoryId='XFBFYCFL';isPub=true`
             }
             let floor = []
+            this.floors = []
             queryPics({ postParams }).then(res => {
-                console.log(res)
                 if (res.Total == 0) {
                     this.floors = []
                 } else {
@@ -69,7 +76,6 @@ export default {
                     this.floorsArr.forEach(el => {
                         floor.forEach(ele => {
                             if (ele.FloorId == el.gname) {
-                                console.log(el)
                                 this.floors.push({
                                     gname: el.gname,
                                     gcode: el.gcode,
@@ -81,20 +87,17 @@ export default {
                         })
                     })
                 }
-                console.log(this.floors)
                 this.floorInfo = this.floors[0]
-                console.log(this.floorInfo.gname)
-                this.$refs.floorMap.init(this.floorInfo.gname)
                 this.init()
             })
         },
         init() {
             this.loadName = `${this.floorInfo.code}`
+        },
+        openFloorMap() {
+            this.getFloorData()
+            this.$refs.floorMap.init(this.floorInfo.gname)
         }
-    },
-    mounted() {
-        console.log(this.floorsArr)
-        this.getFloorData()
     }
 }
 </script>
@@ -110,6 +113,10 @@ export default {
         right: 32px;
         top: 155px;
     }
+    .canvas-box {
+        width: 100%;
+        height: 100%;
+    }
     .nodata {
         height: calc(100%-50px);
         .img1 {

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

@@ -25,9 +25,9 @@
                     </div>
                     <div class='eq-content'>
                         <div class='legend-boxs'>
-                            <Legend :systemName='systemName' :categoryId='categoryId' :floors='floorsArr' type='1'></Legend>
+                            <Legend :systemName='systemName' :floors='floorsArr' type='1' :editTips='`编辑${floorInfo.code}层${systemName}平面图`'></Legend>
                         </div>
-                        <floorMap ref='floorMap' :id='"equip"' :loadName='loadName' :categoryId='categoryId' :type='"system"'></floorMap>
+                        <floorMap ref='floorMap' :id='"equip"' :loadName='loadName' :type='"system"'></floorMap>
                         <div class='additional-box' v-if='fqPic.length>0'>
                             <div class='additional' @click='additionalColl'>
                                 <img src='../../assets/imgs/bg.png' alt />
@@ -87,6 +87,7 @@ export default {
             this.systemName = item.name
             this.smsxt = item.smsxt
             this.$cookie.set('categoryId', item.categoryId, 3)
+            this.$refs.floorMap.init(this.floorInfo.gname)
             if (this.smsxt == '1003' || this.smsxt == '1004') {
                 this.Index()
             }
@@ -223,6 +224,7 @@ export default {
             .eq-right-bottom {
                 display: flex;
                 flex: 1;
+                height: 100%;
                 .title-box {
                     position: fixed;
                     z-index: 2;

+ 2 - 2
src/views/equipment/table/djspTable.vue

@@ -32,8 +32,8 @@
             <el-table-column prop='meterbox' label='商铺电表数' width='200'>
                 <template slot-scope='{row}'>{{row.meterbox || '--'}}</template>
             </el-table-column>
-            <el-table-column prop='shopsnum' label='商铺编号' width='200'>
-                <template slot-scope='{row}'>{{row.shopsnum || '--'}}</template>
+            <el-table-column prop='shopsnum' label='商铺编号' >
+                <template slot-scope='{row}'>{{row.shopsnumList || '--'}}</template>
             </el-table-column>
         </el-table>
         <div class='foot'></div>

+ 6 - 12
src/views/equipment/table/eqListTable.vue

@@ -33,19 +33,19 @@
         </div>
         <el-table :data='tableData' style='width: 100%' :border='true' @row-click='rowHandle'>
             <el-table-column type='index' label='序号' width='50'></el-table-column>
-            <el-table-column prop='type_name' label='设备名称' show-overflow-tooltip resizable width='160'>
+            <el-table-column prop='type_name' label='设备名称' show-overflow-tooltip resizable width="150">
                 <template slot-scope='{row}'>{{row.type_name || '--'}}</template>
             </el-table-column>
-            <el-table-column prop='sl' label='数量' width='100'>
+            <el-table-column prop='sl' label='数量'  width="100">
                 <template slot-scope='{row}'>{{row.sl>=0?row.sl:'--'}}</template>
             </el-table-column>
-            <el-table-column prop='brand' label='品牌'>
+            <el-table-column prop='brand' label='品牌' width="120">
                 <template slot-scope='{row}'>{{row.brand || '--'}}</template>
             </el-table-column>
-            <el-table-column prop='sbxh' label='型号' show-overflow-tooltip resizable>
+            <el-table-column prop='sbxh' label='型号' show-overflow-tooltip resizable width="150">
                 <template slot-scope='{row}'>{{row.sbxh || '--'}}</template>
             </el-table-column>
-            <el-table-column prop='floorcode' label='楼层' width='100'>
+            <el-table-column prop='floorcode' label='楼层' width="100">
                 <template slot-scope='{row}'>{{row.floorcode || '--'}}</template>
             </el-table-column>
             <el-table-column prop='wzjc' label='安装位置' show-overflow-tooltip resizable>
@@ -82,16 +82,10 @@ export default {
     components: { Select, EqDetail },
     data() {
         return {
-            dataSelect2: [
-                { id: 'test1', name: '选择项' },
-                { id: 'test2', name: '单平米' },
-                { id: 'test3', name: '下级分项' },
-                { id: 'test4', name: '滑动平均滑动平均' }
-            ],
             tableData: [],
             total: 0,
             currentPage: 1,
-            size: 10,
+            size: 12,
             innerVisible: false, //详情弹框
             keyword: '',
             manufacturer: '',

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

@@ -95,7 +95,7 @@ export default {
             formatter,
             number_format,
             currentPage: 1,
-            size: 10,
+            size: 12,
             keyword: '',
             handleresults: '',
             handledate: '',

+ 5 - 5
src/views/equipment/table/standTable.vue

@@ -33,17 +33,17 @@
         </div>
         <el-table :data='tableData' :border='true' style='width: 100%' @row-click='rowHandle'>
             <el-table-column type='index' label='序号' width='80'></el-table-column>
-            <el-table-column prop label='设备名称' show-overflow-tooltip resizable>
+            <el-table-column prop label='设备名称' show-overflow-tooltip resizable width='150'>
                 <template slot-scope='{row}'>{{row.type_name || '--'}}</template>
             </el-table-column>
             <!-- sbjc -->
             <el-table-column prop='sl' label='数量' width='100'>
                 <template slot-scope='{row}'>{{row.sl>=0?row.sl:'--'}}</template>
             </el-table-column>
-            <el-table-column prop='brand' label='品牌'>
+            <el-table-column prop='brand' label='品牌' width='120'>
                 <template slot-scope='{row}'>{{row.brand || '--'}}</template>
             </el-table-column>
-            <el-table-column prop='sbxh' label='型号' show-overflow-tooltip resizable>
+            <el-table-column prop='sbxh' label='型号' show-overflow-tooltip resizable width='150'>
                 <template slot-scope='{row}'>{{row.sbxh || '--'}}</template>
             </el-table-column>
             <el-table-column prop='floor' label='楼层' width='100'>
@@ -84,7 +84,7 @@ export default {
             tableData: [],
             total: 0,
             currentPage: 1,
-            size: 11,
+            size: 13,
             keyword: '',
             floor: '',
             row: {},
@@ -132,7 +132,7 @@ export default {
             }
             //下拉
             if (this.floor) {
-                data.gname = this.floor
+                postParams.gname = this.floor
             }
             //输入框搜索
             data.keyword = ''

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

@@ -13,12 +13,12 @@
             ></el-input>
             <el-input clearable placeholder='搜索品牌' size='small' @blur='getList' prefix-icon='el-icon-search' v-model='brand' style='width:192px'></el-input>
         </div>
-        <el-table :data='tableData' style='width: 100%'>
+        <el-table :data='tableData' style='width: 100%' :border='true'>
             <el-table-column type='index' label='序号' width='80'></el-table-column>
-            <el-table-column prop='category' label='类别' width='160'>
+            <el-table-column prop='category' label='类别'  show-overflow-tooltip resizable>
                 <template slot-scope='{row}'>{{row.category || '--'}}</template>
             </el-table-column>
-            <el-table-column prop='sl' label='数量' width='100'>
+            <el-table-column prop='sl' label='数量' >
                 <template slot-scope='{row}'>{{row.sl>=0?row.sl:'--'}}</template>
             </el-table-column>
             <el-table-column prop='brand' label='品牌'>
@@ -51,7 +51,7 @@ export default {
             tableData: [],
             total: 0,
             currentPage: 1,
-            size: 11,
+            size: 13,
             lb: '',
             brand: ''
         }

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

@@ -62,7 +62,7 @@
             </div>
             <input-dialog :type='2' @confirm='confirm'></input-dialog>
         </div>
-        <el-table :data='tableData' style='width: 100%'>
+        <el-table :data='tableData' :border='true' style='width: 100%'>
             <el-table-column type='index' label='序号' width='80'></el-table-column>
             <el-table-column prop='sbmc' label='设备名称' show-overflow-tooltip resizable>
                 <template slot-scope='{row}'>{{row.sbmc || '--'}}</template>
@@ -135,7 +135,7 @@ export default {
             tableData: [],
             total: 0,
             currentPage: 1,
-            size: 10,
+            size: 12,
             sjjssj: '',
             reportdate: '',
             ischange: '',

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

@@ -143,7 +143,7 @@ export default {
             tableData: [],
             total: 0,
             currentPage: 1,
-            size: 10,
+            size: 12,
             reportdate: '',
             sjjssj: '',
             ischange: '',

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

@@ -62,10 +62,10 @@
         </div>
         <el-table :data='tableData' :border='true' style='width: 100%'>
             <el-table-column type='index' label='序号'></el-table-column>
-            <el-table-column prop='nd' label='年度' show-overflow-tooltip resizable>
+            <el-table-column prop='nd' label='年度' show-overflow-tooltip resizable width="80">
                 <template slot-scope='{row}'>{{row.nd || '--'}}</template>
             </el-table-column>
-            <el-table-column prop='qs' label='期数' show-overflow-tooltip resizable>
+            <el-table-column prop='qs' label='期数' show-overflow-tooltip resizable width="80">
                 <template slot-scope='{row}'>{{row.qs || '--'}}</template>
             </el-table-column>
             <el-table-column prop='lb' label='类别' show-overflow-tooltip resizable>
@@ -74,7 +74,7 @@
             <el-table-column prop='xm' label='项目' show-overflow-tooltip resizable>
                 <template slot-scope='{row}'>{{row.xm || '--'}}</template>
             </el-table-column>
-            <el-table-column prop='sl' label='数量' show-overflow-tooltip resizable>
+            <el-table-column prop='sl' label='数量' show-overflow-tooltip resizable width="100">
                 <template slot-scope='{row}'>{{row.sl>=0?row.sl:'--'}}</template>
             </el-table-column>
             <el-table-column prop='ssfasm' label='实施方案说明' show-overflow-tooltip resizable>
@@ -129,7 +129,7 @@ export default {
             yssjwcsj: '',
             lxsjwcsj: '',
             ssfasm: '',
-            size: 10,
+            size: 12,
             keyword: '',
             nd: '',
             lb: '',

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

@@ -5,7 +5,7 @@
         </div>
         <!-- 图例 -->
         <div class='legend-boxs'>
-            <Legend :floors='floorsArr' type='1'></Legend>
+            <Legend :floors='floorsArr' type='1' :editTips='`编辑${floorInfo.code}层楼层功能平面图`'></Legend>
         </div>
         <floor-list v-if='floorsArr.length>0' :floorsArr='floorsArr' :type='1' @emitFloor='emitFloor' :id='"floor"'></floor-list>
         <!-- <div class='additional-box'>

+ 29 - 28
src/views/legendLibrary/addForm.vue

@@ -101,6 +101,9 @@
                         :data='deviceList'
                         @change='treeConfirmDevice'
                         :hideClear='true'
+                        :lastStage='true'
+                        :selectedIds='InfosList'
+                        :notNull='true'
                     />
                 </span>
                 <TreeSelect
@@ -114,7 +117,8 @@
                     @change='treeConfirm'
                     @focusChange='focusChange'
                     :hideClear='true'
-                    :selectedIds='selectedIds'
+                    :selectedIds='InfoTypeIdList'
+                    :lastStage='true'
                 />
             </div>
         </div>
@@ -195,10 +199,14 @@ export default {
 
             // majorList: [], //专业
             deviceList: [],
-            key: 1
+            key: 1,
+            InfoLocals: undefined, //工程信息化
+            // InfoSystems: undefined, //工程信息化专业/系统
+            InfoTypeIds: undefined //铺位可视化typeid
         }
     },
-    props: ['ruleForm', 'title'],
+    props: ['ruleForm', 'title', 'InfosList', 'InfoTypeIdList'],
+
     methods: {
         //业下设备分类和位置分类树形结构
         initQueryDeviceAndPOsition() {
@@ -208,7 +216,7 @@ export default {
             })
         },
         handleRemove(file, fileList) {
-            console.log(file, fileList, 'file')
+            // console.log(file, fileList, 'file')
             this.ruleForm.Url = ''
         },
         getFile(file) {
@@ -259,6 +267,7 @@ export default {
             let postParams = {
                 Content: [this.ruleForm]
             }
+
             updateLegend({ postParams }).then(res => {
                 if (res.Result == 'success') {
                     this.$message.success('图例修改成功!')
@@ -294,17 +303,6 @@ export default {
         },
         //rgba转成16进制
         hexify(color) {
-            console.log(color, 'color')
-            // var values = color
-            //     .replace(/rgba?\(/, '')
-            //     .replace(/\)/, '')
-            //     .replace(/[\s+]/g, '')
-            //     .split(',')
-            // var a = parseFloat(values[3] || 1),
-            //     r = Math.floor(a * parseInt(values[0]) + (1 - a) * 255),
-            //     g = Math.floor(a * parseInt(values[1]) + (1 - a) * 255),
-            //     b = Math.floor(a * parseInt(values[2]) + (1 - a) * 255),
-            //     opacity = ''
             var opacity = ''
             var rgb = color.split(',')
             var r = parseInt(rgb[0].split('(')[1])
@@ -376,10 +374,7 @@ export default {
                     break
             }
             var hex = '#' + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1) + opacity
-            console.log(hex, 'hrc')
             return hex
-
-            // return '#' + ('0' + r.toString(16)).slice(-2) + ('0' + g.toString(16)).slice(-2) + ('0' + b.toString(16)).slice(-2) + opacity
         },
         // 背景颜色改变
         changBgColor(val) {
@@ -462,20 +457,26 @@ export default {
 
         //位置/设备
         treeConfirmDevice(id, info) {
+            console.log(id)
             // this.$set(this.ruleForm, 'InfoLocal', data)
             let InfoSystem = []
             let InfoLocal = []
-            for (let i = 0; i < info.length; i++) {
-                let type = info[i]
-                if (type.name.includes('/')) {
-                    InfoLocal.push(type)
-                    //位置/设备
-                    this.$set(this.ruleForm, 'InfoLocal', InfoLocal)
-                } else {
-                    InfoSystem.push(type)
-                    //专业
-                    this.$set(this.ruleForm, 'InfoSystem', InfoSystem)
+            if (info && info.length > 0) {
+                for (let i = 0; i < info.length; i++) {
+                    let type = info[i]
+                    if (type.name.includes('/')) {
+                        InfoLocal.push(type)
+                        //位置/设备
+                        this.$set(this.ruleForm, 'InfoLocal', InfoLocal)
+                    } else {
+                        InfoSystem.push(type)
+                        //专业
+                        this.$set(this.ruleForm, 'InfoSystem', InfoSystem)
+                    }
                 }
+            } else {
+                this.$set(this.ruleForm, 'InfoLocal', [])
+                this.$set(this.ruleForm, 'InfoSystem', [])
             }
         },
         focusChange(status) {

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

@@ -2,7 +2,15 @@
     <div class='add-legend'>
         <el-dialog :title='title' :visible.sync='dialogVisible'>
             <!-- <add-list v-show='title=="" && GraphCategoryId' ref='searchList' :GraphCategoryId='GraphCategoryId' @mesg='mesg'></add-list> -->
-            <add-form ref='add' :ruleForm='info' @addSuccess='addSuccess' @updateSuccess='updateSuccess' :title='title'></add-form>
+            <add-form
+                ref='add'
+                :InfosList='InfosList'
+                :InfoTypeIdList='InfoTypeIdList'
+                :ruleForm='info'
+                @addSuccess='addSuccess'
+                @updateSuccess='updateSuccess'
+                :title='title'
+            ></add-form>
             <span slot='footer' class='dialog-footer'>
                 <el-button @click='dialogVisible = false,cancal()' size='small'>取 消</el-button>
                 <el-button type='primary' @click='save' size='small'>确 定</el-button>
@@ -33,6 +41,9 @@ export default {
     data() {
         return {
             dialogVisible: false,
+            InfoTypeIdList: [],
+            InfosList: [],
+
             info: {
                 Name: '',
                 Type: 'None',
@@ -78,6 +89,8 @@ export default {
                 }
             } else if (title == '添加图例库') {
                 this.dialogVisible = true
+                this.InfoTypeIdList = []
+                this.InfosList = []
                 this.info = {
                     Name: '',
                     Type: 'None',
@@ -92,6 +105,13 @@ export default {
             } else if (title == '修改图例库') {
                 this.dialogVisible = true
                 this.info = row
+                this.InfosList = []
+                this.InfoTypeIdList = []
+
+                // this.InfosList = [...row.InfoLocal.map(({ id }) => id), ...row.InfoSystem]
+                this.InfosList = [...row.InfoLocal.map(({ id }) => id)]
+                this.InfoTypeIdList = row.InfoTypeId
+                console.log(this.InfosList, this.InfoTypeIdList)
                 console.log(this.info)
                 // 图例库规则中的transform
             } else if (title == '' && this.$refs.searchList) {
@@ -117,6 +137,9 @@ export default {
                 InfoLocal: [], //工程信息化位置与设备分类
                 InfoSystem: [] //工程信息化专业/系统
             }
+            this.InfoTypeIdList = []
+            this.InfosList = []
+
             this.$refs.add.fileList = []
         },
         mesg() {

+ 12 - 12
src/views/legendLibrary/index.vue

@@ -1,17 +1,15 @@
 <template>
     <div class='legend-library'>
-        <div class='nav'>
+        <!-- <div class='nav'>
             <img class='img-menu' src='@/assets/imgs/menu.png' alt />
             <el-divider direction='vertical'></el-divider>
             <img class='img-logo' src='@/assets/imgs/logo_tu.png' alt />
             <span class='nav-span1'>万达管理说明书</span>
             <span class='circular'></span>
-            <!-- <span style='color:#1F2329'>图例库管理</span>
-            <i class='el-icon-caret-bottom'></i>-->
             <Dropdown v-model='selVal' :data='dataSelect'>
                 <span style=' font-size: 14px;color: #1f2329 ;'>{{selText}}</span>
             </Dropdown>
-        </div>
+        </div>-->
         <div class='legend-library-top'>
             图例库管理
             <span class='library-btn'>
@@ -40,6 +38,7 @@
                     :returnParentNode='false'
                     :isShowAllChoice='true'
                     :choseArea='true'
+                    :lastStage='true'
                     :data='positionSelect'
                     @change='treeConfirmPosition'
                     :hideClear='true'
@@ -54,6 +53,7 @@
                         :returnParentNode='true'
                         :choseArea='true'
                         :data='deviceList'
+                        :lastStage='true'
                         :hideClear='true'
                         @change='treeConfirmDevice'
                     />
@@ -81,6 +81,7 @@
                     :choseArea='true'
                     :data='typeVisualization'
                     @change='treeConfirm'
+                    :lastStage='true'
                     @focusChange='focusChange'
                     :hideClear='true'
                 />
@@ -98,35 +99,35 @@
                 <el-input size='small' @change='getTableList' prefix-icon='el-icon-search' v-model='keyword' style='width:192px;margin-right:12px;'></el-input>
             </div>
             <el-table :data='tableData' :key='key' :border='true' style='width: 100%'>
-                <el-table-column prop='Name' label='图例名称'>
+                <el-table-column prop='Name' label='图例名称' width='120'>
                     <template slot-scope='{row}'>{{row.Name }}</template>
                 </el-table-column>
-                <el-table-column prop='style' label='图例样式'>
+                <el-table-column prop='style' label='图例样式' width='150'>
                     <template slot-scope='{row}'>
                         <img class='img' :src='`/serve/topology-wanda/Picture/query/${row.Url}`' alt />
                     </template>
                 </el-table-column>
-                <el-table-column prop='Unit' label='单位'>
+                <el-table-column prop='Unit' label='单位' width='120'>
                     <template slot-scope='{row}'>{{row.Unit}}</template>
                 </el-table-column>
-                <el-table-column prop='position' label='对应广场说明书的位置'>
+                <el-table-column prop='position' label='对应广场说明书的位置' show-overflow-tooltip>
                     <template slot-scope='{row}'>
                         <span v-for='item in row.GraphCategorys ' :key='item.Name'>{{item.Name}}</span>
                     </template>
                 </el-table-column>
                 <el-table-column label='对应工程信息化' align='center'>
-                    <el-table-column prop='type' label='位置/设备分类' width='240' :show-overflow-tooltip='true'>
+                    <el-table-column prop='type' label='位置/设备分类' show-overflow-tooltip>
                         <template slot-scope='{row}'>
                             <span v-for='item in row.InfoLocal ' :key='item.name'>{{item.name}}</span>
                         </template>
                     </el-table-column>
-                    <el-table-column prop='system' label='专业' :show-overflow-tooltip='true'>
+                    <el-table-column prop='system' label='专业' show-overflow-tooltip width='120'>
                         <template slot-scope='{row}'>
                             <span v-for='(item,index) in row.InfoSystems ' :key='index'>{{item.Name}}</span>
                         </template>
                     </el-table-column>
                 </el-table-column>
-                <el-table-column prop='typeId' resizable label='铺位可视化typeid' width='140' :show-overflow-tooltip='true'>
+                <el-table-column prop='typeId' resizable label='铺位可视化typeid' width='140' show-overflow-tooltip>
                     <template slot-scope='{row}'>
                         <span v-for='(item,index) in row.InfoTypes ' :key='index'>{{item.Name}}</span>
                     </template>
@@ -444,7 +445,6 @@ export default {
                 this.key++
                 // this.tableData = res.Content
                 this.total = res.Total
-                console.log(res.Content)
                 this.tableData = res.Content.map(i => {
                     if (i.FillColor.length == '9') {
                         i.FillColor = hexToRgba(i.FillColor)

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

@@ -1,20 +1,27 @@
 <template>
     <!-- 图例库首页 -->
     <div class='legend-rules'>
-        <div class='nav'>
+        <!-- <div class='nav'>
             <img class='img-menu' src='@/assets/imgs/menu.png' alt />
             <el-divider direction='vertical'></el-divider>
             <img class='img-logo' src='@/assets/imgs/logo_tu.png' alt />
             <span style='color:#1F2329'>万达管理说明书</span>
             <span class='circular'></span>
-            <!-- <span style='color:#1F2329'>图例绘制规则</span>
-            <i class='el-icon-caret-bottom'></i>-->
             <Dropdown v-model='selVal' :data='dataSelect'>
                 <span style=' font-size: 14px;color: #1f2329 ;'>{{selText}}</span>
             </Dropdown>
-        </div>
+        </div>-->
         <div class='legend-rules-top'>
-            图例绘制规则
+            <span
+                class='el-icon-arrow-left'
+                @click='goBack'
+                style='float: left;
+                        cursor: pointer;
+                        font-size: 25px;
+                        display: inline-block;
+                        margin-top: 10px;
+                        padding-left: 20px;'
+            ></span>图例绘制规则
             <el-button type='primary' class='rules-button' size='small' @click='add'>添加图例</el-button>
         </div>
         <div class='legend-rules-bottom'>
@@ -135,6 +142,9 @@ export default {
         }
     },
     methods: {
+        goBack() {
+            this.$router.push({ path: 'legendLibrary' })
+        },
         buttonClickHandle(obj) {
             let index = Number(obj.item.index.split('-')[1])
             let _this = this