|
@@ -50,6 +50,7 @@
|
|
|
<BaseEquipmentMsg
|
|
|
v-show="itemType == 'BaseEquipmentMsg'"
|
|
|
:EquipMsgData="EquipMsgData"
|
|
|
+ @changeEquipMsgData="changeEquipMsg"
|
|
|
></BaseEquipmentMsg>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -107,6 +108,7 @@ export default {
|
|
|
EquipData: {}, //设备 信息
|
|
|
equipHeight: "", // 设备属性栏得高度
|
|
|
EquipMsgData: {}, //设备信息点详情数据
|
|
|
+ EquipMsgItem: null, //设备信息点实例
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -130,7 +132,7 @@ export default {
|
|
|
}
|
|
|
// 对设备做出判断 看是否点入的是设备相关信息点
|
|
|
if (this.itemType == "BaseEquipment") {
|
|
|
- this.EquipData = itemList[0].legendData;
|
|
|
+ this.EquipData = itemList[0].legendData;
|
|
|
if (itemList[0].curTextItem) {
|
|
|
this.itemType = "BaseEquipmentMsg";
|
|
|
}
|
|
@@ -141,6 +143,7 @@ export default {
|
|
|
// 同步样式
|
|
|
linkStyle(itemList) {
|
|
|
const item = itemList[0];
|
|
|
+ this.EquipMsgItem = null;
|
|
|
if (this.itemType == "BaseArrow") {
|
|
|
this.strokeColor = item.strokeColor.toRgba();
|
|
|
this.lineStyle = lineStyle[item.lineStyle];
|
|
@@ -179,18 +182,24 @@ export default {
|
|
|
this.fillColor = item.fillColor.toRgba();
|
|
|
// 填充色
|
|
|
} else if (this.itemType == "BaseEquipment") {
|
|
|
- console.log('BaseEquipment',item)
|
|
|
if (item.infoPointList && item.infoPointList.length) {
|
|
|
- console.log('BaseEquipment',item)
|
|
|
this.infoPointList = item.infoPointList;
|
|
|
} else {
|
|
|
this.infoPointList = [];
|
|
|
}
|
|
|
} else if (this.itemType == "BaseEquipmentMsg") {
|
|
|
- // 获取信息点信息,同时拼接设备点信息
|
|
|
+ // 获取信息点详情信息
|
|
|
this.EquipMsgData = item.curTextItem.propertyData;
|
|
|
+ this.EquipMsgItem = item.curTextItem;
|
|
|
}
|
|
|
},
|
|
|
+ // 修改设备信息点数据
|
|
|
+ changeEquipMsg(val) {
|
|
|
+ const obj = this.EquipMsgItem.propertyData;
|
|
|
+ let obj2 = Object.assign(obj, val);
|
|
|
+ this.EquipMsgItem.propertyData = obj2;
|
|
|
+ this.EquipMsgItem.text = val.name;
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|