Jelajahi Sumber

修改初始加载跳转缩放比例计算,看板字体和跳转返回

yhluo 6 bulan lalu
induk
melakukan
44071f7da8

+ 7 - 2
src/assets/scss/indexcompare.scss

@@ -2,12 +2,17 @@
   color: #d3d6dd;
   width: 1920px;
   height: 1080px;
-  position: absolute;
+  position:fixed;
+  top:0;
+  left:0;
+  bottom:0;
+  right:0;
+  /*position: absolute;
   top: 50%;
   left: 50%;
   transform: translate(-50%, -50%);
   transform-origin: left top;
-  overflow: hidden;
+  overflow: hidden;*/
   
   .bg {
     width: 100%;

+ 7 - 2
src/assets/scss/indexmakeprocess.scss

@@ -2,12 +2,17 @@
   color: #d3d6dd;
   width: 1920px;
   height: 1080px;
-  position: absolute;
+  position:fixed;
+  top:0;
+  left:0;
+  bottom:0;
+  right:0;
+  /*position: absolute;
   top: 50%;
   left: 50%;
   transform: translate(-50%, -50%);
   transform-origin: left top;
-  overflow: hidden;
+  overflow: hidden;*/
   
   .bg {
     width: 100%;

+ 7 - 2
src/assets/scss/indexprodline.scss

@@ -2,12 +2,17 @@
   color: #d3d6dd;
   width: 1920px;
   height: 1080px;
-  position: absolute;
+  position:fixed;
+  top:0;
+  left:0;
+  bottom:0;
+  right:0;
+  /*position: absolute;
   top: 50%;
   left: 50%;
   transform: translate(-50%, -50%);
   transform-origin: left top;
-  overflow: hidden;
+  overflow: hidden;*/
   
   .bg {
     width: 100%;

+ 7 - 2
src/assets/scss/indexquality.scss

@@ -2,12 +2,17 @@
   color: #d3d6dd;
   width: 1920px;
   height: 1080px;
-  position: absolute;
+  position:fixed;
+  top:0;
+  left:0;
+  bottom:0;
+  right:0;
+  /*position: absolute;
   top: 50%;
   left: 50%;
   transform: translate(-50%, -50%);
   transform-origin: left top;
-  overflow: hidden;
+  overflow: hidden;*/
   
   .bg {
     width: 100%;

+ 7 - 2
src/assets/scss/indextotal.scss

@@ -2,12 +2,17 @@
   color: #d3d6dd;
   width: 1920px;
   height: 1080px;
-  position: absolute;
+  position:fixed;
+  top:0;
+  left:0;
+  bottom:0;
+  right:0;
+  /*position: absolute;
   top: 50%;
   left: 50%;
   transform: translate(-50%, -50%);
   transform-origin: left top;
-  overflow: hidden;
+  overflow: hidden;*/
 
   .bg {
     width: 100%;

+ 7 - 2
src/assets/scss/indexwarehouse.scss

@@ -2,12 +2,17 @@
   color: #d3d6dd;
   width: 1920px;
   height: 1080px;
-  position: absolute;
+  position:fixed;
+  top:0;
+  left:0;
+  bottom:0;
+  right:0;
+  /*position: absolute;
   top: 50%;
   left: 50%;
   transform: translate(-50%, -50%);
   transform-origin: left top;
-  overflow: hidden;
+  overflow: hidden;*/
   
   .bg {
     width: 100%;

+ 7 - 2
src/assets/scss/indexzz.scss

@@ -2,12 +2,17 @@
   color: #d3d6dd;
   width: 1920px;
   height: 1080px;
-  position: absolute;
+  position:fixed;
+  top:0;
+  left:0;
+  bottom:0;
+  right:0;
+  /*position: absolute;
   top: 50%;
   left: 50%;
   transform: translate(-50%, -50%);
   transform-origin: left top;
-  overflow: hidden;
+  overflow: hidden;*/
   
   .bg {
     width: 100%;

+ 23 - 6
src/utils/drawMixin.js

@@ -1,6 +1,6 @@
 // 屏幕适配 mixin 函数
 
-// * 默认缩放值
+/*// * 默认缩放值
 const scale = {
   width: '1',
   height: '1',
@@ -11,7 +11,7 @@ const baseWidth = 1920
 const baseHeight = 1080
 
 // * 需保持的比例(默认1.77778)
-const baseProportion = parseFloat((baseWidth / baseHeight).toFixed(5))
+const baseProportion = parseFloat((baseWidth / baseHeight).toFixed(5))*/
 
 export default {
   data() {
@@ -28,7 +28,7 @@ export default {
     window.removeEventListener('resize', this.resize)
   },
   methods: {
-    calcRate () {
+    /*calcRate () {
       const appRef = this.$refs["appRef"]
       if (!appRef) return 
       // 当前宽高比
@@ -46,9 +46,25 @@ export default {
           appRef.style.transform = `scale(${scale.width}, ${scale.height}) translate(-50%, -50%)`
         }
       }
+    },*/
+    calcRate(){
+      const appRef = this.$refs["appRef"]
+      if (!appRef) return
+      const newWidth = window.innerWidth;
+      const newHeight = window.innerHeight;
+      
+      if (appRef) {
+        let newScaleX = newWidth / 1920;
+        let newScaleY = newHeight / 1080;
+
+        let newTranslateX = ((1920 - newWidth) / 2 / newWidth * 100).toFixed(5) + '%';
+        let newTranslateY = ((1080 - newHeight) / 2 / newHeight * 100).toFixed(5) + '%';
+        appRef.style.transform = `scale(${newScaleX.toFixed(5)}, ${newScaleY.toFixed(5)}) translate(-${newTranslateX}, -${newTranslateY})`
+        console.log(`scale(${newScaleX.toFixed(5)}, ${newScaleY.toFixed(5)}) translate(-${newTranslateX}, -${newTranslateY})`)
+      }
     },
     resize () {
-      clearTimeout(this.drawTiming);
+      /*clearTimeout(this.drawTiming);*/
       const isFullScreen = document.fullscreenElement
       if (isFullScreen) {
         this.isFullScreen = true;
@@ -59,9 +75,10 @@ export default {
         // this.$refs['fullScreen'].style.display='inline-block';
         //this.$refs['exitFullScreen'].style.display='none';
       }
-      this.drawTiming = setTimeout(() => {
+      /*this.drawTiming = setTimeout(() => {
         this.calcRate()
-      }, 10000)
+      }, 4000)*/
+      this.calcRate()
     },
     fullScreen(){
       var docElm = document.documentElement; //若要全屏页面中div,var element= document.getElementById("divID");

+ 26 - 3
src/views/compare/index.vue

@@ -109,6 +109,7 @@ export default {
       dateWeek: null,
       weekday: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
       decorationColor: ['#568aea', '#000000'],
+      fromComponent: ''
     }
   },
   components: {
@@ -116,13 +117,34 @@ export default {
     leftdown1,
     leftup1
   },
+  beforeRouteEnter(to, from, next) {
+    next(vm => {
+      console.log(from.meta.title)
+      if (from.meta.title == '组装看板' || from.meta.title == '车间看板') {
+        vm.fromComponent = from.meta.title;
+      }
+    })
+  },
   created() {
      this.isFullScreen = document.fullscreenElement;
   },
   mounted() {
     this.timeFn();
     this.cancelLoading();
-    this.autoFullScreen();
+    this.$nextTick(() => {
+        this.autoFullScreen();
+        this.$message({
+            showClose: true,
+            message: `当前屏幕分辨率,宽:${window.innerWidth},高:${window.innerHeight}`,
+            type: 'warning'
+        });
+    })
+    
+    if (this.fromComponent) {
+      setTimeout(() => {
+        this.$router.go(-1);
+      }, 60000)
+    }
   },
   beforeDestroy () {
     clearInterval(this.timing);
@@ -144,7 +166,8 @@ export default {
     },
     autoFullScreen(){
       if (!this.isFullScreen) {
-        setTimeout(() => {
+        this.fullScreen();
+        /*setTimeout(() => {
           this.$showMsgBox({
             caption: "提示",
             msg: '是否全屏展示?',
@@ -154,7 +177,7 @@ export default {
               }
             }
           })
-        }, 3000)
+        }, 3000)*/
       }
     },
 

+ 2 - 2
src/views/makeprocess/bottom1.vue

@@ -168,7 +168,7 @@ $box-width: 100%;
         height: 100% !important;
 
         .header {
-          font-size: 20px !important;
+          font-size: 28px !important;
 
           .header-item {
             line-height: 45px !important;
@@ -185,7 +185,7 @@ $box-width: 100%;
             span.cell-text {
               display: inline-block;
               vertical-align: middle;
-              font-size: 24px !important;
+              font-size: 28px !important;
               line-height: 1.5 !important;
               padding: 0 5px !important;
             }

+ 11 - 3
src/views/makeprocess/index.vue

@@ -106,7 +106,14 @@ export default {
   mounted() {
     this.timeFn();
     this.cancelLoading();
-    this.autoFullScreen();
+    this.$nextTick(() => {
+      this.autoFullScreen();
+      this.$message({
+          showClose: true,
+          message: `当前屏幕分辨率,宽:${window.innerWidth},高:${window.innerHeight}`,
+          type: 'warning'
+      });
+    })
   },
   beforeDestroy () {
     clearInterval(this.timing);
@@ -128,7 +135,8 @@ export default {
     },
     autoFullScreen(){
       if (!this.isFullScreen) {
-        setTimeout(() => {
+        this.fullScreen();
+        /*setTimeout(() => {
           this.$showMsgBox({
             caption: "提示",
             msg: '是否全屏展示?',
@@ -138,7 +146,7 @@ export default {
               }
             }
           })
-        }, 3000)
+        }, 3000)*/
       }
     },
   }

+ 11 - 3
src/views/prodline/index.vue

@@ -150,7 +150,14 @@ export default {
   mounted() {
     this.timeFn();
     this.cancelLoading();
-    this.autoFullScreen();
+    this.$nextTick(() => {
+      this.autoFullScreen();
+      this.$message({
+          showClose: true,
+          message: `当前屏幕分辨率,宽:${window.innerWidth},高:${window.innerHeight}`,
+          type: 'warning'
+      });
+    })
   },
   beforeDestroy () {
     clearInterval(this.timing);
@@ -188,7 +195,8 @@ export default {
     },
     autoFullScreen(){
       if (!this.isFullScreen) {
-        setTimeout(() => {
+        this.fullScreen();
+        /*setTimeout(() => {
           this.$showMsgBox({
             caption: "提示",
             msg: '是否全屏展示?',
@@ -198,7 +206,7 @@ export default {
               }
             }
           })
-        }, 3000)
+        }, 3000)*/
       }
     },
     getlinedata (){

+ 4 - 0
src/views/prodline/up1.vue

@@ -218,6 +218,10 @@ import CenterChart from "../../components/prodlinechart/up1Chart/up1DChart";
           }
         }
       }
+
+      ::v-deep .rows span{
+        font-size: 21px;
+      }
     }
 
   }

+ 4 - 0
src/views/prodline/up2.vue

@@ -154,6 +154,10 @@ $box-width: 100%;
     .rate{
       justify-content: center; /* 水平居中 */
       align-items: center;
+      div{
+          font-size:22px;
+          margin-top:8px;
+      }
     }
   }
 }

+ 11 - 3
src/views/quality/index.vue

@@ -135,7 +135,14 @@ export default {
   mounted() {
     this.timeFn()
     this.cancelLoading()
-    this.autoFullScreen()
+    this.$nextTick(() => {
+      this.autoFullScreen();
+      this.$message({
+          showClose: true,
+          message: `当前屏幕分辨率,宽:${window.innerWidth},高:${window.innerHeight}`,
+          type: 'warning'
+      });
+    })
   },
   beforeDestroy () {
     clearInterval(this.timing)
@@ -157,7 +164,8 @@ export default {
     },
     autoFullScreen(){
       if (!this.isFullScreen) {
-        setTimeout(() => {
+        this.fullScreen();
+        /*setTimeout(() => {
           this.$showMsgBox({
             caption: "提示",
             msg: '是否全屏展示?',
@@ -167,7 +175,7 @@ export default {
               }
             }
           })
-        }, 3000)
+        }, 3000)*/
       }
     },
   }

+ 11 - 3
src/views/total/index.vue

@@ -142,7 +142,14 @@ export default {
   mounted() {
     this.timeFn();
     this.cancelLoading();
-    this.autoFullScreen();
+    this.$nextTick(() => {
+      this.autoFullScreen();
+      this.$message({
+          showClose: true,
+          message: `当前屏幕分辨率,宽:${window.innerWidth},高:${window.innerHeight}`,
+          type: 'warning'
+      });
+    })
   },
   beforeDestroy () {
     clearInterval(this.timing);
@@ -171,7 +178,8 @@ export default {
     },
     autoFullScreen(){
       if (!this.isFullScreen) {
-        setTimeout(() => {
+        this.fullScreen();
+        /*setTimeout(() => {
           this.$showMsgBox({
             caption: "提示",
             msg: '是否全屏展示?',
@@ -181,7 +189,7 @@ export default {
               }
             }
           })
-        }, 3000)
+        }, 3000)*/
       }
     },
   }

+ 11 - 3
src/views/warehouse/index.vue

@@ -133,7 +133,14 @@ export default {
   mounted() {
     this.timeFn()
     this.cancelLoading()
-    this.autoFullScreen();
+    this.$nextTick(() => {
+      this.autoFullScreen();
+      this.$message({
+          showClose: true,
+          message: `当前屏幕分辨率,宽:${window.innerWidth},高:${window.innerHeight}`,
+          type: 'warning'
+      });
+    })
   },
   beforeDestroy () {
     clearInterval(this.timing);
@@ -155,7 +162,8 @@ export default {
     },
     autoFullScreen(){
       if (!this.isFullScreen) {
-        setTimeout(() => {
+        this.fullScreen();
+        /*setTimeout(() => {
           this.$showMsgBox({
             caption: "提示",
             msg: '是否全屏展示?',
@@ -165,7 +173,7 @@ export default {
               }
             }
           })
-        }, 3000)
+        }, 3000)*/
       }
     },
   }

+ 5 - 1
src/views/zz/bottom1.vue

@@ -32,7 +32,8 @@ export default {
         align: ['center', 'center', 'left', 'left', 'left', 'left', 'center', 'center', 'center', 'center', 'center']
       },
       refreshInterval: null,
-      apiCaller: 'KB!ZZDayPlan'
+      apiCaller: 'KB!ZZDayPlan',
+        waitTime: 100000
     }
   },
   mounted() {
@@ -143,6 +144,9 @@ export default {
       ::v-deep .header {
         font-size: 25px;
       }
+      ::v-deep .rows span{
+        font-size: 26px;
+      } 
     }
   }
 }

+ 11 - 3
src/views/zz/index.vue

@@ -130,7 +130,14 @@ export default {
   mounted() {
     this.timeFn();
     this.cancelLoading();
-    this.autoFullScreen();
+    this.$nextTick(() => {
+      this.autoFullScreen();
+      this.$message({
+          showClose: true,
+          message: `当前屏幕分辨率,宽:${window.innerWidth},高:${window.innerHeight}`,
+          type: 'warning'
+      });
+    })
   },
   beforeDestroy () {
     clearInterval(this.timing);
@@ -152,7 +159,8 @@ export default {
     },
     autoFullScreen(){
       if (!this.isFullScreen) {
-        setTimeout(() => {
+        this.fullScreen();
+        /*setTimeout(() => {
           this.$showMsgBox({
             caption: "提示",
             msg: '是否全屏展示?',
@@ -162,7 +170,7 @@ export default {
               }
             }
           })
-        }, 3000)
+        }, 3000)*/
       }
     },
 

+ 3 - 0
src/views/zz/up2.vue

@@ -182,6 +182,9 @@ $box-width: 100%;
       justify-content: center; /* 水平居中 */
       align-items: center;
     }
+    >.jc-center>div{
+      font-size:21px;
+    }
   }
 }
 </style>