|
@@ -20,25 +20,41 @@
|
|
<div v-if="activeTab=='detail'" class="content">
|
|
<div v-if="activeTab=='detail'" class="content">
|
|
<iframe v-if="params.isMyTab == 1" height="100%" width="100%" :src="iframeSrc"></iframe>
|
|
<iframe v-if="params.isMyTab == 1" height="100%" width="100%" :src="iframeSrc"></iframe>
|
|
<div v-else class="content-left">
|
|
<div v-else class="content-left">
|
|
- <div class="content-showType"></div>
|
|
|
|
|
|
+ <div class="content-showType">
|
|
|
|
+ <selectRadio
|
|
|
|
+ :selectRadio="selectRadio"
|
|
|
|
+ @changeRadio="changeRadio"
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
<div class="content-point">
|
|
<div class="content-point">
|
|
<div class="content-point-left">
|
|
<div class="content-point-left">
|
|
<el-scrollbar style="height:100%;">
|
|
<el-scrollbar style="height:100%;">
|
|
- <div style="height:1000px"></div>
|
|
|
|
|
|
+ <div >
|
|
|
|
+ <exhibitionBaseInformation :exhibitionBaseInformation="exhibitionBaseInformation"/>
|
|
|
|
+ </div>
|
|
</el-scrollbar>
|
|
</el-scrollbar>
|
|
</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"></div>
|
|
|
|
|
|
+ <div >
|
|
|
|
+ <exhibitionEnergy :exhibitionEnergy="exhibitionEnergy"/>
|
|
|
|
+ </div>
|
|
</el-scrollbar>
|
|
</el-scrollbar>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="content-right">
|
|
<div class="content-right">
|
|
- <div class="content-repair"></div>
|
|
|
|
|
|
+ <div class="content-repair">
|
|
|
|
+ <exhibitionMaintain :exhibitionMaintain="exhibitionMaintain"/>
|
|
|
|
+
|
|
|
|
+ </div>
|
|
<div class="content-media">
|
|
<div class="content-media">
|
|
<el-scrollbar style="height:100%;">
|
|
<el-scrollbar style="height:100%;">
|
|
- <div style="height:1000px"></div>
|
|
|
|
|
|
+ <div >
|
|
|
|
+ <exhibitionImage :exhibitionImage="exhibitionImage"/>
|
|
|
|
+ <exhibitionVideo :exhibitionVideo="exhibitionVideo"/>
|
|
|
|
+ <exhibitionFile :exhibitionFile="exhibitionFile"/>
|
|
|
|
+ </div>
|
|
</el-scrollbar>
|
|
</el-scrollbar>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -53,35 +69,120 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { mapGetters } from "vuex";
|
|
|
|
-import tools from "@/utils/scan/tools";
|
|
|
|
-import { getDataDictionary, queryZone, deleteZone } from '@/api/scan/request';
|
|
|
|
|
|
+ import {mapGetters} from "vuex";
|
|
|
|
+ import tools from "@/utils/scan/tools";
|
|
|
|
+ import {deleteZone, getDataDictionary, queryZone} from '@/api/scan/request';
|
|
|
|
+
|
|
|
|
+ import eqToSpaceTable from '@/components/business_space/newTables/eqToSpaceTable';
|
|
|
|
+ import syInSpaceTable from '@/components/business_space/newTables/syInSpaceTable';
|
|
|
|
+ import exhibitionBaseInformation from "@/components/ledger/details/detail/exhibitionBaseInformation";
|
|
|
|
+ import exhibitionFile from "@/components/ledger/details/detail/exhibitionFile";
|
|
|
|
+ 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 exhibitionEnergy from "@/components/ledger/details/detail/exhibitionEnergy";
|
|
|
|
+ import exhibitionMaintain from "@/components/ledger/details/detail/exhibitionMaintain";
|
|
|
|
+ import selectRadio from "@/components/ledger/details/detail/selectRadio";
|
|
|
|
|
|
-import eqToSpaceTable from '@/components/business_space/newTables/eqToSpaceTable';
|
|
|
|
-import syInSpaceTable from '@/components/business_space/newTables/syInSpaceTable';
|
|
|
|
-export default {
|
|
|
|
- data() {
|
|
|
|
- return {
|
|
|
|
- params: {}, //参数-包含空间id 分区类型 进入方式(1-平面图 2-列表)
|
|
|
|
- tabsList: [
|
|
|
|
- { Code: 'detail', Name: '空间详情' },
|
|
|
|
- { Code: 'Equipment', Name: '空间内设备' },
|
|
|
|
- { Code: 'EquipmentFor', Name: '服务于空间的设备' },
|
|
|
|
- { Code: 'generalSystem', Name: '空间内系统' },
|
|
|
|
- ], //tab页
|
|
|
|
- activeTab: 'detail', //当前选中的tab
|
|
|
|
- pointData: [], //信息点数据
|
|
|
|
- exampleData: {}, //实例数据
|
|
|
|
- criterias: [], //动态参数
|
|
|
|
- iframeSrc: '', //空间详情iframe
|
|
|
|
|
|
+ function flattenKeys(obj) {
|
|
|
|
+ let res = {}
|
|
|
|
+
|
|
|
|
+ function isObject(val) {
|
|
|
|
+ return typeof val === 'object' && !Array.isArray(val)
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ function digKeys(prev, obj) {
|
|
|
|
+ Object.entries(obj).forEach(([key, value]) => {
|
|
|
|
+ const currentKey = prev ? `${prev}.${key}` : key
|
|
|
|
+ if (isObject(value)) {
|
|
|
|
+ digKeys(currentKey, value)
|
|
|
|
+ } else {
|
|
|
|
+ res[currentKey] = value
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ digKeys('', obj)
|
|
|
|
+ return res
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ export default {
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ params: {}, //参数-包含空间id 分区类型 进入方式(1-平面图 2-列表)
|
|
|
|
+ tabsList: [
|
|
|
|
+ {Code: 'detail', Name: '空间详情'},
|
|
|
|
+ {Code: 'Equipment', Name: '空间内设备'},
|
|
|
|
+ {Code: 'EquipmentFor', Name: '服务于空间的设备'},
|
|
|
|
+ {Code: 'generalSystem', Name: '空间内系统'},
|
|
|
|
+ ], //tab页
|
|
|
|
+ activeTab: 'detail', //当前选中的tab
|
|
|
|
+ pointData: [], //信息点数据
|
|
|
|
+ exampleData: {}, //实例数据
|
|
|
|
+ criterias: [], //动态参数
|
|
|
|
+ instance: {},
|
|
|
|
+ iframeSrc: '', //空间详情iframe
|
|
|
|
+ selectRadio: {
|
|
|
|
+ information: '设备信息点',
|
|
|
|
+ radioList: [
|
|
|
|
+ {
|
|
|
|
+ value: '显示需采集信息点',
|
|
|
|
+ label: '1'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ value: '显示有值信息点',
|
|
|
|
+ label: '2'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ value: '显示全部信息点',
|
|
|
|
+ label: '3'
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
|
|
+ },
|
|
|
|
+ exhibitionBaseInformation: {
|
|
|
|
+ information: {},
|
|
|
|
+ style:2
|
|
|
|
+ },
|
|
|
|
+ exhibitionEnergy: {
|
|
|
|
+ title: '能耗信息',
|
|
|
|
+ dynamic: [],
|
|
|
|
+ },
|
|
|
|
+ exhibitionMaintain: {
|
|
|
|
+ title: '维修/维保记录'
|
|
|
|
+ },
|
|
|
|
+ exhibitionFile: {
|
|
|
|
+ title: '文件',
|
|
|
|
+ list: {}
|
|
|
|
+ },
|
|
|
|
+ exhibitionCrux: {
|
|
|
|
+ title: '关键信息点:',
|
|
|
|
+ cruxArray: [],
|
|
|
|
+ allMessage: [],//全部信息点
|
|
|
|
+ },
|
|
|
|
+ exhibitionImage: {
|
|
|
|
+ title: '图片',
|
|
|
|
+ list: {}
|
|
|
|
+ },
|
|
|
|
+ exhibitionVideo: {
|
|
|
|
+ title: '视频',
|
|
|
|
+ list: {}
|
|
|
|
+ }
|
|
|
|
+ }
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
...mapGetters("layout", ["projectId", "userId", "secret"])
|
|
...mapGetters("layout", ["projectId", "userId", "secret"])
|
|
},
|
|
},
|
|
components: {
|
|
components: {
|
|
eqToSpaceTable,
|
|
eqToSpaceTable,
|
|
- syInSpaceTable
|
|
|
|
|
|
+ syInSpaceTable,
|
|
|
|
+ exhibitionBaseInformation,
|
|
|
|
+ exhibitionFile,
|
|
|
|
+ exhibitionVideo,
|
|
|
|
+ exhibitionImage,
|
|
|
|
+ exhibitionMaintain,
|
|
|
|
+ selectRadio,
|
|
|
|
+ exhibitionCrux,
|
|
|
|
+ exhibitionEnergy
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
this.params = this.$route.query;
|
|
this.params = this.$route.query;
|
|
@@ -93,6 +194,9 @@ export default {
|
|
projectId() { }
|
|
projectId() { }
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ deepCopy(obj) {
|
|
|
|
+ return JSON.parse(JSON.stringify(obj))
|
|
|
|
+ },
|
|
// 返回
|
|
// 返回
|
|
goBack() {
|
|
goBack() {
|
|
this.$router.push({
|
|
this.$router.push({
|
|
@@ -128,6 +232,10 @@ export default {
|
|
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];
|
|
this.exampleData = values[1].Content[0];
|
|
|
|
+ let obj = this.deepCopy(values[1].Content[0]);
|
|
|
|
+ obj = flattenKeys(obj);
|
|
|
|
+ this.instance = obj;
|
|
|
|
+ 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);
|
|
@@ -139,7 +247,171 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
+ let params = { //获取动态参数
|
|
|
|
+ secret: this.secret,
|
|
|
|
+ ProjId: this.projectId,
|
|
|
|
+ data: {
|
|
|
|
+ criterias: this.criterias
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (this.criterias.length) {
|
|
|
|
+ BeatchQueryParam(params, res => {
|
|
|
|
+ res.Content.map(child => {
|
|
|
|
+ this.pointData.forEach(head => {
|
|
|
|
+ if (head.InfoPointCode == child.code) {
|
|
|
|
+ this.exhibitionEnergy.dynamic.push({
|
|
|
|
+ InfoPointCode: head.InfoPointCode,
|
|
|
|
+ InfoPointName: head.InfoPointName,
|
|
|
|
+ Path: head.Path,
|
|
|
|
+ value: child.value,
|
|
|
|
+ data: child.data || '--',
|
|
|
|
+ receivetime: child.receivetime || '',
|
|
|
|
+ error: child.error || '',
|
|
|
|
+ Unit: head.Unit || ''
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ });
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ handleRadios(val) { //判断radio的值显示关键信息,基本信息,图片,文件
|
|
|
|
+ let arr = []
|
|
|
|
+ if (val == 1) { //需采集信息
|
|
|
|
+ arr = this.pointData.filter(i => i.Visible)
|
|
|
|
+ //关键信息点
|
|
|
|
+ this.exhibitionCrux.cruxArray = arr.filter(i => i.KeyWord) //todo 融合
|
|
|
|
+ // 图片和的处理
|
|
|
|
+ this.handlePicList(arr)
|
|
|
|
+ // 文件处理
|
|
|
|
+ this.handleFileList(arr)
|
|
|
|
+
|
|
|
|
+ } else if (val == 2) { //有值信息点
|
|
|
|
+ let list = this.pointData
|
|
|
|
+ list.map(j => {
|
|
|
|
+ if (this.exampleData.hasOwnProperty(j.Path)) {
|
|
|
|
+ return {
|
|
|
|
+ ...j,
|
|
|
|
+ value: this.exampleData[j.Path]
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ arr = list.filter(k => k.value)
|
|
|
|
+ this.handlePicList(arr)
|
|
|
|
+ this.handleFileList(arr)
|
|
|
|
+ })
|
|
|
|
+ } else { //全部信息点
|
|
|
|
+ arr = this.pointData
|
|
|
|
+ this.handlePicList(arr)
|
|
|
|
+ this.handleFileList(arr)
|
|
|
|
+ }
|
|
|
|
+ this.displayData(arr)
|
|
|
|
+ },
|
|
|
|
+ handlePicList(arr) {
|
|
|
|
+ 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':
|
|
|
|
+ if (this.instance.hasOwnProperty(i.Path)) {
|
|
|
|
+ i.PicList = this.instance[i.Path]
|
|
|
|
+ }
|
|
|
|
+ if (picObject[i.InfoPointName]) {
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+ picObject[i.InfoPointName] = []
|
|
|
|
+ }
|
|
|
|
+ picObject[i.InfoPointName].push({
|
|
|
|
+ ...i,
|
|
|
|
+ })
|
|
|
|
+ break;
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
})
|
|
})
|
|
|
|
+ //展示图片
|
|
|
|
+ this.exhibitionImage.list = picObject
|
|
|
|
+ },
|
|
|
|
+ handleFileList(arr) {
|
|
|
|
+ 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 (picObject[i.InfoPointName]) {
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+ picObject[i.InfoPointName] = []
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ picObject[i.InfoPointName].push({
|
|
|
|
+ ...i,
|
|
|
|
+ })
|
|
|
|
+ break
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+ //展示文件
|
|
|
|
+ this.exhibitionFile.list = picObject
|
|
|
|
+ },
|
|
|
|
+ changeRadio(val) { //1,需采集,2,有值,3,全部
|
|
|
|
+ this.handleRadios(val)
|
|
|
|
+ this.currentRadio = val
|
|
|
|
+ },
|
|
|
|
+ displayData(arr) {//对数据进行处理传给组件展示
|
|
|
|
+ const result = {}
|
|
|
|
+ arr.forEach(i => {
|
|
|
|
+ if (this.exampleData.hasOwnProperty(i.Path) && this.currentRadio != 2) {
|
|
|
|
+ i.value = this.exampleData[i.Path]
|
|
|
|
+ }
|
|
|
|
+ switch (i.InputMode) {
|
|
|
|
+ case "L":
|
|
|
|
+ case "L1":
|
|
|
|
+ case "L2":
|
|
|
|
+ case "M":
|
|
|
|
+ case 'F2':
|
|
|
|
+ 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,
|
|
|
|
+ Value: i.value,
|
|
|
|
+ Visible: i.Visible,
|
|
|
|
+ KeyWord: i.KeyWord
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ result[`${i.FirstName}${i.SecondName ? '/' + i.SecondName : ''}`] = {
|
|
|
|
+ paths: [{
|
|
|
|
+ Path: i.Path,
|
|
|
|
+ InfoPointName: i.InfoPointName,
|
|
|
|
+ InfoPointCode: i.InfoPointCode,
|
|
|
|
+ Value: i.value,
|
|
|
|
+ Visible: i.Visible,
|
|
|
|
+ KeyWord: i.KeyWord
|
|
|
|
+ }]
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+ this.exhibitionBaseInformation.information = result
|
|
|
|
+ this.exhibitionCrux.allMessage = result
|
|
},
|
|
},
|
|
// 设置iframe
|
|
// 设置iframe
|
|
setFrame() {
|
|
setFrame() {
|
|
@@ -169,7 +441,8 @@ export default {
|
|
this.getData()
|
|
this.getData()
|
|
this.$message("取消删除")
|
|
this.$message("取消删除")
|
|
})
|
|
})
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+
|
|
}
|
|
}
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
@@ -246,6 +519,7 @@ export default {
|
|
margin-left: 10px;
|
|
margin-left: 10px;
|
|
.content-repair {
|
|
.content-repair {
|
|
height: 50px;
|
|
height: 50px;
|
|
|
|
+ line-height: 50px;
|
|
margin-bottom: 10px;
|
|
margin-bottom: 10px;
|
|
border: 1px solid #ccc;
|
|
border: 1px solid #ccc;
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|