v3.8.0 新增通用方法简化下载使用

This commit is contained in:
YunaiV
2022-02-17 14:28:43 +08:00
parent fee6d00ecf
commit 02a0ab6d6d
28 changed files with 78 additions and 90 deletions

View File

@ -297,7 +297,7 @@ export default {
this.exportLoading = true;
return exportData(queryParams);
}).then(response => {
this.downloadExcel(response, '字典数据.xls');
this.$download.excel(response, '字典数据.xls');
this.exportLoading = false;
}).catch(() => {});
}

View File

@ -250,7 +250,7 @@ export default {
this.exportLoading = true;
return exportType(params);
}).then(response => {
this.downloadExcel(response, '字典类型.xls');
this.$download.excel(response, '字典类型.xls');
this.exportLoading = false;
}).catch(() => {});
}

View File

@ -243,7 +243,7 @@ export default {
this.exportLoading = true;
return exportErrorCodeExcel(params);
}).then(response => {
this.downloadExcel(response, '错误码.xls');
this.$download.excel(response, '错误码.xls');
this.exportLoading = false;
}).catch(() => {});
}

View File

@ -126,7 +126,7 @@ export default {
this.exportLoading = true;
return exportLoginLog(queryParams);
}).then(response => {
this.downloadExcel(response, '登录日志.xls');
this.$download.excel(response, '登录日志.xls');
this.exportLoading = false;
}).catch(() => {});
}

View File

@ -206,7 +206,7 @@ export default {
this.exportLoading = true;
return exportOperateLog(queryParams);
}).then(response => {
this.downloadExcel(response, '操作日志.xls');
this.$download.excel(response, '操作日志.xls');
this.exportLoading = false;
}).catch(() => {});
}

View File

@ -236,7 +236,7 @@ export default {
this.exportLoading = true;
return exportPost(queryParams);
}).then(response => {
this.downloadExcel(response, '岗位数据.xls');
this.$download.excel(response, '岗位数据.xls');
this.exportLoading = false;
}).catch(() => {});
}

View File

@ -497,7 +497,7 @@ export default {
this.exportLoading = true;
return exportRole(queryParams);
}).then(response => {
this.downloadExcel(response, '角色数据.xls');
this.$download.excel(response, '角色数据.xls');
this.exportLoading = false;
}).catch(() => {});
}

View File

@ -282,7 +282,7 @@ export default {
this.exportLoading = true;
return exportSmsLogExcel(params);
}).then(response => {
this.downloadExcel(response, '短信日志.xls');
this.$download.excel(response, '短信日志.xls');
this.exportLoading = false;
}).catch(() => {});
},

View File

@ -334,7 +334,7 @@ export default {
this.exportLoading = true;
return exportSmsTemplateExcel(params);
}).then(response => {
this.downloadExcel(response, '短信模板.xls');
this.$download.excel(response, '短信模板.xls');
this.exportLoading = false;
}).catch(() => {});
},

View File

@ -246,7 +246,7 @@ export default {
this.exportLoading = true;
return exportTenantExcel(params);
}).then(response => {
this.downloadExcel(response, '租户.xls');
this.$download.excel(response, '租户.xls');
this.exportLoading = false;
}).catch(() => {});
}

View File

@ -585,7 +585,7 @@ export default {
this.exportLoading = true;
return exportUser(queryParams);
}).then(response => {
this.downloadExcel(response, '用户数据.xls');
this.$download.excel(response, '用户数据.xls');
this.exportLoading = false;
}).catch(() => {});
},
@ -597,7 +597,7 @@ export default {
/** 下载模板操作 */
importTemplate() {
importTemplate().then(response => {
this.downloadExcel(response, '用户导入模板.xls');
this.$download.excel(response, '用户导入模板.xls');
});
},
// 文件上传中处理