|
|
@ -173,7 +173,7 @@ import * as echarts from "echarts"; |
|
|
|
import PieChartrenyuan from '@/views/echarts/components/PieChartrenyuan' |
|
|
|
import HomeMap from '@/views/dashboard/components/HomeMap' |
|
|
|
import { getCallPolicePage } from '@/api/callPolice/callPolice' |
|
|
|
import { getInfoPage } from '@/api/yInfo/yInfo' |
|
|
|
import { getInfoPage, getUnread } from '@/api/yInfo/yInfo' |
|
|
|
import { getStatusCount } from '@/api/device/device' |
|
|
|
import { init } from 'events'; |
|
|
|
// 1.1入侵报警饼图 |
|
|
@ -314,7 +314,59 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
toDoMessagge() { |
|
|
|
// 先查询未读信息 |
|
|
|
// getUnread().then((response) => { |
|
|
|
// console.log('-------------查询未读信息结果:' + response.data) |
|
|
|
// if (response.code === 20000 && response.data) { |
|
|
|
// this.$store.dispatch('app/setSysMessageCount', response.data) |
|
|
|
this.$store.dispatch('app/setSysMessageCount', "lllll") |
|
|
|
// } else { |
|
|
|
// this.$store.dispatch('app/setSysMessageCount', 0) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
}, |
|
|
|
onConnected(frame) { |
|
|
|
// 订阅广播系统通知 |
|
|
|
this.$stompClient.subscribe( |
|
|
|
'/topic/subscribe', |
|
|
|
this.responseCallback, |
|
|
|
this.onFailed |
|
|
|
) |
|
|
|
// |
|
|
|
// 订阅点对点 通过用户id指定用户 |
|
|
|
this.$stompClient.subscribe( |
|
|
|
'/user/' + this.userId + '/queue/subscribewarn', |
|
|
|
this.responseCallback, |
|
|
|
this.onFailed |
|
|
|
) |
|
|
|
}, |
|
|
|
onFailed(frame) { |
|
|
|
console.log('gongzuotai连接ws失败: ' + JSON.stringify(frame)) |
|
|
|
}, |
|
|
|
connectSrv() { |
|
|
|
var headers = {} |
|
|
|
// console.log('ws', ws) |
|
|
|
this.connetWM(ws, headers, this.onConnected, this.onFailed) |
|
|
|
}, |
|
|
|
onConnected(frame) { |
|
|
|
订阅广播系统通知 |
|
|
|
this.$stompClient.subscribe( |
|
|
|
'/topic/subscribe', |
|
|
|
this.responseCallback, |
|
|
|
this.onFailed |
|
|
|
) |
|
|
|
// 订阅点对点 通过用户id指定用户 |
|
|
|
this.$stompClient.subscribe( |
|
|
|
'/user/' + this.userId + '/queue/subscribewarn', |
|
|
|
this.responseCallback, |
|
|
|
this.onFailed |
|
|
|
) |
|
|
|
}, |
|
|
|
init() { |
|
|
|
// this.toDoMessagge() |
|
|
|
// this.timer = setInterval(this.toDoMessagge, 60000) |
|
|
|
// this.connectSrv() |
|
|
|
getStatusCount({ deviceType: 1 }).then(res => { |
|
|
|
this.statusDataSp = res.data |
|
|
|
this.shipinjiankong_Chart.Data.seriesData = [] |
|
|
|