Browse Source

问题修改

SunZehao 1 week ago
parent
commit
c7be5bbdc4

+ 76 - 67
src/api/powerAnalyse.js

@@ -2,102 +2,111 @@ import request from "@/tools/request";
 
 //获取拟合id
 export function getPowerFittingId(data) {
-  return request({
-    baseURL: process.env.VUE_APP_TEST,
-    url: "new/power/fitting/data",
-    method: "get",
-    params: data,
-  });
+    return request({
+        baseURL: process.env.VUE_APP_TEST,
+        url: "new/power/fitting/data",
+        method: "get",
+        params: data,
+    });
 }
 
 //获取拟合曲线
 export function getPowerFittingChart(data) {
-  return request({
-    baseURL: process.env.VUE_APP_TEST,
-    url: `new/power/fitting/curve?id=${data.id}`,
-    method: "get",
-    timeout: 15000,
-  });
+    return request({
+        baseURL: process.env.VUE_APP_TEST,
+        url: `new/power/fitting/curve?id=${data.id}`,
+        method: "get",
+        timeout: 15000,
+    });
 }
 //获取表格数据
 export function getPowerFittingTable(data) {
-  return request({
-    baseURL: process.env.VUE_APP_TEST,
-    url: `new/power/fitting/show?id=${data.id}`,
-    method: "get",
-  });
+    return request({
+        baseURL: process.env.VUE_APP_TEST,
+        url: `new/power/fitting/show?id=${data.id}`,
+        method: "get",
+    });
 }
 //获取圈选散点数据
 export function getPowerFittingSelectedChart(data) {
-  return request({
-    baseURL: process.env.VUE_APP_TEST,
-    url: `new/power/fitting/filter?yk=${data.yk}&wk=${data.wk}`,
-    method: "get",
-  });
+    return request({
+        baseURL: process.env.VUE_APP_TEST,
+        url: `new/power/fitting/filter?yk=${data.yk}&wk=${data.wk}`,
+        method: "get",
+    });
 }
 //获取光伏圈选散点数据
 export function getPowerFittingSelectedChartGF(data) {
-  return request({
-    baseURL: process.env.VUE_APP_TEST,
-    url: `/photovol/filter?yk=${data.yk}&wk=${data.wk}`,
-    method: "get",
-  });
+    return request({
+        baseURL: process.env.VUE_APP_TEST,
+        url: `/photovol/filter?yk=${data.yk}&wk=${data.wk}`,
+        method: "get",
+    });
+}
+
+export function getWindFittingAlarms(data) {
+    return request({
+        baseURL: process.env.VUE_APP_TEST,
+        url: "/new/power/fitting/alarms",
+        method: "post",
+        data: data,
+    });
 }
 
 // 获取光伏电站设备
 export function getIntervers({ wpids }) {
-  return request({
-    baseURL: process.env.VUE_APP_TEST,
-    url: `photovol/wtByWplist?wpids=${wpids}`,
-    method: "get",
-  });
+    return request({
+        baseURL: process.env.VUE_APP_TEST,
+        url: `photovol/wtByWplist?wpids=${wpids}`,
+        method: "get",
+    });
 }
 //获取光伏功率拟合图表数据
 export function getPowerFittingChartGF({
-  station,
-  inverters,
-  startdate,
-  enddate,
+    station,
+    inverters,
+    startdate,
+    enddate,
 }) {
-  return request({
-    baseURL: process.env.VUE_APP_TEST,
-    url: `/photovol/notfile/powertimefile?station=${station}&inverters=${inverters}&startdate=${startdate}&enddate=${enddate}`,
-    method: "get",
-    timeout: 30000,
-  });
+    return request({
+        baseURL: process.env.VUE_APP_TEST,
+        url: `/photovol/notfile/powertimefile?station=${station}&inverters=${inverters}&startdate=${startdate}&enddate=${enddate}`,
+        method: "get",
+        timeout: 30000,
+    });
 }
 //获取光伏功率光照图表数据
 export function getPowerHotChartGF({
-  station,
-  inverters,
-  startdate,
-  enddate,
-  interval,
-  maxs,
-  mins,
-  maxpower,
-  minpower,
+    station,
+    inverters,
+    startdate,
+    enddate,
+    interval,
+    maxs,
+    mins,
+    maxpower,
+    minpower,
 }) {
-  return request({
-    baseURL: process.env.VUE_APP_TEST,
-    url: `/photovol/curve?station=${station}&inverters=${inverters}&startdate=${startdate}&enddate=${enddate}&interval=${interval}&maxs=${maxs}&mins=${mins}&maxpower=${maxpower}&minpower=${minpower}`,
-    method: "get",
-    // timeout: 9000,
-  });
+    return request({
+        baseURL: process.env.VUE_APP_TEST,
+        url: `/photovol/curve?station=${station}&inverters=${inverters}&startdate=${startdate}&enddate=${enddate}&interval=${interval}&maxs=${maxs}&mins=${mins}&maxpower=${maxpower}&minpower=${minpower}`,
+        method: "get",
+        // timeout: 9000,
+    });
 }
 //光伏性能评价
 export function getApiequipmentinfoDayListGf(params) {
-  return request({
-    baseURL: process.env.VUE_APP_TEST,
-    url: `photovoltaic/analysis?stationId=${params.stationId}&time=${params.time}&timeType=${params.timeType}&pageSize=${params.pageSize}&pageNum=${params.pageNum}`,
-    method: "GET",
-  });
+    return request({
+        baseURL: process.env.VUE_APP_TEST,
+        url: `photovoltaic/analysis?stationId=${params.stationId}&time=${params.time}&timeType=${params.timeType}&pageSize=${params.pageSize}&pageNum=${params.pageNum}`,
+        method: "GET",
+    });
 }
 //光伏离散率分析
 export function getApiLslfxGf(params) {
-  return request({
-    baseURL: process.env.VUE_APP_TEST,
-    url: `photovoltaic/analysis/inverter?stationId=${params.stationId}&time=${params.time}&timeType=${params.timeType}&pageSize=${params.pageSize}&pageNum=${params.pageNum}`,
-    method: "GET",
-  });
+    return request({
+        baseURL: process.env.VUE_APP_TEST,
+        url: `photovoltaic/analysis/inverter?stationId=${params.stationId}&time=${params.time}&timeType=${params.timeType}&pageSize=${params.pageSize}&pageNum=${params.pageNum}`,
+        method: "GET",
+    });
 }

+ 83 - 83
src/views/economicsOperation/stationAnalyse/stationElectricAnalyse/index.vue

@@ -97,7 +97,7 @@
           >
             <el-table-column
               label="本月"
-              width="76"
+              width="85"
               v-if="filter == 1 || filter == 2"
               align="center"
               header-align="center"
@@ -115,7 +115,7 @@
             </el-table-column>
             <el-table-column
               label="同比"
-              width="76"
+              width="85"
               v-if="filter == 1"
               align="center"
               header-align="center"
@@ -133,7 +133,7 @@
             </el-table-column>
             <el-table-column
               label="环比"
-              width="76"
+              width="85"
               v-if="filter == 2"
               align="center"
               header-align="center"
@@ -154,7 +154,7 @@
             align="center"
             header-align="center"
             label="合计"
-            width="76"
+            width="85"
             show-overflow-tooltip
           >
             <template #default="{ row }">
@@ -176,7 +176,7 @@
 import LineCharts from "./components/line-bar-charts.vue";
 import { companys } from "@/api/curveAnalyse";
 import { GetStationByCompany } from "@/api/factoryMonitor/index.js";
-import dataJson from "./dataJson.json"
+import dataJson from "./dataJson.json";
 import {
   getOwnDemand,
   getAllStation,
@@ -236,7 +236,7 @@ export default {
   watch: {},
   created() {
     this.initialization();
-    this.year = dayjs().format("YYYY")
+    this.year = dayjs().format("YYYY");
   },
   methods: {
     tabClick(tab) {
@@ -252,7 +252,7 @@ export default {
       }
     },
     initialization() {
-      this.dataChange(dataJson.data, dataJson.code)
+      this.dataChange(dataJson.data, dataJson.code);
 
       companys().then(({ data: res }) => {
         if (res.data) {
@@ -282,88 +282,88 @@ export default {
       this.loading = true;
       getOwnDemand({ wpId: this.station, year: this.year }).then(
         ({ data, code }) => {
-            this.dataChange(data, code)
+          this.dataChange(data, code);
         }
       );
     },
     dataChange(data, code) {
-        if (code == 200) {
-            //合计列
-            let hj = [
-              data.zhcydlsum,
-              data.sjdlsum,
-              data.swdlsum,
-              data.gwdlsum,
-              data.zhcydllsum + "%",
-            ];
-            //处理纵向表格数据
-            let resData = JSON.parse(JSON.stringify(data.value));
-            let subKey = [
-              ["zhcydl", "zhcydltb", "zhcydlhb"],
-              ["sjdl", "sjdltb", "sjdlhb"],
-              ["swdl", "swdltb", "swdlhb"],
-              ["gwdl", "gwdltb", "gwdlhb"],
-              ["zhcydll", "zhcydlltb", "zhcydllhb"],
-            ];
-            // 数组按矩阵思路, 变成转置矩阵
-            let matrixData = resData.map((row) => {
-              let arr = [];
-              for (var i = 0; i <= 4; i++) {
-                let subArr = [];
-                subKey[i].forEach((sub) => {
-                  subArr.push(row[sub]);
-                });
-                arr.push(subArr);
-              }
-              return arr;
+      if (code == 200) {
+        //合计列
+        let hj = [
+          data.zhcydlsum,
+          data.sjdlsum,
+          data.swdlsum,
+          data.gwdlsum,
+          data.zhcydllsum + "%",
+        ];
+        //处理纵向表格数据
+        let resData = JSON.parse(JSON.stringify(data.value));
+        let subKey = [
+          ["zhcydl", "zhcydltb", "zhcydlhb"],
+          ["sjdl", "sjdltb", "sjdlhb"],
+          ["swdl", "swdltb", "swdlhb"],
+          ["gwdl", "gwdltb", "gwdlhb"],
+          ["zhcydll", "zhcydlltb", "zhcydllhb"],
+        ];
+        // 数组按矩阵思路, 变成转置矩阵
+        let matrixData = resData.map((row) => {
+          let arr = [];
+          for (var i = 0; i <= 4; i++) {
+            let subArr = [];
+            subKey[i].forEach((sub) => {
+              subArr.push(row[sub]);
             });
-            // 加入标题拼接最终的数据
-            this.tableData = matrixData[0].map((col, i) => {
-              let newArr = new Array(
-                this.tableHead.length - matrixData.length - 2
-              ).fill(null);
-              let array = [
-                this.headers[i],
-                ...matrixData.map((row) => {
-                  return row[i];
-                }),
-                ...newArr,
-                hj[i],
-              ];
-              return array;
-            });
-            //   .map((item) => {
-            //     item[item.length - 1] = [item[item.length - 1]];
-            //     return item;
-            //   });
-
-            //处理图表数据
-            let list = [
-              {
-                name: "综合场用电量",
-                data: resData.map((ele) => ele.zhcydl),
-                color: "#4B55AE",
-              },
-              {
-                name: "实发电量",
-                data: resData.map((ele) => ele.sjdl),
-                color: "#05BB4C",
-              },
-              {
-                name: "上网电量",
-                data: resData.map((ele) => ele.swdl),
-                color: "#21a4f7",
-              },
-              {
-                name: "购网电量",
-                data: resData.map((ele) => ele.gwdl),
-                color: "#FF8300",
-              },
-            ];
-            this.list = list;
-            this.loading = false;
+            arr.push(subArr);
           }
-    }
+          return arr;
+        });
+        // 加入标题拼接最终的数据
+        this.tableData = matrixData[0].map((col, i) => {
+          let newArr = new Array(
+            this.tableHead.length - matrixData.length - 2
+          ).fill(null);
+          let array = [
+            this.headers[i],
+            ...matrixData.map((row) => {
+              return row[i];
+            }),
+            ...newArr,
+            hj[i],
+          ];
+          return array;
+        });
+        //   .map((item) => {
+        //     item[item.length - 1] = [item[item.length - 1]];
+        //     return item;
+        //   });
+
+        //处理图表数据
+        let list = [
+          {
+            name: "综合场用电量",
+            data: resData.map((ele) => ele.zhcydl),
+            color: "#4B55AE",
+          },
+          {
+            name: "实发电量",
+            data: resData.map((ele) => ele.sjdl),
+            color: "#05BB4C",
+          },
+          {
+            name: "上网电量",
+            data: resData.map((ele) => ele.swdl),
+            color: "#21a4f7",
+          },
+          {
+            name: "购网电量",
+            data: resData.map((ele) => ele.gwdl),
+            color: "#FF8300",
+          },
+        ];
+        this.list = list;
+        this.loading = false;
+      }
+    },
   },
 };
 </script>

+ 5 - 5
src/views/economicsOperation/windAnalyse/powerCurve/index.vue

@@ -384,13 +384,11 @@ import {
   getPowerFittingChart,
   getPowerFittingTable,
   getPowerFittingSelectedChart,
+  getWindFittingAlarms
 } from "@/api/powerAnalyse.js";
 import {
   getApiequipmentListByWp2
 } from "@/api/monthlyPerformanceAnalysis";
-import {
-  getWindFittingAlarms
-} from "@/api/powerGenerating/index.js";
 import dataJson from "./dataJson.json"
 export default {
   // 名称
@@ -466,6 +464,8 @@ export default {
       tableData: [],
       wtTab: "table",
       allpowerFittingData: [],
+      warnData: [],
+      faultData: [],
       wtDialog: false,
       wtData: [],
       isMultiple: false,
@@ -910,7 +910,7 @@ export default {
       }
     },
     handleClick(val) {
-        this.wtTab = val;
+        this.wtTab = val.props.name;
         if (this.wtTab === "problem") {
             this.faultDataFn();
         } else if (this.wtTab === "warning") {
@@ -935,7 +935,7 @@ export default {
             table: "alarmCt",
         };
         const warnRes = await getWindFittingAlarms(params);
-        this.warnData.value = warnRes.data;
+        this.warnData = warnRes.data;
     },
     async funChartSelect(batch) {
       const wDataArr = [];

File diff suppressed because it is too large
+ 1720 - 1519
src/views/rateAnalysis/index.vue