|
@@ -1,15 +1,27 @@
|
|
|
<template>
|
|
|
<div class="tableDisplay">
|
|
|
<div class="header">
|
|
|
- <el-button style="float:left;" size="small" type="default" icon="el-icon-back" @click="goBack"></el-button>
|
|
|
- <span :title="`${name} - ${code}`" class="details-title"><b>{{ name }} - {{ code }}</b></span>
|
|
|
+ <el-button
|
|
|
+ style="float: left"
|
|
|
+ size="small"
|
|
|
+ type="default"
|
|
|
+ icon="el-icon-back"
|
|
|
+ @click="goBack"
|
|
|
+ ></el-button>
|
|
|
+ <span :title="`${name} - ${code}`" class="details-title"
|
|
|
+ ><b>{{ name }} - {{ code }}</b></span
|
|
|
+ >
|
|
|
</div>
|
|
|
<div class="content">
|
|
|
- <el-scrollbar style="height:100%;">
|
|
|
+ <el-scrollbar style="height: 100%">
|
|
|
<div class="content-scrollbar">
|
|
|
<div class="content-left">
|
|
|
<div class="content-keyPoint">
|
|
|
- <exhibitionCrux :exhibitionCrux="exhibitionCrux" :type="type" @cruxSuccess="cruxSuccess"/>
|
|
|
+ <exhibitionCrux
|
|
|
+ :exhibitionCrux="exhibitionCrux"
|
|
|
+ :type="type"
|
|
|
+ @cruxSuccess="cruxSuccess"
|
|
|
+ />
|
|
|
</div>
|
|
|
<div class="content-showType">
|
|
|
<selectRadio
|
|
@@ -19,48 +31,69 @@
|
|
|
</div>
|
|
|
<div class="content-point">
|
|
|
<div class="content-point-left">
|
|
|
- <exhibitionBaseInformation :exhibitionBaseInformation="exhibitionBaseInformation"/>
|
|
|
+ <exhibitionBaseInformation
|
|
|
+ :exhibitionBaseInformation="exhibitionBaseInformation"
|
|
|
+ />
|
|
|
</div>
|
|
|
<div class="content-point-right">
|
|
|
- <exhibitionEnergy :exhibitionEnergy="exhibitionEnergy"/>
|
|
|
+ <exhibitionEnergy :exhibitionEnergy="exhibitionEnergy" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="content-right">
|
|
|
<div class="content-repair">
|
|
|
- <exhibitionMaintain :exhibitionMaintain="exhibitionMaintain"/>
|
|
|
+ <exhibitionMaintain :exhibitionMaintain="exhibitionMaintain" />
|
|
|
</div>
|
|
|
<div class="content-media">
|
|
|
- <exhibitionImage :exhibitionImage="exhibitionImage" v-show="isShowImage"/>
|
|
|
- <exhibitionVideo :exhibitionVideo="exhibitionVideo" v-show="isShowVideo"/>
|
|
|
- <exhibitionFile :exhibitionFile="exhibitionFile" v-show="isShowFile"/>
|
|
|
+ <exhibitionImage
|
|
|
+ :exhibitionImage="exhibitionImage"
|
|
|
+ v-show="isShowImage"
|
|
|
+ />
|
|
|
+ <exhibitionVideo
|
|
|
+ :exhibitionVideo="exhibitionVideo"
|
|
|
+ v-show="isShowVideo"
|
|
|
+ />
|
|
|
+ <exhibitionFile
|
|
|
+ :exhibitionFile="exhibitionFile"
|
|
|
+ v-show="isShowFile"
|
|
|
+ />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-scrollbar>
|
|
|
</div>
|
|
|
<div class="footer">
|
|
|
- <el-button-group style="float:right;margin:8px 10px 0 0">
|
|
|
+ <el-button-group style="float: right; margin: 8px 10px 0 0">
|
|
|
<el-button
|
|
|
- :disabled="list.findIndex(item => item.value == id) == 0"
|
|
|
+ :disabled="list.findIndex((item) => item.value == id) == 0"
|
|
|
@click="handleClickPrev"
|
|
|
size="mini"
|
|
|
- icon="el-icon-arrow-left">
|
|
|
+ icon="el-icon-arrow-left"
|
|
|
+ >
|
|
|
上一页
|
|
|
</el-button>
|
|
|
- <el-select size="mini" style="float:left;margin:0 10px;" v-model="id" @change="handleChangeExample"
|
|
|
- placeholder="请选择">
|
|
|
+ <el-select
|
|
|
+ size="mini"
|
|
|
+ style="float: left; margin: 0 10px"
|
|
|
+ v-model="id"
|
|
|
+ @change="handleChangeExample"
|
|
|
+ placeholder="请选择"
|
|
|
+ >
|
|
|
<el-option
|
|
|
v-for="item in list"
|
|
|
:key="item.value"
|
|
|
:label="item.label"
|
|
|
- :value="item.value">
|
|
|
+ :value="item.value"
|
|
|
+ >
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
<el-button
|
|
|
- :disabled="list.findIndex(item => item.value == id) == list.length-1"
|
|
|
+ :disabled="
|
|
|
+ list.findIndex((item) => item.value == id) == list.length - 1
|
|
|
+ "
|
|
|
@click="handleClickNext"
|
|
|
- size="mini">
|
|
|
+ size="mini"
|
|
|
+ >
|
|
|
下一页
|
|
|
<i class="el-icon-arrow-right el-icon--right"></i>
|
|
|
</el-button>
|
|
@@ -78,11 +111,11 @@ import exhibitionCrux from "@/components/old-adm/ledger/components/details/detai
|
|
|
import exhibitionEnergy from "@/components/old-adm/ledger/components/details/detail/exhibitionEnergy";
|
|
|
import exhibitionMaintain from "@/components/old-adm/ledger/components/details/detail/exhibitionMaintain";
|
|
|
import selectRadio from "@/components/old-adm/ledger/components/details/detail/selectRadio";
|
|
|
-import tools from "@/utils/old-adm/scan/tools"
|
|
|
+import tools from "@/utils/old-adm/scan/tools";
|
|
|
import ScanController from "@/controller/old-adm/ScanController";
|
|
|
import Dic from "@/controller/old-adm/dicController";
|
|
|
import EquipController from "@/controller/old-adm/equipController";
|
|
|
-import {mapGetters} from "vuex";
|
|
|
+import { mapGetters } from "vuex";
|
|
|
|
|
|
export default {
|
|
|
name: "deviceDetails",
|
|
@@ -94,7 +127,7 @@ export default {
|
|
|
exhibitionMaintain,
|
|
|
selectRadio,
|
|
|
exhibitionCrux,
|
|
|
- exhibitionEnergy
|
|
|
+ exhibitionEnergy,
|
|
|
},
|
|
|
created() {
|
|
|
this.id = this.$route.query.equipId;
|
|
@@ -105,365 +138,405 @@ export default {
|
|
|
this.getData();
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapGetters("layout", ["projectId", "secret", "userId", "group_code"])
|
|
|
+ ...mapGetters("layout", ["projectId", "secret", "userId", "group_code"]),
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- id: '', //当前设备id
|
|
|
- name: '', //当前设备本地名称
|
|
|
- code: '', //当前设备的本地编码
|
|
|
- type: '', //设备类型
|
|
|
+ id: "", //当前设备id
|
|
|
+ name: "", //当前设备本地名称
|
|
|
+ code: "", //当前设备的本地编码
|
|
|
+ type: "", //设备类型
|
|
|
list: [], //设备列表
|
|
|
pointData: [], //信息点数据
|
|
|
exampleData: {}, //实例数据
|
|
|
- currentRadio: '1',//当前选中的select
|
|
|
+ currentRadio: "1", //当前选中的select
|
|
|
criterias: [], //动态参数
|
|
|
criteriasArray: [],
|
|
|
selectRadio: {
|
|
|
- information: '设备信息点',
|
|
|
- initRadio: '1',
|
|
|
+ information: "设备信息点",
|
|
|
+ initRadio: "1",
|
|
|
radioList: [
|
|
|
{
|
|
|
- value: '显示需采集信息点',
|
|
|
- label: '1'
|
|
|
+ value: "显示需采集信息点",
|
|
|
+ label: "1",
|
|
|
},
|
|
|
{
|
|
|
- value: '显示有值信息点',
|
|
|
- label: '2'
|
|
|
+ value: "显示有值信息点",
|
|
|
+ label: "2",
|
|
|
},
|
|
|
{
|
|
|
- value: '显示全部信息点',
|
|
|
- label: '3'
|
|
|
- }
|
|
|
- ]
|
|
|
+ value: "显示全部信息点",
|
|
|
+ label: "3",
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
exhibitionBaseInformation: {
|
|
|
- information: {}
|
|
|
+ information: {},
|
|
|
},
|
|
|
exhibitionEnergy: {
|
|
|
- title: '能耗信息',
|
|
|
- firstName: '',
|
|
|
+ title: "能耗信息",
|
|
|
+ firstName: "",
|
|
|
dynamic: [],
|
|
|
- list: {}
|
|
|
+ list: {},
|
|
|
},
|
|
|
exhibitionMaintain: {
|
|
|
- title: '维修/维保记录'
|
|
|
+ title: "维修/维保记录",
|
|
|
},
|
|
|
exhibitionFile: {
|
|
|
- title: '文件',
|
|
|
- list: {}
|
|
|
+ title: "文件",
|
|
|
+ list: {},
|
|
|
},
|
|
|
exhibitionCrux: {
|
|
|
- title: '关键信息点:',
|
|
|
+ title: "关键信息点:",
|
|
|
cruxArray: [],
|
|
|
- allMessage: [],//全部信息点
|
|
|
+ allMessage: [], //全部信息点
|
|
|
},
|
|
|
exhibitionImage: {
|
|
|
- title: '图片',
|
|
|
+ title: "图片",
|
|
|
list: {},
|
|
|
- arr: []
|
|
|
+ arr: [],
|
|
|
},
|
|
|
exhibitionVideo: {
|
|
|
- title: '视频',
|
|
|
- list: []
|
|
|
+ title: "视频",
|
|
|
+ list: [],
|
|
|
},
|
|
|
- instance: {},//实例信息处理
|
|
|
+ instance: {}, //实例信息处理
|
|
|
isShowImage: false,
|
|
|
isShowVideo: false,
|
|
|
isShowFile: false,
|
|
|
- }
|
|
|
+ };
|
|
|
},
|
|
|
methods: {
|
|
|
deepCopy(obj) {
|
|
|
- return JSON.parse(JSON.stringify(obj))
|
|
|
+ return JSON.parse(JSON.stringify(obj));
|
|
|
},
|
|
|
cruxSuccess() {
|
|
|
- this.getData()
|
|
|
+ this.getData();
|
|
|
},
|
|
|
// 获取表头和实例数据(动态数据在组件中获取,在此格式化请求参数)
|
|
|
getData() {
|
|
|
let params1 = {
|
|
|
- orders: "sort asc",
|
|
|
- pageNumber: 1,
|
|
|
- pageSize: 1000,
|
|
|
- type: this.type
|
|
|
- }, params2 = {
|
|
|
- filters: `id='${this.id}'`,
|
|
|
- };
|
|
|
+ orders: "sort asc",
|
|
|
+ pageNumber: 1,
|
|
|
+ pageSize: 1000,
|
|
|
+ type: this.type,
|
|
|
+ },
|
|
|
+ params2 = {
|
|
|
+ filters: `id='${this.id}'`,
|
|
|
+ };
|
|
|
let promise1 = new Promise((resolve, reject) => {
|
|
|
- Dic.getDataDictionary(params1, res => {
|
|
|
- resolve(res)
|
|
|
- })
|
|
|
- })
|
|
|
+ Dic.getDataDictionary(params1, (res) => {
|
|
|
+ resolve(res);
|
|
|
+ });
|
|
|
+ });
|
|
|
let promise2 = new Promise((resolve, reject) => {
|
|
|
- EquipController.queryEquip(params2).then(res => {
|
|
|
- resolve(res)
|
|
|
- })
|
|
|
- })
|
|
|
+ EquipController.queryEquip(params2).then((res) => {
|
|
|
+ resolve(res);
|
|
|
+ });
|
|
|
+ });
|
|
|
// 数据初始化
|
|
|
this.exhibitionEnergy.dynamic = [];
|
|
|
this.criterias = [];
|
|
|
|
|
|
- Promise.all([promise1, promise2]).then(values => {
|
|
|
+ Promise.all([promise1, promise2]).then((values) => {
|
|
|
this.pointData = values[0].content;
|
|
|
this.exampleData = values[1].content[0];
|
|
|
- this.name = this.exampleData.localName ? this.exampleData.localName : this.exampleData.name ? this.exampleData.name : '';
|
|
|
- this.code = this.exampleData.localId ? this.exampleData.localId : '';
|
|
|
+ this.name = this.exampleData.localName
|
|
|
+ ? this.exampleData.localName
|
|
|
+ : this.exampleData.name
|
|
|
+ ? this.exampleData.name
|
|
|
+ : "";
|
|
|
+ this.code = this.exampleData.localId ? this.exampleData.localId : "";
|
|
|
let obj = this.deepCopy(values[1].content[0]);
|
|
|
obj = tools.flattenKeys(obj);
|
|
|
- for (let key in obj) { //删除对象中数组为空的项
|
|
|
+ for (let key in obj) {
|
|
|
+ //删除对象中数组为空的项
|
|
|
if (Array.isArray(obj[key]) && !obj[key].length) {
|
|
|
- delete obj[key]
|
|
|
+ delete obj[key];
|
|
|
}
|
|
|
}
|
|
|
this.instance = obj;
|
|
|
- this.pointData.forEach(item => {
|
|
|
+ this.pointData.forEach((item) => {
|
|
|
if (item.category != "STATIC") {
|
|
|
let cur = tools.dataForKey(this.exampleData, item.path);
|
|
|
if (cur) {
|
|
|
this.criterias.push({
|
|
|
objectId: this.exampleData.id,
|
|
|
- infoCode: item.code
|
|
|
- })
|
|
|
+ infoCode: item.code,
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
- if (this.instance.hasOwnProperty(item.path)) {
|
|
|
- item.value = this.instance[item.path]
|
|
|
- }
|
|
|
- })
|
|
|
- let params = { //获取动态参数
|
|
|
+ if (this.instance.hasOwnProperty(item.path)) {
|
|
|
+ item.value = this.instance[item.path];
|
|
|
+ }
|
|
|
+ });
|
|
|
+ let params = {
|
|
|
+ //获取动态参数
|
|
|
groupCode: this.group_code,
|
|
|
appId: "datacenter",
|
|
|
projectId: this.projectId,
|
|
|
- data: []
|
|
|
- }
|
|
|
- params.data = this.criterias
|
|
|
+ data: [],
|
|
|
+ };
|
|
|
+ params.data = this.criterias;
|
|
|
if (this.criterias.length) {
|
|
|
- ScanController.BeatchQueryParam(params, res => {
|
|
|
+ ScanController.BeatchQueryParam(params, (res) => {
|
|
|
this.criteriasArray = res.data;
|
|
|
- res.data.length && res.data.map(child => {
|
|
|
- this.pointData.map(head => {
|
|
|
- if (head.code == child.infoCode) {
|
|
|
- if (head.dataSource) {
|
|
|
- head.dataSource.forEach(i => {
|
|
|
- if (i.code == child.data) {
|
|
|
- this.$set(head, 'data', i.name)
|
|
|
- }
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.$set(head, 'data', child.data)
|
|
|
+ res.data.length &&
|
|
|
+ res.data.map((child) => {
|
|
|
+ this.pointData.map((head) => {
|
|
|
+ if (head.code == child.infoCode) {
|
|
|
+ if (head.dataSource) {
|
|
|
+ head.dataSource.forEach((i) => {
|
|
|
+ if (i.code == child.data) {
|
|
|
+ this.$set(head, "data", i.name);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$set(head, "data", child.data);
|
|
|
+ }
|
|
|
+ // this.$set(head, 'svalue', child.value)
|
|
|
+ this.$set(head, "svalue", child.infoValue);
|
|
|
+ // this.$set(head, 'receivetime', child.receivetime)
|
|
|
+ this.$set(head, "receivetime", child.time);
|
|
|
+ this.$set(head, "error", child.error);
|
|
|
}
|
|
|
- // this.$set(head, 'svalue', child.value)
|
|
|
- this.$set(head, 'svalue', child.infoValue)
|
|
|
- // this.$set(head, 'receivetime', child.receivetime)
|
|
|
- this.$set(head, 'receivetime', child.time)
|
|
|
- this.$set(head, 'error', child.error)
|
|
|
- }
|
|
|
- return head
|
|
|
- })
|
|
|
- })
|
|
|
+ return head;
|
|
|
+ });
|
|
|
+ });
|
|
|
this.handleRadios(this.currentRadio);
|
|
|
- this.handleEnclosure() //处理图片视频文件信息
|
|
|
- })
|
|
|
+ this.handleEnclosure(); //处理图片视频文件信息
|
|
|
+ });
|
|
|
} else {
|
|
|
this.handleRadios(this.currentRadio);
|
|
|
- this.handleEnclosure() //处理图片视频文件信息
|
|
|
+ this.handleEnclosure(); //处理图片视频文件信息
|
|
|
}
|
|
|
-
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
handleEnclosure() {
|
|
|
//图片文件处理,脱离radio控制
|
|
|
- let isArr = []
|
|
|
- isArr = this.pointData.filter(k => k.value)
|
|
|
- this.handlePicList(isArr)
|
|
|
- this.handleFileList(isArr)
|
|
|
+ let isArr = [];
|
|
|
+ isArr = this.pointData.filter((k) => k.value);
|
|
|
+ this.handlePicList(isArr);
|
|
|
+ this.handleFileList(isArr);
|
|
|
},
|
|
|
- handleRadios(val) { //判断radio的值显示关键信息,基本信息,图片,文件
|
|
|
- let arr = []
|
|
|
+ handleRadios(val) {
|
|
|
+ //判断radio的值显示关键信息,基本信息,图片,文件
|
|
|
+ let arr = [];
|
|
|
//关键信息点
|
|
|
- this.exhibitionCrux.cruxArray = this.pointData.filter(i => i.keyWord)
|
|
|
- this.exhibitionCrux.cruxArray.map(i => {
|
|
|
+ this.exhibitionCrux.cruxArray = this.pointData.filter((i) => i.keyWord);
|
|
|
+ this.exhibitionCrux.cruxArray.map((i) => {
|
|
|
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)
|
|
|
- } else if (val == 2) { //有值信息点
|
|
|
- arr = this.pointData.filter(k => k.value)
|
|
|
- } else { //全部信息点
|
|
|
- arr = this.pointData
|
|
|
+ if (val == 1) {
|
|
|
+ //需采集信息
|
|
|
+ arr = this.pointData.filter((i) => i.visible);
|
|
|
+ } else if (val == 2) {
|
|
|
+ //有值信息点
|
|
|
+ arr = this.pointData.filter((k) => k.value);
|
|
|
+ } else {
|
|
|
+ //全部信息点
|
|
|
+ arr = this.pointData;
|
|
|
}
|
|
|
- this.displayData(arr)
|
|
|
+ this.displayData(arr);
|
|
|
},
|
|
|
handlePicList(arr) {
|
|
|
- let picObject = {}
|
|
|
- let video = []
|
|
|
+ let picObject = {};
|
|
|
+ let video = [];
|
|
|
//处理数据格式
|
|
|
- arr.map(i => {
|
|
|
- if (i.dataType == 'ATTACHMENT') {
|
|
|
+ arr.map((i) => {
|
|
|
+ if (i.dataType == "ATTACHMENT") {
|
|
|
switch (i.path) {
|
|
|
- case 'infos.installPic':
|
|
|
- case 'infos.nameplate':
|
|
|
- case 'infos.pic':
|
|
|
+ case "infos.installPic":
|
|
|
+ case "infos.nameplate":
|
|
|
+ case "infos.pic":
|
|
|
if (this.instance.hasOwnProperty(i.path)) {
|
|
|
- i.PicList = this.instance[i.path].filter(i => i.type === 'image' || i.type === 'panorama')
|
|
|
- video = video.concat(this.instance[i.path].filter(i => i.type === 'video'))
|
|
|
+ i.PicList = this.instance[i.path].filter(
|
|
|
+ (i) => i.type === "image" || i.type === "panorama"
|
|
|
+ );
|
|
|
+ video = video.concat(
|
|
|
+ this.instance[i.path].filter((i) => i.type === "video")
|
|
|
+ );
|
|
|
}
|
|
|
if (picObject[i.name]) {
|
|
|
} else {
|
|
|
- picObject[i.name] = []
|
|
|
+ picObject[i.name] = [];
|
|
|
}
|
|
|
picObject[i.name].push({
|
|
|
...i,
|
|
|
- })
|
|
|
+ });
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- })
|
|
|
+ });
|
|
|
//展示图片
|
|
|
- let isArray = [] //获取图片数组
|
|
|
+ let isArray = []; //获取图片数组
|
|
|
for (let i in picObject) {
|
|
|
if (Array.isArray(picObject[i])) {
|
|
|
- let list = picObject[i]
|
|
|
- list.forEach(i => {
|
|
|
+ let list = picObject[i];
|
|
|
+ list.forEach((i) => {
|
|
|
if (i.PicList) {
|
|
|
- isArray.push(...i.PicList)
|
|
|
+ isArray.push(...i.PicList);
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
- this.exhibitionImage.list = picObject
|
|
|
- this.exhibitionImage.arr = isArray
|
|
|
- this.exhibitionVideo.list = video
|
|
|
+ this.exhibitionImage.list = picObject;
|
|
|
+ this.exhibitionImage.arr = isArray;
|
|
|
+ this.exhibitionVideo.list = video;
|
|
|
//判断是否显示图片组件
|
|
|
- this.isShowImage = isArray.length ? true : false
|
|
|
+ this.isShowImage = isArray.length ? true : false;
|
|
|
//判断是否显示video组件
|
|
|
- this.isShowVideo = video.length ? true : false
|
|
|
-
|
|
|
+ this.isShowVideo = video.length ? true : false;
|
|
|
},
|
|
|
handleFileList(arr) {
|
|
|
- let picObject = {}
|
|
|
+ let picObject = {};
|
|
|
//处理数据格式
|
|
|
- arr.map(i => {
|
|
|
- if (i.dataType == 'ATTACHMENT') {
|
|
|
+ arr.map((i) => {
|
|
|
+ if (i.dataType == "ATTACHMENT") {
|
|
|
switch (i.path) {
|
|
|
- case 'infos.originalCertificate': //原厂证明
|
|
|
- case 'infos.acceptanceReport': //验收报告
|
|
|
- case 'infos.maintainManual': //维修保养手册
|
|
|
- case 'infos.archive': //设备文档
|
|
|
- case 'infos.drawing': //设备图纸
|
|
|
- case 'infos.approachingAcceptance': //进场验收单
|
|
|
- case 'infos.testReport': //检测报告
|
|
|
- case 'infos.supplierContract': //供应合同
|
|
|
- case 'infos.productCertification': //产品合格证
|
|
|
- case 'infos.operationManual': //操作说明书
|
|
|
- case 'infos.insuranceFile': //保险文件
|
|
|
- case 'infos.checkReport': //安装质检报告
|
|
|
- case 'infos.installDrawing': //安装图纸
|
|
|
- case 'infos.installInstruction': //安装说明书
|
|
|
- case 'infos.designIDGraph': //设计工况空调机组处理过程焓湿图
|
|
|
- case 'infos.fanCharacterCurve': //风机性能曲线
|
|
|
+ case "infos.originalCertificate": //原厂证明
|
|
|
+ case "infos.acceptanceReport": //验收报告
|
|
|
+ case "infos.maintainManual": //维修保养手册
|
|
|
+ case "infos.archive": //设备文档
|
|
|
+ case "infos.drawing": //设备图纸
|
|
|
+ case "infos.approachingAcceptance": //进场验收单
|
|
|
+ case "infos.testReport": //检测报告
|
|
|
+ case "infos.supplierContract": //供应合同
|
|
|
+ case "infos.productCertification": //产品合格证
|
|
|
+ case "infos.operationManual": //操作说明书
|
|
|
+ case "infos.insuranceFile": //保险文件
|
|
|
+ case "infos.checkReport": //安装质检报告
|
|
|
+ case "infos.installDrawing": //安装图纸
|
|
|
+ case "infos.installInstruction": //安装说明书
|
|
|
+ case "infos.designIDGraph": //设计工况空调机组处理过程焓湿图
|
|
|
+ case "infos.fanCharacterCurve": //风机性能曲线
|
|
|
if (this.instance.hasOwnProperty(i.path)) {
|
|
|
- i.fileList = this.instance[i.path]
|
|
|
+ i.fileList = this.instance[i.path];
|
|
|
}
|
|
|
if (picObject[i.name]) {
|
|
|
-
|
|
|
} else {
|
|
|
- picObject[i.name] = []
|
|
|
+ picObject[i.name] = [];
|
|
|
}
|
|
|
picObject[i.name].push({
|
|
|
...i,
|
|
|
- })
|
|
|
- break
|
|
|
+ });
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
//展示文件
|
|
|
- this.exhibitionFile.list = picObject
|
|
|
- let isArray = [] //获取文件数组
|
|
|
+ this.exhibitionFile.list = picObject;
|
|
|
+ let isArray = []; //获取文件数组
|
|
|
for (let i in picObject) {
|
|
|
if (Array.isArray(picObject[i])) {
|
|
|
- let list = picObject[i]
|
|
|
- list.forEach(i => {
|
|
|
+ let list = picObject[i];
|
|
|
+ list.forEach((i) => {
|
|
|
if (i.fileList) {
|
|
|
- isArray.push(...i.fileList)
|
|
|
+ isArray.push(...i.fileList);
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
//判断是否显示文件组件
|
|
|
- this.isShowFile = isArray.length ? true : false
|
|
|
-
|
|
|
+ this.isShowFile = isArray.length ? true : false;
|
|
|
},
|
|
|
- changeRadio(val) { //1,需采集,2,有值,3,全部
|
|
|
- this.handleRadios(val)
|
|
|
- this.currentRadio = val
|
|
|
+ changeRadio(val) {
|
|
|
+ //1,需采集,2,有值,3,全部
|
|
|
+ this.handleRadios(val);
|
|
|
+ this.currentRadio = val;
|
|
|
},
|
|
|
formatDate(str) {
|
|
|
if (str) {
|
|
|
- if (str.includes('-')) {
|
|
|
- return str
|
|
|
+ if (str.includes("-")) {
|
|
|
+ return str;
|
|
|
} else {
|
|
|
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)
|
|
|
+ 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)
|
|
|
+ return (
|
|
|
+ str.substr(0, 4) +
|
|
|
+ "-" +
|
|
|
+ str.substr(4, 2) +
|
|
|
+ "-" +
|
|
|
+ str.substr(6, 2) +
|
|
|
+ " " +
|
|
|
+ str.substr(8, 2)
|
|
|
+ );
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
- return '--'
|
|
|
+ return "--";
|
|
|
}
|
|
|
},
|
|
|
- displayData(arr) {//对数据进行处理传给组件展示
|
|
|
- const result = {}
|
|
|
+ displayData(arr) {
|
|
|
+ //对数据进行处理传给组件展示
|
|
|
+ const result = {};
|
|
|
const resultEnergy = {};
|
|
|
- arr.map(i => {
|
|
|
+ arr.map((i) => {
|
|
|
if (this.instance.hasOwnProperty(i.path) && this.currentRadio != 2) {
|
|
|
- i.value = this.instance[i.path]
|
|
|
+ i.value = this.instance[i.path];
|
|
|
}
|
|
|
- if (i.dataType == 'DATETIME') {
|
|
|
+ if (i.dataType == "DATETIME") {
|
|
|
if (this.instance.hasOwnProperty(i.path)) {
|
|
|
- let time = this.instance[i.path]
|
|
|
- i.value = this.formatDate(time)
|
|
|
+ let time = this.instance[i.path];
|
|
|
+ i.value = this.formatDate(time);
|
|
|
}
|
|
|
}
|
|
|
if (i.dataSource && i.dataSource.length) {
|
|
|
// let source = JSON.parse(i.dataSource)
|
|
|
- let source = i.dataSource
|
|
|
+ let source = i.dataSource;
|
|
|
//判断输入类型
|
|
|
- if (i.dataType == 'ENUM') {
|
|
|
- let d1l = tools.formatDataSource(i.dataSource)
|
|
|
- d1l.forEach(k => {
|
|
|
+ if (i.dataType == "ENUM") {
|
|
|
+ let d1l = tools.formatDataSource(i.dataSource);
|
|
|
+ d1l.forEach((k) => {
|
|
|
if (k.code == this.instance[i.path]) {
|
|
|
- i.value = k.name
|
|
|
+ i.value = k.name;
|
|
|
}
|
|
|
- })
|
|
|
- } else if (i.dataType == 'MENUM' || i.dataType == 'DATETIME'){
|
|
|
+ });
|
|
|
+ } else if (i.dataType == "MENUM" || i.dataType == "DATETIME") {
|
|
|
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(',')
|
|
|
+ let transArray = this.instance[i.path].split(",");
|
|
|
+ i.value = source
|
|
|
+ .filter((item) => transArray.includes(item.code))
|
|
|
+ .map((item) => item.name)
|
|
|
+ .join(",");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- source.forEach(j => {
|
|
|
+ source.forEach((j) => {
|
|
|
if (j.code == this.instance[i.path]) {
|
|
|
- i.value = j.name
|
|
|
+ i.value = j.name;
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
}
|
|
|
// 动态信息点处理
|
|
|
switch (i.category) {
|
|
|
case "STATIC":
|
|
|
- if (result[`${i.firstName}${i.secondName ? '/' + i.secondName : ''}`]) {
|
|
|
- result[`${i.firstName}${i.secondName ? '/' + i.secondName : ''}`].paths.push({
|
|
|
+ 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,
|
|
@@ -476,29 +549,39 @@ export default {
|
|
|
type: i.type,
|
|
|
dataType: i.dataType,
|
|
|
dataSource: i.dataSource,
|
|
|
- })
|
|
|
+ });
|
|
|
} else {
|
|
|
- result[`${i.firstName}${i.secondName ? '/' + i.secondName : ''}`] = {
|
|
|
- paths: [{
|
|
|
- Path: i.path,
|
|
|
- InfoPointName: i.name,
|
|
|
- InfoPointCode: i.code,
|
|
|
- Value: i.value,
|
|
|
- Visible: i.visible,
|
|
|
- KeyWord: i.keyWord,
|
|
|
- classCode: i.classCode,
|
|
|
- id: i.id,
|
|
|
- groupCode: i.groupCode,
|
|
|
- type: i.type,
|
|
|
- dataType: i.dataType,
|
|
|
- dataSource: i.dataSource,
|
|
|
- }]
|
|
|
- }
|
|
|
+ result[
|
|
|
+ `${i.firstName}${i.secondName ? "/" + i.secondName : ""}`
|
|
|
+ ] = {
|
|
|
+ paths: [
|
|
|
+ {
|
|
|
+ Path: i.path,
|
|
|
+ InfoPointName: i.name,
|
|
|
+ InfoPointCode: i.code,
|
|
|
+ Value: i.value,
|
|
|
+ Visible: i.visible,
|
|
|
+ KeyWord: i.keyWord,
|
|
|
+ classCode: i.classCode,
|
|
|
+ id: i.id,
|
|
|
+ groupCode: i.groupCode,
|
|
|
+ type: i.type,
|
|
|
+ dataType: i.dataType,
|
|
|
+ dataSource: i.dataSource,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ };
|
|
|
}
|
|
|
- break
|
|
|
+ break;
|
|
|
default:
|
|
|
- if (resultEnergy[`${i.firstName}${i.secondName ? '/' + i.secondName : ''}`]) {
|
|
|
- resultEnergy[`${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,
|
|
@@ -512,60 +595,67 @@ export default {
|
|
|
FirstName: i.firstName,
|
|
|
dataType: i.dataType,
|
|
|
dataSource: i.dataSource,
|
|
|
- })
|
|
|
+ });
|
|
|
} else {
|
|
|
- resultEnergy[`${i.firstName}${i.secondName ? '/' + i.secondName : ''}`] = {
|
|
|
- paths: [{
|
|
|
- Path: i.path,
|
|
|
- InfoPointName: i.name,
|
|
|
- InfoPointCode: i.code,
|
|
|
- value: i.svalue,
|
|
|
- Visible: i.visible,
|
|
|
- KeyWord: i.keyWord,
|
|
|
- data: i.data,
|
|
|
- receivetime: i.receivetime,
|
|
|
- error: i.error,
|
|
|
- Unit: i.unit,
|
|
|
- FirstName: i.firstName,
|
|
|
- dataType: i.dataType,
|
|
|
- dataSource: i.dataSource,
|
|
|
- }]
|
|
|
- }
|
|
|
+ resultEnergy[
|
|
|
+ `${i.firstName}${i.secondName ? "/" + i.secondName : ""}`
|
|
|
+ ] = {
|
|
|
+ paths: [
|
|
|
+ {
|
|
|
+ Path: i.path,
|
|
|
+ InfoPointName: i.name,
|
|
|
+ InfoPointCode: i.code,
|
|
|
+ value: i.svalue,
|
|
|
+ Visible: i.visible,
|
|
|
+ KeyWord: i.keyWord,
|
|
|
+ data: i.data,
|
|
|
+ receivetime: i.receivetime,
|
|
|
+ error: i.error,
|
|
|
+ Unit: i.unit,
|
|
|
+ FirstName: i.firstName,
|
|
|
+ dataType: i.dataType,
|
|
|
+ dataSource: i.dataSource,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ };
|
|
|
}
|
|
|
}
|
|
|
- })
|
|
|
- this.exhibitionBaseInformation.information = result
|
|
|
- this.exhibitionCrux.allMessage = result
|
|
|
+ });
|
|
|
+ this.exhibitionBaseInformation.information = result;
|
|
|
+ this.exhibitionCrux.allMessage = result;
|
|
|
this.exhibitionEnergy.list = resultEnergy;
|
|
|
},
|
|
|
goBack() {
|
|
|
- this.$router.push({path: "/ledger/facility", name: "facilityLedger" })
|
|
|
+ this.$router.push({
|
|
|
+ path: "/ledger/facility",
|
|
|
+ // name: "facilityLedger",
|
|
|
+ });
|
|
|
},
|
|
|
// 切换实例
|
|
|
handleChangeExample() {
|
|
|
- this.selectRadio.initRadio = '1';
|
|
|
- this.currentRadio = '1';
|
|
|
+ this.selectRadio.initRadio = "1";
|
|
|
+ this.currentRadio = "1";
|
|
|
this.getData();
|
|
|
},
|
|
|
// 切换上一个实例
|
|
|
handleClickPrev() {
|
|
|
- let index = this.list.findIndex(item => item.value == this.id);
|
|
|
+ let index = this.list.findIndex((item) => item.value == this.id);
|
|
|
this.id = this.list[index - 1].value;
|
|
|
this.handleChangeExample();
|
|
|
},
|
|
|
// 切换下一个实例
|
|
|
handleClickNext() {
|
|
|
- let index = this.list.findIndex(item => item.value == this.id);
|
|
|
+ let index = this.list.findIndex((item) => item.value == this.id);
|
|
|
this.id = this.list[index + 1].value;
|
|
|
this.handleChangeExample();
|
|
|
},
|
|
|
},
|
|
|
watch: {
|
|
|
projectId() {
|
|
|
- this.$router.push({ path: "/ledger/facility" })
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
+ this.$router.push({ path: "/ledger/facility" });
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="less">
|
|
@@ -671,5 +761,4 @@ export default {
|
|
|
/deep/ .el-scrollbar__wrap {
|
|
|
overflow-x: hidden;
|
|
|
}
|
|
|
-
|
|
|
</style>
|