浏览代码

2022-11-16 update

1. 调整光伏负荷率的请求参数
2. 增加总发电效率排行页的导出功能
moccus 2 年之前
父节点
当前提交
7dc5a532a0
共有 2 个文件被更改,包括 10 次插入5 次删除
  1. 6 5
      src/views/report/loadRate.vue
  2. 4 0
      src/views/totalPowerRank/index.vue

+ 6 - 5
src/views/report/loadRate.vue

@@ -73,7 +73,7 @@ import { ElMessage } from 'element-plus';
 			return {
 				ChangZhan: [],
 				query: {
-					stationId: 'MHS_FDC',
+					stationId: 'DWK_GDC',
 					date: new Date().formatDate("yyyy-MM-dd"),
 					useType: '1',
 					time: '0930'
@@ -108,6 +108,7 @@ import { ElMessage } from 'element-plus';
 						//链接赋值
 						el.href = window.__MODE__.baseURL + 'loadrate/down?date=' + this.query.date;
 						el.download = '';
+						el.target = '_blank'
 						document.body.appendChild(el)
 						el.click()
 						document.body.removeChild(el)
@@ -119,10 +120,10 @@ import { ElMessage } from 'element-plus';
 				var that = this;
 				that.API.requestData({
 					method: "GET",
-					subUrl: "powercompare/windfarmAjax",
+					subUrl: "powercompare/windfarmAllAjax",
 					success(res) {
-						that.ChangZhan = res.data;
-						that.query.stationId = res.data[0].id;
+						that.ChangZhan = res.data.filter(o => o.id.includes('GDC'));
+						that.query.stationId = that.ChangZhan[0].id;
 					}
 				});
 			},
@@ -243,7 +244,7 @@ import { ElMessage } from 'element-plus';
 						that.tableData.total = 0;
 						that.tableLoading = false;
 					}
-				});
+				})
 			},
 			formatTime(value) {
 				if (typeof(value) == 'undefined') {

+ 4 - 0
src/views/totalPowerRank/index.vue

@@ -38,6 +38,7 @@
 			</div>
 			<div class="query-actions">
 				<button class="btn green" @click="search()">搜索</button>
+				<button class="btn green" @click="exportCsv()">导出</button>
 			</div>
 		</div>
 		<div class="df-table">
@@ -119,6 +120,9 @@
 
 		// 函数
 		methods: {
+			exportCsv(){
+				this.BASE.exportExcel(this.tableData, "总发电效率排行");
+			},
 			// 请求服务
 			requestData() {
 				let that = this;