Browse Source

lcd屏增加分屏功能,其他屏暂时不做分屏操作

liuwei 4 years ago
parent
commit
e1ff9e9e19

+ 6 - 9
src/renderer/assets/less/splitscreen.less

@@ -2,8 +2,6 @@
 /*分屏*/
 .split_screen {
   position: absolute;
-  width: 100%;
-  height: 70%;
   background-color: #0b0b0b;
   box-sizing: border-box;
   overflow: hidden;
@@ -12,10 +10,9 @@
 
   /*分屏项(信号源)*/
   .sitem {
-    border: 1px solid #000000;
-    color:#fff;
-    //background-color: #717171;
-    background-color: #000000;
+    //border: 1px solid #000000;
+    //color:#fff;
+    //background-color: #000000;
 
     // 关闭信号源开窗按钮
     .closeBtn {
@@ -36,7 +33,7 @@
   /*分屏项(栅格)*/
   .sitem2 {
     color:#000;
-    border: 1px solid #3b3b3b;
+    border: 1px solid #202020;
     margin-right: -1px;
     margin-bottom: -1px;
   }
@@ -59,8 +56,8 @@
 /*9分屏*/
 .split_screen_nine {
   display: grid;
-  grid-template-columns: repeat(3,33.3333333%);
-  grid-template-rows: repeat(3,33.3333333%);
+  grid-template-columns: repeat(3,100%/3);
+  grid-template-rows: repeat(3,100%/3);
 }
 
 /*16分屏*/

+ 2 - 4
src/renderer/components/BigShow.vue

@@ -7,10 +7,10 @@
                 v-model="signalPreList"
                 :options="dragOptions2"
                 :class="['split_screen',
-                bigScreenObj[item.ID] ?
                 bigScreenObj[item.ID].splitStatus === 0 ? 'split_screen_one' :
                 bigScreenObj[item.ID].splitStatus === 1 ? 'split_screen_four' :
-                bigScreenObj[item.ID].splitStatus === 2 ? 'split_screen_nine' : 'split_screen_sixteen' : '']"
+                bigScreenObj[item.ID].splitStatus === 2 ? 'split_screen_nine' :
+                bigScreenObj[item.ID].splitStatus === 3 ? 'split_screen_sixteen' : '']"
                 :style="{
                     float:'left',
                     width:item.Width*bigScale + 'px',
@@ -251,8 +251,6 @@
                         const bigScale = this.$store.state.bigScale
                         const positionNum = this.$store.state.positionNum
                         
-                        console.log(bigscreenId,bigScreenObj)
-
                         const arr2 = []
                         arr.forEach(item => {
                             arr2.push(JSON.parse(JSON.stringify(item)))

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

@@ -106,6 +106,22 @@
             mouseUp(e) {
                 if(e.ButtonType === 0){
                     this.$refs[e.ID][0].style.backgroundImage = 'url(' + require(`../../../static/Data/${e.BackIcon}`) + ')'
+
+                    // 分屏和清屏按钮控制
+                    for(const item of e.MouseDownActionList){
+                        if(item.ActionType === 9 && item.Condition === 'SetSplit'){
+                            // 获取大屏对象
+                            const bigscreenObj = this.$store.state.bigScreenObj
+                            // 获取当前大屏Id
+                            let Id = item.SourceID
+                            bigscreenObj[Id].splitStatus = item.Parameter[0]-1
+                            bigscreenObj[Id].bindList = []
+                            for(let i =0;i<(item.Parameter[0])**2;i++){
+                                bigscreenObj[Id].bindList.push(i+1)
+                            }
+                            this.$store.dispatch('updateBigscreenObj',bigscreenObj)
+                        }
+                    }
                 }
             },
         }