|
@@ -223,7 +223,7 @@ export default {
|
|
|
}
|
|
|
this.instance = obj;
|
|
|
this.pointData.forEach(item => {
|
|
|
- if (item.inputMode == "L" || item.inputMode == "L1" || item.inputMode == "L2" || item.inputMode == "M") {
|
|
|
+ if (item.category != "STATIC") {
|
|
|
let cur = tools.dataForKey(this.exampleData, item.path);
|
|
|
if (cur) {
|
|
|
this.criterias.push({
|
|
@@ -329,7 +329,7 @@ export default {
|
|
|
let picObject = {}
|
|
|
//处理数据格式
|
|
|
arr.map(i => {
|
|
|
- if (i.inputMode == 'F2') {
|
|
|
+ if (i.dataType == 'ATTACHMENT') {
|
|
|
switch (i.Path) {
|
|
|
case 'infos.drawing':
|
|
|
case 'infos.installPic':
|
|
@@ -379,7 +379,7 @@ export default {
|
|
|
let picObject = {}
|
|
|
//处理数据格式
|
|
|
arr.map(i => {
|
|
|
- if (i.inputMode == 'F2') {
|
|
|
+ if (i.dataType == 'ATTACHMENT') {
|
|
|
switch (i.path) {
|
|
|
case 'infos.insuranceFile':
|
|
|
case 'infos.archive':
|
|
@@ -426,7 +426,11 @@ export default {
|
|
|
if (str.includes('-')) {
|
|
|
return str
|
|
|
} else {
|
|
|
- return str.substr(0, 4) + "-" + str.substr(4, 2) + "-" + str.substr(6, 2) + " " + str.substr(8, 2) + ":" + str.substr(10, 2) + ":" + str.substr(12, 2)
|
|
|
+ if (str.length > 8) {
|
|
|
+ return str.substr(0, 4) + "-" + str.substr(4, 2) + "-" + str.substr(6, 2) + " " + str.substr(8, 2) + ":" + str.substr(10, 2) + ":" + str.substr(12, 2)
|
|
|
+ } else {
|
|
|
+ return str.substr(0, 4) + "-" + str.substr(4, 2) + "-" + str.substr(6, 2) + " " + str.substr(8, 2)
|
|
|
+ }
|
|
|
}
|
|
|
} else {
|
|
|
return '--'
|
|
@@ -439,7 +443,7 @@ export default {
|
|
|
if (this.instance && this.instance.hasOwnProperty(i.path) && this.currentRadio != 2) {
|
|
|
i.value = this.instance[i.path]
|
|
|
}
|
|
|
- if (i.inputMode == 'C5') {
|
|
|
+ if (i.dataType == 'DATETIME') {
|
|
|
if (this.instance && this.instance.hasOwnProperty(i.path)) {
|
|
|
let time = this.instance[i.path]
|
|
|
i.value = this.formatDate(time)
|
|
@@ -449,7 +453,7 @@ export default {
|
|
|
// let source = JSON.parse(i.DataSource)
|
|
|
let source = i.dataSource
|
|
|
//判断输入类型
|
|
|
- if (i.inputMode == 'D1L') {
|
|
|
+ if (i.dataType == 'ENUM') {
|
|
|
let d1l = tools.formatDataSource(i.dataSource)
|
|
|
d1l.forEach(k => {
|
|
|
if (k.code == this.instance[i.path]) {
|
|
@@ -457,7 +461,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
} else if (i.inputMode == 'D2' || i.inputMode == 'C6') {
|
|
|
- if (this.instance && this.instance.hasOwnProperty(i.path)) {
|
|
|
+ if (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(',')
|
|
@@ -470,70 +474,74 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
- 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({
|
|
|
+ switch (i.category) {
|
|
|
+ case "STATIC":
|
|
|
+ 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.svalue,
|
|
|
+ Value: i.value,
|
|
|
Visible: i.visible,
|
|
|
KeyWord: i.keyWord,
|
|
|
- InputMode: i.inputMode,
|
|
|
- data: i.data,
|
|
|
- receivetime: i.receivetime,
|
|
|
- error: i.error,
|
|
|
- Unit: i.unit,
|
|
|
- FirstName: i.firstName,
|
|
|
+ classCode: i.classCode,
|
|
|
+ id: i.id,
|
|
|
+ groupCode: i.groupCode,
|
|
|
+ type: i.type,
|
|
|
+ dataType: i.dataType
|
|
|
})
|
|
|
} else {
|
|
|
- resultEnergy[`${i.firstName}${i.secondName ? '/' + i.secondName : ''}`] = {
|
|
|
+ result[`${i.firstName}${i.secondName ? '/' + i.secondName : ''}`] = {
|
|
|
paths: [{
|
|
|
Path: i.path,
|
|
|
InfoPointName: i.name,
|
|
|
InfoPointCode: i.code,
|
|
|
- value: i.svalue,
|
|
|
+ Value: i.value,
|
|
|
Visible: i.visible,
|
|
|
KeyWord: i.keyWord,
|
|
|
- InputMode: i.inputMode,
|
|
|
- data: i.data,
|
|
|
- receivetime: i.receivetime,
|
|
|
- error: i.error,
|
|
|
- Unit: i.unit,
|
|
|
- FirstName: i.firstName,
|
|
|
+ classCode: i.classCode,
|
|
|
+ id: i.id,
|
|
|
+ groupCode: i.groupCode,
|
|
|
+ type: i.type,
|
|
|
+ dataType: i.dataType
|
|
|
}]
|
|
|
}
|
|
|
}
|
|
|
- break;
|
|
|
+ break
|
|
|
default:
|
|
|
- if (result[`${i.firstName}${i.secondName ? '/' + i.secondName : ''}`]) {
|
|
|
- result[`${i.firstName}${i.secondName ? '/' + i.secondName : ''}`].paths.push({
|
|
|
+ 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.value,
|
|
|
+ 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,
|
|
|
+ dataType: i.dataType
|
|
|
})
|
|
|
} else {
|
|
|
- result[`${i.firstName}${i.secondName ? '/' + i.secondName : ''}`] = {
|
|
|
+ resultEnergy[`${i.firstName}${i.secondName ? '/' + i.secondName : ''}`] = {
|
|
|
paths: [{
|
|
|
Path: i.path,
|
|
|
InfoPointName: i.name,
|
|
|
InfoPointCode: i.code,
|
|
|
- Value: i.value,
|
|
|
+ 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,
|
|
|
+ dataType: i.dataType
|
|
|
}]
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
})
|
|
|
this.exhibitionBaseInformation.information = result
|