|
|
@ -20,7 +20,7 @@
|
|
|
|
:class-option="{...chart1TableOption,limitMoveNum:4}"
|
|
|
|
:class-option="{...chart1TableOption,limitMoveNum:4}"
|
|
|
|
:data="table2Data"
|
|
|
|
:data="table2Data"
|
|
|
|
class="case-item"
|
|
|
|
class="case-item"
|
|
|
|
style="height: 84%;overflow: hidden;"
|
|
|
|
style="height: 84%;overflow: auto;"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
<div
|
|
|
|
v-for="(item, index) in table2Data"
|
|
|
|
v-for="(item, index) in table2Data"
|
|
|
@ -72,7 +72,6 @@
|
|
|
|
<div
|
|
|
|
<div
|
|
|
|
v-for="(item, index) in table1Data"
|
|
|
|
v-for="(item, index) in table1Data"
|
|
|
|
:key="index"
|
|
|
|
:key="index"
|
|
|
|
|
|
|
|
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<div :style='"background-color:" + ((index % 2 === 0)? "#053460":"#032d57") '>
|
|
|
|
<div :style='"background-color:" + ((index % 2 === 0)? "#053460":"#032d57") '>
|
|
|
|
<div
|
|
|
|
<div
|
|
|
@ -315,8 +314,10 @@ import {handleAlarmInfo} from "@/api/board/index";
|
|
|
|
import {selectBeaconDevicesHistory} from "../../../api/board/GPS";
|
|
|
|
import {selectBeaconDevicesHistory} from "../../../api/board/GPS";
|
|
|
|
import {selectMonitorElectronic} from "../../../api/board";
|
|
|
|
import {selectMonitorElectronic} from "../../../api/board";
|
|
|
|
import gif from "@/assets/board/index/dot.png";
|
|
|
|
import gif from "@/assets/board/index/dot.png";
|
|
|
|
|
|
|
|
import {wgs84togcj02} from '@/utils/coordinate'
|
|
|
|
|
|
|
|
|
|
|
|
let map = null
|
|
|
|
let map = null
|
|
|
|
|
|
|
|
let markers=[]
|
|
|
|
let polyEditor = null
|
|
|
|
let polyEditor = null
|
|
|
|
let texts = []
|
|
|
|
let texts = []
|
|
|
|
let polygons = []
|
|
|
|
let polygons = []
|
|
|
@ -351,6 +352,8 @@ export default {
|
|
|
|
singleHeight: 0, // 单步运动停止的高度(默认值0是无缝不停止的滚动) direction => 0/1
|
|
|
|
singleHeight: 0, // 单步运动停止的高度(默认值0是无缝不停止的滚动) direction => 0/1
|
|
|
|
singleWidth: 0, // 单步运动停止的宽度(默认值0是无缝不停止的滚动) direction => 2/3
|
|
|
|
singleWidth: 0, // 单步运动停止的宽度(默认值0是无缝不停止的滚动) direction => 2/3
|
|
|
|
waitTime: 0,
|
|
|
|
waitTime: 0,
|
|
|
|
|
|
|
|
autoPlay: false,
|
|
|
|
|
|
|
|
navigation: false
|
|
|
|
},
|
|
|
|
},
|
|
|
|
chart1Option: {
|
|
|
|
chart1Option: {
|
|
|
|
grid: {
|
|
|
|
grid: {
|
|
|
@ -396,12 +399,12 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
async mounted() {
|
|
|
|
async mounted() {
|
|
|
|
await this.getData()
|
|
|
|
await this.getData()
|
|
|
|
setInterval(async ()=>{
|
|
|
|
setInterval(async () => {
|
|
|
|
|
|
|
|
|
|
|
|
await this.setAlarmInfos()
|
|
|
|
await this.setAlarmInfos()
|
|
|
|
await this.getAubDevice()
|
|
|
|
await this.getAubDevice()
|
|
|
|
await this.getTable2Data()
|
|
|
|
await this.getTable2Data()
|
|
|
|
},1000*60)
|
|
|
|
}, 1000 * 60)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
async getData() {
|
|
|
|
async getData() {
|
|
|
@ -450,7 +453,7 @@ export default {
|
|
|
|
map = new AMap.Map('map', {
|
|
|
|
map = new AMap.Map('map', {
|
|
|
|
// mapStyle: 'amap://styles/blue',
|
|
|
|
// mapStyle: 'amap://styles/blue',
|
|
|
|
zoom: 11,
|
|
|
|
zoom: 11,
|
|
|
|
center: [113.4, 23.35],
|
|
|
|
center: [104, 36.30],
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
setText(e) {
|
|
|
|
setText(e) {
|
|
|
@ -482,6 +485,7 @@ export default {
|
|
|
|
let e = position.map(val => {
|
|
|
|
let e = position.map(val => {
|
|
|
|
return [val.longitude, val.latitude]
|
|
|
|
return [val.longitude, val.latitude]
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
console.log(e)
|
|
|
|
let thisPolygon = new AMap.Polygon({
|
|
|
|
let thisPolygon = new AMap.Polygon({
|
|
|
|
path: e,
|
|
|
|
path: e,
|
|
|
|
fillColor: val > 0 ? '#ff0000' : '#1791fc',
|
|
|
|
fillColor: val > 0 ? '#ff0000' : '#1791fc',
|
|
|
@ -555,7 +559,8 @@ export default {
|
|
|
|
async getTable2Data() {
|
|
|
|
async getTable2Data() {
|
|
|
|
const {data} = await selectDeviceLatitudeAndLongitude(this.$store.getters.sceneId)
|
|
|
|
const {data} = await selectDeviceLatitudeAndLongitude(this.$store.getters.sceneId)
|
|
|
|
this.table2Data = data
|
|
|
|
this.table2Data = data
|
|
|
|
console.log(data)
|
|
|
|
map.remove(markers)
|
|
|
|
|
|
|
|
markers = []
|
|
|
|
data.forEach(e => {
|
|
|
|
data.forEach(e => {
|
|
|
|
if (e.alarmElectronFence) {
|
|
|
|
if (e.alarmElectronFence) {
|
|
|
|
this.setMarker1(e)
|
|
|
|
this.setMarker1(e)
|
|
|
@ -565,13 +570,20 @@ export default {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
setMarker(e) {
|
|
|
|
setMarker(v) {
|
|
|
|
|
|
|
|
let e = v
|
|
|
|
|
|
|
|
let location = wgs84togcj02(v.longitude, v.latitude)
|
|
|
|
|
|
|
|
e.longitude = location[0]
|
|
|
|
|
|
|
|
e.latitude = location[1]
|
|
|
|
|
|
|
|
if(v.deviceName === '吊地沟E1'){
|
|
|
|
|
|
|
|
console.log(location)
|
|
|
|
|
|
|
|
}
|
|
|
|
let marker = new AMap.Marker({
|
|
|
|
let marker = new AMap.Marker({
|
|
|
|
position: [e.longitude, e.latitude], // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
|
|
|
|
position: [e.longitude, e.latitude], // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
|
|
|
|
title: `信息\n经度:${e.longitude}\n纬度:${e.latitude}\n名称:${e.deviceLocation}\n备注:${e.remark||''}`,
|
|
|
|
title: `信息\n经度:${e.longitude}\n纬度:${e.latitude}\n名称:${e.deviceLocation}\n备注:${e.remark || ''}`,
|
|
|
|
offset: new AMap.Pixel(-20, -40),
|
|
|
|
offset: new AMap.Pixel(-20, -40),
|
|
|
|
content: `<div>
|
|
|
|
content: `<div>
|
|
|
|
<img src="${gif}" alt="" width=" 40px" style="animation:an1 2s ease-in-out infinite;" >
|
|
|
|
<img src="${gif}" alt="" width=" 40px" >
|
|
|
|
</div>`
|
|
|
|
</div>`
|
|
|
|
});
|
|
|
|
});
|
|
|
|
marker.on('click', async () => {
|
|
|
|
marker.on('click', async () => {
|
|
|
@ -587,7 +599,12 @@ export default {
|
|
|
|
const {data} = await selectMonitorElectronic(e.deviceId)
|
|
|
|
const {data} = await selectMonitorElectronic(e.deviceId)
|
|
|
|
data.map(e => e.hwFenceAreaList).flat(1).forEach(e => {
|
|
|
|
data.map(e => e.hwFenceAreaList).flat(1).forEach(e => {
|
|
|
|
if (e.areaShapeFlag === '1') {
|
|
|
|
if (e.areaShapeFlag === '1') {
|
|
|
|
this.setPolygon(e.areaRange.split('_').map(e => e.split(',').map(v => parseFloat(v))))
|
|
|
|
this.setPolygon(e.areaRange.split('_').map(e => e.split(',').map(v => parseFloat(v))).map(v => {
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
longitude: v[0],
|
|
|
|
|
|
|
|
latitude: v[1],
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (e.areaShapeFlag === '2') {
|
|
|
|
if (e.areaShapeFlag === '2') {
|
|
|
|
let arr = e.areaRange.split(',')
|
|
|
|
let arr = e.areaRange.split(',')
|
|
|
@ -596,11 +613,15 @@ export default {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
map.add(marker);
|
|
|
|
map.add(marker);
|
|
|
|
|
|
|
|
markers.push(marker)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
setMarker1(e) {
|
|
|
|
setMarker1(v) {
|
|
|
|
|
|
|
|
let e = v
|
|
|
|
|
|
|
|
e.longitude = wgs84togcj02(v.longitude, v.latitude)[0]
|
|
|
|
|
|
|
|
e.latitude = wgs84togcj02(v.longitude, v.latitude)[1]
|
|
|
|
let marker = new AMap.Marker({
|
|
|
|
let marker = new AMap.Marker({
|
|
|
|
position: [e.longitude, e.latitude], // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
|
|
|
|
position: [e.longitude, e.latitude], // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
|
|
|
|
title: `信息\n经度:${e.longitude}\n纬度:${e.latitude}\n名称:${e.deviceLocation}\n备注:${e.remark||''}`,
|
|
|
|
title: `信息\n经度:${e.longitude}\n纬度:${e.latitude}\n名称:${e.deviceLocation}\n备注:${e.remark || ''}`,
|
|
|
|
offset: new AMap.Pixel(-15, -30),
|
|
|
|
offset: new AMap.Pixel(-15, -30),
|
|
|
|
content: `<div >
|
|
|
|
content: `<div >
|
|
|
|
<svg t="1718261114618" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4305" style="width: 30px;height: 30px;">
|
|
|
|
<svg t="1718261114618" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4305" style="width: 30px;height: 30px;">
|
|
|
@ -621,7 +642,12 @@ export default {
|
|
|
|
const {data} = await selectMonitorElectronic(e.deviceId)
|
|
|
|
const {data} = await selectMonitorElectronic(e.deviceId)
|
|
|
|
data.map(e => e.hwFenceAreaList).flat(1).forEach(e => {
|
|
|
|
data.map(e => e.hwFenceAreaList).flat(1).forEach(e => {
|
|
|
|
if (e.areaShapeFlag === '1') {
|
|
|
|
if (e.areaShapeFlag === '1') {
|
|
|
|
this.setPolygon(e.areaRange.split('_').map(e => e.split(',').map(v => parseFloat(v))))
|
|
|
|
this.setPolygon(e.areaRange.split('_').map(e => e.split(',').map(v => parseFloat(v))).map(v => {
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
longitude: v[0],
|
|
|
|
|
|
|
|
latitude: v[1],
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (e.areaShapeFlag === '2') {
|
|
|
|
if (e.areaShapeFlag === '2') {
|
|
|
|
let arr = e.areaRange.split(',')
|
|
|
|
let arr = e.areaRange.split(',')
|
|
|
@ -630,6 +656,7 @@ export default {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
map.add(marker);
|
|
|
|
map.add(marker);
|
|
|
|
|
|
|
|
markers.push(marker)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
mapOrientation(e) {
|
|
|
|
mapOrientation(e) {
|
|
|
|
map.setZoomAndCenter(16, [e.longitude, e.latitude])
|
|
|
|
map.setZoomAndCenter(16, [e.longitude, e.latitude])
|
|
|
|