修复业务模块bug
This commit is contained in:
@@ -376,8 +376,13 @@ export default {
|
||||
: 0;
|
||||
},
|
||||
async download() {
|
||||
const blob = await api.exportList(this.query);
|
||||
const url = URL.createObjectURL(new Blob([blob.data || blob]));
|
||||
const response = await api.exportList(this.query);
|
||||
const blob = response.data || response;
|
||||
if (!(blob instanceof Blob) || !blob.size) {
|
||||
this.$message.error('导出失败,未生成有效文件');
|
||||
return;
|
||||
}
|
||||
const url = URL.createObjectURL(blob);
|
||||
const link = document.createElement('a');
|
||||
link.href = url;
|
||||
link.download = '总单运单明细.xlsx';
|
||||
|
||||
Reference in New Issue
Block a user