no message
parent
2f67757ad3
commit
509765ec57
|
|
@ -341,15 +341,30 @@ export default {
|
|||
this.tableloding=true;
|
||||
//发起请求:/Jianhuojiemian/download,请求方式为post,类型为 {responseType:'blob'}
|
||||
//参数和搜索参数一样
|
||||
this.$axios.post(this.$httpUrl + '/JianHuoXiaoLv/download', {
|
||||
pageSize: this.total,
|
||||
pageNum: 1,
|
||||
param: this.param,
|
||||
},{responseType:'blob'}).then(res => {
|
||||
this.tableloding=false;
|
||||
//重命名文件
|
||||
this.downloadFile(res.data,'拣货任务效率统计'+ '数据', 'xlsx')
|
||||
});
|
||||
let a = 1;
|
||||
let t = this.total;
|
||||
// eslint-disable-next-line no-constant-condition,no-empty
|
||||
while (true){
|
||||
/* 分文件导出*/
|
||||
let b=10000;
|
||||
if (t<b){
|
||||
b = t;
|
||||
}
|
||||
t=t-b;
|
||||
console.log(a+","+b+","+t)
|
||||
this.$axios.post(this.$httpUrl + '/JianHuoXiaoLv/download', {
|
||||
pageSize: b,
|
||||
pageNum: a,
|
||||
param: this.param,
|
||||
},{responseType:'blob'}).then(res => {
|
||||
this.tableloding=false;
|
||||
//重命名文件
|
||||
this.downloadFile(res.data,'拣货任务效率统计'+ '数据', 'xlsx')
|
||||
});
|
||||
if (t<=0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
downloadFile(obj, name, suffix) {
|
||||
//解析流文件,进行下载保存
|
||||
|
|
|
|||
Loading…
Reference in New Issue