YaolongHan 4 years ago
parent
commit
603aca63f8

+ 3 - 1
src/components/editview/rightPropertyBar/BaseEquipment.vue

@@ -133,6 +133,9 @@ export default {
     // 折叠信息点操作
     clips(item) {
       item.showChildren = !item.showChildren;
+      Object.assign(item,{
+        equipId:this.EquipData.attachObjectIds[0],
+      })
     },
     handleClick(tab, event) {
       // 设置高度
@@ -191,7 +194,6 @@ export default {
           // 勾选设备中选中的对象
           const msgData = res.content;
           // 设置已经勾选数据
-          console.log('勾选',this.InfoPointList)
           if (this.InfoPointList && this.InfoPointList.length) {
             msgData.map((item) => {
               item.checked = false;

+ 4 - 4
src/components/editview/rightPropertyBar/BaseEquipmentMsg.vue

@@ -94,10 +94,10 @@ export default {
   },
   watch: {
     EquipMsgData(val) {
-      this.equipId = val.currentEquipMsg.attachObjectIds[0];
-      this.msgId = val.id;
-      this.msgName = val.name;
-      this.unit = val.unit ? val.unit : "";
+      // this.equipId = val.currentEquipMsg.attachObjectIds[0];
+      // this.msgId = val.id;
+      // this.msgName = val.name;
+      // this.unit = val.unit ? val.unit : "";
       console.log("EquipMsgData", val);
     },
   },

+ 3 - 7
src/components/editview/rightPropertyBar/property.vue

@@ -104,10 +104,9 @@ export default {
       begin: "", //开头样式
       end: "", //结尾样式
       infoPointList: [], //设备--信息点数组
-      EquipData: {}, //设备 id
+      EquipData: {}, //设备 信息
       equipHeight: "", // 设备属性栏得高度
       EquipMsgData: {}, //设备信息点详情数据
-      currentEquipMsg: {}, // 当前设备的信息
     };
   },
   mounted() {
@@ -131,7 +130,7 @@ export default {
       }
       // 对设备做出判断 看是否点入的是设备相关信息点
       if (this.itemType == "BaseEquipment") {
-        this.currentEquipMsg = itemList[0].legendData;
+         this.EquipData = itemList[0].legendData;
         if (itemList[0].curTextItem) {
           this.itemType = "BaseEquipmentMsg";
         }
@@ -187,12 +186,9 @@ export default {
         } else {
           this.infoPointList = [];
         }
-        this.EquipData = item.legendData;
       } else if (this.itemType == "BaseEquipmentMsg") {
         // 获取信息点信息,同时拼接设备点信息
-        let EquipMsgData = item.curTextItem.propertyData;
-        EquipMsgData.currentEquipMsg = this.currentEquipMsg;
-        this.EquipMsgData = EquipMsgData;
+        this.EquipMsgData = item.curTextItem.propertyData;
       }
     },
   },