panlinlin
2021-04-13 a56d8c70d6dd8f6fedc98aa768c3a2182d54acb8
web_src/src/components/UiHeader.vue
@@ -3,6 +3,8 @@
      <el-menu router :default-active="this.$route.path" background-color="#545c64" text-color="#fff" active-text-color="#ffd04b" mode="horizontal">
            <el-menu-item index="/">控制台</el-menu-item>
            <el-menu-item index="/deviceList">设备列表</el-menu-item>
            <el-menu-item index="/pushVideoList">推流列表</el-menu-item>
            <el-menu-item index="/streamProxyList">拉流代理</el-menu-item>
            <el-menu-item index="/parentPlatformList/15/1">国标级联</el-menu-item>
            <el-switch v-model="alarmNotify"  active-text="报警信息推送" style="display: block float: right" @change="sseControl"></el-switch>
            <el-menu-item style="float: right;" @click="loginout">退出</el-menu-item>
@@ -69,6 +71,10 @@
    },
    destroyed() {
        window.removeEventListener('beforeunload', e => this.beforeunloadHandler(e))
        this.sseSource.removeEventListener('open', null);
        this.sseSource.removeEventListener('message', null);
        this.sseSource.removeEventListener('error', null);
        this.sseSource.close();
        // window.removeEventListener('unload', e => this.unloadHandler(e))
    },
 }