Kaynağa Gözat

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

haojianlong 4 yıl önce
ebeveyn
işleme
b2524c9dc0

BIN
src/assets/images/delete.png


+ 12 - 5
src/components/edit/attr_select.vue

@@ -212,7 +212,7 @@
         <div v-if="!SubType">
           <!-- 普通分区 -->
           <div class="row">
-            <div class="row-tit">名称显示</div>
+            <div class="row-tit">显示名称</div>
             <a-button
               type="link"
               class="edit-option-btn"
@@ -248,7 +248,7 @@
     >
       <a-spin :spinning="spinning">
       <div class="row">
-        <span>{{type =='Zone'?`工程信息化中的位置类型`:'工程信息化中的设备类型'}}</span>
+        <span class="edit-option-text">{{type =='Zone'?`工程信息化中的位置类型`:'工程信息化中的设备类型'}}</span>
         <a-button type="link" class="edit-option-btn" @click="handleEdit">选择编辑</a-button>
       </div>
 
@@ -496,7 +496,7 @@ export default {
         } else if (newval.itemType == "baseLine") {
           this.lineWidth = Item.lineWidth;
           this.borderColor = Item.strokeColor.value;
-          if (Item.lineStyle == SLineStyle.Soild) {
+          if (Item.lineStyle == SLineStyle.Solid) {
             this.borderStyle = "solid";
           } else if (Item.lineStyle == SLineStyle.Dashed) {
             this.borderStyle = "dashed";
@@ -597,7 +597,7 @@ export default {
       }
     }
     .row-tit {
-      color: #1f2429;
+      color: #8D9399;
       font-size: 14px;
     }
   }
@@ -610,7 +610,7 @@ export default {
   }
 
   .grid-content {
-    // margin-top: 10px;
+     margin-top: 12px;
     position: relative;
   }
 
@@ -618,6 +618,13 @@ export default {
     font-size: 25px;
   }
 
+  .edit-option-text {
+    color: #8D9399;
+    height: 32px;
+    line-height: 32px;
+    margin-top: -5px;
+  }
+
   .edit-option-btn {
     float: right;
     margin-top: -5px;

+ 1 - 1
src/components/edit/edit-dialog.vue

@@ -48,7 +48,7 @@
       <div class="right">
         <div class="header">
           <span class="select-number">已选择 <b>{{arrList.length}}</b>/{{sysNum}}</span>
-          <a-button type="link" class="link" @click="clearArrList">清空</a-button>
+          <a-button type="link" class="link" @click="clearArrList" :disabled="arrList.length==0">清空</a-button>
         </div>
 
         <div class="list-box">

+ 5 - 2
src/components/edit/left_toolbar.vue

@@ -585,11 +585,12 @@ export default {
   }
   .drawer-model {
     position: absolute;
-    left: 70px;
+    left: 81px;
     top: 0;
     overflow: hidden;
     width: 100%;
     height: 100%;
+    z-index: 0;
     .drawer-model-body {
       width: 100%;
       .btn-list {
@@ -602,6 +603,8 @@ export default {
           border-left: 4px solid #0091ff;
           margin-top: 20px;
           text-indent: 8px;
+          height: 20px;
+          line-height: 20px;
           color: #1F2329;
           margin-bottom: 12px;
         }
@@ -643,7 +646,7 @@ export default {
             }
             .text {
               width: 100%;
-              padding: 0 5px;
+              padding: 0 4px;
               font-size: 12px;
               text-align: center;
               overflow: hidden;

+ 4 - 3
src/components/edit/top_toolbar.vue

@@ -12,7 +12,7 @@
           <span>保存</span>
         </li>
         <li @click="undo">
-            <img class="lock" :src="require(`./../../assets/images/undo.png`)" alt />
+          <img class="lock" :src="require(`./../../assets/images/undo.png`)" alt />
           <span>撤销</span>
         </li>
         <li @click="redo">
@@ -61,7 +61,7 @@
           <span>{{isLock?"解锁":"锁定"}}</span>
         </li>
         <li @click="deleteItem">
-          <a-icon type="delete" />
+          <img class="lock" :src="require(`./../../assets/images/delete.png`)" alt />
           <span>删除</span>
         </li>
       </ul>
@@ -144,7 +144,8 @@ export default {
   computed: {
     // 缩放比例显示文本
     scalePercent() {
-      return (this.scale * 100).toFixed(0) + '%'
+      const scalePercent = (this.scale * 100).toFixed(0) > 9999? 9999 : (this.scale * 100).toFixed(0);
+      return scalePercent + '%'
     }
   },
   methods: {

+ 1 - 1
src/components/mapClass/EditScence.ts

@@ -638,7 +638,7 @@ export class EditScence extends SGraphScene {
             } else if (val == 'dotted') {
                 borderStyle = SLineStyle.Dotted;
             } else if (val == 'solid') {
-                borderStyle = SLineStyle.Soild;
+                borderStyle = SLineStyle.Solid;
             }
             const newMsg = borderStyle;
             const oldMsg = this.focusItem.lineStyle;

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

@@ -143,9 +143,19 @@ export class SFHFQZoneLegendItem extends SPolygonItem {
             if (data.Properties.font) {
                 this.font = new SFont("sans-serif", data.Properties.font);
             }
-            //    if( data.Properties.LineDash){
-            //     this.LineDash =this._legend.Properties.LineDash
-            //    }
+            switch (data.Properties.LineDash) {
+                case "solid":
+                    this.lineStyle = SLineStyle.Solid;
+                    break;
+                case "dotted":
+                    this.lineStyle = SLineStyle.Dotted;
+                    break;
+                case "dashed":
+                    this.lineStyle = SLineStyle.Dashed;
+                    break;
+                default:
+                    this.lineStyle = SLineStyle.Solid;
+            }
         }
         // 监听多边形创建完成事件,并动态计算文本位置
         this.connect("finishCreated", this, () => {
@@ -166,6 +176,19 @@ export class SFHFQZoneLegendItem extends SPolygonItem {
         this.data.Properties.FillColor = this.fillColor.value;
         this.data.Properties.StrokeColor = this.strokeColor.value;
         this.data.Properties.LineWidth = this.lineWidth;
+        switch (this.lineStyle) {
+            case SLineStyle.Solid:
+                this.data.Properties.LineDash = "solid";
+                break;
+            case SLineStyle.Dotted:
+                this.data.Properties.LineDash = "dotted";
+                break;
+            case SLineStyle.Dashed:
+                this.data.Properties.LineDash = "dashed";
+                break;
+            default:
+                this.data.Properties.LineDash = "solid";
+        }
         this.data.OutLine = this.getPointList.map(pos => {
             return {
                 X: pos.x,

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

@@ -151,9 +151,19 @@ export class SSCPZZoneLegendItem extends SPolygonItem {
             if (data.Properties.font) {
                 this.font = new SFont("sans-serif", data.Properties.font);
             }
-            //    if( data.Properties.LineDash){
-            //     this.LineDash =this._legend.Properties.LineDash
-            //    }
+            switch (data.Properties.LineDash) {
+                case "solid":
+                    this.lineStyle = SLineStyle.Solid;
+                    break;
+                case "dotted":
+                    this.lineStyle = SLineStyle.Dotted;
+                    break;
+                case "dashed":
+                    this.lineStyle = SLineStyle.Dashed;
+                    break;
+                default:
+                    this.lineStyle = SLineStyle.Solid;
+            }
         }
         // 监听多边形创建完成事件,并动态计算文本位置
         this.connect("finishCreated", this, () => {
@@ -174,6 +184,19 @@ export class SSCPZZoneLegendItem extends SPolygonItem {
         this.data.Properties.FillColor = this.fillColor.value;
         this.data.Properties.StrokeColor = this.strokeColor.value;
         this.data.Properties.LineWidth = this.lineWidth;
+        switch (this.lineStyle) {
+            case SLineStyle.Solid:
+                this.data.Properties.LineDash = "solid";
+                break;
+            case SLineStyle.Dotted:
+                this.data.Properties.LineDash = "dotted";
+                break;
+            case SLineStyle.Dashed:
+                this.data.Properties.LineDash = "dashed";
+                break;
+            default:
+                this.data.Properties.LineDash = "solid";
+        }
         this.data.OutLine = this.getPointList.map(pos => {
             return {
                 X: pos.x,

+ 27 - 4
src/lib/items/SZoneLegendItem.ts

@@ -1,5 +1,5 @@
 
-import { SGraphItem } from "@saga-web/graph/lib";
+import { SGraphItem, SLineStyle } from "@saga-web/graph/lib";
 import { Legend } from '../types/Legend';
 import { SPainter, SColor, SFont, SPoint, SLineCapStyle } from "@saga-web/draw";
 import { STextItem } from '@saga-web/graph/lib';
@@ -144,9 +144,19 @@ export class SZoneLegendItem extends SPolygonItem {
             if (data.Properties.font) {
                 this.font = new SFont("sans-serif", data.Properties.font);
             }
-            //    if( data.Properties.LineDash){
-            //     this.LineDash =this._legend.Properties.LineDash
-            //    }
+            switch (data.Properties.LineDash) {
+                case "solid":
+                    this.lineStyle = SLineStyle.Solid;
+                    break;
+                case "dotted":
+                    this.lineStyle = SLineStyle.Dotted;
+                    break;
+                case "dashed":
+                    this.lineStyle = SLineStyle.Dashed;
+                    break;
+                default:
+                    this.lineStyle = SLineStyle.Solid;
+            }
         }
         // 监听多边形创建完成事件,并动态计算文本位置
         this.connect("finishCreated", this, () => {
@@ -167,6 +177,19 @@ export class SZoneLegendItem extends SPolygonItem {
         this.data.Properties.FillColor = this.fillColor.value;
         this.data.Properties.StrokeColor = this.strokeColor.value;
         this.data.Properties.LineWidth = this.lineWidth;
+        switch (this.lineStyle) {
+            case SLineStyle.Solid:
+                this.data.Properties.LineDash = "solid";
+                break;
+            case SLineStyle.Dotted:
+                this.data.Properties.LineDash = "dotted";
+                break;
+            case SLineStyle.Dashed:
+                this.data.Properties.LineDash = "dashed";
+                break;
+            default:
+                this.data.Properties.LineDash = "solid";
+        }
         this.data.OutLine = this.getPointList.map(pos => {
             return {
                 X: pos.x,

+ 2 - 0
src/views/editer.vue

@@ -70,6 +70,8 @@ export default {
   .top_toolbar {
     width: 100%;
     height: 60px;
+    position: relative;
+    z-index: 1;
     background: rgba(255, 255, 255, 1);
     box-shadow: 2px 2px 12px 0 rgba(0, 0, 0, 0.1);
   }