|
@@ -451,6 +451,7 @@ import eventdetailsdialog from '@/views/eventdetailsdialog.vue' //事件详情
|
|
import firespread from '@/views/firespread.vue' //事件详情弹窗
|
|
import firespread from '@/views/firespread.vue' //事件详情弹窗
|
|
import Firespread from "./firespread";
|
|
import Firespread from "./firespread";
|
|
import chart from "./from/dvCapsuleChart.vue";
|
|
import chart from "./from/dvCapsuleChart.vue";
|
|
|
|
+import {selectConfigKey} from "@/api/system/config";
|
|
|
|
|
|
let echarts = require('echarts')
|
|
let echarts = require('echarts')
|
|
export default {
|
|
export default {
|
|
@@ -490,17 +491,6 @@ export default {
|
|
/** ----------------------------------weosocket开始------------------------------------- */
|
|
/** ----------------------------------weosocket开始------------------------------------- */
|
|
// this.initWebSocket()
|
|
// this.initWebSocket()
|
|
/** ----------------------------------weosocket结束------------------------------------- */
|
|
/** ----------------------------------weosocket结束------------------------------------- */
|
|
- setInterval(() => {
|
|
|
|
- if (this.calendarDay == this.getCurrentDataStr()) {
|
|
|
|
- this.getTodayEvents(this.getCurrentDataStr(), true);
|
|
|
|
- this.getDeptEventCount(this.getCurrentDataStr(), true);
|
|
|
|
- // this.getEventList(this.getCurrentDataStr(), this.pageSize, this.pageNum, '', true);
|
|
|
|
- this.getEventByEventType(this.getCurrentDataStr(), true);
|
|
|
|
- this.getEventByReportorOrder(this.getCurrentDataStr(), true);
|
|
|
|
- this.getExposureStage(this.getCurrentDataStr(), true);
|
|
|
|
- // this.getSupermap(this.getCurrentDataStr(), true);
|
|
|
|
- }
|
|
|
|
- }, 30000)
|
|
|
|
this.bottomMenuList() //获取底部公共组件消息和任务
|
|
this.bottomMenuList() //获取底部公共组件消息和任务
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
@@ -971,15 +961,15 @@ export default {
|
|
' </div>' +
|
|
' </div>' +
|
|
' </div>' +
|
|
' </div>' +
|
|
' </span>';
|
|
' </span>';
|
|
- if (res.data[i].pictureType == 'image' && res.data[i].picturePath != null && res.data[i].picturePath != '') {
|
|
|
|
- markersMap.bindPopupHtml += '<span>' +
|
|
|
|
- ' <div class="d-l-con">' +
|
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
|
- '<img src="' + res.data[i].picturePath + '" style="width: 150px;height: 100px"/>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </span>'
|
|
|
|
- }
|
|
|
|
|
|
+ // if (res.data[i].pictureType == 'image' && res.data[i].picturePath != null && res.data[i].picturePath != '') {
|
|
|
|
+ // markersMap.bindPopupHtml += '<span>' +
|
|
|
|
+ // ' <div class="d-l-con">' +
|
|
|
|
+ // ' <div class="d-l-l-text">' +
|
|
|
|
+ // '<img src="' + res.data[i].picturePath + '" style="width: 150px;height: 100px"/>' +
|
|
|
|
+ // ' </div>' +
|
|
|
|
+ // ' </div>' +
|
|
|
|
+ // ' </span>'
|
|
|
|
+ // }
|
|
markersMap.bindPopupHtml += '</div>'
|
|
markersMap.bindPopupHtml += '</div>'
|
|
that.markersList.push(markersMap)
|
|
that.markersList.push(markersMap)
|
|
}
|
|
}
|
|
@@ -1134,15 +1124,15 @@ export default {
|
|
' </div>' +
|
|
' </div>' +
|
|
' </div>' +
|
|
' </div>' +
|
|
' </span>';
|
|
' </span>';
|
|
- if (event.pictureType == 'image' && event.picturePath != null && event.picturePath != '') {
|
|
|
|
- markersMap.bindPopupHtml += '<span>' +
|
|
|
|
- ' <div class="d-l-con">' +
|
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
|
- '<img src="' + event.picturePath + '" style="width: 150px;height: 100px"/>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </span>'
|
|
|
|
- }
|
|
|
|
|
|
+ // if (event.pictureType == 'image' && event.picturePath != null && event.picturePath != '') {
|
|
|
|
+ // markersMap.bindPopupHtml += '<span>' +
|
|
|
|
+ // ' <div class="d-l-con">' +
|
|
|
|
+ // ' <div class="d-l-l-text">' +
|
|
|
|
+ // '<img src="' + event.picturePath + '" style="width: 150px;height: 100px"/>' +
|
|
|
|
+ // ' </div>' +
|
|
|
|
+ // ' </div>' +
|
|
|
|
+ // ' </span>'
|
|
|
|
+ // }
|
|
markersMap.bindPopupHtml += '</div>'
|
|
markersMap.bindPopupHtml += '</div>'
|
|
that.markersList.push(markersMap)
|
|
that.markersList.push(markersMap)
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
@@ -1162,12 +1152,14 @@ export default {
|
|
},
|
|
},
|
|
/** ----------------------------------weosocket开始------------------------------------- */
|
|
/** ----------------------------------weosocket开始------------------------------------- */
|
|
initWebSocket(userId, eventTypeDl, eventType) { //初始化weosocket
|
|
initWebSocket(userId, eventTypeDl, eventType) { //初始化weosocket
|
|
- const wsuri = 'ws://127.0.0.1:10003/eventPush/' + userId + '/' + eventTypeDl + '/' + eventType
|
|
|
|
- this.websock = new WebSocket(wsuri)
|
|
|
|
- console.log('建立websocket连接')
|
|
|
|
- this.websock.onopen = this.websocketonopen
|
|
|
|
- this.websock.onmessage = this.websocketonmessage
|
|
|
|
- this.websock.onerror = this.websocketonerror
|
|
|
|
|
|
+ selectConfigKey('KSH_SOCKET').then(res => {
|
|
|
|
+ const wsuri = res.data + userId + '/' + eventTypeDl + '/' + eventType
|
|
|
|
+ this.websock = new WebSocket(wsuri)
|
|
|
|
+ console.log('建立websocket连接')
|
|
|
|
+ this.websock.onopen = this.websocketonopen
|
|
|
|
+ this.websock.onmessage = this.websocketonmessage
|
|
|
|
+ this.websock.onerror = this.websocketonerror
|
|
|
|
+ })
|
|
},
|
|
},
|
|
websocketonopen() { //连接建立之后执行send方法发送数据
|
|
websocketonopen() { //连接建立之后执行send方法发送数据
|
|
console.log('websocket连接成功')
|
|
console.log('websocket连接成功')
|
|
@@ -1185,14 +1177,13 @@ export default {
|
|
// 处理收到的消息
|
|
// 处理收到的消息
|
|
this.handleWebSoceketEvent(e.data)
|
|
this.handleWebSoceketEvent(e.data)
|
|
|
|
|
|
- // this.getEventListNew();
|
|
|
|
- // this.getTodayEvents(this.getCurrentDataStr());
|
|
|
|
- // this.getDeptEventCount(this.getCurrentDataStr());
|
|
|
|
- // this.getEventByEventType(this.getCurrentDataStr());
|
|
|
|
- // this.getEventByReportorOrder(this.getCurrentDataStr());
|
|
|
|
-
|
|
|
|
- // this.$refs.bottomMenu.updateAlert();
|
|
|
|
- // this.$refs.up.play();
|
|
|
|
|
|
+ this.getTodayEvents(this.getCurrentDataStr(), true);
|
|
|
|
+ this.getDeptEventCount(this.getCurrentDataStr(), true);
|
|
|
|
+ this.getEventByEventType(this.getCurrentDataStr(), true);
|
|
|
|
+ this.getEventByReportorOrder(this.getCurrentDataStr(), true);
|
|
|
|
+ this.getExposureStage(this.getCurrentDataStr(), true);
|
|
|
|
+ this.$refs.bottomMenu.updateAlert();
|
|
|
|
+ this.$refs.up.play();
|
|
// thes.$refs.up.pause();//停止播放音乐
|
|
// thes.$refs.up.pause();//停止播放音乐
|
|
}
|
|
}
|
|
},
|
|
},
|