panlinlin
2021-02-25 0f58218badea86a5209ae7f1ccd60b7cb4b26eee
web_src/src/components/UiHeader.vue
@@ -33,7 +33,8 @@
        sseControl() {
            let that = this;
            if (this.alarmNotify) {
                this.sseSource = new EventSource('/api/emit');
                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: '收到报警信息',
@@ -58,7 +59,7 @@
                this.sseSource.removeEventListener('message', null);
                this.sseSource.removeEventListener('error', null);
                this.sseSource.close();
            }
            }
        }
    },
    mounted() {