Browse Source

导出功能修改

chenminghua 3 years ago
parent
commit
1e8ba50df4
2 changed files with 10 additions and 10 deletions
  1. 2 2
      src/tools/excel/Export2Excel.js
  2. 8 8
      src/views/report/ExportExcel.vue

+ 2 - 2
src/tools/excel/Export2Excel.js

@@ -123,7 +123,7 @@ export function export_table_to_excel (id) {
 
   /* original data */
   var data = oo[0];
-  var ws_name = "导出的Excel";
+  var ws_name = "风机数据";
   console.log(data);
 
   var wb = new Workbook(),
@@ -181,7 +181,7 @@ export function export_json_to_excel (th, jsonData, defaultTitle) {
 export function export_blob (th, jsonData,defaultTitle) {
   var data = jsonData;
   data.unshift(th);
-  var ws_name = "导出的Excel";
+  var ws_name = "风机数据";
   var wb = new Workbook(),
   ws = sheet_from_array_of_arrays(data);
   /* add worksheet to workbook */

+ 8 - 8
src/views/report/ExportExcel.vue

@@ -15,15 +15,15 @@
 			<thead>
 				<tr>
 					<th>
-						风电
+						场
 					</th>
 					<th>
-						<input class='t2' type='checkbox' @click="rqCheck"/>
-						日期间隔
+						<input class='t2' type='checkbox' @click="rqCheck" checked='checked'/>
+						日期
 					</th>
 					<th>
-						<input class='t2' type='checkbox' @click="sjCheck"/>
-						时间间隔
+						<input class='t2' type='checkbox' @click="sjCheck" checked='checked'/>
+						时间间隔(s)
 					</th>
 					<th width="120px">
 						操作
@@ -70,8 +70,8 @@
 			const that = this;
 			return {
 				single:false,
-				rqChecked:false,
-				sjChecked:false,
+				rqChecked:true,
+				sjChecked:true,
 				checkList: [],
 				tableIdArr: [], //放checkbox的id数组
 				tableData: [],
@@ -210,7 +210,7 @@
 						data: {
 							templateId: that.templateId,
 							startTs: thisIndex!=undefined ? that.startTs[thisIndex] : that.startTs[_index],
-							endTs: thisIndex!=undefined ? that.endTs[thisIndex] : that.endTs[_index],
+							endTs: thisIndex!=undefined ? that.endTs[thisIndex] + 86400000 : that.endTs[_index] + 86400000,
 							interval: thisIndex!=undefined ? that.inputVal[thisIndex] : that.inputVal[_index],
 							station: thisIndex!=undefined ? that.stations[thisIndex] : that.stations[_index]
 						},