// import excelHelper from "@/utils/excelHelper"; export default { data(){ return { formInline: { windfarm: "", project: "", line: "", }, activeName: 'first', information:'first', value:'MHS_FDC', value2:'', options: [], time:'', timemonth:'', month:'', timeyear:'', year:'', title:'月曲线偏差率排行榜', daymonth:'', dayyear:'', currentPage2: 1, pagesize: 10, orderByColumn:'', isAsc: '', type:'1', gridData:[], dialogFormVisible:false, fanData:[], ChartData:[], dayChartData:[], Xdata:[], sjdata:[], bzdata:[], eldialogtitle:'', } }, created(){ this.API.get('/powercompare/windfarmAjax').then((res) => { this.options = res.data; }) this.DeviceRatData(); }, methods:{ queryApData() { this.DeviceRatData(); }, headStyle() { return "text-align:center" }, handleClick(tab) { this.information = tab.name; this.DeviceRatData(); }, clickCopy(e) { this.type = e; }, tableDatawindturbineName(val) { if(this.type == "1"){ this.dialogFormVisible = false; }else{ this.dialogFormVisible = true; this.Xdata = []; this.sjdata = []; this.bzdata = []; this.fanData = val; var deviceRateChartData = new URLSearchParams(); if(this.information == 'first'){ this.eldialogtitle = '月曲线偏差率排行'; deviceRateChartData.append('type',this.type); deviceRateChartData.append('wtId',this.fanData.windturbineid); this.timeyear = this.year.toString(); deviceRateChartData.append('year',this.timeyear); this.timemonth = this.month.toString(); if(this.timemonth.substring(6,7) < 10){ this.timemonth = this.timemonth.substring(6,7); }else{ this.timemonth = this.timemonth.substring(5,7) } deviceRateChartData.append('month',this.timemonth); this.API.post('/leaderboard/curveMonthchatAjax',deviceRateChartData).then((res) =>{ this.ChartData = res.data.datas; for(let i = 0; i{ this.ChartData = res.data.datas; for(let i = 0; i { this.gridData = res.data; }) }else if(this.information == 'second'){ this.title = '日曲线偏差率排行榜'; deviceRatData.append('pageNum',this.currentPage2); deviceRatData.append('pageSize',this.pagesize); deviceRatData.append('orderByColumn',this.orderByColumn); deviceRatData.append('isAsc',this.isAsc); deviceRatData.append('wpId',this.value); var newData = new Date(); this.updateTime = this.BASE.getBzDate(newData.getTime(), 0); if(this.time == ''){ this.time = this.updateTime; } deviceRatData.append('recorddate',this.time); this.API.post("/leaderboard/curvefittingmainList",deviceRatData).then((res) =>{ this.gridData = res.data; }) } }, drawPie() { this.ECLZX.getCurveDeviationRate("leiDaTu", ['实际功率(kw)', '保证功率(kw)'],this.Xdata,this.sjdata,this.bzdata); }, toExcel(){ excelHelper.exportExcel("devicerattable","负荷率排行榜",".xls",true); } } }