Biao 2 years ago
parent
commit
f27a8f84c3

+ 74 - 4
src/api/wisdomOverhaul/energy/index.js

@@ -4,29 +4,99 @@ import request from "../../../tools/request";
 const yawGetPassRate = (data) => {
     return request({
         baseURL: process.env.VUE_APP_Matrix,
-        url: `yaw/getPassRate?wtId=${data.wtId}$beginDate=${data.beginDate}$endDate=${data.endDate}$type=${data.type}`,
+        url: `yaw/getPassRate?wtId=${data.wtId}&beginDate=${data.beginDate}&endDate=${data.endDate}&type=${data.type}`,
         method: "get",
     });
 };
 const yawGetTotalRanges = (data) => {
     return request({
         baseURL: process.env.VUE_APP_Matrix,
-        url: `yaw/getTotalRanges?wtId=${data.wtId}$beginDate=${data.beginDate}$endDate=${data.endDate}$type=${data.type}`,
+        url: `yaw/getTotalRanges?wtId=${data.wtId}&beginDate=${data.beginDate}&endDate=${data.endDate}&type=${data.type}`,
         method: "get",
     });
 };
 const yawGetRanges = (data) => {
     return request({
         baseURL: process.env.VUE_APP_Matrix,
-        url: `yaw/getRanges?wtId=${data.wtId}$beginDate=${data.beginDate}$endDate=${data.endDate}$type=${data.type}$value=${data.value}`,
+        url: `yaw/getRanges?wtId=${data.wtId}&beginDate=${data.beginDate}&endDate=${data.endDate}&type=${data.type}&value=${data.value}`,
+        method: "get",
+    });
+};
+const scatterScatterWtAjax = (data) => {
+    return request({
+        baseURL: process.env.VUE_APP_Matrix,
+        url: `scatter/scatterWtAjax?wtId=${data.wtId}&year=${data.year}&month=${data.month}`,
+        method: "get",
+    });
+};
+const powersaturationPowersaturationamonutlist = (data) => {
+    return request({
+        baseURL: process.env.VUE_APP_Matrix,
+        url: `powersaturation/powersaturationamonutlist?wtId=${data.wtId}`,
+        method: "get",
+    });
+};
+const powersaturationPowersaturationamonutchart = (data) => {
+    return request({
+        baseURL: process.env.VUE_APP_Matrix,
+        url: `powersaturation/powersaturationamonutchart?wtId=${data.wtId}`,
+        method: "get",
+    });
+};
+const powersaturationPowersaturationmonthlist = (data) => {
+    return request({
+        baseURL: process.env.VUE_APP_Matrix,
+        url: `powersaturation/powersaturationmonthlist?wtId=${data.wtId}&year=${data.year}&month=${data.month}`,
+        method: "get",
+    });
+};
+const powersaturationPowersaturationmonthchart = (data) => {
+    return request({
+        baseURL: process.env.VUE_APP_Matrix,
+        url: `powersaturation/powersaturationmonthchart?wtId=${data.wtId}&year=${data.year}&month=${data.month}`,
+        method: "get",
+    });
+};
+const powersaturationPowersaturationlist = (data) => {
+    return request({
+        baseURL: process.env.VUE_APP_Matrix,
+        url: `powersaturation/powersaturationlist?wtId=${data.wtId}&recorddate=${data.recorddate}`,
+        method: "get",
+    });
+};
+const powersaturationPowersaturationchart = (data) => {
+    return request({
+        baseURL: process.env.VUE_APP_Matrix,
+        url: `powersaturation/powersaturationchart?wtId=${data.wtId}&recorddate=${data.recorddate}`,
+        method: "get",
+    });
+};
+const leaderboardCurvefittingmainList = (data) => {
+    return request({
+        baseURL: process.env.VUE_APP_Matrix,
+        url: `leaderboard/curvefittingmainList?isAsc=${data.isAsc}&wpId=${data.wpId}&recorddate=${data.recorddate}`,
         method: "get",
     });
 };
 
 
 
+
+
 export default {
     yawGetPassRate,
     yawGetTotalRanges,
-    yawGetRanges
+    yawGetRanges,
+    scatterScatterWtAjax,
+    powersaturationPowersaturationamonutlist,
+    powersaturationPowersaturationamonutchart,
+    powersaturationPowersaturationmonthlist,
+    powersaturationPowersaturationmonthchart,
+    powersaturationPowersaturationlist,
+    powersaturationPowersaturationchart,
+    leaderboardCurvefittingmainList,
+    
+
+
+
 }

+ 10 - 4
src/views/NewPages/alarm-center-2.vue

@@ -161,10 +161,16 @@ export default {
   methods: {
     tabSelect (tab) { },
     async search () {
-      const { data } = await apis.powercompareWindfarmAjax();
-      this.wpoptions = data;
-      this.wpvalue = data.data[0].id;
+
+      apis.powercompareWindfarmAjax({
+      }).then((res) => {
+       
+         this.wpoptions = res.data;
+      this.wpvalue = res.data?.[0]?.id;
       this.searchData();
+      });
+
+    
     },
     async searchTree () {
       const { data } = await api.treeType()
@@ -176,7 +182,7 @@ export default {
           field: "name",
         },
       ];
-      data.data.forEach((e) => {
+      data?.data?.forEach((e) => {
         let obj = {
           name: e.name,
           field: e.name,

+ 10 - 6
src/views/allLifeManage/tab1.vue

@@ -235,9 +235,11 @@ export default {
     // 获取厂家
     getVendor() {
       api.companiesList().then((res) => {
-        this.vendorArray = res.data;
-        this.vendor = res.data[0].company;
-        this.getWarehouse();
+        if (res.data) {
+          this.vendorArray = res.data;
+          this.vendor = res.data[0].company;
+          this.getWarehouse();
+        }
       });
 
       // let that = this;
@@ -254,9 +256,11 @@ export default {
     // 获取仓库
     getWarehouse() {
       api.benchmarkingLineList().then((res) => {
-        this.warehouseArray = res.data;
-        this.warehouse = res.data[0].warehouse;
-        this.requestSafeList();
+        if (res.data) {
+          this.warehouseArray = res.data;
+          this.warehouse = res.data[0].warehouse;
+          this.requestSafeList();
+        }
       });
 
       // let that = this;

+ 1 - 0
src/views/allLifeManage/tab2.vue

@@ -326,6 +326,7 @@ export default {
             wtid: this.wtId,
           })
           .then((res) => {
+            if(res.data)
             res.data.forEach((ele) => {
               ele.installdate = new Date(ele.installdate).formatDate(
                 "yyyy-MM-dd hh:mm:ss"

+ 1 - 0
src/views/allLifeManage/tab3.vue

@@ -278,6 +278,7 @@ export default {
             pagesize: 50000,
           })
           .then((res) => {
+            if(res.data)
             this.tableData.data = res.data.records;
           });
 

+ 1 - 1
src/views/malfunctionRecall/index.vue

@@ -243,7 +243,7 @@ export default {
       if (that.wpId) {
         api1
           .benchmarkingWtList({
-            wpid,
+            wpId: wpid,
           })
           .then((res) => {
             this.wtArray = res.data;

+ 1 - 1
src/views/malfunctionStatistics/index.vue

@@ -159,7 +159,7 @@ export default {
             date: this.recorddate,
           })
           .then((res) => {
-            if (res.data.length) {
+            if (res.data) {
               this.tableTitle = res.data[0].wpname + "故障统计";
               this.tableData.data = res.data;
             }

+ 74 - 40
src/views/nxfx/qxpclfx.vue

@@ -81,6 +81,8 @@
 <script>
 import ComTable from "@/components/coms/table/table-qc.vue";
 import thermometerVue from "../../components/chart/bar/thermometer.vue";
+import api1 from "@api/economic/index.js";
+import api from "@api/wisdomOverhaul/energy/index.js";
 export default {
   name: "qxpclfx",
   components: { ComTable },
@@ -102,7 +104,7 @@ export default {
             field: "fj",
             is_num: false,
             is_light: false,
-            sortable: thermometerVue
+            sortable: thermometerVue,
           },
           {
             name: "实际 / 保证(%)",
@@ -110,7 +112,7 @@ export default {
             is_num: false,
             is_light: false,
             sortable: true,
-            id: "id"
+            id: "id",
           },
           {
             name: "实际 / 最优(%)",
@@ -118,7 +120,7 @@ export default {
             is_num: false,
             is_light: false,
             sortable: true,
-            id: "id"
+            id: "id",
           },
           {
             name: "最优 / 保证(%)",
@@ -126,7 +128,7 @@ export default {
             is_num: false,
             is_light: false,
             sortable: true,
-            id: "id"
+            id: "id",
           },
           {
             name: "环比",
@@ -134,7 +136,7 @@ export default {
             is_num: false,
             is_light: false,
             sortable: true,
-            id: "id"
+            id: "id",
           },
           {
             name: "同比",
@@ -142,7 +144,7 @@ export default {
             is_num: false,
             is_light: false,
             sortable: true,
-            id: "id"
+            id: "id",
           },
           {
             name: "比标杆风机",
@@ -150,12 +152,12 @@ export default {
             is_num: false,
             is_light: false,
             sortable: true,
-            id: "id"
-          }
+            id: "id",
+          },
         ],
-        data: []
+        data: [],
       },
-      tableId: ""
+      tableId: "",
     };
   },
   created() {
@@ -165,21 +167,19 @@ export default {
     this.getTable(this.date);
   },
   methods: {
-    // 获取表格数据 
+    // 获取表格数据
     getTable(date) {
-      let that = this;
-      that.tableLoading = true;
-      that.API.requestData({
-        timeout:60000,
-        method: "POST",
-        subUrl: "/leaderboard/curvefittingmainList",
-        data: {
+      // let that = this;
+      this.tableLoading = true;
+
+      api
+        .leaderboardCurvefittingmainList({
           isAsc: "asc",
-          wpId: that.value1,
-          recorddate: date
-        },
-        success(res) {
-          that.tableLoading = false;
+          wpId: this.value1,
+          recorddate: date,
+        })
+        .then((res) => {
+          this.tableLoading = false;
           if (res.code === 200) {
             // that.tableData.data = res.data
             var data = [];
@@ -191,16 +191,45 @@ export default {
                 zybz: item.deviationrate3,
                 hb: item.monthdeviationrate,
                 tb: item.yeardeviationrate,
-                bbgfj: item.standarddeviationrate
+                bbgfj: item.standarddeviationrate,
               };
             });
-            that.tableData.data = data;
+            this.tableData.data = data;
           }
-        },
-        Error(res) {
-          console.log("tag", res);
-        }
-      });
+        });
+
+      // that.API.requestData({
+      //   timeout: 60000,
+      //   method: "POST",
+      //   subUrl: "/leaderboard/curvefittingmainList",
+      //   data: {
+      //     isAsc: "asc",
+      //     wpId: that.value1,
+      //     recorddate: date,
+      //   },
+      //   success(res) {
+      //     that.tableLoading = false;
+      //     if (res.code === 200) {
+      //       // that.tableData.data = res.data
+      //       var data = [];
+      //       res.data.forEach((item, index) => {
+      //         data[index] = {
+      //           fj: item.windturbineid,
+      //           sjbz: item.deviationrate2,
+      //           sjzy: item.deviationrate1,
+      //           zybz: item.deviationrate3,
+      //           hb: item.monthdeviationrate,
+      //           tb: item.yeardeviationrate,
+      //           bbgfj: item.standarddeviationrate,
+      //         };
+      //       });
+      //       that.tableData.data = data;
+      //     }
+      //   },
+      //   Error(res) {
+      //     console.log("tag", res);
+      //   },
+      // });
     },
     //   tab
     handleOpen(vl, index) {
@@ -218,16 +247,21 @@ export default {
     },
     // 场站
     ChangZhanVal() {
-      var that = this;
-      that.API.requestData({
-        method: "GET",
-        baseURL: "http://10.83.66.220:8020/",
-        subUrl: "benchmarking/wplist",
-        success(res) {
-          that.ChangZhan = res.data;
-          that.value1 = res.data[0].id;
-        }
+      api1.benchmarkingWplist({}).then((res) => {
+        this.ChangZhan = res.data;
+        this.value1 = res.data[0].id;
       });
+
+      // var that = this;
+      // that.API.requestData({
+      //   method: "GET",
+      //   baseURL: "http://10.83.66.220:8020/",
+      //   subUrl: "benchmarking/wplist",
+      //   success(res) {
+      //     that.ChangZhan = res.data;
+      //     that.value1 = res.data[0].id;
+      //   }
+      // });
     },
     // 查询
     handleSubmit() {
@@ -256,7 +290,7 @@ export default {
         return end;
       }
     },
-  }
+  },
 };
 </script>
 <style scoped>

+ 103 - 44
src/views/powerCurve/index.vue

@@ -74,6 +74,8 @@
 
 <script>
 import ScatterLineChart from "@com/chart/combination/scatter-line-chart.vue";
+import api1 from "@api/economic/index.js";
+import api from "@api/wisdomOverhaul/energy/index.js";
 export default {
   // 名称
   name: "cutAnalyse",
@@ -91,9 +93,9 @@ export default {
       wtArray: [],
       wpId: "",
       wtId: "",
-      recorddate: "2021-09" || new Date(new Date().getTime() - 3600 * 1000 * 24).formatDate(
-        "yyyy-MM"
-      ),
+      recorddate:
+        "2021-09" ||
+        new Date(new Date().getTime() - 3600 * 1000 * 24).formatDate("yyyy-MM"),
       chartLineData: {
         xTitle: "风速",
         yTitle: "功率",
@@ -113,54 +115,69 @@ export default {
   methods: {
     // 获取风场
     getWp(reGetWp) {
-      let that = this;
-      that.API.requestData({
-        method: "GET",
-        subUrl: "powercompare/windfarmAjax",
-        success(res) {
-          that.wpArray = res.data;
-          that.wpId = res.data[0].id;
-          that.getWt(that.wpId, reGetWp);
-        },
+      api1.benchmarkingWplist({}).then((res) => {
+        this.wpArray = res.data;
+        this.wpId = res.data[0].id;
+        this.getWt(this.wpId, reGetWp);
       });
+
+      // let that = this;
+      // that.API.requestData({
+      //   method: "GET",
+      //   subUrl: "powercompare/windfarmAjax",
+      //   success(res) {
+      //     that.wpArray = res.data;
+      //     that.wpId = res.data[0].id;
+      //     that.getWt(that.wpId, reGetWp);
+      //   },
+      // });
     },
 
     // 获取风机
     getWt(wpid, reGetWp) {
-      let that = this;
-      if (that.wpId) {
-        that.API.requestData({
-          method: "GET",
-          baseURL: "http://10.155.32.4:9001",
-          subUrl: "benchmarking/wtList",
-          data: {
-            wpid,
-          },
-          success(res) {
-            that.wtArray = res.data;
-            that.wtId = res.data[0].id;
+      if (this.wpId) {
+        api1
+          .powercompareWindturbineAjax({
+            wpId: wpid,
+          })
+          .then((res) => {
+            this.wtArray = res.data;
+            this.wtId = res.data[0].id;
             if (!reGetWp) {
-              that.getChartData();
+              this.getChartData();
             }
-          },
-        });
+          });
       }
+
+      // let that = this;
+
+      // that.API.requestData({
+      //   method: "GET",
+      //   baseURL: "http://10.155.32.4:9001",
+      //   subUrl: "benchmarking/wtList",
+      //   data: {
+      //     wpid,
+      //   },
+      //   success(res) {
+      //     that.wtArray = res.data;
+      //     that.wtId = res.data[0].id;
+      //     if (!reGetWp) {
+      //       that.getChartData();
+      //     }
+      //   },
+      // });
     },
 
     // 获取图表数据
     getChartData() {
-      let that = this;
-      that.API.requestData({
-        method: "POST",
-        subUrl: "scatter/scatterWtAjax",
-        showLoading: true,
-        data: {
-          wtId: that.wtId,
-          year: that.recorddate.split("-")[0],
-          month: that.recorddate.split("-")[1],
-        },
-        success(res) {
-          if (res.data.line.length||res.data.scatter.length) {
+      api
+        .scatterScatterWtAjax({
+          wtId: this.wtId,
+          year: this.recorddate.split("-")[0],
+          month: this.recorddate.split("-")[1],
+        })
+        .then((res) => {
+          if (res.data.line.length || res.data.scatter.length) {
             let chartLineData = {
               xTitle: "风速",
               yTitle: "功率",
@@ -182,15 +199,57 @@ export default {
               },
             ];
 
-            that.chartLineData = chartLineData;
-            that.chartData = chartData;
+            this.chartLineData = chartLineData;
+            this.chartData = chartData;
           } else {
-            that.BASE.showMsg({
+            this.BASE.showMsg({
               msg: "所选日期区间暂无数据",
             });
           }
-        },
-      });
+        });
+
+      // let that = this;
+      // that.API.requestData({
+      //   method: "POST",
+      //   subUrl: "scatter/scatterWtAjax",
+      //   showLoading: true,
+      //   data: {
+      //     wtId: that.wtId,
+      //     year: that.recorddate.split("-")[0],
+      //     month: that.recorddate.split("-")[1],
+      //   },
+      //   success(res) {
+      //     if (res.data.line.length || res.data.scatter.length) {
+      //       let chartLineData = {
+      //         xTitle: "风速",
+      //         yTitle: "功率",
+      //         legends: [],
+      //         // data: [[], []],
+      //         data: [[]],
+      //       };
+
+      //       res.data.line.forEach((ele) => {
+      //         // chartLineData.data[0].push(ele[0]);
+      //         // chartLineData.data[1].push(ele[1]);
+      //         chartLineData.data[0].push(ele[1]);
+      //       });
+
+      //       let chartData = [
+      //         {
+      //           title: "功率曲线拟合",
+      //           value: res.data.scatter,
+      //         },
+      //       ];
+
+      //       that.chartLineData = chartLineData;
+      //       that.chartData = chartData;
+      //     } else {
+      //       that.BASE.showMsg({
+      //         msg: "所选日期区间暂无数据",
+      //       });
+      //     }
+      //   },
+      // });
     },
 
     search() {

+ 1 - 1
src/views/warnStatistics/index.vue

@@ -358,7 +358,7 @@ export default {
             date: this.recorddate,
           })
           .then((res) => {
-            if (res.data.length) {
+            if (res.data) {
               this.tableTitle = res.data[0].wpname + "预警统计";
               this.tableData.data = res.data;
             }

+ 4 - 2
src/views/windAnalysis/phdffx.vue

@@ -159,8 +159,9 @@ export default {
           wpId: this.wpId,
         })
         .then((res) => {
-          this.wtList = res.data.data;
-          this.wtId = res.data.data[0].id;
+          if(res.data)
+          this.wtList = res.data;
+          this.wtId = res.data[0].id;
         });
       // const res = await this.API.requestData({
       //   method: "GET",
@@ -188,6 +189,7 @@ export default {
           type: 2,
         })
         .then((res) => {
+
           if (res && res.data && res.data.data) {
             const xData = [];
             const lData = [];

+ 255 - 114
src/views/wtSaturability/tab1.vue

@@ -5,16 +5,41 @@
         <div class="query-item">
           <div class="lable">场站:</div>
           <div class="search-input">
-            <el-select v-model="wpId" clearable placeholder="请选择" popper-class="select" @change="(wpId) => { getWt(wpId, true); }">
-              <el-option v-for="item in wpArray" :key="item.id" :value="item.id" :label="item.name" />
+            <el-select
+              v-model="wpId"
+              clearable
+              placeholder="请选择"
+              popper-class="select"
+              @change="
+                (wpId) => {
+                  getWt(wpId, true);
+                }
+              "
+            >
+              <el-option
+                v-for="item in wpArray"
+                :key="item.id"
+                :value="item.id"
+                :label="item.name"
+              />
             </el-select>
           </div>
         </div>
         <div class="query-item">
           <div class="lable">风机:</div>
           <div class="search-input">
-            <el-select v-model="wtId" clearable placeholder="请选择" popper-class="select">
-              <el-option v-for="item in wtArray" :key="item.id" :value="item.id" :label="item.name" />
+            <el-select
+              v-model="wtId"
+              clearable
+              placeholder="请选择"
+              popper-class="select"
+            >
+              <el-option
+                v-for="item in wtArray"
+                :key="item.id"
+                :value="item.id"
+                :label="item.name"
+              />
             </el-select>
           </div>
         </div>
@@ -26,13 +51,20 @@
     <div class="df-table">
       <ComTable height="35vh" :data="tableData"></ComTable>
     </div>
-    <Mlc height="300px" :list="chartData" :units="chartUnit" :showLegend="true" />
+    <Mlc
+      height="300px"
+      :list="chartData"
+      :units="chartUnit"
+      :showLegend="true"
+    />
   </div>
 </template>
 
 <script>
 import ComTable from "@com/coms/table/table.vue";
 import Mlc from "@com/chart/line/multiple-line-chart.vue";
+import api1 from "@api/economic/index.js";
+import api from "@api/wisdomOverhaul/energy/index.js";
 export default {
   // 名称
   name: "cutAnalyse",
@@ -44,7 +76,7 @@ export default {
   },
 
   // 数据
-  data () {
+  data() {
     return {
       isAsc: "asc",
       wpArray: [],
@@ -58,180 +90,289 @@ export default {
             field: "windturbineid",
             is_num: false,
             is_light: false,
-            sortable: true
+            sortable: true,
           },
           {
             name: "风速",
             field: "speed",
             is_num: false,
             is_light: false,
-            sortable: true
+            sortable: true,
           },
           {
             name: "实际拟合功率",
             field: "actualpower",
             is_num: false,
             is_light: false,
-            sortable: true
+            sortable: true,
           },
           {
             name: "最优拟合功率",
             field: "optimalpower",
             is_num: false,
             is_light: false,
-            sortable: true
-          }
+            sortable: true,
+          },
         ],
         data: [],
       },
-      chartData: [{
-        title: "",
-        yAxisIndex: 0,
-        value: []
-      }],
+      chartData: [
+        {
+          title: "",
+          yAxisIndex: 0,
+          value: [],
+        },
+      ],
       // chartUnit: ["功率(MW)", "(m/s)"]
-       chartUnit: ["功率(MW)"]
+      chartUnit: ["功率(MW)"],
     };
   },
 
   // 函数
   methods: {
     // 获取风场
-    getWp (reGetWp) {
-      let that = this;
-      that.API.requestData({
-        method: "GET",
-        subUrl: "powercompare/windfarmAjax",
-        success (res) {
-          that.wpArray = res.data;
-          that.wpId = res.data[0].id;
-          that.getWt(that.wpId, reGetWp);
-        }
+    getWp(reGetWp) {
+      api1.benchmarkingWplist({}).then((res) => {
+        this.wpArray = res.data;
+        this.wpId = res.data[0].id;
+        this.getWt(this.wpId, reGetWp);
       });
+
+      // let that = this;
+      // that.API.requestData({
+      //   method: "GET",
+      //   subUrl: "powercompare/windfarmAjax",
+      //   success (res) {
+      //     that.wpArray = res.data;
+      //     that.wpId = res.data[0].id;
+      //     that.getWt(that.wpId, reGetWp);
+      //   }
+      // });
     },
 
     // 获取风机
-    getWt (wpid, reGetWp) {
-      let that = this;
-      if (that.wpId) {
-        that.API.requestData({
-          method: "GET",
-          baseURL: "http://10.155.32.4:9001",
-          subUrl: "benchmarking/wtList",
-          data: {
-            wpid
-          },
-          success (res) {
-            that.wtArray = res.data;
-            that.wtId = res.data[0].id;
+    getWt(wpid, reGetWp) {
+      if (this.wpId) {
+        api1
+          .powercompareWindturbineAjax({
+            wpId: wpid,
+          })
+          .then((res) => {
+            this.wtArray = res.data;
+            this.wtId = res.data[0].id;
             if (!reGetWp) {
-              that.getTabData();
+              this.getTabData();
             }
-          }
-        });
+          });
       }
+      // let that = this;
+
+      //   that.API.requestData({
+      //     method: "GET",
+      //     baseURL: "http://10.155.32.4:9001",
+      //     subUrl: "benchmarking/wtList",
+      //     data: {
+      //       wpid,
+      //     },
+      //     success(res) {
+      //       that.wtArray = res.data;
+      //       that.wtId = res.data[0].id;
+      //       if (!reGetWp) {
+      //         that.getTabData();
+      //       }
+      //     },
+      //   });
     },
 
-    getTabData () {
-      let that = this;
-      that.API.requestData({
-        method: "POST",
-        subUrl: "powersaturation/powersaturationamonutlist",
-        data: {
-          wtId: that.wtId
-        },
-        success (res) {
-          that.tableData.data = res.data.list;
-          that.getChartData();
-        }
+    getTabData() {
+
+      api.powersaturationPowersaturationamonutlist({
+          wtId: this.wtId,
+      }).then((res) => {
+        if(res.data)
+        this.tableData.data = res.data.list;
+          this.getChartData();
       });
+
+
+
+      // let that = this;
+      // that.API.requestData({
+      //   method: "POST",
+      //   subUrl: "powersaturation/powersaturationamonutlist",
+      //   data: {
+      //     wtId: that.wtId,
+      //   },
+      //   success(res) {
+      //     that.tableData.data = res.data.list;
+      //     that.getChartData();
+      //   },
+      // });
     },
 
     // 获取图表数据
-    getChartData () {
-      let that = this;
-      that.API.requestData({
-        method: "POST",
-        subUrl: "powersaturation/powersaturationamonutchart",
-        data: {
-          wtId: that.wtId
-        },
-        success (res) {
-          console.log('chartData1:',res)
+    getChartData() {
+      api.powersaturationPowersaturationamonutchart({
+         wtId: this.wtId,
+      }).then((res) => {
+          if(res.data)
+            console.log("chartData1:", res);
           const keyArray = [
-          //   {
-          //   key: "value1",
-          //   title: "风速"
-          // }, 
-          {
-            key: "value2",
-            title: "实际拟合功率"
-          }, {
-            key: "value3",
-            title: "最优拟合功率"
-          }, {
-            key: "value4",
-            title: "保证功率"
-          }];
+            //   {
+            //   key: "value1",
+            //   title: "风速"
+            // },
+            {
+              key: "value2",
+              title: "实际拟合功率",
+            },
+            {
+              key: "value3",
+              title: "最优拟合功率",
+            },
+            {
+              key: "value4",
+              title: "保证功率",
+            },
+          ];
 
           let chartData = [
-          //   {
-          //   title: "风速",
-          //   // yAxisIndex: 1,
-          //    yAxisIndex: 0,
-          //   value: []
-          // },
-
-           {
-            title: "实际拟合功率",
-            yAxisIndex: 0,
-            value: []
-          }, {
-            title: "最优拟合功率",
-            yAxisIndex: 0,
-            value: []
-          }, {
-            title: "保证功率",
-            yAxisIndex: 0,
-            value: []
-          }];
+            //   {
+            //   title: "风速",
+            //   // yAxisIndex: 1,
+            //    yAxisIndex: 0,
+            //   value: []
+            // },
+
+            {
+              title: "实际拟合功率",
+              yAxisIndex: 0,
+              value: [],
+            },
+            {
+              title: "最优拟合功率",
+              yAxisIndex: 0,
+              value: [],
+            },
+            {
+              title: "保证功率",
+              yAxisIndex: 0,
+              value: [],
+            },
+          ];
 
           keyArray.forEach((keyEle, keyIndex) => {
-            console.log('keyele:',keyEle,'keyindex:',keyIndex)
-            console.log('resdata:',res.data)
-            res.data.forEach(ele => {
-              console.log('ele:',ele)
-              console.log(' chartData[keyIndex].value:', chartData[keyIndex].value)
+            console.log("keyele:", keyEle, "keyindex:", keyIndex);
+            console.log("resdata:", res.data);
+            res?.data?.forEach((ele) => {
+              console.log("ele:", ele);
+              console.log(
+                " chartData[keyIndex].value:",
+                chartData[keyIndex].value
+              );
               chartData[keyIndex].value.push({
                 text: "",
-                value: ele[keyEle.key]
+                value: ele[keyEle.key],
               });
             });
           });
 
-          that.chartData = chartData;
-        }
+          this.chartData = chartData;
       });
+
+
+      // let that = this;
+      // that.API.requestData({
+      //   method: "POST",
+      //   subUrl: "powersaturation/powersaturationamonutchart",
+      //   data: {
+      //     wtId: that.wtId,
+      //   },
+      //   success(res) {
+      //     console.log("chartData1:", res);
+      //     const keyArray = [
+      //       //   {
+      //       //   key: "value1",
+      //       //   title: "风速"
+      //       // },
+      //       {
+      //         key: "value2",
+      //         title: "实际拟合功率",
+      //       },
+      //       {
+      //         key: "value3",
+      //         title: "最优拟合功率",
+      //       },
+      //       {
+      //         key: "value4",
+      //         title: "保证功率",
+      //       },
+      //     ];
+
+      //     let chartData = [
+      //       //   {
+      //       //   title: "风速",
+      //       //   // yAxisIndex: 1,
+      //       //    yAxisIndex: 0,
+      //       //   value: []
+      //       // },
+
+      //       {
+      //         title: "实际拟合功率",
+      //         yAxisIndex: 0,
+      //         value: [],
+      //       },
+      //       {
+      //         title: "最优拟合功率",
+      //         yAxisIndex: 0,
+      //         value: [],
+      //       },
+      //       {
+      //         title: "保证功率",
+      //         yAxisIndex: 0,
+      //         value: [],
+      //       },
+      //     ];
+
+      //     keyArray.forEach((keyEle, keyIndex) => {
+      //       console.log("keyele:", keyEle, "keyindex:", keyIndex);
+      //       console.log("resdata:", res.data);
+      //       res.data.forEach((ele) => {
+      //         console.log("ele:", ele);
+      //         console.log(
+      //           " chartData[keyIndex].value:",
+      //           chartData[keyIndex].value
+      //         );
+      //         chartData[keyIndex].value.push({
+      //           text: "",
+      //           value: ele[keyEle.key],
+      //         });
+      //       });
+      //     });
+
+      //     that.chartData = chartData;
+      //   },
+      // });
     },
 
-    search () {
+    search() {
       if (!this.wpId || !this.wtId) {
         this.BASE.showMsg({
-          msg: '场站与风机为必选项'
+          msg: "场站与风机为必选项",
         });
       } else {
         this.getTabData();
       }
-    }
+    },
   },
 
-  created () {
+  created() {
     this.getWp();
   },
 
-  mounted () { },
+  mounted() {},
 
-  unmounted () { },
+  unmounted() {},
 };
 </script>
 
@@ -260,7 +401,7 @@ export default {
     height: 30vh;
 
     &:before {
-      content: '';
+      content: "";
       width: 0.37vh;
       height: 0.37vh;
       background: @write;

+ 296 - 136
src/views/wtSaturability/tab2.vue

@@ -5,27 +5,57 @@
         <div class="query-item">
           <div class="lable">场站:</div>
           <div class="search-input">
-            <el-select v-model="wpId" clearable placeholder="请选择" popper-class="select" @change="(wpId) => { getWt(wpId, true); }">
-              <el-option v-for="item in wpArray" :key="item.id" :value="item.id" :label="item.name" />
+            <el-select
+              v-model="wpId"
+              clearable
+              placeholder="请选择"
+              popper-class="select"
+              @change="
+                (wpId) => {
+                  getWt(wpId, true);
+                }
+              "
+            >
+              <el-option
+                v-for="item in wpArray"
+                :key="item.id"
+                :value="item.id"
+                :label="item.name"
+              />
             </el-select>
           </div>
         </div>
         <div class="query-item">
           <div class="lable">风机:</div>
           <div class="search-input">
-            <el-select v-model="wtId" clearable placeholder="请选择" popper-class="select">
-              <el-option v-for="item in wtArray" :key="item.id" :value="item.id" :label="item.name" />
+            <el-select
+              v-model="wtId"
+              clearable
+              placeholder="请选择"
+              popper-class="select"
+            >
+              <el-option
+                v-for="item in wtArray"
+                :key="item.id"
+                :value="item.id"
+                :label="item.name"
+              />
             </el-select>
           </div>
         </div>
         <div class="query-item">
-					<div class="lable">日期:</div>
-					<div class="search-input">
-						<el-date-picker v-model="recorddate" type="date"
-							value-format="YYYY-MM-DD" placeholder="选择日期" popper-class="date-select">
-						</el-date-picker>
-					</div>
-				</div>
+          <div class="lable">日期:</div>
+          <div class="search-input">
+            <el-date-picker
+              v-model="recorddate"
+              type="date"
+              value-format="YYYY-MM-DD"
+              placeholder="选择日期"
+              popper-class="date-select"
+            >
+            </el-date-picker>
+          </div>
+        </div>
       </div>
       <div class="query-actions">
         <button class="btn green" @click="search">搜索</button>
@@ -34,8 +64,20 @@
     <div class="df-table">
       <ComTable height="35vh" :data="tableData"></ComTable>
     </div>
-    <Mlc height="300px" :list="chartData" :units="chartUnit" :showLegend="true" />
-    <el-dialog title="月风电功率编辑" v-model="dialogShow" width="85%" top="10vh" custom-class="modal" :close-on-click-modal="true">
+    <Mlc
+      height="300px"
+      :list="chartData"
+      :units="chartUnit"
+      :showLegend="true"
+    />
+    <el-dialog
+      title="月风电功率编辑"
+      v-model="dialogShow"
+      width="85%"
+      top="10vh"
+      custom-class="modal"
+      :close-on-click-modal="true"
+    >
       <el-form class="mg-b-16" label-width="100px" inline>
         <el-form-item class="mg-b-8" label="风机编号:">
           <el-input v-model="wtId" readonly placeholder=""></el-input>
@@ -44,19 +86,29 @@
           <el-input v-model="editItem._year" readonly placeholder=""></el-input>
         </el-form-item>
         <el-form-item class="mg-b-8" label="月份:">
-          <el-input v-model="editItem._month" readonly placeholder=""></el-input>
+          <el-input
+            v-model="editItem._month"
+            readonly
+            placeholder=""
+          ></el-input>
         </el-form-item>
         <el-form-item class="mg-b-8" label="风速:">
           <el-input v-model="editItem.speed" readonly placeholder=""></el-input>
         </el-form-item>
         <el-form-item class="mg-b-8" label="实际拟合:">
-          <el-input v-model="editItem.actualpower" placeholder="请输入"></el-input>
+          <el-input
+            v-model="editItem.actualpower"
+            placeholder="请输入"
+          ></el-input>
         </el-form-item>
         <el-form-item class="mg-b-8" label="最优拟合:">
-          <el-input v-model="editItem.optimalpower" placeholder="请输入"></el-input>
+          <el-input
+            v-model="editItem.optimalpower"
+            placeholder="请输入"
+          ></el-input>
         </el-form-item>
       </el-form>
-      <button style="width:100%;" class="btn" @click="editWtInfo">修改</button>
+      <button style="width: 100%" class="btn" @click="editWtInfo">修改</button>
     </el-dialog>
   </div>
 </template>
@@ -64,6 +116,8 @@
 <script>
 import ComTable from "@com/coms/table/table.vue";
 import Mlc from "@com/chart/line/multiple-line-chart.vue";
+import api1 from "@api/economic/index.js";
+import api from "@api/wisdomOverhaul/energy/index.js";
 export default {
   // 名称
   name: "cutAnalyse",
@@ -71,11 +125,11 @@ export default {
   // 使用组件
   components: {
     ComTable,
-    Mlc
+    Mlc,
   },
 
   // 数据
-  data () {
+  data() {
     const that = this;
     return {
       isAsc: "asc",
@@ -83,9 +137,11 @@ export default {
       wtArray: [],
       wpId: "",
       wtId: "",
-      editItem:{},
-      dialogShow:false,
-      recorddate:new Date((new Date().getTime() - 3600 * 1000 * 24)).formatDate("yyyy-MM-dd"),
+      editItem: {},
+      dialogShow: false,
+      recorddate: new Date(new Date().getTime() - 3600 * 1000 * 24).formatDate(
+        "yyyy-MM-dd"
+      ),
       tableData: {
         column: [
           {
@@ -93,28 +149,28 @@ export default {
             field: "windturbineid",
             is_num: false,
             is_light: false,
-            sortable: true
+            sortable: true,
           },
           {
             name: "风速",
             field: "speed",
             is_num: false,
             is_light: false,
-            sortable: true
+            sortable: true,
           },
           {
             name: "实际拟合功率",
             field: "actualpower",
             is_num: false,
             is_light: false,
-            sortable: true
+            sortable: true,
           },
           {
             name: "最优拟合功率",
             field: "optimalpower",
             is_num: false,
             is_light: false,
-            sortable: true
+            sortable: true,
           },
           // {
           //   name: "操作",
@@ -122,8 +178,8 @@ export default {
           //   is_num: false,
           //   is_light: false,
           //   template() {
-					// 			return "<el-button type='text' style='cursor: pointer;'>修改</el-button>";
-					// 	},
+          // 			return "<el-button type='text' style='cursor: pointer;'>修改</el-button>";
+          // 	},
           //   click(e, row){
           //     that.editItem = row;
           //     that.editItem._year = new Date(that.recorddate).getFullYear();
@@ -134,169 +190,273 @@ export default {
         ],
         data: [],
       },
-      chartData: [{
-        title: "",
-        yAxisIndex: 0,
-        value: []
-      }],
+      chartData: [
+        {
+          title: "",
+          yAxisIndex: 0,
+          value: [],
+        },
+      ],
       // chartUnit: ["功率(MW)", "(m/s)"]
-       chartUnit: ["功率(MW)"]
+      chartUnit: ["功率(MW)"],
     };
   },
 
   // 函数
   methods: {
     // 获取风场
-    getWp (reGetWp) {
-      let that = this;
-      that.API.requestData({
-        method: "GET",
-        subUrl: "powercompare/windfarmAjax",
-        success (res) {
-          that.wpArray = res.data;
-          that.wpId = res.data[0].id;
-          that.getWt(that.wpId, reGetWp);
-        }
+    getWp(reGetWp) {
+      api1.benchmarkingWplist({}).then((res) => {
+        this.wpArray = res.data;
+        this.wpId = res.data[0].id;
+        this.getWt(this.wpId, reGetWp);
       });
+
+      // let that = this;
+      // that.API.requestData({
+      //   method: "GET",
+      //   subUrl: "powercompare/windfarmAjax",
+      //   success (res) {
+      //     that.wpArray = res.data;
+      //     that.wpId = res.data[0].id;
+      //     that.getWt(that.wpId, reGetWp);
+      //   }
+      // });
     },
 
     // 获取风机
-    getWt (wpid, reGetWp) {
-      let that = this;
-      if (that.wpId) {
-        that.API.requestData({
-          method: "GET",
-          baseURL: "http://10.155.32.4:9001",
-          subUrl: "benchmarking/wtList",
-          data: {
-            wpid
-          },
-          success (res) {
-            that.wtArray = res.data;
-            that.wtId = res.data[0].id;
+    getWt(wpid, reGetWp) {
+      if (this.wpId) {
+        api1
+          .powercompareWindturbineAjax({
+            wpId: wpid,
+          })
+          .then((res) => {
+            this.wtArray = res.data;
+            this.wtId = res.data[0].id;
             if (!reGetWp) {
-              that.getTabData();
+              this.getTabData();
             }
-          }
-        });
+          });
       }
+
+      // let that = this;
+      // if (this.wpId) {
+      //   that.API.requestData({
+      //     method: "GET",
+      //     baseURL: "http://10.155.32.4:9001",
+      //     subUrl: "benchmarking/wtList",
+      //     data: {
+      //       wpid
+      //     },
+      //     success (res) {
+      //       that.wtArray = res.data;
+      //       that.wtId = res.data[0].id;
+      //       if (!reGetWp) {
+      //         that.getTabData();
+      //       }
+      //     }
+      //   });
+      // }
     },
 
-    getTabData () {
-      let that = this;
-      that.API.requestData({
-        method: "POST",
-        subUrl: "powersaturation/powersaturationmonthlist",
-        data: {
-          wtId: that.wtId,
-          year: new Date(that.recorddate).getFullYear(),
-          month: (new Date(that.recorddate).getMonth() + 1)
-        },
-        success (res) {
-          that.tableData.data = res.data.list;
-          that.getChartData();
-        }
-      });
+    getTabData() {
+      api
+        .powersaturationPowersaturationmonthlist({
+          wtId: this.wtId,
+          year: new Date(this.recorddate).getFullYear(),
+          month: new Date(this.recorddate).getMonth() + 1,
+        })
+        .then((res) => {
+            if(res.data)
+          this.tableData.data = res.data.list;
+          this.getChartData();
+        });
+
+      // let that = this;
+      // that.API.requestData({
+      //   method: "POST",
+      //   subUrl: "powersaturation/powersaturationmonthlist",
+      //   data: {
+      //     wtId: that.wtId,
+      //     year: new Date(that.recorddate).getFullYear(),
+      //     month: new Date(that.recorddate).getMonth() + 1,
+      //   },
+      //   success(res) {
+      //     that.tableData.data = res.data.list;
+      //     that.getChartData();
+      //   },
+      // });
     },
 
     // 获取图表数据
-    getChartData () {
-      let that = this;
-      that.API.requestData({
-        method: "POST",
-        subUrl: "powersaturation/powersaturationmonthchart",
-        data: {
-          wtId: that.wtId,
-          year: new Date(that.recorddate).getFullYear(),
-          month: (new Date(that.recorddate).getMonth() + 1)
-        },
-        success (res) {
+    getChartData() {
 
-          const keyArray = [
-          //   {
-          //   key: "value1",
-          //   title: "风速"
-          // }, 
-          {
-            key: "value2",
-            title: "实际拟合功率"
-          }, {
-            key: "value3",
-            title: "最优拟合功率"
-          }, {
-            key: "value4",
-            title: "保证功率"
-          }];
+      api.powersaturationPowersaturationmonthchart({
+          wtId: this.wtId,
+          year: new Date(this.recorddate).getFullYear(),
+          month: new Date(this.recorddate).getMonth() + 1,
+      }).then((res) => {
+          if(res.data){
+                         const keyArray = [
+            //   {
+            //   key: "value1",
+            //   title: "风速"
+            // },
+            {
+              key: "value2",
+              title: "实际拟合功率",
+            },
+            {
+              key: "value3",
+              title: "最优拟合功率",
+            },
+            {
+              key: "value4",
+              title: "保证功率",
+            },
+          ];
 
           let chartData = [
-          //   {
-          //   title: "风速",
-          //   // yAxisIndex: 1,
-          //    yAxisIndex: 0,
-          //   value: []
-          // },
-           {
-            title: "实际拟合功率",
-            yAxisIndex: 0,
-            value: []
-          }, {
-            title: "最优拟合功率",
-            yAxisIndex: 0,
-            value: []
-          }, {
-            title: "保证功率",
-            yAxisIndex: 0,
-            value: []
-          }];
+            //   {
+            //   title: "风速",
+            //   // yAxisIndex: 1,
+            //    yAxisIndex: 0,
+            //   value: []
+            // },
+            {
+              title: "实际拟合功率",
+              yAxisIndex: 0,
+              value: [],
+            },
+            {
+              title: "最优拟合功率",
+              yAxisIndex: 0,
+              value: [],
+            },
+            {
+              title: "保证功率",
+              yAxisIndex: 0,
+              value: [],
+            },
+          ];
 
           keyArray.forEach((keyEle, keyIndex) => {
-            res.data.forEach(ele => {
+            res.data.forEach((ele) => {
               chartData[keyIndex].value.push({
                 text: "",
-                value: ele[keyEle.key]
+                value: ele[keyEle.key],
               });
             });
           });
 
-          that.chartData = chartData;
-        }
+          this.chartData = chartData;
+          }
+   
       });
+
+
+
+      // let that = this;
+      // that.API.requestData({
+      //   method: "POST",
+      //   subUrl: "powersaturation/powersaturationmonthchart",
+      //   data: {
+      //     wtId: that.wtId,
+      //     year: new Date(that.recorddate).getFullYear(),
+      //     month: new Date(that.recorddate).getMonth() + 1,
+      //   },
+      //   success(res) {
+      //     const keyArray = [
+      //       //   {
+      //       //   key: "value1",
+      //       //   title: "风速"
+      //       // },
+      //       {
+      //         key: "value2",
+      //         title: "实际拟合功率",
+      //       },
+      //       {
+      //         key: "value3",
+      //         title: "最优拟合功率",
+      //       },
+      //       {
+      //         key: "value4",
+      //         title: "保证功率",
+      //       },
+      //     ];
+
+      //     let chartData = [
+      //       //   {
+      //       //   title: "风速",
+      //       //   // yAxisIndex: 1,
+      //       //    yAxisIndex: 0,
+      //       //   value: []
+      //       // },
+      //       {
+      //         title: "实际拟合功率",
+      //         yAxisIndex: 0,
+      //         value: [],
+      //       },
+      //       {
+      //         title: "最优拟合功率",
+      //         yAxisIndex: 0,
+      //         value: [],
+      //       },
+      //       {
+      //         title: "保证功率",
+      //         yAxisIndex: 0,
+      //         value: [],
+      //       },
+      //     ];
+
+      //     keyArray.forEach((keyEle, keyIndex) => {
+      //       res.data.forEach((ele) => {
+      //         chartData[keyIndex].value.push({
+      //           text: "",
+      //           value: ele[keyEle.key],
+      //         });
+      //       });
+      //     });
+
+      //     that.chartData = chartData;
+      //   },
+      // });
     },
 
     // 编辑
-    editWtInfo(){
+    editWtInfo() {
       let that = this;
 
       that.editItem.actualpower += "";
       that.editItem.optimalpower += "";
 
-      if(!that.editItem.actualpower || !that.editItem.optimalpower){
+      if (!that.editItem.actualpower || !that.editItem.optimalpower) {
         that.BASE.showMsg({
-          msg:"实际拟合与最优拟合不可为空"
+          msg: "实际拟合与最优拟合不可为空",
         });
-      }else{
-        
+      } else {
       }
     },
 
-    search () {
+    search() {
       if (!this.wpId || !this.wtId) {
         this.BASE.showMsg({
-          msg: '场站与风机为必选项'
+          msg: "场站与风机为必选项",
         });
       } else {
         this.getTabData();
       }
-    }
+    },
   },
 
-  created () {
+  created() {
     this.getWp();
   },
 
-  mounted () { },
+  mounted() {},
 
-  unmounted () { },
+  unmounted() {},
 };
 </script>
 
@@ -325,7 +485,7 @@ export default {
     height: 30vh;
 
     &:before {
-      content: '';
+      content: "";
       width: 0.37vh;
       height: 0.37vh;
       background: @write;

+ 291 - 141
src/views/wtSaturability/tab3.vue

@@ -5,27 +5,57 @@
         <div class="query-item">
           <div class="lable">场站:</div>
           <div class="search-input">
-            <el-select v-model="wpId" clearable placeholder="请选择" popper-class="select" @change="(wpId) => { getWt(wpId, true); }">
-              <el-option v-for="item in wpArray" :key="item.id" :value="item.id" :label="item.name" />
+            <el-select
+              v-model="wpId"
+              clearable
+              placeholder="请选择"
+              popper-class="select"
+              @change="
+                (wpId) => {
+                  getWt(wpId, true);
+                }
+              "
+            >
+              <el-option
+                v-for="item in wpArray"
+                :key="item.id"
+                :value="item.id"
+                :label="item.name"
+              />
             </el-select>
           </div>
         </div>
         <div class="query-item">
           <div class="lable">风机:</div>
           <div class="search-input">
-            <el-select v-model="wtId" clearable placeholder="请选择" popper-class="select">
-              <el-option v-for="item in wtArray" :key="item.id" :value="item.id" :label="item.name" />
+            <el-select
+              v-model="wtId"
+              clearable
+              placeholder="请选择"
+              popper-class="select"
+            >
+              <el-option
+                v-for="item in wtArray"
+                :key="item.id"
+                :value="item.id"
+                :label="item.name"
+              />
             </el-select>
           </div>
         </div>
         <div class="query-item">
-					<div class="lable">日期:</div>
-					<div class="search-input">
-						<el-date-picker v-model="recorddate" type="date"
-							value-format="YYYY-MM-DD" placeholder="选择日期" popper-class="date-select">
-						</el-date-picker>
-					</div>
-				</div>
+          <div class="lable">日期:</div>
+          <div class="search-input">
+            <el-date-picker
+              v-model="recorddate"
+              type="date"
+              value-format="YYYY-MM-DD"
+              placeholder="选择日期"
+              popper-class="date-select"
+            >
+            </el-date-picker>
+          </div>
+        </div>
       </div>
       <div class="query-actions">
         <button class="btn green" @click="search">搜索</button>
@@ -34,8 +64,20 @@
     <div class="df-table">
       <ComTable height="35vh" :data="tableData"></ComTable>
     </div>
-    <Mlc height="300px" :list="chartData" :units="chartUnit" :showLegend="true" />
-    <el-dialog title="月风电功率编辑" v-model="dialogShow" width="85%" top="10vh" custom-class="modal" :close-on-click-modal="true">
+    <Mlc
+      height="300px"
+      :list="chartData"
+      :units="chartUnit"
+      :showLegend="true"
+    />
+    <el-dialog
+      title="月风电功率编辑"
+      v-model="dialogShow"
+      width="85%"
+      top="10vh"
+      custom-class="modal"
+      :close-on-click-modal="true"
+    >
       <el-form class="mg-b-16" label-width="100px" inline>
         <el-form-item class="mg-b-8" label="风机编号:">
           <el-input v-model="wtId" readonly placeholder=""></el-input>
@@ -44,19 +86,29 @@
           <el-input v-model="editItem._year" readonly placeholder=""></el-input>
         </el-form-item>
         <el-form-item class="mg-b-8" label="月份:">
-          <el-input v-model="editItem._month" readonly placeholder=""></el-input>
+          <el-input
+            v-model="editItem._month"
+            readonly
+            placeholder=""
+          ></el-input>
         </el-form-item>
         <el-form-item class="mg-b-8" label="风速:">
           <el-input v-model="editItem.speed" readonly placeholder=""></el-input>
         </el-form-item>
         <el-form-item class="mg-b-8" label="实际拟合:">
-          <el-input v-model="editItem.actualpower" placeholder="请输入"></el-input>
+          <el-input
+            v-model="editItem.actualpower"
+            placeholder="请输入"
+          ></el-input>
         </el-form-item>
         <el-form-item class="mg-b-8" label="最优拟合:">
-          <el-input v-model="editItem.optimalpower" placeholder="请输入"></el-input>
+          <el-input
+            v-model="editItem.optimalpower"
+            placeholder="请输入"
+          ></el-input>
         </el-form-item>
       </el-form>
-      <button style="width:100%;" class="btn" @click="editWtInfo">修改</button>
+      <button style="width: 100%" class="btn" @click="editWtInfo">修改</button>
     </el-dialog>
   </div>
 </template>
@@ -64,6 +116,8 @@
 <script>
 import ComTable from "@com/coms/table/table.vue";
 import Mlc from "@com/chart/line/multiple-line-chart.vue";
+import api1 from "@api/economic/index.js";
+import api from "@api/wisdomOverhaul/energy/index.js";
 export default {
   // 名称
   name: "cutAnalyse",
@@ -71,11 +125,11 @@ export default {
   // 使用组件
   components: {
     ComTable,
-    Mlc
+    Mlc,
   },
 
   // 数据
-  data () {
+  data() {
     const that = this;
     return {
       isAsc: "asc",
@@ -83,9 +137,11 @@ export default {
       wtArray: [],
       wpId: "",
       wtId: "",
-      editItem:{},
-      dialogShow:false,
-      recorddate:new Date((new Date().getTime() - 3600 * 1000 * 24)).formatDate("yyyy-MM-dd"),
+      editItem: {},
+      dialogShow: false,
+      recorddate: new Date(new Date().getTime() - 3600 * 1000 * 24).formatDate(
+        "yyyy-MM-dd"
+      ),
       tableData: {
         column: [
           {
@@ -93,28 +149,28 @@ export default {
             field: "windturbineid",
             is_num: false,
             is_light: false,
-            sortable: true
+            sortable: true,
           },
           {
             name: "风速",
             field: "speed",
             is_num: false,
             is_light: false,
-            sortable: true
+            sortable: true,
           },
           {
             name: "实际拟合功率",
             field: "actualpower",
             is_num: false,
             is_light: false,
-            sortable: true
+            sortable: true,
           },
           {
             name: "最优拟合功率",
             field: "optimalpower",
             is_num: false,
             is_light: false,
-            sortable: true
+            sortable: true,
           },
           // {
           //   name: "操作",
@@ -122,8 +178,8 @@ export default {
           //   is_num: false,
           //   is_light: false,
           //   template() {
-					// 			return "<el-button type='text' style='cursor: pointer;'>修改</el-button>";
-					// 	},
+          // 			return "<el-button type='text' style='cursor: pointer;'>修改</el-button>";
+          // 	},
           //   click(e, row){
           //     that.editItem = row;
           //     that.editItem._year = new Date(that.recorddate).getFullYear();
@@ -134,167 +190,261 @@ export default {
         ],
         data: [],
       },
-      chartData: [{
-        title: "",
-        yAxisIndex: 0,
-        value: []
-      }],
+      chartData: [
+        {
+          title: "",
+          yAxisIndex: 0,
+          value: [],
+        },
+      ],
       // chartUnit: ["功率(MW)", "(m/s)"]
-       chartUnit: ["功率(MW)"]
+      chartUnit: ["功率(MW)"],
     };
   },
 
   // 函数
   methods: {
     // 获取风场
-    getWp (reGetWp) {
-      let that = this;
-      that.API.requestData({
-        method: "GET",
-        subUrl: "powercompare/windfarmAjax",
-        success (res) {
-          that.wpArray = res.data;
-          that.wpId = res.data[0].id;
-          that.getWt(that.wpId, reGetWp);
-        }
+    getWp(reGetWp) {
+      api1.benchmarkingWplist({}).then((res) => {
+        this.wpArray = res.data;
+        this.wpId = res.data[0].id;
+        this.getWt(this.wpId, reGetWp);
       });
+
+      // let that = this;
+      // that.API.requestData({
+      //   method: "GET",
+      //   subUrl: "powercompare/windfarmAjax",
+      //   success (res) {
+      //     that.wpArray = res.data;
+      //     that.wpId = res.data[0].id;
+      //     that.getWt(that.wpId, reGetWp);
+      //   }
+      // });
     },
 
     // 获取风机
-    getWt (wpid, reGetWp) {
-      let that = this;
-      if (that.wpId) {
-        that.API.requestData({
-          method: "GET",
-          baseURL: "http://10.155.32.4:9001",
-          subUrl: "benchmarking/wtList",
-          data: {
-            wpid
-          },
-          success (res) {
-            that.wtArray = res.data;
-            that.wtId = res.data[0].id;
+    getWt(wpid, reGetWp) {
+      if (this.wpId) {
+        api1
+          .powercompareWindturbineAjax({
+            wpId: wpid,
+          })
+          .then((res) => {
+            this.wtArray = res.data;
+            this.wtId = res.data[0].id;
             if (!reGetWp) {
-              that.getTabData();
+              this.getTabData();
             }
-          }
-        });
+          });
       }
+
+      // let that = this;
+      // if (that.wpId) {
+      //   that.API.requestData({
+      //     method: "GET",
+      //     baseURL: "http://10.155.32.4:9001",
+      //     subUrl: "benchmarking/wtList",
+      //     data: {
+      //       wpid
+      //     },
+      //     success (res) {
+      //       that.wtArray = res.data;
+      //       that.wtId = res.data[0].id;
+      //       if (!reGetWp) {
+      //         that.getTabData();
+      //       }
+      //     }
+      //   });
+      // }
     },
 
-    getTabData () {
-      let that = this;
-      that.API.requestData({
-        method: "POST",
-        subUrl: "powersaturation/powersaturationlist",
-        data: {
-          wtId: that.wtId,
-          recorddate: that.recorddate
-        },
-        success (res) {
-          that.tableData.data = res.data.list;
-          that.getChartData();
-        }
-      });
+    getTabData() {
+      api
+        .powersaturationPowersaturationlist({
+          wtId: this.wtId,
+          recorddate: this.recorddate,
+        })
+        .then((res) => {
+          if (res.data) this.tableData.data = res.data.list;
+          this.getChartData();
+        });
+
+      // let that = this;
+      // that.API.requestData({
+      //   method: "POST",
+      //   subUrl: "powersaturation/powersaturationlist",
+      //   data: {
+      //     wtId: that.wtId,
+      //     recorddate: that.recorddate
+      //   },
+      //   success (res) {
+      //     that.tableData.data = res.data.list;
+      //     that.getChartData();
+      //   }
+      // });
     },
 
     // 获取图表数据
-    getChartData () {
-      let that = this;
-      that.API.requestData({
-        method: "POST",
-        subUrl: "powersaturation/powersaturationchart",
-        data: {
-          wtId: that.wtId,
-          recorddate: that.recorddate
-        },
-        success (res) {
+    getChartData() {
+      api
+        .powersaturationPowersaturationchart({
+          wtId: this.wtId,
+          recorddate: this.recorddate,
+        })
+        .then((res) => {
+          if (res.data) {
+            const keyArray = [
+              //   {
+              //   key: "value1",
+              //   title: "风速"
+              // },
+              {
+                key: "value2",
+                title: "实际拟合功率",
+              },
+              {
+                key: "value3",
+                title: "最优拟合功率",
+              },
+              {
+                key: "value4",
+                title: "保证功率",
+              },
+            ];
 
-          const keyArray = [
-          //   {
-          //   key: "value1",
-          //   title: "风速"
-          // }, 
-          {
-            key: "value2",
-            title: "实际拟合功率"
-          }, {
-            key: "value3",
-            title: "最优拟合功率"
-          }, {
-            key: "value4",
-            title: "保证功率"
-          }];
-
-          let chartData = [
-          //   {
-          //   title: "风速",
-          //   // yAxisIndex: 1,
-          //    yAxisIndex: 0,
-          //   value: []
-          // }, 
-          {
-            title: "实际拟合功率",
-            yAxisIndex: 0,
-            value: []
-          }, {
-            title: "最优拟合功率",
-            yAxisIndex: 0,
-            value: []
-          }, {
-            title: "保证功率",
-            yAxisIndex: 0,
-            value: []
-          }];
+            let chartData = [
+              //   {
+              //   title: "风速",
+              //   // yAxisIndex: 1,
+              //    yAxisIndex: 0,
+              //   value: []
+              // },
+              {
+                title: "实际拟合功率",
+                yAxisIndex: 0,
+                value: [],
+              },
+              {
+                title: "最优拟合功率",
+                yAxisIndex: 0,
+                value: [],
+              },
+              {
+                title: "保证功率",
+                yAxisIndex: 0,
+                value: [],
+              },
+            ];
 
-          keyArray.forEach((keyEle, keyIndex) => {
-            res.data.forEach(ele => {
-              chartData[keyIndex].value.push({
-                text: "",
-                value: ele[keyEle.key]
+            keyArray.forEach((keyEle, keyIndex) => {
+              res.data.forEach((ele) => {
+                chartData[keyIndex].value.push({
+                  text: "",
+                  value: ele[keyEle.key],
+                });
               });
             });
-          });
 
-          that.chartData = chartData;
-        }
-      });
+            this.chartData = chartData;
+          }
+        });
+
+      // let that = this;
+      // that.API.requestData({
+      //   method: "POST",
+      //   subUrl: "powersaturation/powersaturationchart",
+      //   data: {
+      //     wtId: that.wtId,
+      //     recorddate: that.recorddate
+      //   },
+      //   success (res) {
+
+      //     const keyArray = [
+      //     //   {
+      //     //   key: "value1",
+      //     //   title: "风速"
+      //     // },
+      //     {
+      //       key: "value2",
+      //       title: "实际拟合功率"
+      //     }, {
+      //       key: "value3",
+      //       title: "最优拟合功率"
+      //     }, {
+      //       key: "value4",
+      //       title: "保证功率"
+      //     }];
+
+      //     let chartData = [
+      //     //   {
+      //     //   title: "风速",
+      //     //   // yAxisIndex: 1,
+      //     //    yAxisIndex: 0,
+      //     //   value: []
+      //     // },
+      //     {
+      //       title: "实际拟合功率",
+      //       yAxisIndex: 0,
+      //       value: []
+      //     }, {
+      //       title: "最优拟合功率",
+      //       yAxisIndex: 0,
+      //       value: []
+      //     }, {
+      //       title: "保证功率",
+      //       yAxisIndex: 0,
+      //       value: []
+      //     }];
+
+      //     keyArray.forEach((keyEle, keyIndex) => {
+      //       res.data.forEach(ele => {
+      //         chartData[keyIndex].value.push({
+      //           text: "",
+      //           value: ele[keyEle.key]
+      //         });
+      //       });
+      //     });
+
+      //     that.chartData = chartData;
+      //   }
+      // });
     },
 
     // 编辑
-    editWtInfo(){
+    editWtInfo() {
       let that = this;
 
       that.editItem.actualpower += "";
       that.editItem.optimalpower += "";
 
-      if(!that.editItem.actualpower || !that.editItem.optimalpower){
+      if (!that.editItem.actualpower || !that.editItem.optimalpower) {
         that.BASE.showMsg({
-          msg:"实际拟合与最优拟合不可为空"
+          msg: "实际拟合与最优拟合不可为空",
         });
-      }else{
-        
+      } else {
       }
     },
 
-    search () {
+    search() {
       if (!this.wpId || !this.wtId) {
         this.BASE.showMsg({
-          msg: '场站与风机为必选项'
+          msg: "场站与风机为必选项",
         });
       } else {
         this.getTabData();
       }
-    }
+    },
   },
 
-  created () {
+  created() {
     this.getWp();
   },
 
-  mounted () { },
+  mounted() {},
 
-  unmounted () { },
+  unmounted() {},
 };
 </script>
 
@@ -323,7 +473,7 @@ export default {
     height: 30vh;
 
     &:before {
-      content: '';
+      content: "";
       width: 0.37vh;
       height: 0.37vh;
       background: @write;