Forráskód Böngészése

Merge branch 'develop' of http://39.106.8.246:3003/web/wanda-editer into develop

zhangyu 4 éve
szülő
commit
f65a6fc6cb

BIN
src/assets/images/dashedLine.png


BIN
src/assets/images/dotLine.png


BIN
src/assets/images/solidLine.png


+ 10 - 10
src/components/baseEditer.vue

@@ -90,7 +90,7 @@ export default {
     // 自动保存(时间差为一分钟)
     this.autoSave = setInterval(() => {
       this.saveMsgNoMessage();
-    }, 60000);
+    }, 6000);
   },
   methods: {
     init() {
@@ -190,9 +190,9 @@ export default {
     // 读取绘制数据
     readGraph() {
       this.readGroup().then(data => {
-        this.graphId = data.Data[0].ID;
-        bus.$emit("setGraphId", this.graphId);
         if (data.Data) {
+          this.graphId = data.Data[0].ID;
+          bus.$emit("setGraphId", this.graphId);
           const parserData = new STopologyParser(null);
           const itemMap = {};
           parserData.parseData(data.Data[0].Elements);
@@ -266,14 +266,14 @@ export default {
               t.endAnchor = endAnc || null;
             }
           });
-          this.view.fitSceneToView();
-            // 设置初始化缩放比例
-          this.initScale = this.view.scale;
-          this.view.maxScale = this.initScale * 10;
-          this.view.minScale = this.initScale / 10;
-          bus.$emit("initScale", this.view.scale);
-          bus.$emit("elementDataChange", this.scene);
         }
+        this.view.fitSceneToView();
+          // 设置初始化缩放比例
+        this.initScale = this.view.scale;
+        this.view.maxScale = this.initScale * 10;
+        this.view.minScale = this.initScale / 10;
+        bus.$emit("initScale", this.view.scale);
+        bus.$emit("elementDataChange", this.scene);
         this.loadings.close()
       });
     },

+ 4 - 4
src/components/edit/attr_select.vue

@@ -32,7 +32,7 @@
             :label="item.src"
             :value="item.id"
           >
-            <img :src="item.src" alt />
+            <img :src="item.src" alt width='180' />
           </a-select-option>
         </a-select>
       </div>
@@ -346,15 +346,15 @@ export default {
       borderLineOption: [
         {
           id: "solid",
-          src: require("@/assets/images/1pxline.jpg")
+          src: require("@/assets/images/solidLine.png")
         },
         {
           id: "dashed",
-          src: require("@/assets/images/dashedLine.jpg")
+          src: require("@/assets/images/dashedLine.png")
         },
         {
           id: "dotted",
-          src: require("@/assets/images/dotLine.jpg")
+          src: require("@/assets/images/dotLine.png")
         }
       ],
       linepxOption: [

+ 5 - 0
src/components/edit/right_toolbar.vue

@@ -325,6 +325,11 @@ li {
           display: inline-block;
           vertical-align: top;
           line-height: 38px;
+          width: calc(100% - 45px);
+          height: 100%;
+          overflow: hidden;
+          white-space: nowrap;
+          text-overflow: ellipsis;
         }
         &:hover {
           background: #f5f6f7;

+ 14 - 6
src/components/mapClass/EditScence.ts

@@ -178,7 +178,7 @@ export class EditScence extends SGraphScene {
         item.zOrder = ItemOrder.lineOrder;
         item.selectable = true;
         this.addItem(item);
-        this.Markers.push(item);
+        // this.Markers.push(item);
         item.connect("finishCreated", this, this.finishCreated);
         this.grabItem = item;
         this.focusItem = item;
@@ -239,7 +239,7 @@ export class EditScence extends SGraphScene {
         item.status = SItemStatus.Create;
         item.zOrder = ItemOrder.polylineOrder
         this.addItem(item);
-        this.Relations.push(item);
+        // this.Relations.push(item);
         item.connect("finishCreated", this, this.finishCreated);
         this.grabItem = item;
         this.focusItem = item;
@@ -298,7 +298,6 @@ export class EditScence extends SGraphScene {
         Polylines.zOrder = ItemOrder.polygonOrder;
         // Polylines.moveable = true;
         this.addItem(Polylines);
-        this.Nodes.push(Polylines);
         Polylines.connect("finishCreated", this, this.finishCreated);
         this.grabItem = Polylines;
         this.focusItem = Polylines;
@@ -904,15 +903,24 @@ export class EditScence extends SGraphScene {
     finishCreated(item: any) {
         let arrList = []
         if (this.cmd == 'baseLine') {
-            arrList = this.Markers
+            arrList = this.Markers;
+            this.Markers.push(item);
         }
         this.cmd = 'choice';
         this.selectContainer.clear()
         this.selectContainer.toggleItem(item)
         setTimeout(() => {
             this.focusItem = item;
-        })
-        this.undoStack.push(new SGraphAddCommand(this, item, arrList));
+        });
+
+       if(item instanceof SZoneLegendItem || item instanceof SFHFQZoneLegendItem || item instanceof SSCPZZoneLegendItem){
+            this.Nodes.push(item); //完成后,方可扔到Node节点
+       }
+       //    管道完成后方可保存
+       if(item instanceof TipelineItem ){
+           this.Relations.push(item);
+       }
+       this.undoStack.push(new SGraphAddCommand(this, item, arrList));
     }
     ////////////////////////
     //  以下为鼠标键盘操作事件