Browse Source

'图标相关内容修改'

zhangyu 4 years ago
parent
commit
33ff9fec26
3 changed files with 21 additions and 3 deletions
  1. 2 2
      package.json
  2. 11 1
      src/components/mapClass/EditScence.ts
  3. 8 0
      src/lib/items/SImageLegendItem.ts

+ 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",

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

@@ -452,6 +452,7 @@ export class EditScence extends SGraphScene {
                 sHeight: 32,   //icon 的高
                 font: 12,    //font
                 color: '',  //字体颜色
+                FrameColor: this._legend.FrameColor,
                 GraphCategoryId: this._legend.GraphCategoryId,
                 InfoSystemId: InfoSystemId,   //信息工程话分类ID分类
                 InfoTypeId:this._legend.InfoTypeId.length? this._legend.InfoTypeId :[]// 铺位可视化Typeid(用于编辑工程信息化时默认问题)
@@ -710,7 +711,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;
+                }
+            }
         }
     }
 

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

@@ -75,6 +75,12 @@ 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.Properties && data.Properties.FrameColor) {
+            this.activeColor = new SColor(data.Properties.FrameColor);
+        }
     }
 
     toData(): Legend {
@@ -88,6 +94,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,