|
@@ -103,7 +103,6 @@ export default {
|
|
|
this.type = this.$route.query.type;
|
|
|
this.list = this.$route.query.data;
|
|
|
this.getData();
|
|
|
- console.log(this.$route.query)
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters("layout", ["projectId", "secret", "userId"])
|
|
@@ -266,8 +265,8 @@ export default {
|
|
|
let isList = this.pointData
|
|
|
let isArr = []
|
|
|
isList.map(j => {
|
|
|
- if (this.instance.hasOwnProperty(j.Path)) {
|
|
|
- j.value = this.instance[j.Path]
|
|
|
+ if (this.instance.hasOwnProperty(j.path)) {
|
|
|
+ j.value = this.instance[j.path]
|
|
|
return j
|
|
|
}
|
|
|
})
|
|
@@ -278,19 +277,18 @@ export default {
|
|
|
handleRadios(val) { //判断radio的值显示关键信息,基本信息,图片,文件
|
|
|
let arr = []
|
|
|
//关键信息点
|
|
|
- console.log(this.pointData, 'pointttt')
|
|
|
- this.exhibitionCrux.cruxArray = this.pointData.filter(i => i.KeyWord)
|
|
|
+ this.exhibitionCrux.cruxArray = this.pointData.filter(i => i.keyWord)
|
|
|
this.exhibitionCrux.cruxArray.map(i => {
|
|
|
- if (this.instance.hasOwnProperty(i.Path)) {
|
|
|
+ if (this.instance.hasOwnProperty(i.path)) {
|
|
|
return {
|
|
|
...i,
|
|
|
- value: this.instance[i.Path]
|
|
|
+ value: this.instance[i.path]
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
|
|
|
if (val == 1) { //需采集信息
|
|
|
- arr = this.pointData.filter(i => i.Visible)
|
|
|
+ arr = this.pointData.filter(i => i.visible)
|
|
|
// // 图片和的处理
|
|
|
// this.handlePicList(arr)
|
|
|
// // 文件处理
|
|
@@ -299,10 +297,10 @@ export default {
|
|
|
} else if (val == 2) { //有值信息点
|
|
|
let list = this.pointData
|
|
|
list.map(j => {
|
|
|
- if (this.instance.hasOwnProperty(j.Path)) {
|
|
|
+ if (this.instance.hasOwnProperty(j.path)) {
|
|
|
return {
|
|
|
...j,
|
|
|
- value: this.instance[j.Path]
|
|
|
+ value: this.instance[j.path]
|
|
|
}
|
|
|
|
|
|
|
|
@@ -323,22 +321,22 @@ export default {
|
|
|
let picObject = {}
|
|
|
//处理数据格式
|
|
|
arr.map(i => {
|
|
|
- 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.hasOwnProperty(i.Path)) {
|
|
|
- i.PicList = this.instance[i.Path]
|
|
|
+ if (i.inputMode == 'F2') {
|
|
|
+ switch (i.path) {
|
|
|
+ case 'infos.drawing':
|
|
|
+ case 'infos.installPic':
|
|
|
+ case 'infos.installDrawing':
|
|
|
+ case 'infos.nameplate':
|
|
|
+ case 'infos.pic':
|
|
|
+ case 'pic' :
|
|
|
+ if (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;
|
|
@@ -372,20 +370,20 @@ 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.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.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
|
|
@@ -425,104 +423,112 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
displayData(arr) {//对数据进行处理传给组件展示
|
|
|
- console.log(arr, 'arr')
|
|
|
const result = {}
|
|
|
const resultEnergy = {};
|
|
|
arr.map(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":
|
|
|
- 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,
|
|
|
+ classCode: i.classCode,
|
|
|
+ id: i.id,
|
|
|
+ groupCode: i.groupCode,
|
|
|
+ type: i.type
|
|
|
})
|
|
|
} 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,
|
|
|
+ classCode: i.classCode,
|
|
|
+ id: i.id,
|
|
|
+ groupCode: i.groupCode,
|
|
|
+ type: i.type
|
|
|
}]
|
|
|
}
|
|
|
}
|