Browse Source

总发电效率排行模块完成

yangxiao 3 years ago
parent
commit
48e0fc3c59
3 changed files with 17 additions and 20 deletions
  1. 1 1
      src/views/powerRank/index.vue
  2. 15 18
      src/views/totalPowerRank/index.vue
  3. 1 1
      src/views/warningRank/index.vue

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

@@ -203,7 +203,7 @@ export default {
     },
 
     search(){
-      this.getOutputSpeedList(this.wpId);
+      this.getOutputSpeedList();
     }
   },
 

+ 15 - 18
src/views/totalPowerRank/index.vue

@@ -67,13 +67,16 @@ export default {
     return {
       isAsc:"asc",
       typeArray:[{
-        id:"-1",
+        id:"",
+        name:"全部"
+      },{
+        id:"fc",
         name:"风场"
       },{
-        id:"-2",
+        id:"gf",
         name:"光伏电站"
       }],
-      typeId:"-1",
+      typeId:"",
       wpArray:[],
       wpId:"",
       beginDate:new Date((new Date().getTime() - 3600 * 1000 * 24)).formatDate("yyyy-MM-dd"),
@@ -117,14 +120,7 @@ export default {
             sortable: true
           },
           {
-            name: "平均功率",
-            field: "power",
-            is_num: false,
-            is_light: false,
-            sortable: true
-          },
-          {
-            name: "平均效率",
+            name: "发电量(万kwh)",
             field: "generatingCapacity",
             is_num: false,
             is_light: false,
@@ -157,14 +153,16 @@ export default {
     renderWprray(){
       let wpArray = [];
       this.allWpArray.forEach(ele=>{
-        if(this.typeId === "-1"){
+        if(this.typeId === "fc"){
           if(ele.id.indexOf("FDC") !== -1){
             wpArray.push(ele);
           }
-        }else{
+        }else if(this.typeId === "gf"){
           if(ele.id.indexOf("GDC") !== -1){
             wpArray.push(ele);
           }
+        }else{
+          wpArray.push(ele);
         }
       });
       this.wpId = wpArray[0].id;
@@ -174,14 +172,14 @@ export default {
 
     getOutputSpeedList(){
       let that = this;
-      if(!that.typeId || !that.beginDate || !that.endDate){
+      if(!that.beginDate || !that.endDate){
         that.BASE.showMsg({
           msg:"类型与日期不可为空"
         });
       }else{
         that.API.requestData({
-          method: "POST",
-          subUrl: "leaderboard/loadfactortoplist",
+          method: "GET",
+          subUrl: "leaderboard/totalPowerCapacityTopList",
           data:{
             wpId:that.wpId,
             type:that.typeId,
@@ -199,11 +197,10 @@ export default {
           }
         });
       }
-      
     },
 
     search(){
-      this.getOutputSpeedList(this.wpId);
+      this.getOutputSpeedList();
     }
   },
 

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

@@ -203,7 +203,7 @@ export default {
     },
 
     search(){
-      this.getOutputSpeedList(this.wpId);
+      this.getOutputSpeedList();
     }
   },