Quellcode durchsuchen

功率曲线查询页面增加日期功能

sunzehao vor 2 Tagen
Ursprung
Commit
37c2067809

+ 1 - 1
src/api/monthlyPerformanceAnalysis.js

@@ -332,7 +332,7 @@ export function getApiequipmentinfoDayCompareList(params) {
 export function getApiPerformancecurvefitting(params) {
   return request({
     baseURL: process.env.VUE_APP_API,
-    url: `/performance/curvefitting?dateType=${params.dateType}&type=${params.type}&windturbineIds=${params.wtId}`,
+    url: `/performance/curvefitting?recorddate=${params.recorddate}&dateType=${params.dateType}&type=${params.type}&windturbineIds=${params.wtId}`,
     method: "GET",
   });
 }

+ 17 - 1
src/views/economicsOperation/windAnalyse/powerSearch/index.vue

@@ -35,6 +35,18 @@
           </el-select>
         </div> -->
         <div class="station">
+          日期:
+          <el-date-picker
+            size="mini"
+            v-model="dateVal"
+            type="date"
+            placeholder="选择日期"
+            popper-class="date-select"
+            value-format="YYYY-MM-DD"
+        >
+        </el-date-picker>
+        </div>
+        <div class="station">
           风机:
           <el-select
             size="mini"
@@ -149,11 +161,13 @@ import util from "@/helper/util.js";
 import utils from "@/utills/downXlsx";
 import dataJson from "./dataJson.json";
 import { nxfStyle } from "@/utils/nxfCodeStyle";
+import dayjs from "dayjs";
 export default {
   name: "PowerSearch",
   data() {
     return {
       tabIndex: 0,
+      dateVal: "",
       companyVal: "",
       companyOptions: [],
       stationVal: "NX_FGS_HA_FDC_STA",
@@ -175,6 +189,7 @@ export default {
   },
   created() {},
   mounted() {
+    this.dateVal = dayjs().format("YYYY-MM-DD");
     this.getCompanyData();
   },
   watch: {},
@@ -217,7 +232,7 @@ export default {
     // 切换tab
     tabSelect(index) {
       this.tabIndex = index;
-      this.getTableData();
+    //   this.getTableData();
     },
     // 获取公司列表
     async getCompanyData() {
@@ -295,6 +310,7 @@ export default {
     },
     async getTableData() {
       let params = {
+        recorddate: this.dateVal,
         dateType: this.tabIndex * 1 + 1,
         wtId: this.windVal,
         type: this.tabEvent,