|
@@ -14,7 +14,7 @@
|
|
|
:placeholder="'请选择'"
|
|
|
/>
|
|
|
<div class="system-content">
|
|
|
- <div v-for="(item) in systemContentData" :key="'key_' + item.id" class="item-content" :class="{'active': item.isActive}" @click="changeEquipment(item.id)">
|
|
|
+ <div v-for="(item) in systemContentData" :key="'key_' + item.category_code" class="item-content" :class="{'active': item.isActive}" @click="changeEquipment(item.category_code)">
|
|
|
<div class="first-row">
|
|
|
<div>{{item.name}}</div>
|
|
|
<div>{{item.isMaintenance?'维保中' : ''}}</div>
|
|
@@ -48,7 +48,7 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="attachments_num" label="报告">
|
|
|
<template slot-scope="scope">
|
|
|
- <span style="color: #025BAA" @click="showReportDetail(scope.row)">{{ scope.row.attachments_num?(scope.row.attachments_num+ '张') : '—'}}</span>
|
|
|
+ <span style="color: #025BAA" @click="showReportDetail(scope.row, 'equip')">{{ scope.row.attachments_num?(scope.row.attachments_num+ '张') : '—'}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -84,7 +84,7 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column width="100" property="attachmentsNum" label="报告">
|
|
|
<template slot-scope="scope">
|
|
|
- <span style="color: #025BAA">{{ scope.row.attachmentsNum?(scope.row.attachmentsNum+ '张') : '—'}}</span>
|
|
|
+ <span style="color: #025BAA" @click="showReportDetail(scope.row, 'his')">{{ scope.row.attachmentsNum?(scope.row.attachmentsNum+ '张') : '—'}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -105,7 +105,7 @@
|
|
|
<div class="pictures-menu">
|
|
|
<div v-for="(item) in pictureList" :key="'id_' + item.id" class="item" @click="changeCurImg(item.id)" :class="{'active': item.isActive}">
|
|
|
<img :src="item.url" alt="">
|
|
|
- <div class="name">{{item.name}}</div>
|
|
|
+ <div class="name" :title="item.name">{{item.name}}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="cur-img-container">
|
|
@@ -161,9 +161,9 @@ export default {
|
|
|
showDetail: false, // 显示照片、报告详情
|
|
|
detailTitle: '图片预览', // 弹窗名称
|
|
|
pictureList: [
|
|
|
- {id: 1, url: require('../../assets/images/login_back.png'), name: '图层名称1.jpg'},
|
|
|
- {id: 2, url: require('../../assets/images/matter_pop3.png'), name: '图层名称2.jpg'},
|
|
|
- {id: 3, url: require('../../assets/images/login_back.png'), name: '图层名称3.jpg'},
|
|
|
+ // {id: 1, url: require('../../assets/images/login_back.png'), name: '图层名称1.jpg'},
|
|
|
+ // {id: 2, url: require('../../assets/images/matter_pop3.png'), name: '图层名称2.jpg'},
|
|
|
+ // {id: 3, url: require('../../assets/images/login_back.png'), name: '图层名称3.jpg'},
|
|
|
], // 图片列表
|
|
|
curImg: {}, // 当前图片
|
|
|
}
|
|
@@ -231,7 +231,6 @@ export default {
|
|
|
|
|
|
_.forEach(data[0].assetTypeList, (item, index) => {
|
|
|
let itemData = {
|
|
|
- id: item.id,
|
|
|
name: item.category_name,
|
|
|
isMaintenance: item.is_detecting,
|
|
|
statusNum: item.is_exception_num,
|
|
@@ -245,9 +244,10 @@ export default {
|
|
|
abnormalList.push(itemData);
|
|
|
}
|
|
|
})
|
|
|
- this.systemContentData = abnormalList.concat(newData);
|
|
|
- _.map(this.systemContentData, (o, i) => {return o.isActive = i === 0});
|
|
|
+ newData = abnormalList.concat(newData);
|
|
|
+ _.map(newData, (o, i) => {return o.isActive = i === 0});
|
|
|
const { query } = this.$route;
|
|
|
+ this.systemContentData = newData;
|
|
|
if (!_.isEmpty(query) && query.equipId) {
|
|
|
_.map(this.systemContentData, (o) => {return o.isActive = o.id == query.equipId});
|
|
|
}
|
|
@@ -259,7 +259,7 @@ export default {
|
|
|
* 切换系统下的设备
|
|
|
*/
|
|
|
changeEquipment(id) {
|
|
|
- _.map(this.systemContentData, (o) => {return o.isActive = o.id === id});
|
|
|
+ _.map(this.systemContentData, (o) => {return o.isActive = o.category_code === id});
|
|
|
this.getTableData();
|
|
|
},
|
|
|
/**
|
|
@@ -398,8 +398,14 @@ export default {
|
|
|
*/
|
|
|
showReportDetail(val) {
|
|
|
console.log('val', val)
|
|
|
- if (!val.file_type || !val.file_type_id) {
|
|
|
- return
|
|
|
+ if (type === 'equip') {
|
|
|
+ if (!val.file_type || !val.file_type_id) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (!val.attachments_num) {
|
|
|
+ return
|
|
|
+ }
|
|
|
}
|
|
|
this.showDetail = true;
|
|
|
this.detailTitle = '附件预览';
|
|
@@ -425,14 +431,15 @@ export default {
|
|
|
newData.push({
|
|
|
id: item.id,
|
|
|
url: item.urlname,
|
|
|
- isActive: index === 0
|
|
|
+ isActive: index === 0,
|
|
|
+ name: item.description
|
|
|
})
|
|
|
})
|
|
|
if (this.detailTitle === '图片预览') {
|
|
|
- // this.pictureList = newData;
|
|
|
+ this.pictureList = newData;
|
|
|
this.curImg = this.pictureList[0];
|
|
|
} else {
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
})
|
|
@@ -575,6 +582,9 @@ export default {
|
|
|
line-height: 16px;
|
|
|
margin-top: 12px;
|
|
|
text-align: center;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ white-space: nowrap;
|
|
|
}
|
|
|
&:not(:last-of-type){
|
|
|
margin-bottom: 20px;
|