Prechádzať zdrojové kódy

如果没有信号预览控件,不需要加载信号源,提交的streamWindow id增加编号,清屏时增加提交大屏更新请求

liuwei 4 rokov pred
rodič
commit
5c0f593339

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

@@ -126,21 +126,21 @@
             async refreshBigScreen(obj,Id) {
                 if(Id){
                     const signals = obj[Id].signalArr
-                    const streamWindows = signals.map(item => ({
+                    const streamWindows = signals.map((item,index) => ({
                         left:item.left + this.screenPosition[Id].left,
                         top:item.top + this.screenPosition[Id].top,
                         width:item.width,
                         height:item.height,
-                        id:0,
+                        id:index,
                         sourceId:item.sourceId,
                         widthScale:item.widthScale,
                         heightScale:item.heightScale,
                         orginRect:{}
                     }))
-                    /*console.log({
+                    console.log({
                         bigScreenId:Id,
                         streamWindows
-                    })*/
+                    })
                     await reqRefreshView({
                         bigScreenId:Id,
                         streamWindows

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

@@ -33,6 +33,7 @@
 <script>
     import {mapState} from 'vuex'
     import {getStaticFile} from "../../utils/tools"
+    import {reqRefreshView} from "../api"
 
     export default {
         data() {
@@ -80,7 +81,7 @@
 
         methods: {
             // 点击按钮
-            clickBtn(e) {
+            async clickBtn(e) {
                 const bigscreenObj = this.$store.state.bigScreenObj
                 // 只有一个大屏,获取对象的第一个key
                 const firstKey = Object.keys(bigscreenObj)[0]
@@ -186,6 +187,12 @@
                 if (e.ID === '7775e508-c6a5-4044-8264-24772a24fa97' || e.ID === '95c5d676-46a5-4c46-b550-9bc013a59937' || e.ID === 'f47e84bb-c878-4b22-a9d6-eb2e307283bc') {
                     // 清屏
                     bigscreenObj[firstKey].signalArr = []
+                    // 发送请求
+                    const bigScreenId = this.$store.state.curOpeBigscreenId
+                    await reqRefreshView({
+                        bigScreenId,
+                        streamWindows:[]
+                    })
                     this.$store.dispatch('updateBigscreenObj',bigscreenObj)
                     return
                 } else if (e.ID === '49653a62-99cb-40e1-a513-60e42893adb7' || e.ID === 'd55c81a8-54d7-4d90-aad7-4f34c3ba3950' || e.ID === '4142ab5b-ce52-4655-a28d-724bfabb24f0') {

+ 5 - 0
src/renderer/components/SignalList.vue

@@ -22,6 +22,7 @@
     >
         <!--信号源列表项-->
         <div
+                v-if="signalBorder.length"
                 class="signal_item"
                 v-for="item in signalListJson"
                 :key="item.ID"
@@ -59,6 +60,10 @@
         async beforeCreate() {
             this.signalBorder = await getStaticFile('EnitySignalPreviewList.Data')
         },
+        
+        mounted() {
+          console.log(this.signalBorder)
+        },
 
         updated() {
             const flag = this.signalBorder[0] ? (this.signalBorder[0].Orientation === 0 ? 'column' : 'row') : ''

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1 - 1
static/Data3/EnitySignalPreviewList.Data