Vue2导出方法修改成文件流

This commit is contained in:
不做码农 2023-01-30 17:40:14 +08:00
parent 54a7734fa9
commit 25142f5cc5
4 changed files with 8 additions and 20 deletions

View File

@ -134,8 +134,8 @@ namespace ZR.Admin.WebApi.Controllers.System
{
var list = PostService.GetAll();
string sFileName = ExportExcel(list, "syspost", "岗位");
return SUCCESS(new { path = "/export/" + sFileName, fileName = sFileName });
var result = ExportExcelMini(list, "post", "岗位列表");
return ExportExcel(result.Item2, result.Item1);
}
}
}

View File

@ -372,13 +372,9 @@ $if(replaceDto.ShowBtnExport)
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(async () => {
await export${genTable.BusinessName}(queryParams);
})
.then(function () {
return export${genTable.BusinessName}(queryParams);
})
.then((response) => {
this.download(response.data.path);
});
},
$end
//展开/折叠操作

View File

@ -376,13 +376,9 @@ $if(replaceDto.ShowBtnExport)
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(async () => {
await export${genTable.BusinessName}(queryParams);
})
.then(function () {
return export${genTable.BusinessName}(queryParams);
})
.then((response) => {
this.download(response.data.path);
});
},
$end
},

View File

@ -249,13 +249,9 @@ $if(replaceDto.ShowBtnExport)
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(async () => {
await export${genTable.BusinessName}(queryParams);
})
.then(function () {
return export${genTable.BusinessName}(queryParams);
})
.then((response) => {
this.download(response.data.path);
});
},
$end
},