qinhouyu 2 éve
szülő
commit
f719e4011f
2 módosított fájl, 672 hozzáadás és 714 törlés
  1. 21 5
      src/components/TVWall.vue
  2. 651 709
      src/components/TVWalls.vue

+ 21 - 5
src/components/TVWall.vue

@@ -24,7 +24,6 @@
         <!--&lt;!&ndash;视频窗口展示-&#45;&#45;海康&ndash;&gt;-->
         <!--<div id="playWnd" class="playWnd" style="left: 0px; top: 0px;"></div>-->
       <!--</div>-->
-
       <div id="dom1" class="dom1"></div>
     </el-dialog>
   </div>
@@ -39,6 +38,7 @@ import DHWs from '@/dahua/lib/DHWs'
 import { rotation } from '@/api/monitor'
 import Cookies from "js-cookie"
 
+
 /** ----------------------------------摄像头预览结束------------------------------------- */
 export default {
   dicts: ['event_source'],
@@ -361,6 +361,14 @@ export default {
       this.TVWallVisible = true
 
     },
+    realTimeVideoDialog(cameraParams) {
+      // 调用弹窗实时播放接口
+      if (!this.isLogin) {
+        this.$Message.info("正在登陆客户端,请稍等......");
+        return false;
+      }
+      this.ws.openVideo(cameraParams);
+    },
     create1(longitude,latitude,tvListJson,array,array1) { // 调用创建控件接口
       let _this = this
       const params = [
@@ -382,8 +390,12 @@ export default {
       ]
       this.setPos()
       this.customizeTree(tvListJson);
-      _this.ws.createCtrl(params);
-      _this.playRealMonitorVideo(array)
+      if(array1.length == 1){
+        _this.realTimeVideoDialog(array1);
+      }else{
+        _this.ws.createCtrl(params);
+        _this.playRealMonitorVideo(array)
+      }
       setTimeout(() => {
         _this.rotation(longitude,latitude,array1)
       }, 5000)
@@ -514,8 +526,12 @@ export default {
       for (let i = 1; i < length; i++) {
         bfArray.push({"channelId": tvListJson[0].treeLabels[i].labelCode})
       }
-      _this.ws.createCtrl(params);
-      _this.playRealMonitorVideo(bfArray)
+      if(bfArray.length == 1){
+        _this.realTimeVideoDialog([tvListJson[0].treeLabels[1].labelCode]);
+      }else{
+        _this.ws.createCtrl(params);
+        _this.playRealMonitorVideo(bfArray)
+      }
     },
     setPos() {
       let target = document.getElementById(this.domId)

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 651 - 709
src/components/TVWalls.vue