From 268b3e77f3beaba03a1273d643d8aa4fa5db1c10 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 16 十月 2026 13:08:27 +0800
Subject: [PATCH] feat: 全量列表页接入 Excel 导入按钮与共享弹窗
---
src/views/infra/job/index.vue | 29 +++++++++++++++++++++++++++++
1 files changed, 29 insertions(+), 0 deletions(-)
diff --git a/src/views/infra/job/index.vue b/src/views/infra/job/index.vue
index b8d8678..59ef791 100644
--- a/src/views/infra/job/index.vue
+++ b/src/views/infra/job/index.vue
@@ -17,11 +17,15 @@
deleteJobList,
exportJob,
getJobPage,
+ importJob,
+ importJobTemplate,
runJob,
syncJob,
updateJobStatus,
} from '#/api/infra/job';
import { $t } from '#/locales';
+
+import ImportModalComponent from '#/components/import-modal';
import { useGridColumns, useGridFormSchema } from './data';
import Detail from './modules/detail.vue';
@@ -39,9 +43,26 @@
destroyOnClose: true,
});
+const [ImportModal, importModalApi] = useVbenModal({
+ connectedComponent: ImportModalComponent,
+ destroyOnClose: true,
+});
+
/** 鍒锋柊琛ㄦ牸 */
function handleRefresh() {
gridApi.query();
+}
+
+/** 瀵煎叆浠诲姟 */
+function handleImport() {
+ importModalApi
+ .setData({
+ title: $t('ui.actionTitle.import', ['浠诲姟']),
+ fileName: '瀹氭椂浠诲姟瀵煎叆妯℃澘.xls',
+ importFn: importJob,
+ templateFn: importJobTemplate,
+ })
+ .open();
}
/** 瀵煎嚭琛ㄦ牸 */
@@ -201,6 +222,7 @@
<template>
<Page auto-content-height><FormModal @success="handleRefresh" />
<DetailModal />
+ <ImportModal @success="handleRefresh" />
<Grid table-title="瀹氭椂浠诲姟鍒楄〃">
<template #toolbar-tools>
<TableAction
@@ -220,6 +242,13 @@
onClick: handleExport,
},
{
+ label: $t('ui.actionTitle.import', ['浠诲姟']),
+ type: 'primary',
+ icon: ACTION_ICON.UPLOAD,
+ auth: ['infra:job:import'],
+ onClick: handleImport,
+ },
+ {
label: '鎵ц鏃ュ織',
type: 'primary',
icon: 'lucide:history',
--
Gitblit v1.9.3