Revert "修改地图"

This reverts commit ea612ad905.

# Conflicts:
#	ruoyi-ui/src/assets/board/senso/bg2.jpg
dev
夜笙歌 7 months ago
parent 651831313e
commit 0b9239a98f

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 KiB

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

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

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

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

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