Browse Source

三测单

LIJU 3 months ago
parent
commit
fcc3bf1406
1 changed files with 105 additions and 10 deletions
  1. 105 10
      src/components/medical-advice/temperature/graphics.vue

+ 105 - 10
src/components/medical-advice/temperature/graphics.vue

@@ -1578,7 +1578,7 @@ export default {
     },
     // 设置刻度样式
     setScaleStyles(screenWidth, screenHeight) {
-      // this.applyConditionalPrintAdjustment()
+      this.applyConditionalPrintAdjustment()
       // 默认刻度样式
       let pulseStyle = {
         titleMarginTop: '0px',
@@ -1626,9 +1626,15 @@ export default {
               marginTop:  this.marginTop + 'px',
             };  
           }else {
-            containerStyle = {
-              marginTop:  (this.marginTop + 14) + 'px',
-            };              
+            if((this.marginTop == 48) && (window.devicePixelRatio == 1) && (window.innerHeight == 969)){//三楼左➡️右第一台 和 第四台
+                containerStyle = {
+                  marginTop:  this.marginTop + 'px',
+                };              
+            }else {
+              containerStyle = {
+                marginTop:  (this.marginTop + 14) + 'px', //还有一个病区的电脑是相同的配置,但不知为何出现不一样的效果
+              };     
+            }  
           }
         }else {//marginTop:-2
           pulseStyle = {
@@ -1670,9 +1676,15 @@ export default {
         };
         if(this.marginTop > 38) {
           if(this.marginTop < 58) {
-            containerStyle = {
-              marginTop:  (this.marginTop + 15) + 'px',
-            };
+            if((this.marginTop == 48) && (window.devicePixelRatio == 1) && (window.innerHeight == 657)){//十楼左➡️右第二台
+              containerStyle = {
+                marginTop:  this.marginTop + 'px',
+              };
+            }else {
+              containerStyle = {
+                marginTop:  (this.marginTop + 15) + 'px',// 这个病区跟上面数值好像都一样,但不知道是什么原因,导致差异 
+              };
+            }
           }else {
             if(window.devicePixelRatio < 1) {
               containerStyle = {
@@ -1693,9 +1705,15 @@ export default {
               };
             }
           }else {
-            containerStyle = {
-              marginTop:  (this.marginTop + 10) + 'px',
-            };
+            if((this.marginTop == 38) && (window.devicePixelRatio == 1) && (window.innerHeight == 657)) {//6楼电脑从左到右第1个
+              containerStyle = {
+                marginTop:  (this.marginTop + 10 + 14) + 'px',
+              };
+            }else {
+              containerStyle = {
+                marginTop:  (this.marginTop + 10) + 'px',
+              };
+            }
           }
           console.log("this.marginTop <= 38",containerStyle.marginTop)
         }
@@ -1704,6 +1722,7 @@ export default {
       }
       // 例如:1536x864
       else if (screenWidth === 1536 && screenHeight === 864) {
+        this.removeConditionalPrintCSS()
         pulseStyle = {
           titleMarginTop: '0px',
           firstRowMarginTop: '40px',
@@ -1745,10 +1764,63 @@ export default {
           marginTop: '22px'
         };        
       }   
+      // 例如:1600x900
+      else if (screenWidth === 1600 && screenHeight === 900) {//急诊2楼儿科电脑 从左到右 01
+        pulseStyle = {
+          titleMarginTop: '0px',
+          firstRowMarginTop: '32px',
+          normalRowMarginTop: '55px',
+          lastRowMarginTop: '56px'
+        };
+        temperatureStyle = {
+          titleMarginTop: '0px',
+          firstRowMarginTop: '32px',
+          normalRowMarginTop: '55px',
+          lastRowMarginTop: '56px'
+        };
+        legendStyle = {
+          marginTop: '476px'
+        };
+        if((this.marginTop == 48) && (window.devicePixelRatio == 1) && (window.innerHeight == 789)) {
+          containerStyle = {
+            marginTop:  (this.marginTop + 14)  + 'px',
+          };
+        }else {
+          containerStyle = {
+            marginTop:  this.marginTop  + 'px',
+          };
+        }
+        console.log('1600x900分辨率','marginTop:',this.marginTop,'window.devicePixelRatio',window.devicePixelRatio,'window.innerHeight',window.innerHeight)
+      }   
       // 例如:1440x900
       else if (screenWidth === 1440 && screenHeight === 900) {
         if(this.marginTop > 38) {
           if(this.marginTop < 58) {
+            // if((window.innerHeight == 712) || (window.innerHeight == 789)) {//九楼712 三楼03 789
+            if(window.innerHeight == 712) {//九楼712 (三楼03 789 撤销)
+              pulseStyle = {
+                titleMarginTop: '0px',
+                firstRowMarginTop: '32px',
+                normalRowMarginTop: '55px',
+                lastRowMarginTop: '56px'
+              };
+              temperatureStyle = {
+                titleMarginTop: '0px',
+                firstRowMarginTop: '32px',
+                normalRowMarginTop: '55px',
+                lastRowMarginTop: '56px'
+              };
+              legendStyle = {
+                marginTop: '476px'
+              };
+              containerStyle = {
+                marginTop:  this.marginTop + 'px',
+              };
+              console.log("window.innerHeight11111111111",window.innerHeight);
+            }else {
+              if(window.innerHeight == 789) {//6楼电脑从左到右第2个
+                this.removeConditionalPrintCSS()
+              }
               pulseStyle = {
                 titleMarginTop: '0px',
                 firstRowMarginTop: '32px',
@@ -1767,6 +1839,8 @@ export default {
               containerStyle = {
                 marginTop:  (this.marginTop + 14) + 'px',
               };
+              console.log("window.innerHeight2222222222",window.innerHeight);
+            }
           }else {
               pulseStyle = {
                 titleMarginTop: '0px',
@@ -1789,6 +1863,26 @@ export default {
           }
         }else {
           if(window.devicePixelRatio < 1) {
+            if(window.innerHeight == 876) {//十楼左第一台 三楼左➡️右第五台
+              pulseStyle = {
+                titleMarginTop: '0px',
+                firstRowMarginTop: '32px',
+                normalRowMarginTop: '55px',
+                lastRowMarginTop: '56px'
+              };
+              temperatureStyle = {
+                titleMarginTop: '0px',
+                firstRowMarginTop: '32px',
+                normalRowMarginTop: '55px',
+                lastRowMarginTop: '56px'
+              };
+              legendStyle = {
+                marginTop: '476px'
+              };
+              containerStyle = {
+                marginTop:  (this.marginTop + 10) + 'px',
+              };
+            }else {
               pulseStyle = {
                 titleMarginTop: '0px',
                 firstRowMarginTop: '32px',
@@ -1807,6 +1901,7 @@ export default {
               containerStyle = {
                 marginTop:  (this.marginTop + 7) + 'px',
               };
+            }
           }else {
             pulseStyle = {
               titleMarginTop: '0px',