|
@@ -4,7 +4,7 @@
|
|
|
<el-scrollbar wrap-class="scrollbar-wrapper">
|
|
|
<el-menu :default-active="activeMenu" :collapse="isCollapse" :background-color="variables.menuBg"
|
|
|
:text-color="variables.menuText" :unique-opened="true" :active-text-color="variables.menuActiveText"
|
|
|
- :collapse-transition="false" mode="vertical">
|
|
|
+ :collapse-transition="false" mode="vertical" :router="true">
|
|
|
<sidebar-item v-for="route in routes" :key="route.path" :item="route" :base-path="route.path" />
|
|
|
</el-menu>
|
|
|
</el-scrollbar>
|
|
@@ -29,13 +29,13 @@
|
|
|
'sidebar'
|
|
|
]),
|
|
|
routes() {
|
|
|
- console.log("----------------------", this.$router.options.routes)
|
|
|
+ console.log('----------------------', this.$router.options.routes)
|
|
|
// this.socketInfo()
|
|
|
return this.$router.options.routes
|
|
|
},
|
|
|
socketInfo() {
|
|
|
// var staffId = JSON.parse(localStorage.getItem('winseaview-userInfo')).content.staffId
|
|
|
- var staffId = "84f62127b7384dcdbaeaddfe460329fc"
|
|
|
+ var staffId = '84f62127b7384dcdbaeaddfe460329fc'
|
|
|
|
|
|
// getAdminId().toPromise().then(response => {console.log(11111)})
|
|
|
this.loading = false
|
|
@@ -49,14 +49,14 @@
|
|
|
// this.websocket = new WebSocket('ws://192.168.1.119:9100/websocket/' + staffId)
|
|
|
this.websocket = new WebSocket('ws://192.168.1.114:8090/websocket/' + staffId)
|
|
|
}
|
|
|
- console.log("knjhdfkhedfkh",process.env.NODE_ENV)
|
|
|
+ console.log('knjhdfkhedfkh',process.env.NODE_ENV)
|
|
|
this.initWebSocket()
|
|
|
} else {
|
|
|
alert('当前浏览器不支持websocket')
|
|
|
}
|
|
|
},
|
|
|
initWebSocket() {
|
|
|
- console.log("有该方法·",this.websocket)
|
|
|
+ console.log('有该方法·',this.websocket)
|
|
|
// 连接错误
|
|
|
this.websocket.onerror = this.setErrorMessage
|
|
|
// 连接成功
|