Переглянути джерело

Merge branch 'master' of http://git.xt.wenhq.top:8083/wenhongquan/qdtlui

MSI\liwei 3 роки тому
батько
коміт
9cb1bd7e63

+ 1 - 0
.gitignore

@@ -1 +1,2 @@
 node_modules
+dist

+ 10 - 5
public/index.html

@@ -297,7 +297,7 @@
         function cbIntegrationCallBack(oData) {
             console.log(JSON.stringify(oData.responseMsg));
         }
-
+        window.videosize = "1x1";
         //初始化
         function init() {
             getPubKey(function() {
@@ -309,7 +309,7 @@
                 var port = 443; //综合安防管理平台端口,若启用HTTPS协议,默认443
                 var snapDir = "D:\\SnapDir"; //抓图存储路径
                 var videoDir = "D:\\VideoDir"; //紧急录像或录像剪辑存储路径
-                var layout = "1x1"; //playMode指定模式的布局
+                var layout = window.videosize; //playMode指定模式的布局
                 var enableHTTPS = 1; //是否启用HTTPS协议与综合安防管理平台交互,这里总是填1
                 var encryptedFields = "secret"; //加密字段,默认加密领域为secret
                 var showToolbar = 1; //是否显示工具栏,0-不显示,非0-显示
@@ -339,7 +339,11 @@
                     })
                     .then(function(oData) {
                         oWebControl.JS_Resize(b_width, b_height); // 初始化后resize一次,规避firefox下首次显示窗口后插件窗口未与DIV窗口重合问题
-                        window.startPreview();
+                        if(window.videoresiz==="1x1"){
+                            window.startPreview(window.cameraid,-1);
+
+                        }
+                       
                     });
             });
         }
@@ -438,7 +442,7 @@
 
         //视频预览功能
         $("#startPreview").click(function() {
-            startPreview();
+            startPreview(window.cameraid,-1);
         });
 
         //停止全部预览
@@ -469,7 +473,8 @@
             });
         }
 
-        function startPreview() {
+
+        function startPreview(cameraIndexCode=window.cameraid,index=-1) {
             var cameraIndexCode = window.cameraid; //获取输入的监控点编号值,必填
             var streamMode = 0; //主子码流标识:0-主码流,1-子码流
             var transMode = 1; //传输协议:0-UDP,1-TCP

+ 2 - 2
src/components/Videoplayer/index.vue

@@ -1,5 +1,5 @@
 <template>
-    <div id="playWnd"  style="width:100%;height:100%"></div>
+    <div id="playWnd"  style="width:100%;height:100%;"></div>
 </template>
 <script>
 export default {
@@ -13,7 +13,7 @@ export default {
     initPlugin();
     videoresiz();
   },
-  unmounted() {
+  beforeDestroy() {
     closevideo();
   },
 }

+ 1 - 0
src/components/map/index.vue

@@ -101,6 +101,7 @@ export default {
 
     this.initdev();
     this.initPoint();
+    window.videosize = "1x1";
     // this.addpoint(point);
 
 

+ 2 - 2
src/views/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container home">
-    <el-row :gutter="20">
+    <!-- <el-row :gutter="20">
       <el-col :sm="24" :lg="24">
         <blockquote class="text-warning" style="font-size: 14px">
           领取阿里云通用云产品1888优惠券
@@ -740,7 +740,7 @@
           </div>
         </el-card>
       </el-col>
-    </el-row>
+    </el-row> -->
   </div>
 </template>
 

+ 22 - 4
src/views/qdtl/video/video.vue

@@ -17,13 +17,13 @@
                 :filter-node-method="filterNode"
                 ref="tree"
                 @check-change = 'treeChange'
-                style="height:97rem;background-color:#04283C;color:#C5D0D4"
+                style="background-color:#04283C;color:#C5D0D4"
                 >
             </el-tree>
       </div>
 
-     <div style="float:left;margin-left:3rem;margin-top:1rem">
-         <videodiv :cameracode="ccode" style="width:115rem;height:100rem"></videodiv>
+     <div style="position: absolute;right:0;top:0;width: 100%;height: 100%;padding-left:33rem;">
+         <videodiv :cameracode="ccode" style="height:100rem;width:100%"></videodiv>
            <!-- <mapdiv ref='mapv' style="height:100rem;width:115rem" ></mapdiv> -->
       </div>
 
@@ -106,6 +106,15 @@ export default {
         this.getvideo();
         // this.getList();
     },
+    
+    mounted(){
+      window.videosize = "3x3";
+
+    },
+    beforeDestroy(){
+      window.videosize = "1x1";
+      closevideo();
+    },
     methods:{
         loadNode(node, resolve){
         if (node.level > 3) return resolve([]);
@@ -204,6 +213,8 @@ export default {
               }
 
           }
+
+         // startPreview(code,0-8)
           // for(var index in arry){
           //       var obj = arry[index]
           //       if(obj.lnglat){
@@ -224,7 +235,14 @@ export default {
 <style>
      .leftTree{
           float:left;
-          width:34rem;
+          width:32rem;
+          background-color:#04283C;
+          padding: 10px;
+          padding-top:0 ;
+          min-height: 95vh;
+     }
+     .app-container{
+       padding:0
      }
 </style>