From a17db206151f8c857bbe6beca660f2ef9e516aa3 Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@iotlink.com>
Date: 星期三, 14 十月 2020 13:59:41 +0800
Subject: [PATCH] 摄像机切换时清空表单

---
 src/pages/cameraAccess/index/VideoManage.vue |   61 ++++++++++++++++--------------
 1 files changed, 33 insertions(+), 28 deletions(-)

diff --git a/src/pages/cameraAccess/index/VideoManage.vue b/src/pages/cameraAccess/index/VideoManage.vue
index 0cf560d..5e2ba7e 100644
--- a/src/pages/cameraAccess/index/VideoManage.vue
+++ b/src/pages/cameraAccess/index/VideoManage.vue
@@ -1,6 +1,12 @@
 <template>
   <div class="s-video-manage">
-    <el-tabs class="video-tab" v-model="activeName" type="border-card" @tab-click="handleClick">
+    <el-tabs
+      class="video-tab"
+      ref="topTab"
+      v-model="activeName"
+      type="border-card"
+      @tab-click="handleClick"
+    >
       <el-tab-pane
         :label="firstLabeName"
         name="camera-info"
@@ -50,7 +56,7 @@
 // import fTemplate from "@/components/common/fTemplate";
 // import localSeparate from "@/components/camera/localSeparate";
 
-//import bus from "@/main";
+import bus from "@/plugin/bus";
 //import TreeDataPool from "@/Pool/TreeData";
 
 export default {
@@ -108,14 +114,11 @@
     },
     "DataStackPool.selectedDir": {
       handler(node, oldNode) {
-        console.log(this.activeName)
-        console.log(node, '鍕鹃�夋湰鍦拌棰�')
         if (this.TreeDataPool.treeActiveName !== 'dataStack') {
           return
         }
         this.$nextTick(() => {
           if (this.activeName == "camera-info") {
-            console.log("dataStackInfo.selectDir(node)")
             this.$refs.dataStackInfo.selectDir(node);
           } else if (this.activeName == "separate-rule" && node.length !== 0) {
             this.$refs.sepRule.initCameraData(node.id);
@@ -123,7 +126,8 @@
         })
       },
       deep: true
-    }
+    },
+
   },
   created() {
     if (this.TreeDataPool.treeActiveName == 'camera') {
@@ -160,16 +164,17 @@
   },
   mounted() {
     this.$nextTick(() => {
-      //   bus.$on("addCameraOnTree", node => {
-      //     this.handAddDevice(node);
-      //   });
-      //   bus.$on("addDirOnTree", node => {
-      //     this.handAddDIr(node);
-      //   });
-      //   this.TreeDataPool.clean();
+      bus.$on("addCameraOnTree", node => {
+        this.handAddDevice(node);
+      });
+      bus.$on("addDirOnTree", node => {
+        this.handAddDIr(node);
+      });
+      this.TreeDataPool.clean();
     });
 
-    let _this = this
+    let _this = this;
+    _this.PollData.statisticTaskInfo();
     this.intervalTimer = setInterval(() => {
       _this.PollData.statisticTaskInfo();
     }, 10000)
@@ -228,8 +233,9 @@
 <style lang="scss">
 .s-video-manage {
   width: 100%;
+  min-width: 1599px;
   height: 100%;
-  float: right;
+  float: left;
   box-sizing: border-box;
   .el-tabs--border-card {
     box-shadow: none;
@@ -247,19 +253,17 @@
   .el-tabs--border-card {
     height: 100%;
     width: 100%;
-    &.video-tab{
-      &>.el-tabs__header{
-        position: fixed;
-        top:0;
-        
-        width:100%;
-        z-index:999;
+    &.video-tab {
+      & > .el-tabs__header {
+        //position: fixed;
+        //position: absolute;
+        //top:0;
+        //left: 0;
         height: 54px;
         overflow-y: hidden;
       }
     }
     .el-tabs__header {
-       
       .is-active {
         color: #3d68e1 !important;
       }
@@ -286,16 +290,17 @@
       }
     }
   }
-  .el-tabs__content {
+  .video-tab > .el-tabs__content {
     width: 100%;
-    margin-top: 52px;
-    //height: calc(100% - 52px);
+    //margin-top: 52px;
+    height: calc(100% - 36px);
     box-sizing: border-box;
-    padding: 13px 0;
+    overflow-y: auto;
+    padding: 0;
   }
   .el-tab-pane {
     width: 100%;
-    height: 100%;
+    //height: 100%;
   }
 }
 </style>

--
Gitblit v1.8.0