ソースを参照

室内室外消防栓添加地址

王通 1 年間 前
コミット
627d99b94a
1 ファイル変更49 行追加31 行削除
  1. 49 31
      src/components/TVWalls.vue

+ 49 - 31
src/components/TVWalls.vue

@@ -35,6 +35,7 @@ import {tvCameraList} from '@/api/haikang/haikang'
 import {findCameraByEventCoordinate, rotation} from '@/api/monitor'
 import DHWs from '@/dahua/lib/DHWs'
 import Cookies from "js-cookie"
+import {selectConfigKey} from "@/api/system/config";
 /** ----------------------------------摄像头预览结束------------------------------------- */
 export default {
   dicts: ['event_source'],
@@ -284,39 +285,56 @@ export default {
       }
     },
     showTVWall(data, val) {
-      this.tvListJson = data
-      this.data = val
-      this.autoList = []
-      this.stringList = []
-      let length = data[0].treeLabels.length > 4 ? 5 : data[0].treeLabels.length
-      for (let i = 1; i < length; i++) {
-        this.autoList.push({"channelId": data[0].treeLabels[i].labelCode})
-        this.stringList.push(data[0].treeLabels[i].labelCode)
-      }
-      console.log("this.autoList",this.autoList);
-      console.log("this.stringList",this.stringList);
-      // let that=this;
-      /** ----------------------------------大华摄像头预览开始------------------------------------- */
-      this.ws.addEventListener('connectStateChange', data => {
-        if (data) {
-          console.log('连接成功')
-        } else {
-          console.log('连接失败,下载客户端')
-          this.alertReinstall()
+      selectConfigKey("DssVersion").then(res => {
+        if(this.ws.getLocalDssVersion()!=res.data){
+          this.$modal.confirm('系统检测到新客户端版本,请更新后使用', '系统提示', {
+              confirmButtonText: '确定',
+              cancelButtonText: '取消',
+              type: 'warning'
+            }
+          ).then(() => {
+            window.open("https://pan.baidu.com/s/1MlWyhFw6pEYiaLvzsje-BA?pwd=3jps");
+          }).catch(() => {
+            return
+          });
+          return
+        }else{
+          this.tvListJson = data
+          this.data = val
+          this.autoList = []
+          this.stringList = []
+          let length = data[0].treeLabels.length > 4 ? 5 : data[0].treeLabels.length
+          for (let i = 1; i < length; i++) {
+            this.autoList.push({"channelId": data[0].treeLabels[i].labelCode})
+            this.stringList.push(data[0].treeLabels[i].labelCode)
+          }
+          console.log("this.autoList",this.autoList);
+          console.log("this.stringList",this.stringList);
+          // let that=this;
+          /** ----------------------------------大华摄像头预览开始------------------------------------- */
+          this.ws.addEventListener('connectStateChange', data => {
+            if (data) {
+              console.log('连接成功')
+            } else {
+              console.log('连接失败,下载客户端')
+              this.alertReinstall()
+            }
+          })
+          this.preview()
+          /** ----------------------------------大华摄像头预览结束------------------------------------- */
+          /** ----------------------------------海康摄像头预览开始------------------------------------- */
+          // tvCameraList().then(response => {
+          //   this.cameraList=response.data
+          // })
+          // that.initPlugin()
+          // setTimeout(function() {
+          //   that.playhk();
+          // }, 5000)
+          // /** ----------------------------------海康摄像头预览结束------------------------------------- */
+          this.TVWallVisible = true
         }
       })
-      this.preview()
-      /** ----------------------------------大华摄像头预览结束------------------------------------- */
-      /** ----------------------------------海康摄像头预览开始------------------------------------- */
-      // tvCameraList().then(response => {
-      //   this.cameraList=response.data
-      // })
-      // that.initPlugin()
-      // setTimeout(function() {
-      //   that.playhk();
-      // }, 5000)
-      // /** ----------------------------------海康摄像头预览结束------------------------------------- */
-      this.TVWallVisible = true
+
     },
     /** ----------------------------------大华摄像头预览开始------------------------------------- */
     alertLogin: function () {