From d28d80295c50867a602045d852175f0fc3a5e4ff Mon Sep 17 00:00:00 2001
From: dap <15891557205@163.com>
Date: Wed, 28 Jan 2026 19:31:55 +0800
Subject: [PATCH] =?UTF-8?q?refactor(=E7=B3=BB=E7=BB=9F=E9=85=8D=E7=BD=AE):?=
=?UTF-8?q?=20=E9=87=8D=E6=9E=84=E5=AF=BC=E5=87=BA=E5=8A=9F=E8=83=BD?=
=?UTF-8?q?=E4=BB=A5=E4=BD=BF=E7=94=A8=E6=96=B0=E7=9A=84blob=E5=AF=BC?=
=?UTF-8?q?=E5=87=BA=E5=B7=A5=E5=85=B7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
替换commonDownloadExcel为useBlobExport钩子,统一导出逻辑
---
.../web-antd/src/views/system/config/index.vue | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/apps/web-antd/src/views/system/config/index.vue b/apps/web-antd/src/views/system/config/index.vue
index 09ec5dd0..cbe3eb7f 100644
--- a/apps/web-antd/src/views/system/config/index.vue
+++ b/apps/web-antd/src/views/system/config/index.vue
@@ -15,7 +15,7 @@ import {
configRefreshCache,
configRemove,
} from '#/api/system/config';
-import { commonDownloadExcel } from '#/utils/file/download';
+import { useBlobExport } from '#/utils/file/export';
import configModal from './config-modal.vue';
import { columns, querySchema } from './data';
@@ -104,10 +104,14 @@ function handleMultiDelete() {
});
}
-function handleDownloadExcel() {
- commonDownloadExcel(configExport, '参数配置', tableApi.formApi.form.values, {
- fieldMappingTime: formOptions.fieldMappingTime,
- });
+const { exportBlob, exportLoading, buildExportFileName } =
+ useBlobExport(configExport);
+async function handleExport() {
+ // 构建表单请求参数
+ const formValues = await tableApi.formApi.getValues();
+ // 文件名
+ const fileName = buildExportFileName('参数配置');
+ exportBlob({ data: formValues, fileName });
}
async function handleRefreshCache() {
@@ -124,7 +128,9 @@ async function handleRefreshCache() {
刷新缓存
{{ $t('pages.common.export') }}