From abb72ed0fc3358620960329f6bd10c8a012a71e9 Mon Sep 17 00:00:00 2001 From: qushaowei <qushaowei@163.com> Date: 星期五, 29 十二月 2023 15:02:47 +0800 Subject: [PATCH] Merge branch 'master' of http://117.34.109.166:18448/r/vue_mdc_430 into develop --- src/views/WorkshopSignage.vue | 59 ++++------------------------------------------------------- 1 files changed, 4 insertions(+), 55 deletions(-) diff --git a/src/views/WorkshopSignage.vue b/src/views/WorkshopSignage.vue index 5dc5cb2..53d8115 100644 --- a/src/views/WorkshopSignage.vue +++ b/src/views/WorkshopSignage.vue @@ -145,8 +145,7 @@ value: 22, color: '#FF0000' } - ],// 璁惧鐘舵�佹寚绀虹伅鍒楄〃锛� - isFullscreen: false + ]// 璁惧鐘舵�佹寚绀虹伅鍒楄〃锛� } }, watch: { @@ -190,15 +189,7 @@ this.$refs.deviceContainerRef.style.backgroundImage = `url(${this.getImgView( this.workshopDetails.backgroundImage )})` - - this.fullScreenPageHeight = `calc(100% - ${this.pageHeaderHeight}px)` - this.normalPageHeight = `calc(100% - ${this.pageHeaderHeight}px - ${this.taskBarHeight}px - ${this.utilsBarHeight}px)` - - if (this.isFullscreen) { - this.$refs.deviceContainerRef.style.height = this.fullScreenPageHeight - } else { - this.$refs.deviceContainerRef.style.height = this.normalPageHeight - } + this.$refs.deviceContainerRef.style.height = this.normalPageHeight }) }, @@ -297,56 +288,15 @@ // setTimeout( this.$refs.equmentDetaiModel.initData(item.equipmentId),0) // },1000*10) } - }, - - onResize() { - // 鍒╃敤灞忓箷鍒嗚鲸鐜囧拰window瀵硅薄鐨勫唴楂樺害鏉ュ垽鏂吋瀹笽E - let winFlag = window.innerHeight === window.screen.height - // 鍒╃敤window鍏ㄥ睆鏍囪瘑鏉ュ垽鏂� -- IE鏃犳晥 - let isFull = window.fullScreen || document.webkitIsFullScreen - - if (isFull === undefined) { - this.isFullscreen = winFlag - } else { - this.isFullscreen = winFlag || isFull - } - console.log(winFlag) // true鍏ㄥ睆 false涓嶆槸鍏ㄥ睆 - console.log('浠诲姟鏍忛珮搴�', this.taskBarHeight) - console.log('宸ュ叿鏍忛珮搴�', this.utilsBarHeight) - - //鍏ㄥ睆鍒欏浘绾哥洅瀛愬彲瑙嗛珮搴﹀噺鍘婚〉澶撮珮搴︼紝姝e父绐楀彛鍒欏噺鍘婚〉澶淬�佸睆骞曞簳閮ㄤ换鍔℃爮浠ュ強娴忚鍣ㄥ伐鍏锋爮楂樺害 - if (winFlag) { - console.log('瑙﹀彂鍏ㄥ睆') - this.$refs.deviceContainerRef.style.height = this.fullScreenPageHeight - - } else { - console.log('鍏抽棴鍏ㄥ睆') - // 濡傛灉鍒锋柊椤甸潰閲嶆柊鍔犺浇鍚庨粯璁ゅ浜庡叏灞忔ā寮忥紝鍒欏伐鍏锋爮楂樺害涓鸿礋鏁帮紝鍥犳闇�瑕侀��鍑哄叏灞忔ā寮忔椂閲嶇疆宸ュ叿鏍忛珮搴� - this.utilsBarHeight = window.outerHeight - window.innerHeight - this.normalPageHeight = `calc(100% - ${this.pageHeaderHeight}px - ${this.taskBarHeight}px - ${this.utilsBarHeight}px)` - this.$refs.deviceContainerRef.style.height = this.normalPageHeight - } } - }, created() { + if (this.utilsBarHeight > 0) this.normalPageHeight = `calc(100% - ${this.pageHeaderHeight}px - ${this.taskBarHeight}px - ${this.utilsBarHeight}px)` + else this.normalPageHeight = `calc(100% - ${this.pageHeaderHeight}px - ${this.taskBarHeight}px - 87px)` if (this.$route.params.id) { this.getDeviceListByApi(this.$route.params.id) this.getWorkshopDetailsByApi(this.$route.params.id) } - - - let winFlag = window.innerHeight === window.screen.height - // 鍒╃敤window鍏ㄥ睆鏍囪瘑鏉ュ垽鏂� -- IE鏃犳晥 - let isFull = window.fullScreen || document.webkitIsFullScreen - - if (isFull === undefined) { - this.isFullscreen = winFlag - } else { - this.isFullscreen = winFlag || isFull - } - - // window.addEventListener('resize', this.onResize) }, mounted() { // 绂佹鐢ㄦ埛閫変腑鍐呭 @@ -356,7 +306,6 @@ // 纭繚閿�姣佸畾鏃跺櫒銆佷簨浠跺強鍥炴敹璧勬簮 clearInterval(this.timingAcquisition) this.timingAcquisition = null - // window.removeEventListener('resize', this.onResize) } } </script> -- Gitblit v1.9.3