|
@@ -7,7 +7,7 @@
|
|
|
<div style="margin-left: 5%;width: 20%;float: left;">
|
|
|
<span>风场</span>
|
|
|
<el-select v-model="value" placeholder="请选择" style="margin-left: 5%;" @change="currentSel">
|
|
|
- <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
|
|
|
+ <el-option v-for="item in options" :key="item.name" :label="item.name" :value="item.id">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</div>
|
|
@@ -79,7 +79,7 @@
|
|
|
<div style="margin-left: 5%;width: 20%;float: left;">
|
|
|
<span>风场</span>
|
|
|
<el-select v-model="value" placeholder="请选择" style="margin-left: 5%;" @change="currentSel">
|
|
|
- <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
|
|
|
+ <el-option v-for="item in options" :key="item.name" :label="item.name" :value="item.id">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</div>
|
|
@@ -152,7 +152,7 @@
|
|
|
<div style="margin-left: 5%;width: 20%;float: left;">
|
|
|
<span>风场</span>
|
|
|
<el-select v-model="value" placeholder="请选择" style="margin-left: 5%;" @change="currentSel">
|
|
|
- <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
|
|
|
+ <el-option v-for="item in options" :key="item.name" :label="item.name" :value="item.id">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</div>
|
|
@@ -402,20 +402,14 @@ import excelHelper from "@/utils/excelHelper";
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- options: [{
|
|
|
- value: 'MHS_FDC',
|
|
|
- label: '麻黄山'
|
|
|
- }, {
|
|
|
- value: 'NSS_FDC',
|
|
|
- label: '牛首山'
|
|
|
- }],
|
|
|
+ options: [],
|
|
|
gridData: [],
|
|
|
gridDataMonth:[],
|
|
|
gridDataYear:[],
|
|
|
value: 'NSS_FDC',
|
|
|
- value1: '2021-01-01',
|
|
|
- value2:'2021-01',
|
|
|
- value3:'2021',
|
|
|
+ value1: '',
|
|
|
+ value2:'',
|
|
|
+ value3:'',
|
|
|
yearvalue:'',
|
|
|
monthvalue:'',
|
|
|
dialogTableVisible: false,
|
|
@@ -448,11 +442,23 @@ import excelHelper from "@/utils/excelHelper";
|
|
|
total:'',
|
|
|
totalMonth:'',
|
|
|
totalYear:'',
|
|
|
+ updateTime:'',
|
|
|
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
-
|
|
|
+ this.$http.get('/powercompare/windfarmAjax').then((res) => {
|
|
|
+ this.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 - 1:'0'+date.date
|
|
|
+ this.updateTime = date.year + '-' + newmonth + '-' + day
|
|
|
},
|
|
|
mounted() {
|
|
|
this.gradeByDaygData();
|
|
@@ -607,6 +613,9 @@ import excelHelper from "@/utils/excelHelper";
|
|
|
page.append('orderByColumn',this.orderByColumn);
|
|
|
page.append('isAsc',this.isAsc);
|
|
|
page.append('wpId', this.value);
|
|
|
+ if(this.value1 == ''){
|
|
|
+ this.value1 = this.updateTime;
|
|
|
+ }
|
|
|
page.append('recorddate', this.value1);
|
|
|
this.$http.post("/benchmarking/gadaylistByPage", page).then((res) => {
|
|
|
console.log(res)
|
|
@@ -617,15 +626,29 @@ import excelHelper from "@/utils/excelHelper";
|
|
|
},
|
|
|
gamonthlistByPage(){
|
|
|
let that = this;
|
|
|
- // this.yearvalue = this.value1.slice(0,4);
|
|
|
var pagemonth = new URLSearchParams();
|
|
|
- this.monthvalue = this.value2.toString();
|
|
|
- this.yearvalue = this.monthvalue.slice(0,4);
|
|
|
- this.monthvalue = this.monthvalue.slice(5,7);
|
|
|
pagemonth.append('pageNum',this.currentPage2);
|
|
|
pagemonth.append('pageSize',this.pagesize);
|
|
|
pagemonth.append('wpId',this.value);
|
|
|
+ if(this.yearvalue == ''){
|
|
|
+ this.yearvalue = this.updateTime.substring(0,4);
|
|
|
+ console.log(this.yearvalue)
|
|
|
+ }
|
|
|
pagemonth.append('year',this.yearvalue);
|
|
|
+ if(this.value2 == ''){
|
|
|
+ this.value2 = this.updateTime;
|
|
|
+ if(this.value2.substring(5,7) < 10){
|
|
|
+ this.monthvalue = this.value2.substring(6,7);
|
|
|
+ }else{
|
|
|
+ this.monthvalue = this.value2.substring(5,7);
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ if(this.value2.substring(5,7) < 10){
|
|
|
+ this.monthvalue = this.value2.substring(6,7);
|
|
|
+ }else{
|
|
|
+ this.monthvalue = this.value2.substring(5,7);
|
|
|
+ }
|
|
|
+ }
|
|
|
pagemonth.append('month',this.monthvalue);
|
|
|
this.$http.post("/benchmarking/gamonthlistByPage",pagemonth).then((res) => {
|
|
|
that.gridDataMonth = res.data.data.list;
|
|
@@ -640,7 +663,10 @@ import excelHelper from "@/utils/excelHelper";
|
|
|
pageyear.append('pageNum',this.currentPage2);
|
|
|
pageyear.append('pageSize',this.pagesize);
|
|
|
pageyear.append('wpId',this.value);
|
|
|
- pageyear.append('year',this.yearvalue);
|
|
|
+ if(this.value3 == ''){
|
|
|
+ this.value3 = this.updateTime.substring(0,4);
|
|
|
+ }
|
|
|
+ pageyear.append('year',this.value3);
|
|
|
this.$http.post("/benchmarking/gayearlistByPage",pageyear).then((res) =>{
|
|
|
that.gridDataYear = res.data.data.list;
|
|
|
that.totalYear = res.data.data.total;
|