Browse Source

值际对标功能及部分功能修改

lizaixun 4 years ago
parent
commit
756bf5d626

+ 3 - 1
src/views/benchMarking/FiveLossLineTable.vue

@@ -565,7 +565,7 @@ export default {
               if(this.wpId.length == 2){
                   this.tableSwitch = true;
                   this.value = this.wpId[0];
-                  this.value2 = this.wpId[1]
+                  this.value2 = this.wpId[1];
                   this.FiveLossTableDataTable1();
               }else{
                   this.value = this.wpId;
@@ -577,6 +577,8 @@ export default {
         },
         FiveLossTableDataTable1(){
             if(this.timedate == ''){
+                this.timedate[0] = this.$route.query.beginDate;
+                this.timedate[1] = this.$route.query.endDate;
                 this.beginDate = this.$route.query.beginDate;
                 this.endDate = this.$route.query.endDate;
             }else{

+ 20 - 7
src/views/benchMarking/FiveLossRates.vue

@@ -404,8 +404,8 @@ export default {
             // {endDate:'2021-01-04'}
         ],
         isAsc:'asc',
-        beginDate:'2021-01-01',
-        endDate:'2021-01-04',
+        beginDate:'',
+        endDate:'',
         gridData:"",
         multipleSelection:[],
         sortInOrder:[],
@@ -460,6 +460,8 @@ export default {
         value2:'gz',
         wpId:[],
         wpName:[],
+        updateTime1:'',
+        updateTime:'',
         orderByColumn:'',
         dialogTableVisible:false,
         lineDataOption:[],
@@ -498,6 +500,9 @@ export default {
       FiveLossRatesHistogramChart:FiveLossRatesHistogramChart
     },
     created(){
+      this.$http.get('/powercompare/windfarmAjax').then((res) => {
+        this.options = res.data.data;
+      })
       this.FiveLossInformation();
     },
     methods:{
@@ -629,12 +634,20 @@ export default {
 		},
     FiveLossInformation(){
       let that = this;
-      this.$http.get('/powercompare/windfarmAjax').then((res) => {
-        that.options = res.data.data;
-      })
+      const nowDate = new Date();
+      const date = {
+          year: nowDate.getFullYear(),
+          month: nowDate.getMonth() + 1,
+          date: nowDate.getDate(),
+      }
+      const newmonth = date.month>10?date.month:'0'+date.month
+      const day = date.date>10?date.date:'0'+date.date
+      const day1 = date.date>10?date.date - 1:'0'+date.date
+      this.updateTime = date.year + '-' + newmonth + '-' + day
+      this.updateTime1 = date.year + '-' + newmonth + '-' + day1
       if(this.timedate == ''){
-        this.timedate[0] = '2021-01-01';
-        this.timedate[1] = '2021-01-04';
+        this.timedate[0] = this.updateTime1;
+        this.timedate[1] = this.updateTime;
         this.beginDate = this.timedate[0];
         this.endDate = this.timedate[1];
       }else{

+ 51 - 25
src/views/betweenValues/InterValue.vue

@@ -90,133 +90,157 @@
                     width="95">
                 </el-table-column>
                 <el-table-column
+                :sortable="'custom'"
                     prop="ordernum"
                     label="综合排名"
                     width="70">
                 </el-table-column>
                 <el-table-column
+                :sortable="'custom'"
                     prop="scadafdlnum"
                     label="发电量排名"
                     width="70">
                 </el-table-column>
                 <el-table-column
+                :sortable="'custom'"
                     prop="scadafdl"
                     label="发电量"
                     width="65">
                 </el-table-column>
                 <el-table-column
+                :sortable="'custom'"
                     prop="gzssnum"
                     label="故障损失电量排名"
                     width="70">
                 </el-table-column>
                 <el-table-column
+                :sortable="'custom'"
                     prop="gzss"
                     label="故障损失电量"
                     width="70">
                 </el-table-column>
                 <el-table-column
+                :sortable="'custom'"
                     prop="jxsslnum"
                     label="检修损失电量排名"
                     width="70">
                 </el-table-column>
                 <el-table-column
+                :sortable="'custom'"
                     prop="jxssl"
                     label="检修损失电量"
                     width="70">
                 </el-table-column>
                 <el-table-column
+                :sortable="'custom'"
                     prop="xnsslnum"
                     label="性能损失电量排名"
                     width="70">
                 </el-table-column>
                 <el-table-column
+                :sortable="'custom'"
                     prop="xnssl"
                     label="性能损失电量"
                     width="70">
                 </el-table-column>
                 <el-table-column
+                :sortable="'custom'"
                     prop="xdssnum"
                     label="限电损失电量排名"
                     width="70">
                 </el-table-column>
                 <el-table-column
+                :sortable="'custom'"
                     prop="xdss"
                     label="限电损失电量"
                     width="70">
                 </el-table-column>
                 <el-table-column
+                :sortable="'custom'"
                     prop="slssnum"
                     label="受累损失电量排名"
                     width="70">
                 </el-table-column>
                 <el-table-column
+                :sortable="'custom'"
                     prop="slss"
                     label="受累损失电量"
                     width="70">
                 </el-table-column>
                 <el-table-column
+                :sortable="'custom'"
                     prop="fnlyl"
                     label="风能利用率(%)"
                     width="70">
                 </el-table-column>
                 <el-table-column
+                :sortable="'custom'"
                     prop="gzsslnum"
                     label="故障损失率排名"
                     width="70">
                 </el-table-column>
                 <el-table-column
+                :sortable="'custom'"
                     prop="gzssl"
                     label="故障损失率(%)"
                     width="70">
                 </el-table-column>
                 <el-table-column
+                :sortable="'custom'"
                     prop="jxsslnum"
                     label="检修损失率排名"
                     width="70">
                 </el-table-column>
                 <el-table-column
+                :sortable="'custom'"
                     prop="jxssl"
                     label="检修损失率(%)"
                     width="70">
                 </el-table-column>
                 <el-table-column
+                :sortable="'custom'"
                     prop="qflnum"
                     label="弃风率排名"
                     width="70">
                 </el-table-column>
                 <el-table-column
+                :sortable="'custom'"
                     prop="qfl"
                     label="弃风率(%)"
                     width="70">
                 </el-table-column>
                 <el-table-column
+                :sortable="'custom'"
                     prop="xnsslnum"
                     label="性能损失率排名"
                     width="70">
                 </el-table-column>
                 <el-table-column
+                :sortable="'custom'"
                     prop="xnssl"
                     label="性能损失率(%)"
                     width="70">
                 </el-table-column>
                 <el-table-column
+                :sortable="'custom'"
                     prop="slsslnum"
                     label="受累损失率排名"
                     width="70">
                 </el-table-column>
                 <el-table-column
+                :sortable="'custom'"
                     prop="slssl"
                     label="受累损失率(%)"
                     width="70">
                 </el-table-column>
-                <!-- <el-table-column
+                <el-table-column
                     prop="address"
                     label="操作"
                     width="70">
                     <template slot-scope="scope">
                         <el-button size="mini"  @click="handleEdit(scope.$index, scope.row)">详情</el-button>
                     </template>
-                </el-table-column> -->
+                </el-table-column>
                 </el-table-column>
             </el-table>
             	<el-dialog class="el-dialog_body" width="60%" title="对标信息分析" :visible.sync="dialogTableVisible" append-to-body>
@@ -430,16 +454,17 @@ export default {
             this.$http.get('/powercompare/windfarmAjax').then((res) => {
                 that.options = res.data.data;
             })
+            this.doesExist = 'no';
             var valueData1 = new URLSearchParams();
             valueData1.append('orderByColumn',this.orderByColumn);
             valueData1.append('isAsc',this.isAsc);
             this.$http.post('/contrast/benchmarkZjList',valueData1).then((res) => {
                 // that.tableData = res.data.data
-                 console.log(res)
+                console.log(res)
                 that.tableData = res.data.data;
-                 for(let i=0;i<that.tableData.length;i++){
-                        that.getTableDataAll.push(that.tableData[i])
-                    }
+                // for(let i=0;i<that.tableData.length;i++){
+                //     that.getTableDataAll.push(that.tableData[i])
+                // }
             })
         },
         InterValueData(){     
@@ -456,26 +481,27 @@ export default {
             valueData.append('month',this.value3);
             valueData.append('zjs',this.value4)
             this.$http.post('/contrast/addBenchmarkZj',valueData).then((res) => {
-                console.log(res)
+                console.log(res.data.data)
                 that.tableData = res.data.data;
                 // console.log(that.getTableDataAll)
-                console.log(that.tableData)
-                for(let i=0;i<that.getTableDataAll.length;i++){
-                    for(let j=0;j<that.tableData.length;j++){
-                        if(that.getTableDataAll[i].wpId == that.tableData[j].wpId && that.getTableDataAll[i].zjName == that.tableData[j].zjName){
-                            that.doesExist = 'yes';
-                            this.$message.error("此值在表中已存在");
-                            return;
-                        }     
-                    } 
-                }
-                if(that.doesExist == 'no'){
-                    for(let i=0;i<that.tableData.length;i++){
-                        that.getTableDataAll.push(that.tableData[i])
-                    }
-                    this.$message.error("添加成功");
-                    return; 
-                }
+                // console.log(that.tableData)
+                // for(let i=0;i<that.getTableDataAll.length;i++){
+                //     for(let j=0;j<that.tableData.length;j++){
+                //         if(that.getTableDataAll[i].wpId == that.tableData[j].wpId && that.getTableDataAll[i].zjName == that.tableData[j].zjName){
+                //             that.doesExist = 'yes';
+                //             this.$message.error("此值在表中已存在");
+                //             return;
+                //         }     
+                //     } 
+                // }
+                // if(that.doesExist == 'no'){
+                //     for(let i=0;i<that.tableData.length;i++){
+                //         that.getTableDataAll.push(that.tableData[i])
+                //     }
+                //     console.log(that.getTableDataAll)
+                //     this.$message.error("添加成功");
+                //     return; 
+                // }
             })
             // this.InterValueDatainitial();
         },
@@ -614,7 +640,7 @@ export default {
                         
         },
         clearAll(){
-            this.getTableDataAll = [];
+            this.tableData = [];
         }
     }
 }

+ 39 - 5
src/views/betweenValues/InterValueLineTable.vue

@@ -26,6 +26,7 @@
             <el-form-item label="选择时间:">
               <el-date-picker
                 v-model="timedate"
+                value-format="yyyy-MM-dd"
                 type="daterange"
                 range-separator="至"
                 start-placeholder="开始日期"
@@ -452,7 +453,7 @@ export default {
             tableSwitch:false,
             value: '',
             value2: '',
-            timedate: ['Fri Jan 01 2021 00:00:00 GMT+0800','Mon Jan 04 2021 00:00:00 GMT+0800'],
+            timedate: [],
             multipleSelection:[],
             multipleSelection1:[],
             multipleSelection2:[],
@@ -475,6 +476,8 @@ export default {
             fdcName2:'',
             sortInOrde2:[],
             getTableData:[],
+            updateTime:'',
+            updateTime1:'',
         }
     },
     filters: {
@@ -561,8 +564,26 @@ export default {
           }
         },
         FiveLossTableData1(){
-            this.beginDate = this.timedate[0];
-            this.endDate = this.timedate[1];
+            const nowDate = new Date();
+            const date = {
+                year: nowDate.getFullYear(),
+                month: nowDate.getMonth() + 1,
+                date: nowDate.getDate(),
+            }
+            const newmonth = date.month>10?date.month:'0'+date.month
+            const day = date.date>10?date.date:'0'+date.date
+            const day1 = date.date>10?date.date - 1:'0'+date.date
+            this.updateTime = date.year + '-' + newmonth + '-' + day
+            this.updateTime1 = date.year + '-' + newmonth + '-' + day1
+            if(this.timedate == ''){
+              this.timedate[0] = this.updateTime1;
+              this.timedate[1] = this.updateTime;
+              this.beginDate = this.timedate[0];
+              this.endDate = this.timedate[1];
+            }else{
+              this.beginDate = this.timedate[0];
+              this.endDate = this.timedate[1];
+            }
             var interValueLineData = new URLSearchParams();
             interValueLineData.append('pageNum',this.currentPage2);
             interValueLineData.append('pageSize',this.pagesize);
@@ -573,13 +594,26 @@ export default {
             interValueLineData.append('endDate',this.endDate);
             interValueLineData.append('wpId',this.value);
             this.$http.post('/contrast/benchmarkZjWtList',interValueLineData).then((res) => {
+              console.log(res)
               this.fdcLineData = res.data.data;
           })
           this.FiveLossTableData2();
         },
         FiveLossTableData2(){
-            this.beginDate = this.timedate[0];
-            this.endDate = this.timedate[1];
+            // const newmonth = date.month>10?date.month:'0'+date.month
+            // const day = date.date>10?date.date:'0'+date.date
+            // const day1 = date.date>10?date.date - 1:'0'+date.date
+            // this.updateTime = date.year + '-' + newmonth + '-' + day
+            // this.updateTime1 = date.year + '-' + newmonth + '-' + day1
+            if(this.timedate == ''){
+              this.timedate[0] = this.updateTime1;
+              this.timedate[1] = this.updateTime;
+              this.beginDate = this.timedate[0];
+              this.endDate = this.timedate[1];
+            }else{
+              this.beginDate = this.timedate[0];
+              this.endDate = this.timedate[1];
+            }
             if(this.value2.length > 0){
                 this.tableSwitch = true;
             }else{

+ 13 - 2
src/views/gradeEvaluation/PerformanceAnalysisOperation.vue

@@ -1,6 +1,13 @@
 <template>
     <div class="box">
         <div class="searchBar">
+            <el-form :inline="true" :model="formInline" class="demo-form-inline">
+          <el-row :gutter="1">
+            <el-form-item>
+              <el-button style="margin-left:20%" type="primary" @click="goReturn">返回</el-button>
+            </el-form-item>
+          </el-row>
+        </el-form>
             <div style="font-size:30px;text-align:center;margin-top:1%">{{title}}</div>
             <el-table
                 id="callthepolicetable"
@@ -222,6 +229,7 @@ export default {
                     })
                 }
                 this.jdChart = res.data.data.jd;
+                // console.log(this.jdChart)
                 for(let i = 0;i<this.jdChart.length;i++){
                     let jddata = new Date(this.jdChart[i].recorddate);
                     if(formatDate(jddata, 'yyyy-MM-dd').substring(8,10)<10){
@@ -230,7 +238,7 @@ export default {
                         this.date3.push(formatDate(jddata, 'yyyy-MM-dd').substring(8,10) + '日');
                     }
                     this.jfData.push(this.jdChart[i].jfpl);
-                    this.djData.push(this.jdChart[i].tjsj);
+                    this.djData.push(this.jdChart[i].tjxs);
                     this.$nextTick(function() {
                         this.getWindChartDataImport('windchartHistogram')
                     })
@@ -511,7 +519,10 @@ export default {
                 ]
             };
             charts.setOption(option);
-        }
+        },
+        goReturn(){
+            this.$router.push('/performanceAnalysis')
+        },
     }
 }
 </script>