zhangyu před 4 roky
rodič
revize
124e7da8aa

+ 24 - 6
src/components/edit/attr_select.vue

@@ -56,7 +56,7 @@
           <a-input-number v-model="fontSize" :min="1" @change="changeFont" style="width: 168px" />
         </div>
         <div class="color-choice">
-          <swatches v-model="fontColor" popover-x="left" @close="changeFontColor" />
+          <swatches v-model="fontColor" :swatches="swatchesFont" popover-x="left" @close="changeFontColor" />
         </div>
       </div>
       <div class="row">
@@ -126,7 +126,7 @@
             <a-input-number v-model="fontSize" :min="1" @change="changeFont" style="width: 168px" />
           </div>
           <div class="color-choice">
-            <swatches v-model="fontColor" @close="changeFontColor" popover-x="left" />
+            <swatches v-model="fontColor" :swatches="swatchesFont" @close="changeFontColor" popover-x="left" />
           </div>
         </div>
         <!-- 当为设备状态时 -->
@@ -184,7 +184,7 @@
               />
             </div>
             <div class="color-choice">
-              <swatches v-model="fontColor" @close="changeFontColor" popover-x="left" />
+              <swatches v-model="fontColor" :swatches="swatchesFont" @close="changeFontColor" popover-x="left" />
             </div>
           </div>
         </div>
@@ -247,7 +247,7 @@
               />
             </div>
             <div class="color-choice">
-              <swatches v-model="fontColor" @close="changeFontColor" popover-x="left" />
+              <swatches v-model="fontColor" :swatches="swatchesFont" @close="changeFontColor" popover-x="left" />
             </div>
           </div>
         </div>
@@ -376,9 +376,9 @@ export default {
         Line: "管道编辑",
         Zone: "编辑区域"
       },
-      swatchess: ["#69C5FC", "#656EDF", "#58AF6F", "#2D8FAA"],
+      swatchess: ["#57c5fc26", "#5f6ce126", "#71b31226", "#00a17726"],
       swatches: [
-        "#F7F9Fa",
+        "#f7f9facc",
         "#1FBC9C",
         "#1CA085",
         "#2ECC70",
@@ -391,6 +391,24 @@ export default {
         "#222F3D",
         "#00000000",
       ],
+      swatchesFont: [
+        "#1fbc9c",
+        "#1ca085",
+        "#2ecc70",
+        "#27af60",
+        "#3398db",
+        "#2980b9",
+        "#a463bf",
+        "#8e43ad",
+        "#646c73",
+        "#1f2429",
+        "#f2c511",
+        "#f39c19",
+        "#e84b3c",
+        "#c0382b",
+        "#dde6e8",
+        "#bdc3c8"
+      ],
       lengedName: "", // 图例名称
       imageNum: 1, //设备数量
       fillColor: "", //修改填充色 (主要针对防火风区以及石材铺装)

+ 9 - 7
src/components/mapClass/EditScence.ts

@@ -23,6 +23,7 @@ import { SSpaceItem } from '@saga-web/big/lib/items/floor/SSpaceItem';
 import { SMathUtil } from '@saga-web/big/lib/utils/SMathUtil';
 import { MinDis } from '@saga-web/big/lib/types/MinDis';
 import { HighlightItem } from '@/lib/items/HighlightItem';
+import { TimeSelect } from 'element-ui';
 /**
  * 在线绘图
  *
@@ -187,7 +188,6 @@ export class EditScence extends SGraphScene {
         if (clickItem) {
             clickItem.connect('onMove', item, item.changePos);
         }
-        this.scenceUpdate(this);
         return true
     }
 
@@ -250,7 +250,6 @@ export class EditScence extends SGraphScene {
             item.anchor1ID = anc.id;
             item.node1Id = anc.parent.id;
         }
-        this.scenceUpdate(this);
         return true
     }
 
@@ -301,7 +300,6 @@ export class EditScence extends SGraphScene {
         Polylines.connect("finishCreated", this, this.finishCreated);
         this.grabItem = Polylines;
         this.focusItem = Polylines;
-        this.scenceUpdate(this);
     }
 
     /**
@@ -410,7 +408,7 @@ export class EditScence extends SGraphScene {
             Properties: {
                 IconUrl: require(`../../assets/images/t-text-hover.png`),
                 Text: '请在右侧属性栏输入文字!',
-                Color: "#646C73",
+                Color: "#646c73",
                 Font: 14,
                 BackgroundColor: "#f7f9facc"
             }
@@ -422,7 +420,7 @@ export class EditScence extends SGraphScene {
         item.zOrder = ItemOrder.textOrder;
         this.addItem(item);
         this.Markers.push(item);
-        this.grabItem = item;
+        this.grabItem = null;
         this.focusItem = item;
         this.cmd = 'choice';
         this.finishCreated(item);
@@ -453,7 +451,7 @@ export class EditScence extends SGraphScene {
                 sWidth: 32,  //icon 的宽
                 sHeight: 32,   //icon 的高
                 font: 16,    //font
-                color: '#1F2429',  //字体颜色
+                color: "#1F2429",  //字体颜色
                 FrameColor: this._legend.FrameColor,
                 GraphCategoryId: this._legend.GraphCategoryId,
                 InfoSystemId:this._legend.InfoSystemId ? this._legend.InfoSystemId :'' ,
@@ -468,7 +466,7 @@ export class EditScence extends SGraphScene {
         item.zOrder = ItemOrder.markOrder;
         this.addItem(item);
         this.Nodes.push(item);
-        this.grabItem = item;
+        this.grabItem = null;
         this.focusItem = item;
         this.finishCreated(item);
         this.scenceUpdate(this);
@@ -785,6 +783,7 @@ export class EditScence extends SGraphScene {
                 if (c > -1) {
                     this.Relations.splice(c, 1);
                 }
+                this.grabItem = null;
                 this.focusItem = null;
                 if (this.view) {
                     this.view.update();
@@ -828,6 +827,8 @@ export class EditScence extends SGraphScene {
                 }
             });
             this.focusItemList = [];
+            this.grabItem = null;
+            this.focusItem = null;
             if (this.view) {
                 this.view.update();
             }
@@ -920,6 +921,7 @@ export class EditScence extends SGraphScene {
        if(item instanceof TipelineItem ){
            this.Relations.push(item);
        }
+       this.scenceUpdate(this);
        this.undoStack.push(new SGraphAddCommand(this, item, arrList));
     }
     ////////////////////////