YaolongHan hace 4 años
padre
commit
d7c07eb204

+ 2 - 2
package.json

@@ -3,7 +3,7 @@
   "version": "0.1.4",
   "remote": {
     "host": "39.102.40.239",
-    "path": "/opt/apps/web",
+    "path": "/opt/apps/web/persagyTopo",
     "user": "publish",
     "password": "1qaz2wsx",
     "local": "persagyTopo"
@@ -52,4 +52,4 @@
     "vue-template-compiler": "^2.6.11",
     "node-ssh": "^6.0.0"
   }
-}
+}

+ 23 - 2
src/components/editClass/big-edit/BigEditFactory.ts

@@ -23,8 +23,8 @@
  *
  * *********************************************************************************************************************
  */
-import { SBaseLineEdit, SBaseTextEdit, SBaseImageEdit, SBaseRectEdit, SBasePolygonEdit } from "./../edit";
-import { Marker, SBaseExpainEdit } from "./"
+import { SBaseLineEdit, SBaseTextEdit, SBaseImageEdit, SBaseRectEdit, SBasePolygonEdit, SBaseCircleEdit } from "./../edit";
+import { Marker, SBaseExpainEdit, SBaseArrow } from "./"
 import { SItemFactory } from "@persagy-web/big"
 /**
  * item创建工厂
@@ -81,6 +81,16 @@ export class BigEditFactory extends SItemFactory {
     } // Function createBaseRectEdit()
 
     /**
+     * 创建基础圆
+     *
+     * @param   data    Marker数据
+     * @return  圆item
+     * */
+    createBaseCircleEdit(data: Marker): SBaseCircleEdit {
+        return new SBaseCircleEdit(null, data);
+    } // Function createBaseRectEdit()
+
+    /**
      * 创建基础注释
      *
      * @param   data    Marker数据
@@ -99,4 +109,15 @@ export class BigEditFactory extends SItemFactory {
     createBasePolygonEdit(data: Marker): SBasePolygonEdit {
         return new SBasePolygonEdit(null, data);
     } // Function createBasePolygonEdit()
+
+    /**
+     * 创建基础基础箭头(折线)
+     *
+     * @param   data    Marker数据
+     * @return  注释item
+     */
+    createBaseArrow(data: Marker): SBaseArrow {
+        return new SBaseArrow(null, data);
+    } // Function createBasePolygonEdit()
+
 } // Class SItemFactory

+ 5 - 2
src/components/editClass/big-edit/SBaseEditScene.ts

@@ -1,10 +1,10 @@
 import { SGraphEditScene, SGraphAddCommand } from "../edit"
 import { SMouseEvent } from "@persagy-web/base/lib";
-import { SPoint, SFont, SColor, SRect } from '@persagy-web/draw/lib';
+import { SPoint, SFont, SColor, SRect, SArrowStyleType } from '@persagy-web/draw/lib';
 import { SRectSelectItem, SItemStatus } from '@persagy-web/big/lib';
 import { SGraphItem, SGraphSelectContainer } from "@persagy-web/graph/";
 import { uuid } from "./until";
-import { SBaseExpainEdit, SBaseArrow, SBaseEquipment, SBasePipeUninTool,addBasePipe } from "./"
+import { SBaseExpainEdit, SBaseArrow, SBaseEquipment, SBasePipeUninTool, addBasePipe } from "./"
 export class SBaseEditScene extends SGraphEditScene {
 
     /**图例节点 */
@@ -71,6 +71,9 @@ export class SBaseEditScene extends SGraphEditScene {
             },
             style: {
                 outLine: [{ x: event.x, y: event.y }],
+                begin: SArrowStyleType.None,  //开端箭头样式
+                end: SArrowStyleType.None,    //结尾箭头样式
+                isMove: true,                 //是否可以移动
                 default: {
                 }
             }

+ 9 - 2
src/components/editClass/big-edit/items/SBaseArrow.ts

@@ -25,7 +25,7 @@
  */
 import { SColor, SFont, SPainter, SArrowStyleType } from "@persagy-web/draw/";
 import { SBasePolylineEdit } from './../../edit';
-import { SGraphItem,SLineStyle } from "@persagy-web/graph";
+import { SGraphItem, SLineStyle } from "@persagy-web/graph";
 import { Marker } from "./../types/Marker";
 import { SMouseEvent } from "@persagy-web/base/lib";
 import { ItemOrder } from '@persagy-web/big/lib';
@@ -59,7 +59,12 @@ export class SBaseArrow extends SBasePolylineEdit {
     }
     constructor(parent: SGraphItem | null, data: Marker) {
         super(parent, data);
-        this.begin = SArrowStyleType.Basic
+        this.data = data;
+        // 设置箭头
+        if (data && data.style) {
+            this.begin = data.style.begin ? data.style.begin : SArrowStyleType.None;
+            this.end = data.style.end ? data.style.end : SArrowStyleType.None
+        }
     }
     /**
      * 鼠标按下事件
@@ -112,6 +117,8 @@ export class SBaseArrow extends SBasePolylineEdit {
     * @return	formData
     */
     toData(): any {
+        this.data.style.begin = this.begin;
+        this.data.style.end = this.end;
         return super.toData()
     }
 }

+ 2 - 1
src/components/editClass/big-edit/items/SBaseEquipment.ts

@@ -27,10 +27,11 @@ import { SColor, SLine, SPainter, SPoint, SRect } from "@persagy-web/draw/";
 import { SGraphItem, SGraphSvg } from "@persagy-web/graph";
 import { SGraphEdit } from '../../edit/';
 import { Marker } from "./../types/Marker";
+
 /**
  * 编辑基础设备类
  *
- * * @author  haojianlong
+ * @author han_yao_long@163.com
  */
 export class SBaseEquipment extends SGraphEdit {
     /**编辑相关操作的数据 */

+ 2 - 2
src/components/editClass/edit/SGraphEditScene.ts

@@ -28,7 +28,7 @@ import { SGraphScene, SGraphItem } from "@persagy-web/graph";
 import { SPoint } from "@persagy-web/draw";
 import { SMouseEvent, SUndoStack, } from "@persagy-web/base";
 import { SRectSelectItem, SItemStatus } from "@persagy-web/big";
-import { SBaseArrowEdit,SBasePolygonEdit, SBaseCircleEdit, SBaseLineEdit, SGraphAddCommand, SGraphEdit, SBasePolylineEdit, SBaseTextEdit, SBaseImageEdit, SBaseRectEdit, SBaseTriangleEdit } from './'
+import { SBaseArrowEdit, SBasePolygonEdit, SBaseCircleEdit, SBaseLineEdit, SGraphAddCommand, SGraphEdit, SBasePolylineEdit, SBaseTextEdit, SBaseImageEdit, SBaseRectEdit, SBaseTriangleEdit } from './'
 
 /**
  * Graphy图形引擎编辑场景类
@@ -99,8 +99,8 @@ export class SGraphEditScene extends SGraphScene {
                 type: "BaseLine"           // 自定义类型用于区分mark与node
             },
             style: {
+                line: [{ x: event.x, y: event.y }],
                 default: {
-                    line: [{ x: event.x, y: event.y }],
                 }
             }
         }

+ 13 - 6
src/components/editClass/edit/items/SBaseCircleEdit.ts

@@ -123,15 +123,20 @@ export class SBaseCircleEdit extends SGraphEdit {
   constructor(parent: SGraphItem | null, data: Marker) {
     super(parent);
     this.data = data;
-    if (data.style && data.style.default) {
+    if (data.style) {
       // 关于顶点
-      if (data.style.default.line) {
+      if (data.style.line) {
         let setPointList: SPoint[];
-        setPointList = data.style.default.line.map(i => {
-          return new SPoint(i.X, i.Y)
+        setPointList = data.style.line.map(i => {
+          return new SPoint(i.x, i.y)
         });
         this.line = setPointList;
+        this.calRect()
+        console.log('this.line',this.line)
       }
+    }
+    if (data.style && data.style.default) {
+
       // 颜色
       if (data.style.default.strokeColor) {
         this.strokeColor = new SColor(data.style.default.strokeColor)
@@ -325,10 +330,11 @@ export class SBaseCircleEdit extends SGraphEdit {
    */
   toData(): any {
     const Line = [{ x: this.line[0].x, y: this.line[0].y }, { x: this.line[1].x, y: this.line[1].y }];
-    this.data.style.default.line = Line;
+    this.data.style.line = Line;
     this.data.style.default.lineWidth = this.lineWidth;
     this.data.style.default.lineStyle = this.lineStyle;
-    this.data.style.default.strokeColor = this.strokeColor;
+    this.data.style.default.strokeColor = this.strokeColor.value;
+    this.data.style.default.fillColor = this.fillColor.value;
     return this.data
   }
 
@@ -339,6 +345,7 @@ export class SBaseCircleEdit extends SGraphEdit {
    */
   onDraw(painter: SPainter): void {
     if (this.line.length == 2) {
+      this.calRect()
       painter.pen.color = this.strokeColor;
       painter.brush.color = this.fillColor;
       painter.pen.lineWidth = this.lineWidth;

+ 3 - 0
src/components/editClass/edit/items/SBaseImageEdit.ts

@@ -247,6 +247,9 @@ export class SBaseImageEdit extends SGraphEdit {
                 height,
             }
         }
+
+        this.data.pos.x = this.pos.x;
+        this.data.pos.y = this.pos.y;
         this.data.style.default.zorder = this.zOrder;
         this.data.style.default.url = this.url;
         this.data.style.default.lineWidth = this.lineWidth;

+ 6 - 3
src/components/editClass/edit/items/SBaseLineEdit.ts

@@ -165,15 +165,18 @@ export class SBaseLineEdit extends SGraphEdit {
         super(parent);
         this.showSelect = false;
         this.data = data;
-        if (data.style && data.style.default) {
+        if (data.style) {
             // 关于顶点
-            if (data.style.default.line) {
+            if (data.style.line) {
                 let setPointList: SPoint[];
-                setPointList = data.style.default.line.map(i => {
+                setPointList = data.style.line.map(i => {
                     return new SPoint(i.x, i.y)
                 });
                 this.line = setPointList;
             }
+        }
+        if (data.style && data.style.default) {
+
             // 颜色
             if (data.style.default.strokeColor) {
                 this.strokeColor = new SColor(data.style.default.strokeColor)

+ 20 - 0
src/components/editClass/edit/items/SBasePolygonEdit.ts

@@ -876,6 +876,26 @@ export class SBasePolygonEdit extends SGraphEdit {
     } // Function contains()
 
     /**
+     * 返回对象储存的相关数据
+     *
+     * @return	formData
+     */
+    toData() {
+        const Line = this.pointList.map(pos => {
+            return {
+                x: pos.x,
+                y: pos.y
+            }
+        });
+        this.data.style.outLine = Line;
+        this.data.style.default.lineWidth = this.lineWidth;
+        this.data.style.default.lineStyle = this.lineStyle;
+        this.data.style.default.strokeColor = this.strokeColor.value;
+        this.data.style.default.fillColor = this.fillColor.value;
+        return this.data
+    } // Function toData()
+
+    /**
      * Item绘制操作
      *
      * @param   painter       painter对象

+ 39 - 0
src/components/editClass/edit/items/SBasePolylineEdit.ts

@@ -135,6 +135,7 @@ export class SBasePolylineEdit extends SGraphEdit {
         this.data = data;
         this.name = data.name;
         this.moveTo(data.pos.x, data.pos.y);
+        this.showSelect = false;
         if (data && data.style) {
             if (data.style.outLine) {
                 let setPointList: SPoint[];
@@ -143,6 +144,26 @@ export class SBasePolylineEdit extends SGraphEdit {
                 })
                 this.pointList = setPointList;
             }
+
+            this.moveable = data.style.isMove ? data.style.isMove : false;
+            if (data.style && data.style.default) {
+                // 颜色
+                if (data.style.default.strokeColor) {
+                    this.strokeColor = new SColor(data.style.default.strokeColor)
+                }
+
+                // 线宽
+                if (data.style.default.lineWidth) {
+                    this.lineWidth = data.style.default.lineWidth
+                }
+
+                // 线样式
+                if (data.style.default.lineStyle) {
+                    this.lineStyle = data.style.default.lineStyle
+                }
+
+            }
+
         }
     } // Constructor
 
@@ -571,6 +592,24 @@ export class SBasePolylineEdit extends SGraphEdit {
     } // Function drawBaseLine()
 
     /**
+     * 返回对象储存的相关数据
+     *
+     * @return	formData
+     */
+    toData() {
+        const Line = this.pointList.map(pos => {
+            return {
+                x: pos.x,
+                y: pos.y
+            }
+        });
+        this.data.style.outLine = Line;
+        this.data.style.default.lineWidth = this.lineWidth;
+        this.data.style.default.lineStyle = this.lineStyle;
+        this.data.style.default.strokeColor = this.strokeColor.value;
+        return this.data
+    } // Function toData()
+    /**
      * Item绘制操作
      *
      * @param   painter painter对象

+ 2 - 0
src/components/editClass/edit/items/SBaseRectEdit.ts

@@ -334,6 +334,7 @@ export class SBaseRectEdit extends SGraphEdit {
     this.data.style.default.lineWidth = this.lineWidth;
     this.data.style.default.lineStyle = this.lineStyle;
     this.data.style.default.strokeColor = this.strokeColor.value;
+    this.data.style.default.fillColor = this.fillColor.value;
     return this.data
   }
 
@@ -344,6 +345,7 @@ export class SBaseRectEdit extends SGraphEdit {
    */
   onDraw(painter: SPainter): void {
     if (this.line.length == 2) {
+      this.calRect()
       painter.pen.color = this.strokeColor;
       painter.brush.color = this.fillColor;
       painter.pen.lineWidth = this.lineWidth;

+ 3 - 0
src/components/editClass/edit/items/SBaseTextEdit.ts

@@ -337,6 +337,9 @@ export class SBaseTextEdit extends SGraphEdit {
             this.data.size.width = this.width
             this.data.size.height = this.height;
         }
+
+        this.data.pos.x = this.pos.x;
+        this.data.pos.y = this.pos.y;
         this.data.style.default.zorder = this.zOrder;
         this.data.style.default.text = this.text;
         this.data.style.default.strokeColor = this.strokeColor.value;

+ 36 - 28
src/components/editClass/persagy-edit/PTopoParser.ts

@@ -67,35 +67,43 @@ export class PTopoParser extends SParser {
 
     } // Function parseData()
     addMarker(data: Marker) {
-        // 基础直线
-        if (data.properties.type == "BaseLine") {
-            this.markers.push(this.factory.createBaseLineEdit(data))
-        }
-        // 基础文字
-        if (data.properties.type == "BaseText") {
-            this.markers.push(this.factory.createBaseTextEdit(data))
-        }
-        // 基础图片
-        if (data.properties.type == "BaseImage") {
-            this.markers.push(this.factory.createBaseImageEdit(data))
-        }
-        // 基础注释
-        if (data.properties.type == "BaseExplain") {
-            this.markers.push(this.factory.createBaseExpainEdit(data))
-        }
-        // 基础注释
-        if (data.properties.type == "BaseCircle") {
-            this.markers.push(this.factory.createBaseExpainEdit(data))
-        }
-        if (data.properties.type == "BaseArrow") {
-            this.markers.push(this.factory.createBaseExpainEdit(data))
-        }
-        if (data.properties.type == "BaseRect") {
-            this.markers.push(this.factory.createBaseExpainEdit(data))
-        }
-        if (data.properties.type == "BaseTriangle") {
-            this.markers.push(this.factory.createBaseExpainEdit(data))
+        if (data.properties && data.properties.type) {
+            switch (data.properties.type) {
+                case "BaseLine":
+                    this.markers.push(this.factory.createBaseLineEdit(data));
+                    break;
+                case "BaseText":
+                    this.markers.push(this.factory.createBaseTextEdit(data));
+                    break;
+                case "BaseImage":
+                    this.markers.push(this.factory.createBaseImageEdit(data));
+                    break;
+                case "BaseExplain":
+                    this.markers.push(this.factory.createBaseExpainEdit(data));
+                    break;
+                case "BaseCircle":
+                    this.markers.push(this.factory.createBaseCircleEdit(data));
+                    break;
+                case "BaseArrow":
+                    this.markers.push(this.factory.createBaseArrow(data));
+                    break;
+                case "BaseRect":
+                    this.markers.push(this.factory.createBaseRectEdit(data));
+                    break;
+                case "BasePolygon":
+                    this.markers.push(this.factory.createBasePolygonEdit(data));
+                    break;
+            }
         }
+        // if (data.properties.type == "BaseArrow") {
+        //     this.markers.push(this.factory.createBaseArrow(data))
+        // }
+        // if (data.properties.type == "BaseRect") {
+        //     this.markers.push(this.factory.createBaseExpainEdit(data))
+        // }
+        // if (data.properties.type == "BaseTriangle") {
+        //     this.markers.push(this.factory.createBaseExpainEdit(data))
+        // }
         // // 基础文字
         // if (data.properties.type == "BaseText") {
         //     this.Markers.push(this.factory.createBaseTextEdit(data))

+ 4 - 2
src/components/editClass/persagy-edit/PTopoScene.ts

@@ -78,7 +78,7 @@ export class PTopoScene extends SBaseEditScene {
             this.clearCmdStatus();
         }
         else if (this.editCmd == "EditBaseArrows") {
-            this.addArrowsItem(event)
+            // this.addArrowsItem(event)
             this.clearCmdStatus();
         }
         else if (this.editCmd == "wantou" || this.editCmd == "santong" || this.editCmd == "sitong") {
@@ -152,6 +152,8 @@ export class PTopoScene extends SBaseEditScene {
     finishCreated(item: SGraphEdit): void {
         this.grabItem = null;
         item.status = SItemStatus.Normal;
+        this.selectContainer.clear();
+        this.selectContainer.toggleItem(item);
     }
     /**
      * 修改 cmdstatus 函数;常在在业务中调用
@@ -182,7 +184,7 @@ export class PTopoScene extends SBaseEditScene {
      */
     save() {
         if (!this.view) return;
-        const Marktype: string[] = ['BaseLine', 'BaseText', 'BaseExplain', 'BaseImage', 'BaseCircle', 'BaseArrow', 'BaseTriangle', 'BaseRect'];
+        const Marktype: string[] = ['BasePolygon','BaseLine', 'BaseText', 'BaseExplain', 'BaseImage', 'BaseCircle', 'BaseArrow', 'BaseTriangle', 'BaseRect'];
         const markers: any = [];   /**图例节点 */  // 与工程信息无关的标识对象(增加文本注释,图上的图片说明)
         const nodes: any = [];   /**图例节点 */  // 与工程信息无关的标识对象(增加文本注释,图上的图片说明)
         const relations: any = [];   /**图例节点 */  // 与工程信息无关的标识对象(增加文本注释,图上的图片说明)

+ 42 - 0
src/components/editview/leftToolBar/addItemModel.vue

@@ -0,0 +1,42 @@
+<!-- 新增实例 -->
+<template>
+  <Modal
+    class="getItemModal"
+    :show="true"
+    title="添加实例对象"
+    mode="full"
+    @close="modalClose"
+    @confirm="modalConfirm"
+  >
+    <template #content>
+      <div class="getItem">
+        <div class="left"></div>
+        <div class="right">r</div>
+      </div>
+    </template>
+  </Modal>
+</template>
+<style lang="less">
+.getItemModal {
+  height: 100%;
+  .getItem {
+    width: 100%;
+    height: 100%;
+    display: flex;
+    .right {
+      width: 420px;
+      height: 100%;
+      border-left: 1px solid #eff0f1;
+    }
+    .left {
+      flex: 1;
+    }
+  }
+}
+.p-modal-content .p-modal-content-full {
+  height: calc(100vh - 56px);
+  .p-modal-content-main {
+    height: 100%;
+  }
+}
+</style>

+ 27 - 0
src/components/editview/leftToolBar/equipmentList.vue

@@ -19,6 +19,11 @@
         </div>
       </li>
     </ul>
+    <!-- 添加设备 -->
+    <div class="addbtn" @click="openAddEqupModle">
+      <i class="el-icon-plus"></i>
+      添加设备示例
+    </div>
   </div>
 </template>
 <script>
@@ -26,6 +31,12 @@ export default {
   data() {
     return {};
   },
+  methods: {
+    // 打开添加弹窗
+    openAddEqupModle() {
+      this.$emit('openAddEqupModle')
+    },
+  },
 };
 </script>
 <style lang="less" scoped>
@@ -38,6 +49,7 @@ li {
 .equip-list {
   width: 100%;
   height: 100%;
+  position: relative;
   ul {
     li {
       width: 100%;
@@ -70,5 +82,20 @@ li {
       }
     }
   }
+  .addbtn {
+    width: 100%;
+    height: 40px;
+    position: absolute;
+    bottom: 0;
+    left: 0;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    box-shadow: 0px 0px 6px 0px rgba(0, 0, 0, 0.11);
+    cursor: pointer;
+    &:hover {
+      color: #0091ff;
+    }
+  }
 }
 </style>

+ 28 - 12
src/components/editview/leftToolBar/legendList.vue

@@ -2,7 +2,7 @@
 <template>
   <div class="lengend-list">
     <!-- 基础图例 -->
-    <div class="base-item-list" v-if="chiceStatus==0">
+    <div class="base-item-list" v-if="chiceStatus == 0">
       <Input
         class="baseItemInput"
         :width="188"
@@ -10,29 +10,43 @@
         v-model="baseItemVal"
         @pressEnter="pressEnter"
       />
-      <div class="lengend-item" v-for="(item,index) in baseEditItems" :key="index">
-        <span class="legend-title">{{item.title}}</span>
-        <div class="legend-content" v-for="(itemList,i) in item.itemList" :key="i">
-          <div class="title">{{itemList.title}}</div>
+      <div
+        class="lengend-item"
+        v-for="(item, index) in baseEditItems"
+        :key="index"
+      >
+        <span class="legend-title">{{ item.title }}</span>
+        <div
+          class="legend-content"
+          v-for="(itemList, i) in item.itemList"
+          :key="i"
+        >
+          <div class="title">{{ itemList.title }}</div>
           <ul>
             <li
-              :class="{ 'btn-active': choiceLegend== baseItem.id }"
-              v-for="(baseItem,k) in itemList.itemList"
+              :class="{ 'btn-active': choiceLegend == baseItem.id }"
+              v-for="(baseItem, k) in itemList.itemList"
               :key="k"
               @click="drawItem(baseItem.id)"
               :title="baseItem.name"
             >
               <img class="icon" :src="baseItem.icon" />
-              <span class="iconName">{{baseItem.name}}</span>
+              <span class="iconName">{{ baseItem.name }}</span>
             </li>
           </ul>
         </div>
       </div>
     </div>
     <!-- 设备类 -->
-    <equipmentList v-if="chiceStatus==1"></equipmentList>
+    <equipmentList
+      v-if="chiceStatus == 1"
+      @openAddEqupModle="xx"
+    ></equipmentList>
     <!-- 管线类 -->
-    <pipeList v-if="chiceStatus==3" @getPipe="drawItem"></pipeList>
+    <pipeList v-if="chiceStatus == 3" @getPipe="drawItem"></pipeList>
+
+    <!-- 新增实例对象 -->
+    <addItemModel></addItemModel>
   </div>
 </template>
 <script>
@@ -40,8 +54,9 @@ import { baseEditItems } from "./data";
 import { mapMutations, mapState } from "vuex";
 import pipeList from "./pipeList.vue";
 import equipmentList from "./equipmentList.vue";
+import addItemModel from "./addItemModel.vue";
 export default {
-  components: { pipeList, equipmentList },
+  components: { pipeList, equipmentList, addItemModel },
   props: ["chiceStatus"],
   data() {
     return {
@@ -56,7 +71,7 @@ export default {
   methods: {
     ...mapMutations(["SETCHOICELEHEND"]),
     drawItem(item) {
-      console.log('getPipe',item)
+      console.log("getPipe", item);
       this.SETCHOICELEHEND(item);
     },
     pressEnter() {},
@@ -66,6 +81,7 @@ export default {
 <style scoped lang="less">
 .lengend-list {
   width: 100%;
+  height: 100%;
   .base-item-list {
     .baseItemInput {
       margin: 12px 0;

+ 2 - 4
src/components/editview/rightPropertyBar/property.vue

@@ -9,7 +9,7 @@
       v-show="itemType == 'BaseText' || itemType == 'BaseExplain'"
     ></baseTextPro>
     <baseLinePro
-      v-show="itemType == 'BaseLine'"
+      v-show="itemType == 'BaseArrow'"
       :strokeColor="strokeColor"
       :lineStyle="lineStyle"
       :lineWidth="lineWidth"
@@ -25,7 +25,6 @@
       v-show="
         itemType == 'BaseRect' ||
         itemType == 'BaseTriangle' ||
-        itemType == 'BaseArrow' ||
         itemType == 'BaseCircle' ||
         itemType == 'BasePolygon'
       "
@@ -92,7 +91,7 @@ export default {
     // 同步样式
     linkStyle(itemList) {
       const item = itemList[0];
-      if (this.itemType == "BaseLine") {
+      if (this.itemType == "BaseArrow") {
         this.strokeColor = item.strokeColor.toRgba();
         this.lineStyle = lineStyle[item.lineStyle];
         this.lineWidth = item.lineWidth;
@@ -118,7 +117,6 @@ export default {
       } else if (
         this.itemType == "BaseRect" ||
         this.itemType == "BaseTriangle" ||
-        this.itemType == "BaseArrow" ||
         this.itemType == "BaseCircle" ||
         this.itemType == "BasePolygon"
       ) {

+ 3 - 2
src/main.ts

@@ -6,11 +6,12 @@ import './assets/font/iconfont.css';
 import ElementUI from 'element-ui';
 import 'element-ui/lib/theme-chalk/index.css';
 Vue.use(ElementUI);
-import { Input } from 'meri-design';
+import { Input, Modal} from 'meri-design';
+import { Select } from 'ant-design-vue';
 // 按需引入公共组件
 Vue.use(Input)
-import { Select } from 'ant-design-vue';
 Vue.use(Select)
+Vue.use(Modal)
 Vue.config.productionTip = false;
 new Vue({
   router,