|
@@ -11,15 +11,15 @@
|
|
|
@change='changeCurSystem'
|
|
|
v-model='systemId'
|
|
|
:selectdata='systemList'
|
|
|
- :placeholder=''请选择''
|
|
|
+ :placeholder='"请选择"'
|
|
|
hideClear
|
|
|
/>
|
|
|
<div class='system-content'>
|
|
|
<div
|
|
|
v-for='(item) in systemContentData'
|
|
|
- :key=''key_' + item.category_code'
|
|
|
+ :key='"key_" + item.category_code'
|
|
|
class='item-content'
|
|
|
- :class='{'active': item.isActive}'
|
|
|
+ :class='{"active": item.isActive}'
|
|
|
@click='changeEquipment(item.category_code)'
|
|
|
>
|
|
|
<div class='first-row'>
|
|
@@ -31,7 +31,7 @@
|
|
|
{{item.num}}
|
|
|
<span>台</span>
|
|
|
</div>
|
|
|
- <span :class='{'abnormal': item.abnormal}'>{{item.statusNum !== 0?item.statusNum : ''}}</span>
|
|
|
+ <span :class='{"abnormal": item.abnormal}'>{{item.statusNum !== 0?item.statusNum : ''}}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -48,7 +48,7 @@
|
|
|
<template slot-scope='scope'>
|
|
|
<span
|
|
|
style='display: inline-block;width: 6px;height:6px;border-radius: 3px;background: #0091FF;'
|
|
|
- :style='{'background': !scope.row.is_exception?'#0091FF' : '#F54E45'}'
|
|
|
+ :style='{"background": !scope.row.is_exception?"#0091FF" : "#F54E45"}'
|
|
|
></span>
|
|
|
<span style='margin-left: 10px'>{{ !scope.row.is_exception?'正常' : '异常' }}</span>
|
|
|
</template>
|
|
@@ -57,7 +57,7 @@
|
|
|
<template slot-scope='scope'>
|
|
|
<span
|
|
|
style='color: #025BAA'
|
|
|
- @click='showPicturesDetail(scope.row, 'equip')'
|
|
|
+ @click='showPicturesDetail(scope.row, "equip")'
|
|
|
>{{ scope.row.photos_num?(scope.row.photos_num + '张') : '—' }}</span>
|
|
|
<!-- <span style="color: #025BAA" @click="showPicturesDetail(scope.row)">1张</span> -->
|
|
|
</template>
|
|
@@ -66,8 +66,9 @@
|
|
|
<template slot-scope='scope'>
|
|
|
<span
|
|
|
style='color: #025BAA'
|
|
|
- @click='showReportDetail(scope.row, 'equip')'
|
|
|
+ @click='(e) => showReportDetail(scope.row, "equip", e)'
|
|
|
>{{ scope.row.attachments_num?(scope.row.attachments_num+ '张') : '—'}}</span>
|
|
|
+ <!-- <span style="color: #025BAA" @click="(e) => showReportDetail(scope.row, 'equip', e)">1张</span> -->
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -99,7 +100,7 @@
|
|
|
<template slot-scope='scope'>
|
|
|
<span
|
|
|
style='color: #025BAA'
|
|
|
- @click='showPicturesDetail(scope.row, 'his')'
|
|
|
+ @click='showPicturesDetail(scope.row, "his")'
|
|
|
>{{ scope.row.photosNum || scope.row.photosNum === 0?(scope.row.photosNum + '张') : '—' }}</span>
|
|
|
<!-- <span style="color: #025BAA" @click="showPicturesDetail(scope.row)">1张</span> -->
|
|
|
</template>
|
|
@@ -108,8 +109,9 @@
|
|
|
<template slot-scope='scope'>
|
|
|
<span
|
|
|
style='color: #025BAA'
|
|
|
- @click='showReportDetail(scope.row, 'his')'
|
|
|
+ @click='(e) => showReportDetail(scope.row, "his", e)'
|
|
|
>{{ scope.row.attachmentsNum?(scope.row.attachmentsNum+ '张') : '—'}}</span>
|
|
|
+ <!-- <span style="color: #025BAA" @click="(e) => showReportDetail(scope.row, 'his', e)">1张</span> -->
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -130,22 +132,27 @@
|
|
|
<div class='pictures-menu'>
|
|
|
<div
|
|
|
v-for='(item) in pictureList'
|
|
|
- :key=''id_' + item.id'
|
|
|
+ :key='"id_" + item.id'
|
|
|
class='item'
|
|
|
@click='changeCurImg(item.id)'
|
|
|
- :class='{'active': item.isActive}'
|
|
|
+ :class='{"active": item.isActive}'
|
|
|
>
|
|
|
<img :src='item.url' alt />
|
|
|
<div class='name' :title='item.name'>{{item.name}}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class='cur-img-container'>
|
|
|
- <img :src='curImg.url' alt />
|
|
|
+ <img v-if='curImg.url' :src='curImg.url' alt />
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div v-show='showAccessory' class='accessory-container' :style='{"top": accessoryPos.top + "px", "left": accessoryPos.left + "px"}'>
|
|
|
+ <div v-for='(item) in accessoryList' :key='"id_" + item.id'>
|
|
|
+ <a :href='item.url' target='_blank' :title='item.name'>{{item.name}}</a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -158,6 +165,7 @@ import { log } from 'util'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ plazaId: 1000423, // 广场id
|
|
|
systemId: '', // 当前系统Id
|
|
|
systemList: [], // 系统
|
|
|
systemContentData: [
|
|
@@ -196,7 +204,15 @@ export default {
|
|
|
// {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: {} // 当前图片
|
|
|
+ curImg: {}, // 当前图片
|
|
|
+
|
|
|
+ showAccessory: false, // 附件窗口显示状态
|
|
|
+ isClickAccessory: false, // 是否点击的是附件
|
|
|
+ accessoryList: [], // 附件
|
|
|
+ accessoryPos: {
|
|
|
+ top: 0,
|
|
|
+ left: 0
|
|
|
+ } // 附件弹窗位置
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -207,7 +223,20 @@ export default {
|
|
|
|
|
|
computed: {},
|
|
|
|
|
|
+ beforeMount() {
|
|
|
+ let PLAZAID = localStorage.getItem('PLAZAID')
|
|
|
+ this.plazaId = Number(PLAZAID) || 1000423
|
|
|
+ },
|
|
|
mounted() {
|
|
|
+ document.addEventListener('click', () => {
|
|
|
+ setTimeout(() => {
|
|
|
+ if (this.isClickAccessory) {
|
|
|
+ this.isClickAccessory = false
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.showAccessory = false
|
|
|
+ }, 20)
|
|
|
+ })
|
|
|
this.getSystemList()
|
|
|
},
|
|
|
|
|
@@ -249,7 +278,7 @@ export default {
|
|
|
*/
|
|
|
getEquipmentOfSystem() {
|
|
|
let param = {
|
|
|
- plazaId: 1000423,
|
|
|
+ plazaId: this.plazaId,
|
|
|
ccode: 1002347
|
|
|
}
|
|
|
if (this.systemId !== '') {
|
|
@@ -312,7 +341,7 @@ export default {
|
|
|
return o.isActive
|
|
|
}).category_code
|
|
|
}
|
|
|
- let url = `/sms/query?plazaId=1000423&page=${this.curPage}&size=${this.pageSize}&orderBy=is_exception,0`
|
|
|
+ let url = `/data/sms_asset/query?plazaId=${this.plazaId}3&page=${this.curPage}&size=${this.pageSize}&orderBy=is_exception,0`
|
|
|
if (_.trim(this.searchKey) !== '') {
|
|
|
url = `${url}&keyword=${this.searchKey}:sbjc,sbjbm`
|
|
|
}
|
|
@@ -342,7 +371,12 @@ export default {
|
|
|
*/
|
|
|
showEquipmentStatus(row, column, e) {
|
|
|
setTimeout(() => {
|
|
|
- if (this.showDetail) return
|
|
|
+ if (this.showDetail || this.showAccessory) {
|
|
|
+ // if (this.showAccessory) {
|
|
|
+ // this.showAccessory = false;
|
|
|
+ // }
|
|
|
+ return
|
|
|
+ }
|
|
|
this.equipTitle = row.sbjc
|
|
|
this.dialogTableVisible = true
|
|
|
this.assetnum = row.assetnum
|
|
@@ -357,13 +391,13 @@ export default {
|
|
|
let param = {
|
|
|
page: this.hisCurPage,
|
|
|
size: this.hisPageSize,
|
|
|
- plazaId: 1000423,
|
|
|
- // assetnum: this.assetnum,
|
|
|
- assetnum: 24071,
|
|
|
- // startDate: this.startTime,
|
|
|
- startDate: 20000101000000,
|
|
|
- // endDate: this.endTime
|
|
|
- endDate: 20200201000000
|
|
|
+ plazaId: this.plazaId,
|
|
|
+ assetnum: this.assetnum,
|
|
|
+ // assetnum: 24071,
|
|
|
+ startDate: this.startTime,
|
|
|
+ // startDate: 20000101000000,
|
|
|
+ endDate: this.endTime
|
|
|
+ // endDate: 20200201000000
|
|
|
}
|
|
|
queryHistoryTableData('/data/base/queryDateByAssetNum', param).then(res => {
|
|
|
const { result, data, count } = res
|
|
@@ -439,6 +473,30 @@ export default {
|
|
|
/**
|
|
|
* 显示附件详情
|
|
|
*/
|
|
|
+ showReportDetail(val, type, e) {
|
|
|
+ console.log('val', val)
|
|
|
+ if (type === 'equip') {
|
|
|
+ if (!val.file_type || !val.file_type_id) {
|
|
|
+ // return;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (!val.attachments_num) {
|
|
|
+ // return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ console.log('e', e)
|
|
|
+ this.accessoryPos = {
|
|
|
+ top: e.clientY + 5,
|
|
|
+ left: e.clientX - 360 - 5
|
|
|
+ }
|
|
|
+ this.isClickAccessory = true
|
|
|
+ this.showAccessory = true
|
|
|
+ this.detailTitle = '附件预览'
|
|
|
+ this.getDetailData(val)
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 显示附件详情
|
|
|
+ */
|
|
|
showReportDetail(val) {
|
|
|
console.log('val', val)
|
|
|
if (type === 'equip') {
|
|
@@ -462,7 +520,8 @@ export default {
|
|
|
file_type: type === 'equip' ? val.file_type : val.type,
|
|
|
// file_type: 0,
|
|
|
file_type_id: type === 'equip' ? val.file_type_id : val.id,
|
|
|
- // file_type_id: 2914,
|
|
|
+ // file_type_id: this.detailTitle === "图片预览" ?2914 : 1136,
|
|
|
+ // file_type_id: 9886,
|
|
|
type: this.detailTitle === '图片预览' ? 0 : 1
|
|
|
}
|
|
|
queryDetailData('/data/base/queryFileDetails', param).then(res => {
|
|
@@ -480,8 +539,11 @@ export default {
|
|
|
})
|
|
|
if (this.detailTitle === '图片预览') {
|
|
|
this.pictureList = newData
|
|
|
- this.curImg = this.pictureList[0]
|
|
|
+ if (this.pictureList.length > 0) {
|
|
|
+ this.curImg = this.pictureList[0]
|
|
|
+ }
|
|
|
} else {
|
|
|
+ this.accessoryList = newData
|
|
|
}
|
|
|
}
|
|
|
})
|
|
@@ -613,7 +675,7 @@ export default {
|
|
|
margin-right: 21px;
|
|
|
padding-top: 16px;
|
|
|
padding-bottom: 16px;
|
|
|
- width: 180px;
|
|
|
+ padding-right: 5px;
|
|
|
height: 100%;
|
|
|
overflow: auto;
|
|
|
.item {
|
|
@@ -623,6 +685,7 @@ export default {
|
|
|
border-radius: 4px;
|
|
|
}
|
|
|
.name {
|
|
|
+ width: 180px;
|
|
|
font-size: 12px;
|
|
|
color: #1f2429;
|
|
|
line-height: 16px;
|
|
@@ -635,6 +698,9 @@ export default {
|
|
|
&:not(:last-of-type) {
|
|
|
margin-bottom: 20px;
|
|
|
}
|
|
|
+ .active > img {
|
|
|
+ border-color: rgba(31, 35, 41, 0.15);
|
|
|
+ }
|
|
|
}
|
|
|
.active > img {
|
|
|
border-color: rgba(31, 35, 41, 0.15);
|
|
@@ -653,5 +719,32 @@ export default {
|
|
|
max-height: 530px;
|
|
|
}
|
|
|
}
|
|
|
+ .accessory-container {
|
|
|
+ padding-top: 4px;
|
|
|
+ padding-bottom: 4px;
|
|
|
+ width: 360px;
|
|
|
+ max-height: 166px;
|
|
|
+ overflow: auto;
|
|
|
+ position: fixed;
|
|
|
+ background: #fff;
|
|
|
+ box-shadow: 0px 2px 10px 0px rgba(31, 35, 41, 0.1);
|
|
|
+ border-radius: 2px;
|
|
|
+ border: 1px solid rgba(228, 229, 231, 1);
|
|
|
+ z-index: 5000;
|
|
|
+ > div > a {
|
|
|
+ padding-left: 12px;
|
|
|
+ padding-right: 12px;
|
|
|
+ display: block;
|
|
|
+ height: 38px;
|
|
|
+ font-size: 14px;
|
|
|
+ line-height: 38px;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ white-space: nowrap;
|
|
|
+ &:hover {
|
|
|
+ background: #f5f6f7;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|