Procházet zdrojové kódy

pageid 参数页面不跳转问题优化

dengliying před 11 měsíci
rodič
revize
c399507189
1 změnil soubory, kde provedl 90 přidání a 66 odebrání
  1. 90 66
      ui/src/views/monitor/pfd/index.vue

+ 90 - 66
ui/src/views/monitor/pfd/index.vue

@@ -420,6 +420,7 @@ export default {
           }, 500);
 
           if(params.pageId === "LJL"){ // 裂解炉
+            console.log("裂解炉");
             el.style.left =  "0";
             el.style.top =  "-700px";
           }else if(params.pageId === "JLQ"){ // 急冷区
@@ -485,80 +486,103 @@ export default {
     },
     created() {
       let pageId = this.$route.query.pageId; // 页面参数
+      console.log("pageId222",pageId);
       if(pageId){
+          let imgSizeObj = {};
           if(pageId === "LJL"){ // 裂解炉
-              this.imageWidth = 10948;
-              this.areaLJLWidth = 1265;
-              this.areaJLQWidth = 2156;
-              this.areaZJQWidth = 4089;
-              this.areaYSWidth = 2652;
-              this.areaTBPWidth = 1438;
-              this.areaRQ1Width = 2652;
-              this.areaLQ_RQWidth = 3396;
-              this.areaLQ_1Width = 3396;
-              this.areaLQ_2Width = 1632;
-              this.areaRQ2Width = 1632;
+            // 记录图片大小
+            imgSizeObj =  {
+              imageWidth:10948,
+              areaLJLWidth: 1265,
+              areaJLQWidth: 2156,
+              areaZJQWidth: 4089,
+              areaYSWidth: 2652,
+              areaTBPWidth: 1438,
+              areaRQ1Width: 2652,
+              areaLQ_RQWidth: 3396,
+              areaLQ_1Width: 3396,
+              areaLQ_2Width: 1632,
+              areaRQ2Width: 1632,
+            };
+
           }else if(pageId === "JLQ"){ // 急冷区
-              this.imageWidth = 6348;
-              this.areaLJLWidth = 734;
-              this.areaJLQWidth = 1252;
-              this.areaZJQWidth = 2372;
-              this.areaYSWidth = 1539;
-              this.areaTBPWidth = 835;
-              this.areaRQ1Width = 1538;
-              this.areaLQ_RQWidth = 1970;
-              this.areaLQ_1Width = 1970;
-              this.areaLQ_2Width = 948;
-              this.areaRQ2Width = 948;
+            // 记录图片大小
+            imgSizeObj =  {
+              imageWidth: 6348,
+              areaLJLWidth: 734,
+              areaJLQWidth: 1252,
+              areaZJQWidth: 2372,
+              areaYSWidth: 1539,
+              areaTBPWidth: 835,
+              areaRQ1Width: 1538,
+              areaLQ_RQWidth: 1970,
+              areaLQ_1Width: 1970,
+              areaLQ_2Width: 948,
+              areaRQ2Width: 948,
+            };
+
           }else if(pageId === "YS"){// 压缩
-              this.imageWidth = 5348;
-              this.areaLJLWidth = 619;
-              this.areaJLQWidth = 1056;
-              this.areaZJQWidth = 2000;
-              this.areaYSWidth = 1298;
-              this.areaTBPWidth = 705;
-              this.areaRQ1Width = 1297;
-              this.areaLQ_RQWidth = 1661;
-              this.areaLQ_1Width = 1661;
-              this.areaLQ_2Width = 800;
-              this.areaRQ2Width = 800;
+            imgSizeObj =  {
+              imageWidth: 5348,
+              areaLJLWidth: 619,
+              areaJLQWidth: 1056,
+              areaZJQWidth: 2000,
+              areaYSWidth: 1298,
+              areaTBPWidth: 705,
+              areaRQ1Width: 1297,
+              areaLQ_RQWidth: 1661,
+              areaLQ_1Width: 1661,
+              areaLQ_2Width: 800,
+              areaRQ2Width: 800,
+            };
           }else if(pageId === "TBP"){// 脱丙烷
-              this.imageWidth = 7348;
-              this.areaLJLWidth = 851;
-              this.areaJLQWidth = 1452;
-              this.areaZJQWidth = 2749;
-              this.areaYSWidth = 1784;
-              this.areaTBPWidth = 970;
-              this.areaRQ1Width = 1783;
-              this.areaLQ_RQWidth = 2284;
-              this.areaLQ_1Width = 2284;
-              this.areaLQ_2Width = 1101;
-              this.areaRQ2Width = 1101;
+             imgSizeObj =  {
+                imageWidth: 7348,
+                areaLJLWidth: 851,
+                areaJLQWidth: 1452,
+                areaZJQWidth: 2749,
+                areaYSWidth: 1784,
+                areaTBPWidth: 970,
+                areaRQ1Width: 1783,
+                areaLQ_RQWidth: 2284,
+                areaLQ_1Width: 2284,
+                areaLQ_2Width: 1101,
+                areaRQ2Width: 1101,
+              };
           }else if(pageId === "LQ"){// 冷区
-              this.imageWidth = 7348;
-              this.areaLJLWidth = 851;
-              this.areaJLQWidth = 1452;
-              this.areaZJQWidth = 2749;
-              this.areaYSWidth = 1784;
-              this.areaTBPWidth = 970;
-              this.areaRQ1Width = 1783;
-              this.areaLQ_RQWidth = 2284;
-              this.areaLQ_1Width = 2284;
-              this.areaLQ_2Width = 1101;
-              this.areaRQ2Width = 1101;
+              imgSizeObj =  {
+                imageWidth: 7348,
+                areaLJLWidth: 851,
+                areaJLQWidth: 1452,
+                areaZJQWidth: 2749,
+                areaYSWidth: 1784,
+                areaTBPWidth: 970,
+                areaRQ1Width: 1783,
+                areaLQ_RQWidth: 2284,
+                areaLQ_1Width: 2284,
+                areaLQ_2Width: 1101,
+                areaRQ2Width: 1101,
+              };
           } else if(pageId === "RQ"){// 热区
-             this.imageWidth = 6548;
-              this.areaLJLWidth = 759;
-              this.areaJLQWidth = 1295;
-              this.areaZJQWidth = 2451;
-              this.areaYSWidth = 1591;
-              this.areaTBPWidth = 866;
-              this.areaRQ1Width = 1950;
-              this.areaLQ_RQWidth = 2037;
-              this.areaLQ_1Width = 2037;
-              this.areaLQ_2Width = 982;
-              this.areaRQ2Width = 982;
+            imgSizeObj =  {
+                imageWidth: 6548,
+                areaLJLWidth: 759,
+                areaJLQWidth: 1295,
+                areaZJQWidth: 2451,
+                areaYSWidth: 1591,
+                areaTBPWidth: 866,
+                areaRQ1Width: 1950,
+                areaLQ_RQWidth: 2037,
+                areaLQ_1Width: 2037,
+                areaLQ_2Width: 982,
+                areaRQ2Width: 982,
+              };
           }
+
+          this.$store.dispatch('settings/changeSetting', {
+            key: 'pfdPageImgeSize',
+            value: imgSizeObj
+          });
       }
     },
     methods: {