瀏覽代碼

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

YaolongHan 4 年之前
父節點
當前提交
b3f28832c8

+ 2 - 2
package.json

@@ -9,10 +9,10 @@
   },
   "dependencies": {
     "@saga-web/base": "2.1.22",
-    "@saga-web/big": "1.0.71",
+    "@saga-web/big": "1.0.72",
     "@saga-web/draw": "2.1.100",
     "@saga-web/feng-map": "1.0.20",
-    "@saga-web/graph": "2.1.104",
+    "@saga-web/graph": "2.1.105",
     "ant-design-vue": "^1.6.0",
     "core-js": "^3.6.4",
     "element-ui": "^2.13.2",

+ 4 - 0
src/components/baseEditer.vue

@@ -539,6 +539,10 @@ export default {
        */
       // TODO: changeScale缩放底图
       bus.$on("changeScale", zoom => {
+        if (zoom == 1) {
+          this.view.fitSceneToView();
+          return;
+        }
         const { scale } = this.view;
         this.changeScaleByClick = true;
         this.view.scaleByPoint(

+ 3 - 2
src/components/edit/attr_select.vue

@@ -377,7 +377,7 @@ export default {
       },
       swatchess: ["#69C5FC", "#656EDF", "#58AF6F", "#2D8FAA"],
       swatches: [
-        "#00000000",
+        "#F7F9Fa",
         "#1FBC9C",
         "#1CA085",
         "#2ECC70",
@@ -387,7 +387,8 @@ export default {
         "#A463BF",
         "#8E43AD",
         "#3D556E",
-        "#222F3D"
+        "#222F3D",
+        "#00000000",
       ],
       lengedName: "", // 图例名称
       imageNum: 1, //设备数量

+ 8 - 3
src/components/edit/left_toolbar.vue

@@ -637,14 +637,17 @@ export default {
           display: flex;
           flex-wrap: wrap;
           li {
-            width: 66px;
+            width: 67px;
             height: 60px;
             display: flex;
             justify-content: center;
             flex-direction: column;
+            border: 1px solid #ffffff;
             cursor: pointer;
             &:hover {
-              background: #f5f6f7;
+              background: #F5F6F7;
+              border: 1px solid #D9DBDE;
+              border-radius: 5px;
             }
             .item {
               width: 54px;
@@ -679,7 +682,9 @@ export default {
             }
           }
           .active-li {
-            background: #e1f2ff;
+            background: #DFEFFE;
+            border: 1px solid #98C8FA ;
+            border-radius: 5px;
           }
         }
       }

+ 5 - 1
src/components/edit/top_toolbar.vue

@@ -188,7 +188,11 @@ export default {
       // emit 缩放比例 this.scale / oldScale
       const oldScale = this.scale
       this.scale = Number((oldScale + type * this.scaleStep).toFixed(2))
-      bus.$emit('changeScale', this.scale / oldScale)
+      if ( 0 < oldScale && oldScale < 99) {
+        bus.$emit('changeScale', this.scale / oldScale)
+      } else {
+        bus.$emit('changeScale', 1)
+      }
     },
     FocusItemChanged(itemMsg) {
       this.focusItem = null;

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

@@ -453,6 +453,7 @@ export class EditScence extends SGraphScene {
                 sHeight: 32,   //icon 的高
                 font: 12,    //font
                 color: '',  //字体颜色
+                FrameColor: this._legend.FrameColor,
                 GraphCategoryId: this._legend.GraphCategoryId,
                 InfoSystemId:this._legend.InfoSystemId ? this._legend.InfoSystemId :'' ,
                 InfoTypeId:this._legend.InfoTypeId.length? this._legend.InfoTypeId :[],// 铺位可视化Typeid(用于编辑工程信息化时默认问题)
@@ -712,7 +713,16 @@ export class EditScence extends SGraphScene {
             // 重新选中focusitem
             const item = this.focusItem;
             this.selectContainer.clear();
-            this.selectContainer.toggleItem(item)
+            this.selectContainer.toggleItem(item);
+            
+            // 图标绑定工程信息化数据后设置状态
+            if (item instanceof SImageLegendItem) {
+                if (item.data.AttachObjectIds && item.data.AttachObjectIds.length) {
+                    item.isActive = true;
+                } else {
+                    item.isActive = false;
+                }
+            }
         }
     }
 

+ 11 - 0
src/lib/items/SImageLegendItem.ts

@@ -75,6 +75,15 @@ export class SImageLegendItem extends SIconTextItem {
         if (data.Properties && data.Properties.color) {
             this.color = new SColor(data.Properties.color);
         }
+        if (data.Properties && data.Properties.IsActive) {
+            this.isActive = data.Properties.IsActive;
+        }
+        if (data.AttachObjectIds && data.AttachObjectIds.length) {
+            this.isActive = true;
+        }
+        if (data.Properties && data.Properties.FrameColor) {
+            this.activeColor = new SColor(data.Properties.FrameColor);
+        }
     }
 
     toData(): Legend {
@@ -88,6 +97,8 @@ export class SImageLegendItem extends SIconTextItem {
         this.data.Properties.sHeight = this.sHeight;
         this.data.Properties.font = this.font.size;
         this.data.Properties.color = this.color.value;
+        this.data.Properties.FrameColor = this.activeColor.value;
+        this.data.Properties.IsActive = this.isActive;
         this.data.AnchorList = this.anchorList.map(t => {
             return {
                 ID: t.id,