Browse Source

三测单的问题解决2部分

LIJU 3 weeks ago
parent
commit
597a4057b5
1 changed files with 25 additions and 22 deletions
  1. 25 22
      src/components/medical-advice/temperature/graphics.vue

+ 25 - 22
src/components/medical-advice/temperature/graphics.vue

@@ -22,11 +22,11 @@
             info.name
           }}</span>
           <span class="tbale-label">年龄:</span>
-          <span style="display: inline-block; width: 60px; text-align: left">{{
+          <span style="display: inline-block; width: 50px; text-align: left">{{
             info.age + "岁"
           }}</span>
           <span class="tbale-label">性别:</span>
-          <span style="display: inline-block; width: 60px; text-align: left">{{
+          <span style="display: inline-block; width: 50px; text-align: left">{{
             info.sexName
           }}</span>
           <span class="tbale-label">入院日期:</span>
@@ -42,7 +42,7 @@
             info.bedNo
           }}</span>
           <span class="tbale-label">住院号:</span>
-          <span style="display: inline-block; width: 100px; text-align: left">{{
+          <span style="display: inline-block; width: 120px; text-align: left">{{
             info.inpatientNo
           }}</span>
         </p>
@@ -765,7 +765,8 @@ export default {
       containerStyle: {
         marginTop: '-12px',
         left: '28px'
-      }
+      },
+      chromeMatch:''
     };
   },
   computed: {
@@ -1498,6 +1499,10 @@ export default {
       console.log('平台:', navigator.platform);
       console.log('语言:', navigator.language);
       console.log('浏览器供应商:', navigator.vendor);
+      const ua = navigator.userAgent;
+      const chromeMatch = ua.match(/Chrome\/[\d.]+/);
+      this.chromeMatch = chromeMatch[0];
+      console.log('Chrome版本:', chromeMatch ? chromeMatch[0] : '未找到');
 
       // 媒体查询检测
       const isHighDPI = window.matchMedia('(-webkit-min-device-pixel-ratio: 2)').matches;
@@ -1705,17 +1710,10 @@ export default {
         };
         if(this.marginTop > 38) {
           if(this.marginTop < 58) {
-            if((this.marginTop == 48) && (window.devicePixelRatio == 1) && (window.innerHeight == 657)){//十楼左➡️右第二台
-              containerStyle = {
-                marginTop:  this.marginTop + 'px',
-                left: '28px'
-              };
-            }else {
-              containerStyle = {
-                marginTop:  (this.marginTop + 15) + 'px',//5楼左2 
-                left: '28px'
-              };
-            }
+            containerStyle = {
+              marginTop:  (this.marginTop + 15) + 'px',//5楼左2 /8楼左1 /十楼左2
+              left: '28px'
+            };
           }else {
             if(window.devicePixelRatio < 1) {
               containerStyle = {
@@ -1738,8 +1736,8 @@ export default {
                 left: '28px'
               };
             }
-          }else { //6楼左1 /3楼左2  /5楼左1 /9楼左一
-            this.applyConditionalPrintAdjustment(42)
+          }else { //6楼左1 /3楼左2  /5楼左1 /9楼左一 /8楼左2
+            this.applyConditionalPrintAdjustment(37)
             containerStyle = {
               marginTop:  (this.marginTop + 10 + 14) + 'px',
               left: '35px'
@@ -1752,7 +1750,10 @@ export default {
       }
       // 例如:1536x864
       else if (screenWidth === 1536 && screenHeight === 864) {
-        this.removeConditionalPrintCSS()
+        if(this.chromeMatch && (this.chromeMatch == 'Chrome/139.0.0.0')) {
+          this.removeConditionalPrintCSS()
+          console.log("Chrome版本111111111111111111111",this.chromeMatch)
+        }
         pulseStyle = {
           titleMarginTop: '0px',
           firstRowMarginTop: '40px',
@@ -1830,11 +1831,13 @@ export default {
       else if (screenWidth === 1440 && screenHeight === 900) {
         if(this.marginTop > 38) {
           if(this.marginTop < 58) {
-              if(window.innerHeight == 712) {//九楼左2 (打印偏右半格)
+              if((window.innerHeight == 712) || (window.innerHeight == 757)) {//九楼左2 (打印偏右半格)有俩个,怀疑是不同版本的谷歌
                 this.removeConditionalPrintCSS()
               }              
-              if(window.innerHeight == 789) {//6楼左2  /3楼左3 /3楼左5
-                // this.removeConditionalPrintCSS() //6楼左2
+              if(window.innerHeight == 789) {//6楼左2  /3楼左3 /3楼左5 /10楼左1
+                if(this.chromeMatch && (this.chromeMatch == 'Chrome/139.0.0.0')) {
+                  this.removeConditionalPrintCSS() //6楼左2
+                }
               }
               pulseStyle = {
                 titleMarginTop: '0px',
@@ -1852,7 +1855,7 @@ export default {
                 marginTop: '476px'
               };
               containerStyle = {
-                marginTop:  (this.marginTop + 14) + 'px',
+                marginTop:  (this.marginTop + 14 + 2) + 'px',//加上2是因为偏上一点点
                 left: '28px'
               };
               console.log("window.innerHeight2222222222",window.innerHeight);