修复问题

master
夜笙歌 2 weeks ago
parent e5ad285ad4
commit 8bd5a00d87

@ -193,6 +193,15 @@
color: #FFF;
opacity: 0.5;
}
.reference{
/*position: fixed;*/
/*bottom: 0;*/
/*left: 50%;*/
/*transform: translateX(-50%);*/
/*color: #000;*/
/*font-size: 14px;*/
/*line-height: 40px;*/
}
</style>
</head>
<body>
@ -204,5 +213,6 @@
<div class="load_title">正在加载系统资源,请耐心等待</div>
</div>
</div>
<!-- <div class="reference"><a href="https://beian.miit.gov.cn">粤ICP备10240187号-3</a></div>-->
</body>
</html>

@ -40,7 +40,7 @@ export function getAlarmInfos(query) {
export function getDeviceOperations(query) {
return request({
// baseURL:'/monitoring-api',
url: '/business/monitorPlatform/getDeviceOperations/0',
url: '/business/monitorPlatform/getDeviceOperations/'+query,
method: 'get',
})
}

@ -10,13 +10,13 @@ import zhLocale from './zh_CN'
Vue.use(VueI18n)
const messages = {
en_US: {
...enLocale,
...elementEnLocale
},
zh_CN: {
...zhLocale,
...elementZhLocale
},
en_US: {
...enLocale,
...elementEnLocale
}
}

@ -5,6 +5,7 @@
<div style="z-index: 99999;">
<BoardTopNav/>
</div>
<div class="reference"><a href="https://beian.miit.gov.cn">粤ICP备10240187号-3</a></div>
</div>
</template>
@ -20,3 +21,16 @@ export default {
},
}
</script>
<style lang="scss" scoped>
.reference{
position: absolute;
bottom: 0;
width: 100%;
text-align: center;
background-color: #fff1;
color: #fff6;
font-size: 14px;
line-height: 20px;
}
</style>

@ -6,6 +6,7 @@
</keep-alive>
</transition>
<iframe-toggle />
<div class="reference"><a href="https://beian.miit.gov.cn">粤ICP备10240187号-3</a></div>
</section>
</template>
@ -27,6 +28,16 @@ export default {
</script>
<style lang="scss" scoped>
.reference{
position: sticky;
top: 100%;
width: 100%;
text-align: center;
background-color: #0002;
color: #000;
font-size: 14px;
line-height: 40px;
}
.app-main {
/* 50= navbar 50 */
min-height: calc(100vh - 50px);

@ -8,7 +8,7 @@ const state = {
},
device: 'desktop',
size: Cookies.get('size') || 'medium',
language: Cookies.get('language') || 'en_US',
language: Cookies.get('language') || 'zh_CN',
sceneId:null
}

@ -1,5 +1,6 @@
import { login, logout, getInfo, refreshToken } from '@/api/login'
import { getToken, setToken, setExpiresIn, removeToken } from '@/utils/auth'
import Cookies from 'js-cookie'
const user = {
state: {
@ -49,6 +50,9 @@ const user = {
commit('SET_TOKEN', data.access_token)
setExpiresIn(data.expires_in)
commit('SET_EXPIRES_IN', data.expires_in)
if(!Cookies.get("language")){
Cookies.set("language", 'zh_CN');
}
resolve()
}).catch(error => {
reject(error)

@ -17,7 +17,7 @@
</div>
</div>
<vue-seamless-scroll
:class-option="{...chart1TableOption,limitMoveNum:10}"
:class-option="{...chart1TableOption,limitMoveNum:4}"
:data="table2Data"
class="case-item"
style="height: 84%;overflow: hidden;"
@ -401,7 +401,7 @@ export default {
await this.setAlarmInfos()
await this.getAubDevice()
await this.getTable2Data()
},1000*5)
},1000*60)
},
methods: {
async getData() {
@ -463,20 +463,20 @@ export default {
} else {
position = [e.centerPoint.longitude, e.centerPoint.latitude]
}
let text = new AMap.Text({
text: '<div style="color:#fff;width: 100%;height: 100%;">' + '总数:' + e.deviceCount + (e.abnormalCount ? ('/异常数量:' + e.abnormalCount) : '') + '</div>',
anchor: 'center',
draggable: true,
cursor: 'pointer',
position: position
});
text.setStyle({
'background-color': e.abnormalCount ? '#fe0000' : '#0055fe',
padding: '4px 12px',
'font-size': '1vw'
})
map.add(text)
texts.push(text)
// let text = new AMap.Text({
// text: '<div style="color:#fff;width: 100%;height: 100%;">' + '' + e.deviceCount + (e.abnormalCount ? ('/' + e.abnormalCount) : '') + '</div>',
// anchor: 'center',
// draggable: true,
// cursor: 'pointer',
// position: position
// });
// text.setStyle({
// 'background-color': e.abnormalCount ? '#fe0000' : '#0055fe',
// padding: '4px 12px',
// 'font-size': '1vw'
// })
// map.add(text)
// texts.push(text)
},
setPolygon(position, val) {
let e = position.map(val => {
@ -568,7 +568,7 @@ export default {
setMarker(e) {
let marker = new AMap.Marker({
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),
content: `<div>
<img src="${gif}" alt="" width=" 40px" style="animation:an1 2s ease-in-out infinite;" >
@ -579,6 +579,7 @@ export default {
map.remove(polygons)
map.remove(circles)
map.remove(texts)
texts = []
polygons = []
circles = []
return
@ -599,7 +600,7 @@ export default {
setMarker1(e) {
let marker = new AMap.Marker({
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),
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;">

@ -38,9 +38,11 @@
<span style="color: #d9dee3">{{ (i || {}).attributeValue }}</span>
</p>
</div>
<div v-if="show"
:style="'background-image: url('+(MonitorInfo.monitorPic ? MonitorInfo.monitorPic :defaultImg)+');'"
:class="((controlList&& controlList.length === 0) ? 'img1' : 'img')"></div>
<el-image
v-if="show"
:class="((controlList&& controlList.length === 0) ? 'img1' : 'img')"
:src="(MonitorInfo.monitorPic ? MonitorInfo.monitorPic :defaultImg)"
fit="contain"></el-image>
<div class="terminal">
<div class="terminalList">
<div v-for="(i,k) in controlList" class="item">
@ -827,7 +829,7 @@ export default {
bottom: 55%;
left: 12%;
color: #f4f4f4;
font-size: 0.7vw;
font-size: 0.6vw;
display: inline-block;
line-height: calc(11vh / 3);
}
@ -839,7 +841,7 @@ export default {
top: 55%;
left: 12%;
color: #f4f4f4;
font-size: 0.7vw;
font-size: 0.6vw;
}
}

@ -46,10 +46,10 @@
</el-table-column>
<el-table-column v-for="i in deviceDataColumns" :label="i.columnName" :prop="i.columnKey" :key="i.columnKey">
<template slot-scope="scope">
<img v-if="tableData[scope.$index][i.columnKey].toString().includes('http')"
<img v-if="(tableData[scope.$index][i.columnKey]||'').toString().includes('http')"
:src="tableData[scope.$index][i.columnKey]" alt="" height="100px"
width="100px">
<span v-else> {{ tableData[scope.$index][i.columnKey].toString() }}</span>
<span v-else> {{ (tableData[scope.$index][i.columnKey]||'').toString() }}</span>
</template>
</el-table-column>
<!-- <el-table-column-->

@ -184,11 +184,11 @@
<el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item label="搜索">
<el-select
:reserve-keyword="true"
v-model="value"
multiple
filterable
remote
reserve-keyword
placeholder="请输入关键词"
@change="setMarker2"
:remote-method="searchMap1"
@ -253,7 +253,7 @@
{{ warInfo.alarmInfoType === '2' ? '监控单元报警' : '' }}
{{ warInfo.alarmInfoType === '3' ? '离线报警' : '' }}
{{ warInfo.alarmInfoType === '4' ? '电子围栏' : '' }}
<!-- {{ warInfo.alarmTypeName }}-->
<!-- {{ warInfo.alarmTypeName }}-->
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
@ -581,9 +581,9 @@ export default {
this.setChart2()
this.setAllNums()
this.setDeviceOperations()
setInterval(()=>{
setInterval(() => {
this.setTable3()
},5000)
}, 5000)
// let data = await axios.get(`https://geo.datav.aliyun.com/areas_v3/bound/${this.code}_full.json`)
// let data = await axios.get(`http://124.223.15.102:3333/componentLib/getMap?id=${this.code}`)
@ -672,7 +672,8 @@ export default {
})
},
async setDeviceOperations() {
let {data: data} = await getDeviceOperations()
// let {data: data} = await getDeviceOperations(this.$store.getters.tenantId)
let {data: data} = await getDeviceOperations(0)
let onlineDevicesTrend = data["onlineDevicesTrend"];
let sortArr = Object.keys(onlineDevicesTrend)
sortArr = sortArr.sort((a, b) => {
@ -1028,7 +1029,13 @@ export default {
const data = await getDeviceByAreaId(this.$store.getters.tenantId)
this.markerData = data.data.map(e => e.devicesList).flat(1)
data.data.map(e => e.devicesList).flat(1).forEach(e => {
this.setMarker(e)
if (e.latitude && e.longitude) {
if (e.ifAlarm !== '1') {
this.setMarker3(e)
} else {
this.setMarker(e)
}
}
})
})
},
@ -1041,25 +1048,27 @@ export default {
title: `信息\n经度${e.longitude}\n纬度${e.latitude}\n名称${e.deviceName}\n`,
offset: new AMap.Pixel(-15, -30),
content: `<div> <svg t="1718261114618" class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" p-id="4305" style="width: 30px;height: 30px;">
<path fill="${(e.ifAlarm === '1') ? '#3D93FD' : '#ff0000'}" d="M512 64.5c-180.5 0-326.9 146.4-326.9 326.9 0 63.3 18 122.3 49.2 172.4 1.1 2 2.1 4 3.2 5.9 34.9 58.2 113.9 128.8 165.5 194.5 66.3 84.4 93.2 158 93.2 158 1.6 1.4 13.1 35.6 15.1 35.8 2.5 0.2 12.6-34 14.5-35.8 0 0 22-69.2 83.7-146.6 56-70.1 142.8-145.7 177-206 0.9-1.6 1.8-3.3 2.6-5 31.5-50.2 49.7-109.6 49.7-173.3 0.1-180.5-146.3-326.8-326.8-326.8z" p-id="4306">
<path fill="${(e.ifAlarm !== '1') ? '#3D93FD' : '#ff0000'}" d="M512 64.5c-180.5 0-326.9 146.4-326.9 326.9 0 63.3 18 122.3 49.2 172.4 1.1 2 2.1 4 3.2 5.9 34.9 58.2 113.9 128.8 165.5 194.5 66.3 84.4 93.2 158 93.2 158 1.6 1.4 13.1 35.6 15.1 35.8 2.5 0.2 12.6-34 14.5-35.8 0 0 22-69.2 83.7-146.6 56-70.1 142.8-145.7 177-206 0.9-1.6 1.8-3.3 2.6-5 31.5-50.2 49.7-109.6 49.7-173.3 0.1-180.5-146.3-326.8-326.8-326.8z" p-id="4306">
</path></svg></div>`
});
marker.on('rightclick', async () => {
// if (markerIds.includes(e.deviceId)) {
// return
// } else {
// markerIds.push(e.deviceId)
// }
const {data} = await selectMonitorElectronic(e.deviceId)
data.map(e => e.hwFenceAreaList).flat(1).forEach(e => {
if (e.areaShapeFlag === '1') {
this.setPolygon(e.areaRange.split('_').map(e => e.split(',').map(v => parseFloat(v))))
}
if (e.areaShapeFlag === '2') {
let arr = e.areaRange.split(',')
this.setCircle([arr[0], arr[1]], arr[2])
}
})
if(polygons.length>0||circles.length>0){
polygons = []
circles = []
map.remove(polygons)
map.remove(circles)
}else{
const {data} = await selectMonitorElectronic(e.deviceId)
data.map(e => e.hwFenceAreaList).flat(1).forEach(e => {
if (e.areaShapeFlag === '1') {
this.setPolygon(e.areaRange.split('_').map(e => e.split(',').map(v => parseFloat(v))))
}
if (e.areaShapeFlag === '2') {
let arr = e.areaRange.split(',')
this.setCircle([arr[0], arr[1]], arr[2])
}
})
}
})
marker.on('dblclick', () => {
this.equipmentInfoDialog = true
@ -1118,19 +1127,60 @@ export default {
map.remove(markers)
map.remove(polygons)
map.remove(circles)
polygons = []
circles = []
markers = []
e.forEach(v => {
console.log(v)
console.log(this.options)
let arr = this.options.filter(r => r.value.deviceId === v) || []
if (arr.length > 0) {
this.setMarker1(arr[0].value)
if (arr[0].value.ifAlarm !== '1') {
this.setMarker1(arr[0].value)
} else {
this.setMarker(arr[0].value)
}
}
})
if(!bl){
if (!bl) {
map.setFitView(markers)
}
},
setMarker3(e) {
let marker = new AMap.Marker({
position: [e.longitude, e.latitude],
title: `信息\n经度${e.longitude}\n纬度${e.latitude}\n名称${e.deviceName}\n`,
offset: new AMap.Pixel(-20, -40),
content: `<div>
<img src="${gif}" alt="" width=" 40px" >
</div>`
});
marker.on('rightclick', async () => {
// if (markerIds.includes(e.deviceId)) {
// return
// } else {
// markerIds.push(e.deviceId)
// }
const {data} = await selectMonitorElectronic(e.deviceId)
data.map(e => e.hwFenceAreaList).flat(1).forEach(e => {
if (e.areaShapeFlag === '1') {
this.setPolygon(e.areaRange.split('_').map(e => e.split(',').map(v => parseFloat(v))))
}
if (e.areaShapeFlag === '2') {
let arr = e.areaRange.split(',')
this.setCircle([arr[0], arr[1]], arr[2])
}
})
})
marker.on('dblclick', () => {
this.equipmentInfoDialog = true
this.equipmentInfo = this.markerData.filter(v => v.monitorUnitId === e.monitorUnitId)
this.monitorUnitId = e.monitorUnitId
// this.$router.push({path: '/board/equipment', query: {monitorUnitId: e.monitorUnitId}})
});
map.add(marker);
markers.push(marker)
},
getDeviceInfo() {
this.$router.push({path: '/board/equipment', query: {monitorUnitId: this.monitorUnitId}})
},
@ -1168,7 +1218,7 @@ export default {
createMap() {
map = new AMap.Map('map', {
zoom: 11,
center: this.centerGeo,
center: this.centerGeo.length === 2 ? this.centerGeo : [116.23, 39.54],
});
},
async searchMap() {
@ -1176,33 +1226,53 @@ export default {
map.remove(markers)
map.remove(polygons)
map.remove(circles)
polygons = []
circles = []
markers = []
this.markerData = data
console.log(data)
data.forEach(e => {
if (e.latitude && e.longitude) {
this.setMarker1(e)
if (e.ifAlarm !== '1') {
this.setMarker1(e)
} else {
this.setMarker(e)
}
}
})
map.setFitView(markers)
},
async searchMap1(name, e) {
console.log(111)
// if(!e){
if (time2) {
clearInterval(time2)
}
time2 = null
if(name.length === 0){
if (name.length === 0) {
const data = await getDeviceByAreaId(this.$store.getters.tenantId)
this.markerData = data.data.map(e => e.devicesList).flat(1)
data.data.map(e => e.devicesList).flat(1).forEach(e => {
this.setMarker(e)
if (e.ifAlarm !== '1') {
this.setMarker1(e)
} else {
this.setMarker(e)
}
})
}else{
} else {
time2 = setInterval(async () => {
const {data} = await selectDeviceByName({name: name})
this.markerData = data
map.remove(markers)
markers = []
data.forEach(e => {
if (e.ifAlarm !== '1') {
this.setMarker1(e)
} else {
this.setMarker(e)
}
})
}, 5000)
// }
const {data} = await selectDeviceByName({name: name})
@ -1210,6 +1280,8 @@ export default {
map.remove(markers)
map.remove(polygons)
map.remove(circles)
polygons = []
circles = []
markers = []
this.loading = true;
this.loading = false;
@ -1220,6 +1292,11 @@ export default {
label: e.deviceName,
value: e
})
if (e.ifAlarm !== '1') {
this.setMarker1(e)
} else {
this.setMarker(e)
}
}
})
this.options = option
@ -1235,7 +1312,11 @@ export default {
if (this.isRail) {
const data = await getDeviceByAreaId(this.$store.getters.tenantId)
data.data.map(e => e.devicesList).flat(1).forEach(e => {
this.setMarker(e)
if (e.ifAlarm !== '1') {
this.setMarker3(e)
} else {
this.setMarker(e)
}
})
} else {
map.remove(markers)

@ -29,7 +29,7 @@
</el-form-item>
<el-form-item label="设备" prop="deviceId">
<el-select v-model="form.deviceId" placeholder="请选择设备">
<el-select v-model="form.deviceId" placeholder="请选择设备" @change="getDeviceMarket">
<el-option
v-for="(device, index) in devicesOptions"
:key="index"
@ -80,8 +80,11 @@ import {
wgs84togcj02
} from '@/utils/coordtransform'
import {getDeviceByModel, getSelectListBySceneId} from "@/api/business/alarmRule";
import gif from "@/assets/board/index/dot.png";
import {selectMonitorElectronic} from "@/api/board";
let map = null
let markers = []
let polyEditor = null
let CircleEditor = null
export default {
@ -171,6 +174,22 @@ export default {
})
},
methods: {
getDeviceMarket(){
},
setMarker(e) {
map.remove(markers)
markers=[]
let marker = new AMap.Marker({
position: [e.longitude, e.latitude], // [116.39, 39.9]
title: `信息\n经度${e.longitude}\n纬度${e.latitude}\n名称${e.deviceLocation}\n备注${e.remark||''}`,
offset: new AMap.Pixel(-20, -40),
content: `<div>
<img src="${gif}" alt="" width=" 40px" style="animation:an1 2s ease-in-out infinite;" >
</div>`
});
map.add(marker);
},
getEditedScenes() {
getEditedScenes().then(response => {
this.editedScenes = response.data;

@ -53,6 +53,7 @@
<span>Copyright © 2018-2019 ruoyi.vip All Rights Reserved.</span>
</div>-->
</div>
<div class="reference"><a href="https://beian.miit.gov.cn">粤ICP备10240187号-3</a></div>
</div>
</template>
@ -70,8 +71,8 @@ export default {
codeUrl: "",
cookiePassword: "",
loginForm: {
username: "admin",
password: "admin123",
username: "",
password: "",
rememberMe: false,
code: "",
uuid: ""
@ -148,7 +149,17 @@ export default {
};
</script>
<style lang="scss" rel="stylesheet/scss">
<style lang="scss" rel="stylesheet/scss" scoped>
.reference{
position: fixed;
bottom: 0;
width: 100%;
text-align: center;
background-color: #0002;
color: #fff;
font-size: 14px;
line-height: 40px;
}
.login {
position: absolute;
top:0;

@ -40,7 +40,8 @@ module.exports = {
// target: `http://10.11.43.111:8080`,
// target: `http://10.11.41.54:9080`,
// target: `http://175.27.215.92:9080`,
target: `http://124.223.15.102:9080`,
// target: `http://124.223.15.102:9080`,
target: `http://47.122.6.3:9080`,
// target: `http://10.11.41.54:9080`,
// target: `http://10.11.40.122:9080`,
// target: `http://10.11.43.177:9080`,

Loading…
Cancel
Save