|
@@ -4,15 +4,8 @@
|
|
|
<baseTextPro v-if="itemObj && ['BaseText', 'BaseExplain'].includes(itemType)" :TextItem="itemObj"></baseTextPro>
|
|
|
<baseLinePro v-if="itemObj && itemType == 'BaseArrow'" :LineItem="itemObj"></baseLinePro>
|
|
|
<BaseGraphy
|
|
|
- :lineStyle="lineStyle"
|
|
|
- :lineWidth="lineWidth"
|
|
|
- :strokeColor="strokeColor"
|
|
|
- :fillColor="fillColor"
|
|
|
- :Url="Url"
|
|
|
- :Width="Width"
|
|
|
- :Height="Height"
|
|
|
- v-if="itemObj && ['BaseRect', 'BaseTriangle', 'BaseCircle', 'BasePolygon', 'BaseArrowPolygon'].includes(itemType)"
|
|
|
:GraphyItem="itemObj"
|
|
|
+ v-if="itemObj && ['BaseRect', 'BaseTriangle', 'BaseCircle', 'BasePolygon', 'BaseArrowPolygon'].includes(itemType)"
|
|
|
></BaseGraphy>
|
|
|
<BaseImagePro v-if="itemObj && itemType == 'BaseImage'" :ImageItem="itemObj"></BaseImagePro>
|
|
|
<BaseEquipment :EquipItem="itemObj" v-if="itemObj && itemType == 'BaseEquipment'"></BaseEquipment>
|
|
@@ -57,22 +50,22 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
itemType: "", // item 类型
|
|
|
- strokeColor: "", //线条颜色
|
|
|
- lineStyle: "solid", //线条样式
|
|
|
- lineWidth: 1, //线宽
|
|
|
- color: "", ///文本颜色
|
|
|
- fontSize: 0, //字体大小
|
|
|
- textMsg: "", // 文本
|
|
|
- backgroundColor: "", // 背景色
|
|
|
- Width: 0, //item 宽
|
|
|
- Height: 0, //item 高
|
|
|
- posX: 0, // item X坐标
|
|
|
- posY: 0, // item Y坐标
|
|
|
- Url: "", // 路径
|
|
|
- fillColor: "", //填充色
|
|
|
- begin: "", //开头样式
|
|
|
- end: "", //结尾样式
|
|
|
- AnotherMsg: "", // 附加信息 (只用与设备图例)
|
|
|
+ // strokeColor: "", //线条颜色
|
|
|
+ // lineStyle: "solid", //线条样式
|
|
|
+ // lineWidth: 1, //线宽
|
|
|
+ // color: "", ///文本颜色
|
|
|
+ // fontSize: 0, //字体大小
|
|
|
+ // textMsg: "", // 文本
|
|
|
+ // backgroundColor: "", // 背景色
|
|
|
+ // Width: 0, //item 宽
|
|
|
+ // Height: 0, //item 高
|
|
|
+ // posX: 0, // item X坐标
|
|
|
+ // posY: 0, // item Y坐标
|
|
|
+ // Url: "", // 路径
|
|
|
+ // fillColor: "", //填充色
|
|
|
+ // begin: "", //开头样式
|
|
|
+ // end: "", //结尾样式
|
|
|
+ // AnotherMsg: "", // 附加信息 (只用与设备图例)
|
|
|
itemObj: null,
|
|
|
};
|
|
|
},
|
|
@@ -105,63 +98,63 @@ export default {
|
|
|
// this.itemType = "BaseEquipmentMsg";
|
|
|
// }
|
|
|
// }
|
|
|
- console.log(`this.itemType: ,${this.itemType}`, this.itemObj);
|
|
|
+ // console.log(`this.itemType: ,${this.itemType}`, this.itemObj);
|
|
|
// 同步联动样式
|
|
|
- this.linkStyle(itemList);
|
|
|
+ // this.linkStyle(itemList);
|
|
|
},
|
|
|
// 同步样式
|
|
|
- linkStyle(itemList) {
|
|
|
- const item = itemList[0];
|
|
|
- this.EquipMsgItem = null;
|
|
|
- if (this.itemType == "BaseArrow") {
|
|
|
- this.strokeColor = item.strokeColor.toRgba();
|
|
|
- this.lineStyle = lineStyle[item.lineStyle];
|
|
|
- this.lineWidth = item.lineWidth;
|
|
|
- this.begin = arrowType[item.begin];
|
|
|
- this.end = arrowType[item.end];
|
|
|
- } else if (this.itemType == "BaseText" || this.itemType == "BaseExplain") {
|
|
|
- this.strokeColor = item.strokeColor.toRgba();
|
|
|
- this.color = item.color.toRgba();
|
|
|
- this.backgroundColor = item.backgroundColor.toRgba();
|
|
|
- this.textMsg = item.text;
|
|
|
- this.fontSize = item.font.size;
|
|
|
- } else if (this.itemType == "BaseImage" || this.itemType == "BasePipeUninTool") {
|
|
|
- this.Width = item.width; //item 宽
|
|
|
- this.Height = item.height; //item 高
|
|
|
- this.Url = item.url; // 路径
|
|
|
- this.lineStyle = lineStyle[item.lineStyle];
|
|
|
- this.lineWidth = item.lineWidth;
|
|
|
- this.strokeColor = item.strokeColor.toRgba();
|
|
|
- } else if (
|
|
|
- this.itemType == "BaseRect" ||
|
|
|
- this.itemType == "BaseTriangle" ||
|
|
|
- this.itemType == "BaseCircle" ||
|
|
|
- this.itemType == "BasePolygon"
|
|
|
- ) {
|
|
|
- this.Width = item.width; //item 宽
|
|
|
- this.Height = item.height; //item 高
|
|
|
- this.lineStyle = lineStyle[item.lineStyle];
|
|
|
- this.lineWidth = item.lineWidth;
|
|
|
- this.strokeColor = item.strokeColor.toRgba();
|
|
|
- this.fillColor = item.fillColor.toRgba();
|
|
|
- // 填充色
|
|
|
- }
|
|
|
- // else if (this.itemType == "BaseEquipment") {
|
|
|
- // this.posX = item.pos.x; //item 宽
|
|
|
- // this.posY = item.pos.y; //item 高
|
|
|
- // this.AnotherMsg = item.anotherMsg;
|
|
|
- // if (item.infoPointList && item.infoPointList.length) {
|
|
|
- // this.infoPointList = item.infoPointList;
|
|
|
- // } else {
|
|
|
- // this.infoPointList = [];
|
|
|
- // }
|
|
|
- // }
|
|
|
- // else if (this.itemType == "BaseEquipmentMsg") {
|
|
|
- // // 获取信息点详情信息
|
|
|
- // this.EquipMsgData = item.curTextItem.propertyData;
|
|
|
- // this.EquipMsgItem = item.curTextItem;
|
|
|
- // }
|
|
|
- },
|
|
|
+ // linkStyle(itemList) {
|
|
|
+ // const item = itemList[0];
|
|
|
+ // this.EquipMsgItem = null;
|
|
|
+ // if (this.itemType == "BaseArrow") {
|
|
|
+ // this.strokeColor = item.strokeColor.toRgba();
|
|
|
+ // this.lineStyle = lineStyle[item.lineStyle];
|
|
|
+ // this.lineWidth = item.lineWidth;
|
|
|
+ // this.begin = arrowType[item.begin];
|
|
|
+ // this.end = arrowType[item.end];
|
|
|
+ // } else if (this.itemType == "BaseText" || this.itemType == "BaseExplain") {
|
|
|
+ // this.strokeColor = item.strokeColor.toRgba();
|
|
|
+ // this.color = item.color.toRgba();
|
|
|
+ // this.backgroundColor = item.backgroundColor.toRgba();
|
|
|
+ // this.textMsg = item.text;
|
|
|
+ // this.fontSize = item.font.size;
|
|
|
+ // } else if (this.itemType == "BaseImage" || this.itemType == "BasePipeUninTool") {
|
|
|
+ // this.Width = item.width; //item 宽
|
|
|
+ // this.Height = item.height; //item 高
|
|
|
+ // this.Url = item.url; // 路径
|
|
|
+ // this.lineStyle = lineStyle[item.lineStyle];
|
|
|
+ // this.lineWidth = item.lineWidth;
|
|
|
+ // this.strokeColor = item.strokeColor.toRgba();
|
|
|
+ // } else if (
|
|
|
+ // this.itemType == "BaseRect" ||
|
|
|
+ // this.itemType == "BaseTriangle" ||
|
|
|
+ // this.itemType == "BaseCircle" ||
|
|
|
+ // this.itemType == "BasePolygon"
|
|
|
+ // ) {
|
|
|
+ // this.Width = item.width; //item 宽
|
|
|
+ // this.Height = item.height; //item 高
|
|
|
+ // this.lineStyle = lineStyle[item.lineStyle];
|
|
|
+ // this.lineWidth = item.lineWidth;
|
|
|
+ // this.strokeColor = item.strokeColor.toRgba();
|
|
|
+ // this.fillColor = item.fillColor.toRgba();
|
|
|
+ // // 填充色
|
|
|
+ // }
|
|
|
+ // // else if (this.itemType == "BaseEquipment") {
|
|
|
+ // // this.posX = item.pos.x; //item 宽
|
|
|
+ // // this.posY = item.pos.y; //item 高
|
|
|
+ // // this.AnotherMsg = item.anotherMsg;
|
|
|
+ // // if (item.infoPointList && item.infoPointList.length) {
|
|
|
+ // // 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;
|