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

'update_2020.12.16_17:51'

zhangyu 4 éve
szülő
commit
9675be2192

+ 2 - 1
src/components/editview/basePlanEditer.vue

@@ -482,7 +482,8 @@ export default {
                     if (this.styleMap[equip.id]) {
                         SPlanDecorator.equipDecorator(equipItem, this.styleMap[equip.id]);
                     } else if (this.styleMap[equip.classCode]) {
-                        SPlanDecorator.equipDecorator(equipItem, this.styleMap[equip.calssCode]);
+                        console.log(this.styleMap[equip.classCode])
+                        SPlanDecorator.equipDecorator(equipItem, this.styleMap[equip.classCode]);
                     } else {
                         SPlanDecorator.equipDecorator(equipItem, this.styleMap["defaultEquipStyle"]);
                     }

+ 17 - 0
src/components/editview/rightPropertyBar/BaseEquipment.vue

@@ -48,6 +48,12 @@
                 </div>
                 <div class="box-padding box-border-bottom">
                     <p class="box-title">字符</p>
+                    <div class="base-property">
+                        <div class="base-property-item">
+                            <el-color-picker show-alpha class="fix-box-1" v-model="color"></el-color-picker>
+                        </div>
+                        <div class="base-property-item"></div>
+                    </div>
                 </div>
                 <div class="box-padding box-border-bottom">
                     <p class="box-title">显示图标</p>
@@ -69,6 +75,7 @@
     </div>
 </template>
 <script>
+import { SColor } from "@persagy-web/draw";
 import { imgBaseUrl, imgServeUpload } from "@/api/imageservice";
 import bus from "@/bus/bus";
 export default {
@@ -86,6 +93,16 @@ export default {
             showBimRelation: true, // 显示与BIM坐标关系
         };
     },
+    computed: {
+        color: {
+            get: function () {
+                return this.EquipItem.color.toRgba();
+            },
+            set: function () {
+                this.EquipItem.color = new SColor(this.color);
+            }
+        }
+    },
     methods: {
         // 设置宽
         changeWidth(val) {

+ 1 - 1
src/components/editview/rightPropertyBar/property.vue

@@ -43,7 +43,7 @@
         ></BaseImagePro>
         <BaseEquipment
             :EquipItem="itemObj"
-            v-show="itemObj && itemType == 'BaseEquipment'"
+            v-if="itemObj && itemType == 'BaseEquipment'"
         ></BaseEquipment>
     </div>
 </template>