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/crm/clue/index.vue | 35 ++++++++++++++++++++++++++++++++++-
1 files changed, 34 insertions(+), 1 deletions(-)
diff --git a/src/views/crm/clue/index.vue b/src/views/crm/clue/index.vue
index 26f4340..1995ccd 100644
--- a/src/views/crm/clue/index.vue
+++ b/src/views/crm/clue/index.vue
@@ -11,8 +11,16 @@
import { Button, message, Tabs } from 'ant-design-vue';
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
-import { deleteClue, exportClue, getCluePage } from '#/api/crm/clue';
+import {
+ deleteClue,
+ exportClue,
+ getCluePage,
+ importClue,
+ importClueTemplate,
+} from '#/api/crm/clue';
import { $t } from '#/locales';
+
+import ImportModalComponent from '#/components/import-modal';
import { useGridColumns, useGridFormSchema } from './data';
import Form from './modules/form.vue';
@@ -22,6 +30,11 @@
const [FormModal, formModalApi] = useVbenModal({
connectedComponent: Form,
+ destroyOnClose: true,
+});
+
+const [ImportModal, importModalApi] = useVbenModal({
+ connectedComponent: ImportModalComponent,
destroyOnClose: true,
});
@@ -42,6 +55,18 @@
/** 鍒涘缓绾跨储 */
function handleCreate() {
formModalApi.setData(null).open();
+}
+
+/** 瀵煎叆绾跨储 */
+function handleImport() {
+ importModalApi
+ .setData({
+ title: $t('ui.actionTitle.import', ['绾跨储']),
+ fileName: '绾跨储瀵煎叆妯℃澘.xls',
+ importFn: importClue,
+ templateFn: importClueTemplate,
+ })
+ .open();
}
/** 缂栬緫绾跨储 */
@@ -109,6 +134,7 @@
<template>
<Page auto-content-height><FormModal @success="handleRefresh" />
+ <ImportModal @success="handleRefresh" />
<Grid>
<template #toolbar-actions>
<Tabs class="w-full" @change="handleChangeSceneType">
@@ -134,6 +160,13 @@
auth: ['crm:clue:export'],
onClick: handleExport,
},
+ {
+ label: $t('ui.actionTitle.import', ['绾跨储']),
+ type: 'primary',
+ icon: ACTION_ICON.UPLOAD,
+ auth: ['crm:clue:import'],
+ onClick: handleImport,
+ },
]"
/>
</template>
--
Gitblit v1.9.3