Browse Source

首页的一些字面上切换类的改动

mw_666 3 years ago
parent
commit
8d0fab5196
2 changed files with 38 additions and 8 deletions
  1. 1 1
      public/static/config/modeConfig.js
  2. 37 7
      src/views/Home/Home.vue

+ 1 - 1
public/static/config/modeConfig.js

@@ -25,7 +25,7 @@ if (localTest) {
 
     tilesUrl = "http://localhost:8080/static/cesium/Assets/Textures/NaturalEarthII";
 } else {
-    baseURL = "http://10.155.32.4:8082/" // 正式环境
+    baseURL = "http://192.168.1.103:8082/" // 正式环境
 
     tilesUrl = "http://10.155.32.4:8070/zhfx/new_tiles";
 }

+ 37 - 7
src/views/Home/Home.vue

@@ -104,7 +104,7 @@
               @click="
                 showDoneChart({
                   data: DayPower,
-                  dialogTitle: '日发电量',
+                  dialogTitle: planBtnName.indexOf('电站') !== -1 || planBtnName.indexOf('光电厂') !== -1 ? '日照强度' : '日发电量',
                   dialogType: 'doneLineChart',
                 })
               "
@@ -979,8 +979,8 @@ export default {
           that.powerData = [
             {
               title: that.wpId === '-2' || that.wpId.indexOf('GDC') !== -1 ? "日照强度" : "风速",
-              value: res.data.jczbmap.ssfs,
-              dialogTitle:  that.wpId === '-2' || that.wpId.indexOf('GDC') !== -1 ? "日照强度详情" : "风速详情",
+				
+              dialogTitle: that.wpId == 0 ? '详情' : that.wpId === '-2' || that.wpId.indexOf('GDC') !== -1 ? "日照强度详情" : "风速详情",
               subUrl: "genreset/findGLDetail",
               targetName: "ssfs",
               dialogType: "powerLineChart",
@@ -1084,8 +1084,20 @@ export default {
         },
         success(res) {
           let rdlKey = ["value1", "value2", "value3", "speed"];
+		  let dw = {
+			  units:"",
+			  title:""
+		  };
+		  that.wpId === '-2' || that.wpId.indexOf('GDC') !== -1 ? 
+		  dw={
+			  units:"(w/㎡)",
+			  title:"日照"
+		  } : dw={
+			  units:"(m/s)",
+			  title:"风速"
+		  };
           let DayPower = {
-            units: ["(万kWh)", "(m/s)"],
+            units: ["(万kWh)", dw.units],
             value: [
               {
                 title: "发电量",
@@ -1103,7 +1115,7 @@ export default {
                 value: [],
               },
               {
-                title: "风速",
+                title: dw.title,
                 yAxisIndex: 1,
                 value: [],
               },
@@ -1303,7 +1315,7 @@ export default {
 
       // this.powerLineChartData = res.data;
       this.powerLineChartData = res.data.value;
-      if (res.dialogTitle === "风速详情") {
+      if (res.dialogTitle === "详情") {
         this.powerLineChartYAxises = [
           {
             min: 0,
@@ -1318,7 +1330,25 @@ export default {
             unit: "(w/㎡)",
           },
         ];
-      } else {
+      }else if(res.dialogTitle === "风速详情") {
+        this.powerLineChartYAxises = [
+          {
+            min: 0,
+            name: "风速",
+            position: "left",
+            unit: "(m/s)",
+          },
+        ];
+      }else if(res.dialogTitle === "日照强度详情") {
+	    this.powerLineChartYAxises = [
+		  {
+		    min: 0,
+		    name: "日照",
+		    position: "right",
+		    unit: "(w/㎡)",
+		  },
+	    ];
+	  }else {
         this.powerLineChartYAxises = [
           {
             min: 0,