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

调整任何情况下都不影响已有开窗大小位置前的一次提交

liuwei 4 роки тому
батько
коміт
7a7d35addf

+ 8 - 8
src/renderer/assets/less/splitscreen.less

@@ -47,27 +47,27 @@
 /*1分屏*/
 .split_screen_one {
   display: grid;
-  grid-template-columns: repeat(1,1fr);
-  grid-template-rows: repeat(1,1fr);
+  grid-template-columns: repeat(1,100%);
+  grid-template-rows: repeat(1,100%);
 }
 
 /*4分屏*/
 .split_screen_four {
   display: grid;
-  grid-template-columns: repeat(2,1fr);
-  grid-template-rows: repeat(2,1fr);
+  grid-template-columns: repeat(2,50%);
+  grid-template-rows: repeat(2,50%);
 }
 
 /*9分屏*/
 .split_screen_nine {
   display: grid;
-  grid-template-columns: repeat(3,1fr);
-  grid-template-rows: repeat(3,1fr);
+  grid-template-columns: repeat(3,33.3333333%);
+  grid-template-rows: repeat(3,33.3333333%);
 }
 
 /*16分屏*/
 .split_screen_sixteen {
   display: grid;
-  grid-template-columns: repeat(4,1fr);
-  grid-template-rows: repeat(4,1fr);
+  grid-template-columns: repeat(4,25%);
+  grid-template-rows: repeat(4,25%);
 }

+ 11 - 9
src/renderer/components/BigShow.vue

@@ -27,7 +27,9 @@
                     @dragstop="dragStop"
                     @resizestop="(obj) => reSizeSignal(obj,itemV)"
             >
-                <div ref="signal">
+                <div
+                    ref="signal"
+                >
                     {{itemV.deviceID}}
                     <!--<div class="closeBtn" @click.stop="closeSignal(itemV)">×</div>
                     <video-player
@@ -101,7 +103,7 @@
                     aspectRatio: '200:93',
                     preload: 'auto',
                     notSupportedMessage: '此视频暂无法播放,请稍后再试',
-                },
+                }
             }
         },
 
@@ -157,10 +159,10 @@
                             bigScreenId:this.currentBigshow[0].ID,
                             streamWindows
                         }
-                        // console.log(data)
                         this.streamWindows = streamWindows
                         // 调用大屏开窗接口
                         await reqRefreshView(data)
+                        this.$store.dispatch('updateSignalPreList', streamWindows)
                     }
                 })
             },
@@ -203,12 +205,12 @@
                 },
 
                 set(arr) {
-                    if (arr.length > 0){
+                    if(arr.length>0){
                         const arr2 = []
                         arr.forEach(item => {
                             arr2.push(JSON.parse(JSON.stringify(item)))
                         })
-                        arr2.forEach(item => {
+                        arr2.forEach((item,index) => {
                             item.Id = guId()
                             item.splitScreenStatus = this.$store.state.splitScreenStatus + 1
                             item.width = this.currentBigshow[0].Width * this.$store.state.bigScale / item.splitScreenStatus
@@ -216,9 +218,9 @@
                             item.widthScale = item.width / (this.currentBigshow[0].Width * this.$store.state.bigScale)
                             item.heightScale = item.height / (this.currentBigshow[0].Height * this.$store.state.bigScale)
                         })
-                        this.$store.dispatch('updateSignalPreList', arr2)
+                        this.reqRefreshBigScreen(arr2)
                     }else {
-                        this.$store.dispatch('updateSignalPreList', arr)
+                        this.reqRefreshBigScreen(arr)
                     }
                 }
             },
@@ -248,9 +250,9 @@
 
         watch: {
             // 监视大屏中的信号源,只要变动,就调用回调函数
-            signalPreList: function (arr) {
+           /* signalPreList: function (arr) {
                 this.reqRefreshBigScreen(arr)
-            },
+            },*/
 
             // 监视分屏的状态
             splitScreenStatus: function(num) {

+ 0 - 1
src/renderer/components/Button.vue

@@ -75,7 +75,6 @@
         methods: {
             // 点击按钮
             clickBtn(e) {
-                console.log(e)
                 // 预案管理声音开关
                 if (e.ID === '355d3c32-1502-40b4-9ddd-663d5b8469e7') {
                     if (this.count % 2 === 0) {