Преглед изворни кода

电视墙 资源详情 样式 土地也能点 视频预览宽度 气泡去除地址 电视墙未绑定

wangzhe пре 2 година
родитељ
комит
9ef58ace38
3 измењених фајлова са 83 додато и 76 уклоњено
  1. 81 74
      src/components/TVWalls.vue
  2. 1 1
      src/views/datacenter.vue
  3. 1 1
      src/views/forest.vue

+ 81 - 74
src/components/TVWalls.vue

@@ -32,7 +32,9 @@
             <!--{{resource.value}}-->
           <!--</el-descriptions-item>-->
         <!--</el-descriptions>-->
-        <div id="dom1" class="dom1"></div>
+        <div id="dom1" class="dom1" v-if="cameraNum!=0"></div>
+        <img src="@/assets/images/cameraType/not-video.png" v-else style="height: 650px;width: 1086px;">
+        <!--<div id="dom1" class="dom1"></div>-->
           <div class="leader-info-container" v-if="userDataShow">
             <div class="leader-info-list-con" v-for="user in userData">
               <h4 style="">{{user.position}}:{{user.name}}</h4>
@@ -81,6 +83,7 @@ export default {
   components: {},
   data() {
     return {
+      cameraNum:0,
       // title:['365','369','371','373','372','370'].includes(Cookies.get("deptId"))?"电视墙":"电视墙\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000您的所有操作痕迹已被后台记录,请谨慎操作。部分摄像头处于敏感区域,已屏蔽操控权限,无法操控。",
       title: "电视墙\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000您的所有操作痕迹已被后台记录,请谨慎操作。部分摄像头处于敏感区域,已屏蔽操控权限,无法操控。",
       tvListJson: [],
@@ -260,83 +263,87 @@ export default {
       }
     },
     showTVWall(data, val, item, resourceData) {
-      selectConfigKey("DssVersion").then(res => {
-        if(this.ws.getLocalDssVersion()!=res.data){
-          this.$modal.confirm('系统检测到新客户端版本,请更新后使用', '系统提示', {
-              confirmButtonText: '确定',
-              cancelButtonText: '取消',
-              type: 'warning'
-            }
-          ).then(() => {
-            selectConfigKey('video_plugin_url').then(response => {
-              window.open(response.data);
-            })
-          }).catch(() => {
+      if(data[0].labelChannels.length != 0){
+        selectConfigKey("DssVersion").then(res => {
+          if(this.ws.getLocalDssVersion()!=res.data){
+            this.$modal.confirm('系统检测到新客户端版本,请更新后使用', '系统提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+              }
+            ).then(() => {
+              selectConfigKey('video_plugin_url').then(response => {
+                window.open(response.data);
+              })
+            }).catch(() => {
+              return
+            });
             return
-          });
-          return
-        }else{
-          if(item != null){
-            this.userData = item;
-            this.userDataShow = true;
-          }
-          if(resourceData != null){
-            let myCollection = [];
-            Object.keys(resourceData).forEach((k) => {
-              // console.log("k=", k)
-              myCollection.push({
-                key: k,
-                value: resourceData[k]?resourceData[k]:'无'
-                // eval("("+'{'+k+' : resourceData[k]}'+")")
+          }else{
+            if(item != null){
+              this.userData = item;
+              this.userDataShow = true;
+            }
+            if(resourceData != null){
+              let myCollection = [];
+              Object.keys(resourceData).forEach((k) => {
+                // console.log("k=", k)
+                myCollection.push({
+                  key: k,
+                  value: resourceData[k]?resourceData[k]:'无'
+                  // eval("("+'{'+k+' : resourceData[k]}'+")")
+                });
               });
-            });
-            // console.log("myCollection=", myCollection);
-            // for (let i = 0; i < resourceData.length; i++) {
-            //   console.log("resourceData=", resourceData[i])
-            // }
-            this.resourceData = myCollection;
-            this.userDataShow = false;
-            this.resourceDataShow = true;
-          }else {
-            this.resourceDataShow = false;
-          }
-
-          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()
+              // console.log("myCollection=", myCollection);
+              // for (let i = 0; i < resourceData.length; i++) {
+              //   console.log("resourceData=", resourceData[i])
+              // }
+              this.resourceData = myCollection;
+              this.userDataShow = false;
+              this.resourceDataShow = true;
+            }else {
+              this.resourceDataShow = false;
             }
-          })
-          this.preview()
-          /** ----------------------------------大华摄像头预览结束------------------------------------- */
-          /** ----------------------------------海康摄像头预览开始------------------------------------- */
-          // tvCameraList().then(response => {
-          //   this.cameraList=response.data
-          // })
-          // that.initPlugin()
-          // setTimeout(function() {
-          //   that.playhk();
-          // }, 5000)
-          // /** ----------------------------------海康摄像头预览结束------------------------------------- */
-          this.TVWallVisible = true
 
-        }
-      })
+            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.cameraNum = data[0].labelChannels.length;
+          }
+        })
+      }
+      this.TVWallVisible = true
+      this.cameraNum = data[0].labelChannels.length;
     },
     /** ----------------------------------大华摄像头预览开始------------------------------------- */
     alertLogin: function () {

+ 1 - 1
src/views/datacenter.vue

@@ -727,7 +727,7 @@ export default {
             labelChannels: labelChannels,
           },
         ];
-        if (data.cameraList.length > 0) {
+        if (data.cameraList.length > 0 || true) {
           // this.$refs.TVWall.showTVWall1(
           //   data.longitude,
           //   data.latitude,

+ 1 - 1
src/views/forest.vue

@@ -1426,7 +1426,7 @@
               labelChannels: labelChannels,
             },
           ];
-          if (data.cameraList.length > 0) {
+          if (data.cameraList.length > 0 || true) {
             //   this.$refs.TVWall.showTVWall1(
             //     data.longitude,
             //     data.latitude,