diff --git a/apps/web-antd/src/views/system/post/index.vue b/apps/web-antd/src/views/system/post/index.vue index bfa7bf3c..da25a4cb 100644 --- a/apps/web-antd/src/views/system/post/index.vue +++ b/apps/web-antd/src/views/system/post/index.vue @@ -17,7 +17,7 @@ import { postList, postRemove, } from '#/api/system/post'; -import { commonDownloadExcel } from '#/utils/file/download'; +import { useBlobExport } from '#/utils/file/export'; import DeptTree from '#/views/system/user/dept-tree.vue'; import { columns, querySchema } from './data'; @@ -118,8 +118,14 @@ function handleMultiDelete() { }); } -function handleDownloadExcel() { - commonDownloadExcel(postExport, '岗位信息', tableApi.formApi.form.values); +const { exportBlob, exportLoading, buildExportFileName } = + useBlobExport(postExport); +async function handleExport() { + // 构建表单请求参数 + const formValues = await tableApi.formApi.getValues(); + // 文件名 + const fileName = buildExportFileName('岗位数据'); + exportBlob({ data: formValues, fileName }); } @@ -137,7 +143,9 @@ function handleDownloadExcel() { {{ $t('pages.common.export') }}