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/contact/index.vue |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/src/views/crm/contact/index.vue b/src/views/crm/contact/index.vue
index 9021ae0..3eb2ded 100644
--- a/src/views/crm/contact/index.vue
+++ b/src/views/crm/contact/index.vue
@@ -15,8 +15,12 @@
   deleteContact,
   exportContact,
   getContactPage,
+  importContact,
+  importContactTemplate,
 } from '#/api/crm/contact';
 import { $t } from '#/locales';
+
+import ImportModalComponent from '#/components/import-modal';
 
 import { useGridColumns, useGridFormSchema } from './data';
 import Form from './modules/form.vue';
@@ -26,6 +30,11 @@
 
 const [FormModal, formModalApi] = useVbenModal({
   connectedComponent: Form,
+  destroyOnClose: true,
+});
+
+const [ImportModal, importModalApi] = useVbenModal({
+  connectedComponent: ImportModalComponent,
   destroyOnClose: true,
 });
 
@@ -53,6 +62,18 @@
 /** 鍒涘缓鑱旂郴浜� */
 function handleCreate() {
   formModalApi.setData(null).open();
+}
+
+/** 瀵煎叆鑱旂郴浜� */
+function handleImport() {
+  importModalApi
+    .setData({
+      title: $t('ui.actionTitle.import', ['鑱旂郴浜�']),
+      fileName: '鑱旂郴浜哄鍏ユā鏉�.xls',
+      importFn: importContact,
+      templateFn: importContactTemplate,
+    })
+    .open();
 }
 
 /** 缂栬緫鑱旂郴浜� */
@@ -119,6 +140,7 @@
 
 <template>
   <Page auto-content-height><FormModal @success="handleRefresh" />
+    <ImportModal @success="handleRefresh" />
     <Grid>
       <template #toolbar-actions>
         <Tabs class="w-full" @change="handleChangeSceneType">
@@ -144,6 +166,13 @@
               auth: ['crm:contact:export'],
               onClick: handleExport,
             },
+            {
+              label: $t('ui.actionTitle.import', ['鑱旂郴浜�']),
+              type: 'primary',
+              icon: ACTION_ICON.UPLOAD,
+              auth: ['crm:contact:import'],
+              onClick: handleImport,
+            },
           ]"
         />
       </template>

--
Gitblit v1.9.3