|
@@ -7,7 +7,7 @@
|
|
<div class="content">
|
|
<div class="content">
|
|
<div class="content-left">
|
|
<div class="content-left">
|
|
<div class="content-keyPoint">
|
|
<div class="content-keyPoint">
|
|
- <exhibitionCrux :exhibitionCrux="exhibitionCrux"/>
|
|
|
|
|
|
+ <exhibitionCrux :exhibitionCrux="exhibitionCrux" :type="type"/>
|
|
</div>
|
|
</div>
|
|
<div class="content-showType">
|
|
<div class="content-showType">
|
|
<selectRadio
|
|
<selectRadio
|
|
@@ -25,7 +25,9 @@
|
|
</div>
|
|
</div>
|
|
<div class="content-point-right">
|
|
<div class="content-point-right">
|
|
<el-scrollbar style="height:100%;">
|
|
<el-scrollbar style="height:100%;">
|
|
- <div style="height:1000px">6</div>
|
|
|
|
|
|
+ <div style="height:1000px">
|
|
|
|
+ <exhibitionEnergy :exhibitionEnergy="exhibitionEnergy"/>
|
|
|
|
+ </div>
|
|
</el-scrollbar>
|
|
</el-scrollbar>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -38,6 +40,7 @@
|
|
<el-scrollbar style="height:100%;">
|
|
<el-scrollbar style="height:100%;">
|
|
<div style="height:1000px">
|
|
<div style="height:1000px">
|
|
<exhibitionImage :exhibitionImage="exhibitionImage"/>
|
|
<exhibitionImage :exhibitionImage="exhibitionImage"/>
|
|
|
|
+ <exhibitionVideo :exhibitionVideo="exhibitionVideo"></exhibitionVideo>
|
|
<exhibitionFile :exhibitionFile="exhibitionFile"/>
|
|
<exhibitionFile :exhibitionFile="exhibitionFile"/>
|
|
</div>
|
|
</div>
|
|
</el-scrollbar>
|
|
</el-scrollbar>
|
|
@@ -52,17 +55,22 @@
|
|
import exhibitionBaseInformation from "@/components/ledger/details/detail/exhibitionBaseInformation";
|
|
import exhibitionBaseInformation from "@/components/ledger/details/detail/exhibitionBaseInformation";
|
|
import exhibitionFile from "@/components/ledger/details/detail/exhibitionFile";
|
|
import exhibitionFile from "@/components/ledger/details/detail/exhibitionFile";
|
|
import exhibitionImage from "@/components/ledger/details/detail/exhibitionImage";
|
|
import exhibitionImage from "@/components/ledger/details/detail/exhibitionImage";
|
|
|
|
+ import exhibitionVideo from "@/components/ledger/details/detail/exhibitionVideo";
|
|
import exhibitionCrux from "@/components/ledger/details/detail/exhibitionCrux";
|
|
import exhibitionCrux from "@/components/ledger/details/detail/exhibitionCrux";
|
|
|
|
+ import exhibitionEnergy from "@/components/ledger/details/detail/exhibitionEnergy";
|
|
import exhibitionMaintain from "@/components/ledger/details/detail/exhibitionMaintain";
|
|
import exhibitionMaintain from "@/components/ledger/details/detail/exhibitionMaintain";
|
|
import selectRadio from "@/components/ledger/details/detail/selectRadio";
|
|
import selectRadio from "@/components/ledger/details/detail/selectRadio";
|
|
import tools from "@/utils/scan/tools"
|
|
import tools from "@/utils/scan/tools"
|
|
- import { getDataDictionary, queryEquip, BeatchQueryParam } from "@/api/scan/request";
|
|
|
|
- import { mapGetters, mapActions } from "vuex";
|
|
|
|
|
|
+ import {BeatchQueryParam, getDataDictionary, queryEquip} from "@/api/scan/request";
|
|
|
|
+ import {mapGetters} from "vuex";
|
|
|
|
+
|
|
function flattenKeys(obj) {
|
|
function flattenKeys(obj) {
|
|
let res = {}
|
|
let res = {}
|
|
|
|
+
|
|
function isObject(val) {
|
|
function isObject(val) {
|
|
return typeof val === 'object' && !Array.isArray(val)
|
|
return typeof val === 'object' && !Array.isArray(val)
|
|
}
|
|
}
|
|
|
|
+
|
|
function digKeys(prev, obj) {
|
|
function digKeys(prev, obj) {
|
|
Object.entries(obj).forEach(([key, value]) => {
|
|
Object.entries(obj).forEach(([key, value]) => {
|
|
const currentKey = prev ? `${prev}.${key}` : key
|
|
const currentKey = prev ? `${prev}.${key}` : key
|
|
@@ -81,10 +89,12 @@
|
|
components: {
|
|
components: {
|
|
exhibitionBaseInformation,
|
|
exhibitionBaseInformation,
|
|
exhibitionFile,
|
|
exhibitionFile,
|
|
|
|
+ exhibitionVideo,
|
|
exhibitionImage,
|
|
exhibitionImage,
|
|
exhibitionMaintain,
|
|
exhibitionMaintain,
|
|
selectRadio,
|
|
selectRadio,
|
|
- exhibitionCrux
|
|
|
|
|
|
+ exhibitionCrux,
|
|
|
|
+ exhibitionEnergy
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
this.id = this.$route.query.equipId;
|
|
this.id = this.$route.query.equipId;
|
|
@@ -129,17 +139,27 @@
|
|
exhibitionBaseInformation: {
|
|
exhibitionBaseInformation: {
|
|
information: {}
|
|
information: {}
|
|
},
|
|
},
|
|
|
|
+ exhibitionEnergy:{
|
|
|
|
+ title:'能耗信息'
|
|
|
|
+ },
|
|
exhibitionMaintain: {
|
|
exhibitionMaintain: {
|
|
title: '维修/维保记录'
|
|
title: '维修/维保记录'
|
|
},
|
|
},
|
|
- exhibitionFile: {},
|
|
|
|
|
|
+ exhibitionFile: {
|
|
|
|
+ title: '文件',
|
|
|
|
+ list: {}
|
|
|
|
+ },
|
|
exhibitionCrux: {
|
|
exhibitionCrux: {
|
|
title: '关键信息点:',
|
|
title: '关键信息点:',
|
|
cruxArray: [],
|
|
cruxArray: [],
|
|
- allMessage:[],//全部信息点
|
|
|
|
|
|
+ allMessage: [],//全部信息点
|
|
},
|
|
},
|
|
exhibitionImage: {
|
|
exhibitionImage: {
|
|
title: '图片',
|
|
title: '图片',
|
|
|
|
+ list: {}
|
|
|
|
+ },
|
|
|
|
+ exhibitionVideo:{
|
|
|
|
+ title:'视频',
|
|
list:{}
|
|
list:{}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -169,19 +189,32 @@
|
|
})
|
|
})
|
|
Promise.all([promise1, promise2]).then(values => {
|
|
Promise.all([promise1, promise2]).then(values => {
|
|
this.pointData = values[0].Content;
|
|
this.pointData = values[0].Content;
|
|
- this.exampleData = values[1].Content[0];
|
|
|
|
|
|
+ let obj = flattenKeys(values[1].Content[0])
|
|
|
|
+ this.exampleData = obj;
|
|
this.handleRadios(1)
|
|
this.handleRadios(1)
|
|
|
|
+
|
|
this.pointData.forEach(item => {
|
|
this.pointData.forEach(item => {
|
|
if (item.InputMode == "L" || item.InputMode == "L1" || item.InputMode == "L2" || item.InputMode == "M") {
|
|
if (item.InputMode == "L" || item.InputMode == "L1" || item.InputMode == "L2" || item.InputMode == "M") {
|
|
let cur = tools.dataForKey(this.exampleData, item.Path);
|
|
let cur = tools.dataForKey(this.exampleData, item.Path);
|
|
if (cur) {
|
|
if (cur) {
|
|
this.criterias.push({
|
|
this.criterias.push({
|
|
- id: exampleData.EquipID,
|
|
|
|
|
|
+ id: this.exampleData.EquipID,
|
|
code: item.InfoPointCode
|
|
code: item.InfoPointCode
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
+ let params = { //获取动态参数
|
|
|
|
+ secret: this.secret,
|
|
|
|
+ ProjId: this.projectId,
|
|
|
|
+ criterias: this.criterias
|
|
|
|
+ }
|
|
|
|
+ if (this.criterias.length) {
|
|
|
|
+ BeatchQueryParam(params, res => {
|
|
|
|
+ console.log(params,'===param===')
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
})
|
|
})
|
|
},
|
|
},
|
|
handleRadios(val) { //判断radio的值显示关键信息,基本信息,图片,文件
|
|
handleRadios(val) { //判断radio的值显示关键信息,基本信息,图片,文件
|
|
@@ -190,8 +223,10 @@
|
|
arr = this.pointData.filter(i => i.Visible)
|
|
arr = this.pointData.filter(i => i.Visible)
|
|
//关键信息点
|
|
//关键信息点
|
|
this.exhibitionCrux.cruxArray = arr.filter(i => i.KeyWord) //todo 融合
|
|
this.exhibitionCrux.cruxArray = arr.filter(i => i.KeyWord) //todo 融合
|
|
- // 图片和文件的处理
|
|
|
|
|
|
+ // 图片和的处理
|
|
this.handlePicList(arr)
|
|
this.handlePicList(arr)
|
|
|
|
+ // 文件处理
|
|
|
|
+ this.handleFileList(arr)
|
|
|
|
|
|
} else if (val == 2) { //有值信息点
|
|
} else if (val == 2) { //有值信息点
|
|
let list = this.pointData
|
|
let list = this.pointData
|
|
@@ -203,9 +238,13 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
arr = list.filter(k => k.value)
|
|
arr = list.filter(k => k.value)
|
|
|
|
+ this.handlePicList(arr)
|
|
|
|
+ this.handleFileList(arr)
|
|
})
|
|
})
|
|
} else { //全部信息点
|
|
} else { //全部信息点
|
|
arr = this.pointData
|
|
arr = this.pointData
|
|
|
|
+ this.handlePicList(arr)
|
|
|
|
+ this.handleFileList(arr)
|
|
}
|
|
}
|
|
this.displayData(arr)
|
|
this.displayData(arr)
|
|
},
|
|
},
|
|
@@ -240,30 +279,65 @@
|
|
//展示图片
|
|
//展示图片
|
|
this.exhibitionImage.list = picObject
|
|
this.exhibitionImage.list = picObject
|
|
},
|
|
},
|
|
|
|
+ handleFileList(arr) {
|
|
|
|
+ let picObject = {}
|
|
|
|
+ //处理数据格式
|
|
|
|
+ let obj = flattenKeys(this.exampleData)
|
|
|
|
+ arr.map(i => {
|
|
|
|
+ if (i.InputMode == 'F2') {
|
|
|
|
+ switch (i.Path) {
|
|
|
|
+ case 'LedgerParam.InsuranceDoc.InsuranceFile':
|
|
|
|
+ case 'LedgerParam.PhotoDoc.Archive':
|
|
|
|
+ case 'LedgerParam.Siteinstall.CheckReport':
|
|
|
|
+ if (obj.hasOwnProperty(i.Path)) {
|
|
|
|
+ i.fileList = obj[i.Path]
|
|
|
|
+ }
|
|
|
|
+ if (picObject[i.InfoPointName]) {
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+ picObject[i.InfoPointName] = []
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ picObject[i.InfoPointName].push({
|
|
|
|
+ ...i,
|
|
|
|
+ })
|
|
|
|
+ break
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+ //展示文件
|
|
|
|
+ this.exhibitionFile.list = picObject
|
|
|
|
+ },
|
|
|
|
+
|
|
displayData(arr) {//对数据进行处理传给组件展示
|
|
displayData(arr) {//对数据进行处理传给组件展示
|
|
const result = {}
|
|
const result = {}
|
|
arr.forEach(i => {
|
|
arr.forEach(i => {
|
|
if (this.exampleData.hasOwnProperty(i.Path) && this.currentRadio != 2) {
|
|
if (this.exampleData.hasOwnProperty(i.Path) && this.currentRadio != 2) {
|
|
i.value = this.exampleData[i.Path]
|
|
i.value = this.exampleData[i.Path]
|
|
- console.log(i.value, '======')
|
|
|
|
}
|
|
}
|
|
- 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,
|
|
|
|
- Value: i.value
|
|
|
|
- })
|
|
|
|
- } else {
|
|
|
|
- result[`${i.FirstName}${i.SecondName ? '/' + i.SecondName : ''}`] = {
|
|
|
|
- paths: [{
|
|
|
|
|
|
+ if(i.InputMode != 'F2') {
|
|
|
|
+ if (result[`${i.FirstName}${i.SecondName ? '/' + i.SecondName : ''}`]) {
|
|
|
|
+ result[`${i.FirstName}${i.SecondName ? '/' + i.SecondName : ''}`].paths.push({
|
|
Path: i.Path,
|
|
Path: i.Path,
|
|
InfoPointName: i.InfoPointName,
|
|
InfoPointName: i.InfoPointName,
|
|
InfoPointCode: i.InfoPointCode,
|
|
InfoPointCode: i.InfoPointCode,
|
|
- Value: i.value
|
|
|
|
- }]
|
|
|
|
|
|
+ Value: i.value,
|
|
|
|
+ Visible: i.Visible
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ result[`${i.FirstName}${i.SecondName ? '/' + i.SecondName : ''}`] = {
|
|
|
|
+ paths: [{
|
|
|
|
+ Path: i.Path,
|
|
|
|
+ InfoPointName: i.InfoPointName,
|
|
|
|
+ InfoPointCode: i.InfoPointCode,
|
|
|
|
+ Value: i.value,
|
|
|
|
+ Visible: i.Visible
|
|
|
|
+ }]
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
})
|
|
})
|
|
this.exhibitionBaseInformation.information = result
|
|
this.exhibitionBaseInformation.information = result
|
|
this.exhibitionCrux.allMessage = result
|
|
this.exhibitionCrux.allMessage = result
|
|
@@ -274,7 +348,6 @@
|
|
changeRadio(val) { //1,需采集,2,有值,3,全部
|
|
changeRadio(val) { //1,需采集,2,有值,3,全部
|
|
this.handleRadios(val)
|
|
this.handleRadios(val)
|
|
this.currentRadio = val
|
|
this.currentRadio = val
|
|
- console.log(val, '=======val======')
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
@@ -353,7 +426,6 @@
|
|
.content-media {
|
|
.content-media {
|
|
height: calc(100% - 60px);
|
|
height: calc(100% - 60px);
|
|
border: 1px solid #ccc;
|
|
border: 1px solid #ccc;
|
|
- background: @bgc;
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|