Sfoglia il codice sorgente

Merge branch 'master' of http://git.zthymaoyi.com/gongdecai/wangluohuoyun-htqd

gjy 2 anni fa
parent
commit
736aa86b8a

+ 3 - 2
src/layout/components/Sidebar/SidebarItem.vue

@@ -24,6 +24,7 @@
         :item="child"
         :base-path="resolvePath(child.path)"
         class="nest-menu"
+        
       />
     </el-submenu>
   </div>
@@ -65,7 +66,7 @@ export default {
     flushCom:function(){
       this.$router.go(0);  
    },
-    hasOneShowingChild(children = [], parent) {
+    hasOneShowingChild(children = [], parent) {debugger
       const showingChildren = children.filter(item => {
         if (item.hidden) {
           return false
@@ -89,7 +90,7 @@ export default {
 
       return false
     },
-    resolvePath(routePath) {
+    resolvePath(routePath) {debugger
       if (isExternal(routePath)) {
         return routePath
       }

+ 5 - 5
src/layout/components/Sidebar/index.vue

@@ -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
         // 连接成功