소스 검색

BUG修改

Koishi 3 년 전
부모
커밋
bcef5dc709
2개의 변경된 파일58개의 추가작업 그리고 14개의 파일을 삭제
  1. 57 14
      src/views/Home/Home.vue
  2. 1 0
      src/views/Home/components/power-review.vue

+ 57 - 14
src/views/Home/Home.vue

@@ -869,8 +869,8 @@ export default {
   },
   data() {
     return {
-      historyWpId: '',
-      historyPlanBtnName:'',
+      historyWpId: "",
+      historyPlanBtnName: "",
       timmer: null, // 计时器
       timmer2: null,
       timmer3: null,
@@ -1227,26 +1227,68 @@ export default {
 
     // 点击地图展示类型
     changeShowType(wpId, planBtnName) {
-      this.wpName = planBtnName?planBtnName:this.wpName;
-      this.planBtnName = planBtnName?planBtnName:this.planBtnName;
+      if (
+        planBtnName === "电站" ||
+        planBtnName.indexOf("马场湖") !== -1 ||
+        planBtnName.indexOf("宣和") !== -1 ||
+        planBtnName.indexOf("大武口") !== -1 ||
+        planBtnName.indexOf("平罗") !== -1 ||
+        planBtnName.indexOf("海子井") !== -1
+      ) {
+        this.PowertrendYAxises = [
+          {
+            name: "功率",
+            min: 0,
+            max: null,
+            unit: "(万kWh)",
+            position: "left",
+          },
+          {
+            name: "日照",
+            min: 0,
+            max: 25,
+            unit: "(W/㎡)",
+            position: "right",
+          },
+        ];
+      } else {
+        this.PowertrendYAxises = [
+          {
+            name: "功率",
+            min: 0,
+            max: null,
+            unit: "(万kWh)",
+            position: "left",
+          },
+          {
+            name: "风速",
+            min: 0,
+            max: 25,
+            unit: "(m/s)",
+            position: "right",
+          },
+        ];
+      }
+      this.wpName = planBtnName ? planBtnName : this.wpName;
+      this.planBtnName = planBtnName ? planBtnName : this.planBtnName;
       this.jczbmap = {};
       clearInterval(this.timmer);
       this.timmer = null;
-      this.wpId = wpId?wpId:this.wpId;
-      
+      this.wpId = wpId ? wpId : this.wpId;
+
       this.requestData(false);
       this.getCharts();
       this.timmer = setInterval(() => {
         this.requestData(false);
       }, this.$store.state.websocketTimeSec);
     },
-    changeShowTypes(wpId,planBtnName){
-      this.historyWpId = wpId
-      this.historyPlanBtnName = planBtnName
-      this.changeShowType(wpId,planBtnName);
+    changeShowTypes(wpId, planBtnName) {
+      this.historyWpId = wpId;
+      this.historyPlanBtnName = planBtnName;
+      this.changeShowType(wpId, planBtnName);
     },
-    changeShowBackType(){
-      this.changeShowType(this.historyWpId,this.historyPlanBtnName);
+    changeShowBackType() {
+      this.changeShowType(this.historyWpId, this.historyPlanBtnName);
     },
     // 打开弹窗
     openDialog(dialogTitle, subUrl, targetName, dialogType) {
@@ -1338,9 +1380,10 @@ export default {
       this.dialogTitle = res.dialogTitle;
       this.dialogType = res.dialogType;
       this.doneLineChartData = res.data;
-      this.doneLineChartData.units[0] = this.doneLineChartData.units[0]?this.doneLineChartData.units[0]:'(万KWh)';
+      this.doneLineChartData.units[0] = this.doneLineChartData.units[0]
+        ? this.doneLineChartData.units[0]
+        : "(万KWh)";
       this.dialogShow = true;
-      console.log(this.doneLineChartData)
     },
 
     // 地图进入事件

+ 1 - 0
src/views/Home/components/power-review.vue

@@ -120,6 +120,7 @@ export default {
 
   watch: {
     data(res) {
+      console.log(11111, res);
       this.PowerLoad = res;
     },
     id(res) {