|
@@ -116,6 +116,7 @@
|
|
|
exampleData: {}, //实例数据
|
|
|
currentRadio: '1',//当前选中的select
|
|
|
criterias: [], //动态参数
|
|
|
+ criteriasArray: [],
|
|
|
selectRadio: {
|
|
|
information: '设备信息点',
|
|
|
initRadio: '1',
|
|
@@ -141,6 +142,7 @@
|
|
|
title: '能耗信息',
|
|
|
firstName:'',
|
|
|
dynamic: [],
|
|
|
+ list: {}
|
|
|
},
|
|
|
exhibitionMaintain: {
|
|
|
title: '维修/维保记录'
|
|
@@ -210,8 +212,6 @@
|
|
|
let obj = this.deepCopy(values[1].Content[0]);
|
|
|
obj = tools.flattenKeys(obj);
|
|
|
this.instance = obj;
|
|
|
- this.handleRadios(this.currentRadio)
|
|
|
- this.handleEnclosure() //处理图片视频文件信息
|
|
|
this.pointData.forEach(item => {
|
|
|
if (item.InputMode == "L" || item.InputMode == "L1" || item.InputMode == "L2" || item.InputMode == "M") {
|
|
|
let cur = tools.dataForKey(this.exampleData, item.Path);
|
|
@@ -224,7 +224,6 @@
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
let params = { //获取动态参数
|
|
|
secret: this.secret,
|
|
|
ProjId: this.projectId,
|
|
@@ -235,7 +234,20 @@
|
|
|
let arr = []
|
|
|
if (this.criterias.length) {
|
|
|
BeatchQueryParam(params, res => {
|
|
|
+ this.criteriasArray = res.Content;
|
|
|
arr = res.Content
|
|
|
+ arr && arr.length && arr.forEach(child => {
|
|
|
+ this.pointData.map(head => {
|
|
|
+ if (head.InfoPointCode == child.code) {
|
|
|
+ head.svalue = child.value;
|
|
|
+ head.data = child.data || '--';
|
|
|
+ head.receivetime = child.receivetime || '';
|
|
|
+ head.error = child.error || ''
|
|
|
+ }
|
|
|
+ return head
|
|
|
+ })
|
|
|
+ })
|
|
|
+ /****************************delete****************************/
|
|
|
arr && arr.length && arr.map(child => {
|
|
|
this.pointData.forEach(head => {
|
|
|
if (head.InfoPointCode == child.code) {
|
|
@@ -255,9 +267,12 @@
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
+ /****************************delete****************************/
|
|
|
})
|
|
|
|
|
|
}
|
|
|
+ this.handleRadios(this.currentRadio);
|
|
|
+ this.handleEnclosure() //处理图片视频文件信息
|
|
|
})
|
|
|
},
|
|
|
handleEnclosure() {
|
|
@@ -426,7 +441,8 @@
|
|
|
},
|
|
|
displayData(arr) {//对数据进行处理传给组件展示
|
|
|
const result = {}
|
|
|
- arr.forEach(i => {
|
|
|
+ const resultEnergy = {};
|
|
|
+ arr.map(i => {
|
|
|
if (this.instance.hasOwnProperty(i.Path) && this.currentRadio != 2) {
|
|
|
i.value = this.instance[i.Path]
|
|
|
}
|
|
@@ -461,11 +477,45 @@
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+ // 动态信息点处理
|
|
|
switch (i.InputMode) {
|
|
|
case "L":
|
|
|
case "L1":
|
|
|
case "L2":
|
|
|
case "M":
|
|
|
+ if (resultEnergy[`${i.FirstName}${i.SecondName ? '/' + i.SecondName : ''}`]) {
|
|
|
+ resultEnergy[`${i.FirstName}${i.SecondName ? '/' + i.SecondName : ''}`].paths.push({
|
|
|
+ Path: i.Path,
|
|
|
+ InfoPointName: i.InfoPointName,
|
|
|
+ InfoPointCode: i.InfoPointCode,
|
|
|
+ value: i.svalue,
|
|
|
+ Visible: i.Visible,
|
|
|
+ KeyWord: i.KeyWord,
|
|
|
+ InputMode: i.InputMode,
|
|
|
+ data: i.data,
|
|
|
+ receivetime: i.receivetime,
|
|
|
+ error: i.error,
|
|
|
+ Unit: i.Unit,
|
|
|
+ FirstName: i.FirstName,
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ resultEnergy[`${i.FirstName}${i.SecondName ? '/' + i.SecondName : ''}`] = {
|
|
|
+ paths: [{
|
|
|
+ Path: i.Path,
|
|
|
+ InfoPointName: i.InfoPointName,
|
|
|
+ InfoPointCode: i.InfoPointCode,
|
|
|
+ value: i.svalue,
|
|
|
+ Visible: i.Visible,
|
|
|
+ KeyWord: i.KeyWord,
|
|
|
+ InputMode: i.InputMode,
|
|
|
+ data: i.data,
|
|
|
+ receivetime: i.receivetime,
|
|
|
+ error: i.error,
|
|
|
+ Unit: i.Unit,
|
|
|
+ FirstName: i.FirstName,
|
|
|
+ }]
|
|
|
+ }
|
|
|
+ }
|
|
|
break;
|
|
|
default:
|
|
|
if (result[`${i.FirstName}${i.SecondName ? '/' + i.SecondName : ''}`]) {
|
|
@@ -498,6 +548,7 @@
|
|
|
})
|
|
|
this.exhibitionBaseInformation.information = result
|
|
|
this.exhibitionCrux.allMessage = result
|
|
|
+ this.exhibitionEnergy.list = resultEnergy;
|
|
|
},
|
|
|
goBack() {
|
|
|
this.$router.push({
|