Browse Source

数据中心 电视墙更新提示规则

付宇航 1 year ago
parent
commit
b9658992d0
2 changed files with 10 additions and 8 deletions
  1. 9 8
      src/components/TVWall.vue
  2. 1 0
      src/views/datacenter.vue

+ 9 - 8
src/components/TVWall.vue

@@ -259,11 +259,9 @@ export default {
       mixedVideoDisplayMode: 2,
       isShowTipe: true,
       /** ----------------------------------摄像头预览结束------------------------------------- */
-      cameraList:[],
       initCount: 0,
       pubKey: '',
       oWebControl: null,
-      cameraList:{},
       cameraVisible:false,
     }
   },
@@ -318,7 +316,10 @@ export default {
           getDahuaVideoServer().then(newResponse => {
             this.ws.detectConnectQt().then(res => {
               if (res) { // 连接客户端成功
-                this.alertLogin()
+                console.log(!this.cameraVisible)
+                if(!this.cameraVisible){
+                  this.alertLogin()
+                }
                 this.ws.login({
                   loginIp: newResponse.loginIp,
                   loginPort: newResponse.loginPort,
@@ -335,7 +336,9 @@ export default {
                   this.isLogin = res
                   console.log('---res-----', res)
                   if (res) {
-                    this.alertLoginSuccess()
+                    if(!this.cameraVisible){
+                      this.alertLoginSuccess()
+                    }
                     this.activePanel = 'key2'
                     console.log(tvListJson)
                     const array=[]
@@ -768,10 +771,8 @@ export default {
     cameraList:{
       handler(val,oldval){
         this.$nextTick(() => {
-          setTimeout(() => {
-            console.log(this.cameraList)
-            this.cameraList.length > 0 ? this.cameraVisible = false : this.cameraVisible = true
-          },800)
+          console.log(this.cameraList)
+          this.cameraList.length > 0 ? this.cameraVisible = false : this.cameraVisible = true
         })
       }
     }

+ 1 - 0
src/views/datacenter.vue

@@ -173,6 +173,7 @@ export default {
       source: [],
       size:'',
       detailInfo:[],
+      cameraList:[]
     };
   },
   watch: {