|
@@ -193,8 +193,8 @@ export default {
|
|
|
pageSize: 1000,
|
|
|
type: this.params.zone
|
|
|
}, params2 = {
|
|
|
- Filters: `id='${this.params.RoomID}'`,
|
|
|
- ZoneType: this.params.zone
|
|
|
+ filters: `id='${this.params.RoomID}'`,
|
|
|
+ zoneType: this.params.zone
|
|
|
};
|
|
|
let promise1 = new Promise((resolve, reject) => {
|
|
|
getDataDictionary(params1, res => {
|
|
@@ -212,8 +212,8 @@ export default {
|
|
|
|
|
|
Promise.all([promise1, promise2]).then(values => {
|
|
|
this.pointData = values[0].content;
|
|
|
- this.exampleData = values[1].Content[0];
|
|
|
- let obj = values[1].Content[0] ? this.deepCopy(values[1].Content[0]) : values[1].Content[0];
|
|
|
+ this.exampleData = values[1].content[0];
|
|
|
+ let obj = values[1].content[0] ? this.deepCopy(values[1].content[0]) : values[1].content[0];
|
|
|
|
|
|
obj = tools.flattenKeys(obj);
|
|
|
for (let key in obj) {
|
|
@@ -227,7 +227,7 @@ export default {
|
|
|
let cur = tools.dataForKey(this.exampleData, item.path);
|
|
|
if (cur) {
|
|
|
this.criterias.push({
|
|
|
- id: this.exampleData.RoomID,
|
|
|
+ id: this.exampleData.id,
|
|
|
code: item.code
|
|
|
})
|
|
|
}
|
|
@@ -318,25 +318,24 @@ export default {
|
|
|
},
|
|
|
handlePicList(arr) {
|
|
|
let picObject = {}
|
|
|
- debugger
|
|
|
//处理数据格式
|
|
|
arr.map(i => {
|
|
|
- if (i.InputMode == 'F2') {
|
|
|
+ if (i.inputMode == 'F2') {
|
|
|
switch (i.Path) {
|
|
|
- case 'LedgerParam.PhotoDoc.Drawing':
|
|
|
- case 'LedgerParam.Siteinstall.InstallPic':
|
|
|
- case 'LedgerParam.Siteinstall.InstallDrawing':
|
|
|
- case 'LedgerParam.PhotoDoc.Nameplate':
|
|
|
- case 'LedgerParam.PhotoDoc.Pic':
|
|
|
- case 'Pic' :
|
|
|
- if (this.instance && this.instance.hasOwnProperty(i.Path)) {
|
|
|
- i.PicList = this.instance[i.Path]
|
|
|
+ case 'infos.drawing':
|
|
|
+ case 'infos.installPic':
|
|
|
+ case 'infos.installDrawing':
|
|
|
+ case 'infos.nameplate':
|
|
|
+ case 'infos.pic':
|
|
|
+ case 'pic' :
|
|
|
+ if (this.instance && this.instance.hasOwnProperty(i.path)) {
|
|
|
+ i.PicList = this.instance[i.path]
|
|
|
}
|
|
|
- if (picObject[i.InfoPointName]) {
|
|
|
+ if (picObject[i.name]) {
|
|
|
} else {
|
|
|
- picObject[i.InfoPointName] = []
|
|
|
+ picObject[i.name] = []
|
|
|
}
|
|
|
- picObject[i.InfoPointName].push({
|
|
|
+ picObject[i.name].push({
|
|
|
...i,
|
|
|
})
|
|
|
break;
|
|
@@ -371,21 +370,21 @@ export default {
|
|
|
let picObject = {}
|
|
|
//处理数据格式
|
|
|
arr.map(i => {
|
|
|
- if (i.InputMode == 'F2') {
|
|
|
- switch (i.Path) {
|
|
|
- case 'LedgerParam.InsuranceDoc.InsuranceFile':
|
|
|
- case 'LedgerParam.PhotoDoc.Archive':
|
|
|
- case 'LedgerParam.Siteinstall.CheckReport':
|
|
|
- if (this.instance && this.instance.hasOwnProperty(i.Path)) {
|
|
|
- i.fileList = this.instance[i.Path]
|
|
|
+ if (i.inputMode == 'F2') {
|
|
|
+ switch (i.path) {
|
|
|
+ case 'infos.insuranceFile':
|
|
|
+ case 'infos.archive':
|
|
|
+ case 'infos.checkReport':
|
|
|
+ if (this.instance && this.instance.hasOwnProperty(i.path)) {
|
|
|
+ i.fileList = this.instance[i.path]
|
|
|
}
|
|
|
- if (picObject[i.InfoPointName]) {
|
|
|
+ if (picObject[i.name]) {
|
|
|
|
|
|
} else {
|
|
|
- picObject[i.InfoPointName] = []
|
|
|
+ picObject[i.name] = []
|
|
|
}
|
|
|
|
|
|
- picObject[i.InfoPointName].push({
|
|
|
+ picObject[i.name].push({
|
|
|
...i,
|
|
|
})
|
|
|
break
|
|
@@ -428,99 +427,100 @@ export default {
|
|
|
const result = {}
|
|
|
const resultEnergy = {};
|
|
|
arr.forEach(i => {
|
|
|
- if (this.instance && this.instance.hasOwnProperty(i.Path) && this.currentRadio != 2) {
|
|
|
- i.value = this.instance[i.Path]
|
|
|
+ if (this.instance && this.instance.hasOwnProperty(i.path) && this.currentRadio != 2) {
|
|
|
+ i.value = this.instance[i.path]
|
|
|
}
|
|
|
- if (i.InputMode == 'C5') {
|
|
|
- if (this.instance && this.instance.hasOwnProperty(i.Path)) {
|
|
|
- let time = this.instance[i.Path]
|
|
|
+ if (i.inputMode == 'C5') {
|
|
|
+ if (this.instance && this.instance.hasOwnProperty(i.path)) {
|
|
|
+ let time = this.instance[i.path]
|
|
|
i.value = this.formatDate(time)
|
|
|
}
|
|
|
}
|
|
|
- if (i.DataSource && i.DataSource.length) {
|
|
|
- let source = JSON.parse(i.DataSource)
|
|
|
+ if (i.dataSource && i.dataSource.length) {
|
|
|
+ // let source = JSON.parse(i.DataSource)
|
|
|
+ let source = i.dataSource
|
|
|
//判断输入类型
|
|
|
- if (i.InputMode == 'D1L') {
|
|
|
- let d1l = tools.formatDataSource(i.DataSource)
|
|
|
+ if (i.inputMode == 'D1L') {
|
|
|
+ let d1l = tools.formatDataSource(i.dataSource)
|
|
|
d1l.forEach(k => {
|
|
|
- if (k.Code == this.instance[i.Path]) {
|
|
|
- i.value = k.Name
|
|
|
+ if (k.code == this.instance[i.path]) {
|
|
|
+ i.value = k.name
|
|
|
}
|
|
|
})
|
|
|
- } else if (i.InputMode == 'D2' || i.InputMode == 'C6') {
|
|
|
- if (this.instance && this.instance.hasOwnProperty(i.Path)) {
|
|
|
- if (!Array.isArray(this.instance[i.Path])) {
|
|
|
- let transArray = this.instance[i.Path].split(',')
|
|
|
- i.value = source.filter(item => transArray.includes(item.Code)).map(item => item.Name).join(',')
|
|
|
+ } else if (i.inputMode == 'D2' || i.inputMode == 'C6') {
|
|
|
+ if (this.instance && this.instance.hasOwnProperty(i.path)) {
|
|
|
+ if (!Array.isArray(this.instance[i.path])) {
|
|
|
+ let transArray = this.instance[i.path].split(',')
|
|
|
+ i.value = source.filter(item => transArray.includes(item.code)).map(item => item.name).join(',')
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
source.forEach(j => {
|
|
|
- if (this.instance && j.Code == this.instance[i.Path]) {
|
|
|
- i.value = j.Name
|
|
|
+ if (this.instance && j.code == this.instance[i.path]) {
|
|
|
+ i.value = j.name
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
- switch (i.InputMode) {
|
|
|
+ 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,
|
|
|
+ if (resultEnergy[`${i.firstName}${i.secondName ? '/' + i.secondName : ''}`]) {
|
|
|
+ resultEnergy[`${i.firstName}${i.secondName ? '/' + i.secondName : ''}`].paths.push({
|
|
|
+ Path: i.path,
|
|
|
+ InfoPointName: i.name,
|
|
|
+ InfoPointCode: i.code,
|
|
|
value: i.svalue,
|
|
|
- Visible: i.Visible,
|
|
|
- KeyWord: i.KeyWord,
|
|
|
- InputMode: i.InputMode,
|
|
|
+ Visible: i.visible,
|
|
|
+ KeyWord: i.keyWord,
|
|
|
+ InputMode: i.inputMode,
|
|
|
data: i.data,
|
|
|
receivetime: i.receivetime,
|
|
|
error: i.error,
|
|
|
- Unit: i.Unit,
|
|
|
- FirstName: i.FirstName,
|
|
|
+ Unit: i.unit,
|
|
|
+ FirstName: i.firstName,
|
|
|
})
|
|
|
} else {
|
|
|
- resultEnergy[`${i.FirstName}${i.SecondName ? '/' + i.SecondName : ''}`] = {
|
|
|
+ resultEnergy[`${i.firstName}${i.secondName ? '/' + i.secondName : ''}`] = {
|
|
|
paths: [{
|
|
|
- Path: i.Path,
|
|
|
- InfoPointName: i.InfoPointName,
|
|
|
- InfoPointCode: i.InfoPointCode,
|
|
|
+ Path: i.path,
|
|
|
+ InfoPointName: i.name,
|
|
|
+ InfoPointCode: i.code,
|
|
|
value: i.svalue,
|
|
|
- Visible: i.Visible,
|
|
|
- KeyWord: i.KeyWord,
|
|
|
- InputMode: i.InputMode,
|
|
|
+ Visible: i.visible,
|
|
|
+ KeyWord: i.keyWord,
|
|
|
+ InputMode: i.inputMode,
|
|
|
data: i.data,
|
|
|
receivetime: i.receivetime,
|
|
|
error: i.error,
|
|
|
- Unit: i.Unit,
|
|
|
- FirstName: i.FirstName,
|
|
|
+ Unit: i.unit,
|
|
|
+ FirstName: i.firstName,
|
|
|
}]
|
|
|
}
|
|
|
}
|
|
|
break;
|
|
|
default:
|
|
|
- if (result[`${i.FirstName}${i.SecondName ? '/' + i.SecondName : ''}`]) {
|
|
|
- result[`${i.FirstName}${i.SecondName ? '/' + i.SecondName : ''}`].paths.push({
|
|
|
- Path: i.Path,
|
|
|
- InfoPointName: i.InfoPointName,
|
|
|
- InfoPointCode: i.InfoPointCode,
|
|
|
+ if (result[`${i.firstName}${i.secondName ? '/' + i.secondName : ''}`]) {
|
|
|
+ result[`${i.firstName}${i.secondName ? '/' + i.secondName : ''}`].paths.push({
|
|
|
+ Path: i.path,
|
|
|
+ InfoPointName: i.name,
|
|
|
+ InfoPointCode: i.code,
|
|
|
Value: i.value,
|
|
|
- Visible: i.Visible,
|
|
|
- KeyWord: i.KeyWord,
|
|
|
- InputMode: i.InputMode
|
|
|
+ Visible: i.visible,
|
|
|
+ KeyWord: i.keyWord,
|
|
|
+ InputMode: i.inputMode,
|
|
|
})
|
|
|
} else {
|
|
|
- result[`${i.FirstName}${i.SecondName ? '/' + i.SecondName : ''}`] = {
|
|
|
+ result[`${i.firstName}${i.secondName ? '/' + i.secondName : ''}`] = {
|
|
|
paths: [{
|
|
|
- Path: i.Path,
|
|
|
- InfoPointName: i.InfoPointName,
|
|
|
- InfoPointCode: i.InfoPointCode,
|
|
|
+ Path: i.path,
|
|
|
+ InfoPointName: i.name,
|
|
|
+ InfoPointCode: i.code,
|
|
|
Value: i.value,
|
|
|
- Visible: i.Visible,
|
|
|
- KeyWord: i.KeyWord,
|
|
|
- InputMode: i.InputMode
|
|
|
+ Visible: i.visible,
|
|
|
+ KeyWord: i.keyWord,
|
|
|
+ InputMode: i.inputMode,
|
|
|
}]
|
|
|
}
|
|
|
}
|