解决更新通道导致的点播丢失
This commit is contained in:
@@ -59,8 +59,8 @@ export default {
|
||||
sseControl() {
|
||||
let that = this;
|
||||
if (this.alarmNotify) {
|
||||
console.log("申请SSE推送API调用,浏览器ID: " + this.$browserId);
|
||||
this.sseSource = new EventSource('/api/emit?browserId=' + this.$browserId);
|
||||
console.log("申请SSE推送API调用,浏览器ID: " + this.$browserId);
|
||||
this.sseSource = new EventSource('/api/emit?browserId=' + this.$browserId);
|
||||
this.sseSource.addEventListener('message', function(evt) {
|
||||
that.$notify({
|
||||
title: '收到报警信息',
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<template>
|
||||
<div id="channelList">
|
||||
<el-container>
|
||||
|
||||
<el-header>
|
||||
<uiHeader></uiHeader>
|
||||
</el-header>
|
||||
@@ -118,7 +117,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
initData: function () {
|
||||
if (this.parentChannelId == "" || this.parentChannelId == 0) {
|
||||
if (typeof (this.parentChannelId) == "undefined" || this.parentChannelId == 0) {
|
||||
this.getDeviceChannelList();
|
||||
} else {
|
||||
this.showSubchannels();
|
||||
@@ -153,6 +152,7 @@ export default {
|
||||
},
|
||||
getDeviceChannelList: function () {
|
||||
let that = this;
|
||||
if (typeof (this.$route.params.deviceId) == "undefined") return;
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: `/api/device/query/devices/${this.$route.params.deviceId}/channels`,
|
||||
|
||||
Reference in New Issue
Block a user