Browse Source

联调信息

YaolongHan 4 years ago
parent
commit
61fbd45cb1

+ 1 - 0
src/components/editClass/big-edit/items/SBaseEquipment.ts

@@ -175,6 +175,7 @@ export class SBaseEquipment extends SBaseIconTextEdit {
             item.isTransform = false;
             item.showSelect = false;
             item.color = item.color ? new SColor(item.color) : new SColor('#000000');
+            item.connect('textSelect', this, this.textSelectChange)
             this.textItemList.push(item)
         } else {
             this.textItemList.splice(index, 1)

+ 2 - 2
src/components/editClass/edit/items/SBaseIconTextEdit.ts

@@ -332,7 +332,7 @@ export class SBaseIconTextEdit extends SGraphEdit {
                     obj.connect('textSelect', this, this.textSelectChange)
                     textItemList.push(obj)
                 })
-                this.textItemList = textItemList;                
+                this.textItemList = textItemList;
             }
         }
         this.img.url = this.data.style.default.url;
@@ -467,7 +467,7 @@ export class SBaseIconTextEdit extends SGraphEdit {
         const rect = this.boundingRect();
         const lw = painter.toPx(1);
         // 编辑态和选中态出现绘制区域
-        if (this.status == SItemStatus.Edit || this.selected) { 
+        if (this.status == SItemStatus.Edit || this.selected) {
             // doto 如果子元素被选中
             painter.pen.lineWidth = lw;
             painter.pen.lineDash = [3*lw, 7*lw];

+ 20 - 0
src/components/editview/rightPropertyBar/BaseEquipmentMsg.vue

@@ -0,0 +1,20 @@
+<!-- 设备信息点详情 -->
+<template>
+  <div>设备信息点详情</div>
+</template>
+<script>
+export default {
+  props: ["EquipMsgData"],
+  data() {
+    return {};
+  },
+  mounted() {},
+  watch: {
+    EquipMsgData(val) {
+      console.log("EquipMsgData", val);
+    },
+  },
+};
+</script>
+<style lang="less">
+</style>

+ 16 - 4
src/components/editview/rightPropertyBar/property.vue

@@ -47,6 +47,10 @@
       v-show="itemType == 'BaseEquipment'"
       :equipHeight="equipHeight"
     ></BaseEquipment>
+    <BaseEquipmentMsg
+      v-show="itemType == 'BaseEquipmentMsg'"
+      :EquipMsgData="EquipMsgData"
+    ></BaseEquipmentMsg>
   </div>
 </template>
 <script>
@@ -55,6 +59,7 @@ import baseLinePro from "./baseLinePro.vue";
 import BaseGraphy from "./BaseGraphy";
 import BaseImagePro from "./BaseImagePro";
 import BaseEquipment from "./BaseEquipment";
+import BaseEquipmentMsg from "./BaseEquipmentMsg";
 import bus from "@/bus/bus";
 const lineStyle = {
   0: "Solid",
@@ -81,6 +86,7 @@ export default {
     BaseGraphy,
     BaseImagePro,
     BaseEquipment,
+    BaseEquipmentMsg,
   },
   data() {
     return {
@@ -100,6 +106,7 @@ export default {
       infoPointList: [], //设备--信息点数组
       EquipData: {}, //设备 id
       equipHeight: "", // 设备属性栏得高度
+      EquipMsgData: {}, //设备信息点详情数据
     };
   },
   mounted() {
@@ -121,6 +128,12 @@ export default {
       } else {
         this.itemType = "";
       }
+      // 对设备做出判断 看是否点入的是设备相关信息点
+      if (this.itemType == "BaseEquipment") {
+        if (itemList[0].curTextItem) {
+          this.itemType = "BaseEquipmentMsg";
+        }
+      }
       // 同步联动样式
       this.linkStyle(itemList);
     },
@@ -165,15 +178,14 @@ export default {
         this.fillColor = item.fillColor.toRgba();
         // 填充色
       } else if (this.itemType == "BaseEquipment") {
-        if (
-          item.infoPointList &&
-          item.infoPointList.length
-        ) {
+        if (item.infoPointList && item.infoPointList.length) {
           this.infoPointList = item.infoPointList;
         } else {
           this.infoPointList = [];
         }
         this.EquipData = item.legendData;
+      } else if (this.itemType == "BaseEquipmentMsg") {
+        this.EquipMsgData = item.curTextItem.propertyData;
       }
     },
   },