|
@@ -130,7 +130,7 @@ export default {
|
|
|
pageSize: 1000,
|
|
|
type: 'shaft'
|
|
|
}, params2 = {
|
|
|
- Filters: `ShaftID='${this.params.ShaftID}'`
|
|
|
+ filters: `id='${this.params.ShaftID}'`
|
|
|
};
|
|
|
let promise1 = new Promise((resolve, reject) => {
|
|
|
getDataDictionary(params1, res => {
|
|
@@ -144,8 +144,8 @@ export default {
|
|
|
})
|
|
|
Promise.all([promise1, promise2]).then(values => {
|
|
|
this.pointData = values[0].content;
|
|
|
- this.exampleData = values[1].Content[0];
|
|
|
- let obj = this.deepCopy(values[1].Content[0]);
|
|
|
+ this.exampleData = values[1].content[0];
|
|
|
+ let obj = this.deepCopy(values[1].content[0]);
|
|
|
obj = tools.flattenKeys(obj);
|
|
|
for (let key in obj) {
|
|
|
if (Array.isArray(obj[key]) && !obj[key].length) {
|
|
@@ -194,66 +194,67 @@ export default {
|
|
|
displayData(arr) {//对数据进行处理传给组件展示
|
|
|
const result = {}
|
|
|
arr.forEach(i => {
|
|
|
- if (this.instance.hasOwnProperty(i.Path) && this.currentRadio != 2) {
|
|
|
- i.value = this.instance[i.Path]
|
|
|
+ if (this.instance.hasOwnProperty(i.path) && this.currentRadio != 2) {
|
|
|
+ i.value = this.instance[i.path]
|
|
|
}
|
|
|
- if (i.InputMode == 'C5') {
|
|
|
- if (this.instance.hasOwnProperty(i.Path)) {
|
|
|
- let time = this.instance[i.Path]
|
|
|
+ if (i.inputMode == 'C5') {
|
|
|
+ if (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.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.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 (j.Code == this.instance[i.Path]) {
|
|
|
- i.value = j.Name
|
|
|
+ if (j.code == this.instance[i.path]) {
|
|
|
+ i.value = j.name
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
- switch (i.InputMode) {
|
|
|
+ switch (i.inputMode) {
|
|
|
case "L":
|
|
|
case "L1":
|
|
|
case "L2":
|
|
|
case "M":
|
|
|
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,
|
|
|
}]
|
|
|
}
|
|
|
}
|