Explorar o código

解决导出excele不能单个导出的问题

mw_666 %!s(int64=3) %!d(string=hai) anos
pai
achega
97d717bcc9
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      src/views/report/ExportExcel.vue

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

@@ -198,13 +198,13 @@
 						},
 						success(res) {
 							if (res.code == 200) {
-								if (thisIndex!=undefined) {//一键导出
+								if (thisIndex!=undefined) {//单击导出
 									if (that.templateId == 1) {//模板1
 										that.export(res.data, 0, that.zipNames[thisIndex]);
 									} else if (that.templateId == 2) {//模板2
 										that.exportMuban2(res.data, 0, that.zipNames[thisIndex]);
 									}
-								} else {//单击导出
+								} else {//一键导出
 									if (that.templateId == 1) {
 										that.export(res.data, 0, that.zipNames[_index], ++_index);
 									} else if (that.templateId == 2) {
@@ -325,7 +325,7 @@
 						}
 					}else{
 						that.exportMuban2(data, _index, excelName);
-						if (that.stations.length == deepIndex && _index == 1) { //当长度一致时,向zip塞值,_index只让执行第一次
+						if (that.stations.length && _index == 1) { //当长度一致时,向zip塞值,_index只让执行第一次
 							var thisPath = that.paths,
 								thisPathName = that.pathName;
 							that.tempArrayS = [];