Merge remote-tracking branch 'origin/master'

dev
xins 7 months ago
commit bfa20d43ff

@ -124,8 +124,10 @@ export default {
await this.$store.dispatch('app/setSceneId', this.sceneId)
},
toLink(e, nowMenu) {
if (this.$store.getters.sceneId) {
this.nowMenu = nowMenu
this.$router.replace({path: "/board/" + e});
}
},
async dropdownLink(e,) {
this.nowMenu = '2'

@ -1,5 +1,5 @@
<template>
<div class="container">
<div class="container" :style="'background-image: url('+((controlList&& controlList.length === 0) ? bgImg1 : bgImg)+')'">
<div class="title1">监控设备</div>
<div class="centerImg"></div>
<div class="title">监控单元</div>
@ -15,7 +15,7 @@
</span>
</el-tree>
</div>
<div v-if="show" class="equipmentInfo">
<div v-if="show" :class="((controlList&& controlList.length === 0) ? 'equipmentInfo1' : 'equipmentInfo')">
<p>
<span>名称</span>
<span style="color: #d9dee3">{{ MonitorInfo.monitorUnitName }}</span>
@ -35,7 +35,7 @@
</div>
<div v-if="show"
:style="'background-image: url('+(MonitorInfo.monitorPic ? MonitorInfo.monitorPic :defaultImg)+');'"
class="img"></div>
:class="((controlList&& controlList.length === 0) ? 'img1' : 'img')"></div>
<div class="terminal">
<!--el-form :model="form" class="demo-form-inline">
<el-form-item label="传感器名称:">
@ -120,6 +120,8 @@ import {
import defaultImg from '@/assets/board/equipment/icon.png'
import defaultImg1 from '@/assets/board/equipment/icon2.png'
import defaultImg2 from '@/assets/board/equipment/defaultImg.png'
import bgImg from '@/assets/board/equipment/bg.jpg'
import bgImg1 from '@/assets/board/equipment/bg2.jpg'
let getDeviceInterval = null
@ -130,6 +132,8 @@ export default {
defaultImg,
defaultImg1,
defaultImg2,
bgImg,
bgImg1,
show: false,
monitorUnitId: '',
data1: true,
@ -157,8 +161,6 @@ export default {
await this.getTree()
},
switchChange(functionIdentifier, deviceId, deviceCode, modeFunctionId) {
console.log(this.controlList)
console.log(this.controlList)
this.$confirm('确定执行么?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@ -243,7 +245,6 @@ export default {
}
.container {
background-image: url("~@/assets/board/equipment/bg.jpg");
background-repeat: no-repeat;
background-size: 100% 100%;
width: 100%;
@ -305,6 +306,22 @@ export default {
}
}
.equipmentInfo1 {
position: absolute;
top: 52.6%;
left: 17.2%;
width: 28.4%;
height: 44%;
color: #1684c2;
padding: 2vh 0 0 1vw;
p {
margin: 0;
line-height: 10vh;
font-size: 0.9vw;
}
}
.img {
background-repeat: no-repeat;
background-size: 100% 100%;
@ -314,6 +331,15 @@ export default {
width: 12%;
height: 20.4%;
}
.img1{
background-repeat: no-repeat;
background-size: 100% 100%;
position: absolute;
top: 11.5%;
left: 16.9%;
width: 28.8%;
height: 40.4%;
}
.terminal {
position: absolute;

@ -438,7 +438,6 @@ export default {
this.$refs.chart3.setData(option3)
},
dispose(e) {
console.log(e)
this.$confirm('该问题已处理?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',

@ -41,7 +41,8 @@
<span style="color: #fff;"> 起止时间</span>
<div style="display: inline-block;margin-right: 12px;">
<el-date-picker v-model="date" end-placeholder="" format="yyyy-MM-dd hh:ss:mm"
range-separator="至" start-placeholder="开始日期" type="datetimerange" value-format="timestamp">
range-separator="至" start-placeholder="开始日期" type="datetimerange"
value-format="timestamp">
</el-date-picker>
<!-- - -->
<!-- <el-date-picker-->
@ -104,10 +105,12 @@
</div>
<div style="text-align: center;margin: 8px 0;">
<el-button type="primary" v-if="isMap" @click="continueMap"
disabled>已加载 {{(mapOffset + 1) * 100}} 总计 {{mapTotal}}</el-button>
<el-button type="primary" v-if="isMap" @click="continueMap"
:disabled="mapTotal < (mapOffset + 1) * 100">继续加载</el-button>
<el-button v-if="isMap" disabled type="primary"
@click="continueMap">已加载 {{ (mapOffset + 1) * 100 }} 总计 {{ mapTotal }}
</el-button>
<el-button v-if="isMap" :disabled="mapTotal < (mapOffset + 1) * 100" type="primary"
@click="continueMap">继续加载
</el-button>
</div>
<el-table v-show="isMap" :data="mapData" :max-height="40 * vh" highlight-current-row style="width: 100%"
@current-change="mapTableChange">
@ -213,8 +216,8 @@ export default {
console.log(polyline1);
polyline1 = new AMap.Polyline({
path: e,
strokeColor:'#000',
strokeWeight:10,
strokeColor: '#000',
strokeWeight: 10,
borderWeight: 2, // 线 1
});
map.add(polyline1);
@ -248,7 +251,7 @@ export default {
endMarkerhs = e.target.hS
let hs1 = startMarkerhs
let hs2 = endMarkerhs
if(startMarkerhs>endMarkerhs){
if (startMarkerhs > endMarkerhs) {
hs1 = endMarkerhs
hs2 = startMarkerhs
}
@ -320,13 +323,13 @@ export default {
},
setStyle(e) {
if (e.rowIndex % 2 === 0) {
return { textAlign: 'center', backgroundColor: '#08406f', color: '#05aaba' }
return {textAlign: 'center', backgroundColor: '#08406f', color: '#05aaba'}
} else {
return { textAlign: 'center', backgroundColor: '#063468', color: '#05aaba' }
return {textAlign: 'center', backgroundColor: '#063468', color: '#05aaba'}
}
},
async setDeviceInfo() {
const { data } = await getDeviceInfo(this.deviceId)
const {data} = await getDeviceInfo(this.deviceId)
this.topData = data || {}
if (this.topData.gpsFlag !== '1') {
this.date = null
@ -339,7 +342,7 @@ export default {
this.show = false
this.mapOffset = 0
}
const { data } = await getHistoryData({
const {data} = await getHistoryData({
"sceneId": this.$store.getters.sceneId,
"deviceId": this.deviceId,
deviceModeId: this.deviceModeId,
@ -348,11 +351,13 @@ export default {
startTime: this.date?.[0],
endTime: this.date?.[1],
})
console.log(data)
let deviceDataColumns = data.deviceDataColumns
let dataList = data.historyData?.dataList || []
if (dataList.filter(e => (Object.keys(e).includes('longitude') || Object.keys(e).includes('longitude'))).length > 0) {
this.mapTotal = data.historyData.count
if (deviceDataColumns.filter(e => e.columnKey === 'longitude' || e.columnKey === '"latitude"').length >0) {
this.isMap = true
let mapData = dataList.filter(e => (Object.keys(e).includes('longitude') || Object.keys(e).includes('longitude'))).map(e => {
this.mapTotal = data.historyData.count
let mapData = dataList.filter(e => (Object.keys(e).includes('longitude') || Object.keys(e).includes('"latitude"'))).map(e => {
let [lng, lat] = wgs84togcj02(e.longitude, e.latitude)
return {
...e,
@ -380,7 +385,7 @@ export default {
}
},
async setLinkDevices() {
const { data } = await getLinkDevices(this.deviceId)
const {data} = await getLinkDevices(this.deviceId)
this.bottomData = data
},
mapTableChange(e) {
@ -443,47 +448,46 @@ export default {
background-color: #FFF0 !important;
}
/deep/ .el-table th.el-table__cell.is-leaf,
{
/deep/ .el-table th.el-table__cell.is-leaf, {
border-color: #0000;
}
}
/deep/ .el-table::before,
.el-table--group::after,
.el-table--border::after {
/deep/ .el-table::before,
.el-table--group::after,
.el-table--border::after {
background-color: #0000;
}
}
/deep/ .el-table .el-table__header-wrapper th,
.el-table .el-table__fixed-header-wrapper th {
/deep/ .el-table .el-table__header-wrapper th,
.el-table .el-table__fixed-header-wrapper th {
background-color: #0000;
}
}
/deep/ .el-collapse-item__header {
/deep/ .el-collapse-item__header {
background-color: #0000;
border-color: #0000;
height: auto;
}
}
/deep/ .el-collapse {
/deep/ .el-collapse {
border-color: #0000;
}
}
/deep/ .el-table td.el-table__cell {
/deep/ .el-table td.el-table__cell {
border-color: #0000;
}
}
/deep/ .el-table .el-table__header-wrapper th {
/deep/ .el-table .el-table__header-wrapper th {
color: #05ecf3;
}
}
/deep/ .el-table .current-row {
/deep/ .el-table .current-row {
color: #000;
}
}
/deep/ .el-table .el-table__row:hover {
/deep/ .el-table .el-table__row:hover {
color: #000;
}
}
}

@ -15,22 +15,22 @@
<div class="table1">
<div style="background-color: #094170">
<div class="scrollTable" style="font-weight: bold;width: 8%">
<div class="scrollTable" style="font-weight: bold;width: 10%">
告警编号
</div>
<div class="scrollTable" style="font-weight: bold;width: 8%">
<div class="scrollTable" style="font-weight: bold;width: 15%">
告警类型
</div>
<div class="scrollTable" style="font-weight: bold;width: 15%">
告警级别
</div>
<div class="scrollTable" style="font-weight: bold;width: 21%">
<div class="scrollTable" style="font-weight: bold;width: 30%">
告警单元
</div>
<div class="scrollTable" style="font-weight: bold;width: 20%">
告警时间
</div>
<div class="scrollTable" style="font-weight: bold;width: 8%">
<div class="scrollTable" style="font-weight: bold;width: 10%">
处理情况
</div>
</div>
@ -38,23 +38,24 @@
style="height: calc(100% - 33px);overflow: hidden;">
<div v-for="(item, index) in table1Data" :key="index">
<div :style='"background-color:" + ((index % 2 === 0) ? "#053460" : "#032d57")'>
<div class="scrollTable" style="width: 8%">
{{ item.data1 }}
<div class="scrollTable" style="width: 10%">
{{ item.alarmInfoId }}
</div>
<div class="scrollTable" style="width: 8%">
{{ item.data2 }}
<div class="scrollTable" style="width: 15%">
{{ item.alarmTypeName }}
</div>
<div class="scrollTable" style="width: 15%">
{{ item.data3 }}
{{ item.alarmLevelName }}
</div>
<div class="scrollTable" style="width: 21%">
{{ item.data4 }}
<div class="scrollTable" style="width: 30%">
{{ item.monitorUnitName }}
</div>
<div class="scrollTable" style="width: 20%">
{{ item.data5 }}
{{ item.alarmTime }}
</div>
<div class="scrollTable" style="width: 8%">
<span style="color: #67C23A;">已处理</span>
<div class="scrollTable" style="width: 10%">
<el-button v-if="item.handleStatus === '0'" size="mini" type="primary" @click="dispose(item)"></el-button>
<span v-else style="color: #67C23A;">已处理</span>
</div>
</div>
</div>
@ -90,6 +91,9 @@ import {
getAlarmCountGroupAlarmType,
getAlarmInfos
} from '@/api/board/smartScene'
import {
handleAlarmInfo
} from '@/api/board/index'
export default {
components: {
@ -175,15 +179,36 @@ export default {
},
async setAlarmInfos(e) {
const {rows: data} = await getAlarmInfos({"sceneId":e})
this.table1Data = data.map((e,i)=>{
return {
data1: e.alarmInfoId,
data2: e.alarmTypeName,
data3: e.alarmLevelName,
data4: e.monitorUnitName,
data5: e.alarmTime,
this.table1Data = data
},
dispose(e) {
this.$confirm('该问题已处理?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
handleAlarmInfo({
alarmInfoId:e.alarmInfoId
}).then(e=>{
if(e.code === 200){
this.$message({
type: 'success',
message: '已处理!'
});
this.setTable3()
}else{
this.$message({
type: 'info',
message: '网络错误'
});
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
});
});
}
}
};

Loading…
Cancel
Save