hanbaoshan
2020-08-05 a51a787a5ecb7d249dba434be74160c85516c555
src/components/LeftNav.vue
@@ -180,13 +180,13 @@
                ></i>
              </el-input>
              <!-- 隐藏树按钮 -->
              <div class="dev-tree-close">
              <!-- <div class="dev-tree-close">
                <i
                  class="el-icon-s-fold"
                  style="color: #3D68E1;line-height: 22px;font-size: 27px;"
                  @click="closeTree"
                ></i>
              </div>
              </div> -->
            </div>
            <!-- 本地视频源列表 -->
@@ -337,24 +337,24 @@
      loadingGBTree: false
    };
  },
  watch: {
    $route(to, from) {
      switch (to.name) {
        case "Searching":
          this.cameraAuth = "videoSearch:camera"
          this.dataStack = "videoSearch:dataStack"
          break
        case "VideoManage":
          this.cameraAuth = "VIDEOCAMERA:camera"
          this.dataStack = "VIDEOCAMERA:dataStack"
          break
        default:
          this.cameraAuth = "videoMonitor:camera"
          this.dataStack = "videoMonitor:dataStack"
      }
      // console.log("路由变化:", to, from)
    }
  },
  // watch: {
  //   $route(to, from) {
  //     switch (to.name) {
  //       case "Searching":
  //         this.cameraAuth = "videoSearch:camera"
  //         this.dataStack = "videoSearch:dataStack"
  //         break
  //       case "VideoManage":
  //         this.cameraAuth = "VIDEOCAMERA:camera"
  //         this.dataStack = "VIDEOCAMERA:dataStack"
  //         break
  //       default:
  //         this.cameraAuth = "videoMonitor:camera"
  //         this.dataStack = "videoMonitor:dataStack"
  //     }
  //     // console.log("路由变化:", to, from)
  //   }
  // },
  created() {
    if (this.showCam) {
      this.TreeDataPool.treeActiveName = "camera"