From a88e152594bf4971f2f906c1b18ca82b68171f3f Mon Sep 17 00:00:00 2001 From: "34701892@qq.com" <34701892@qq.com> Date: Sat, 13 Dec 2025 12:20:18 +0800 Subject: [PATCH] =?UTF-8?q?feat(jnh):=20=E6=B7=BB=E5=8A=A0=E6=89=B9?= =?UTF-8?q?=E9=87=8F=E5=AF=BC=E5=85=A5=E5=8A=9F=E8=83=BD=E5=92=8C=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增getUploadUrl API接口用于获取上传URL - 创建import.vue组件实现批量导入功能 - 在index.vue中添加批量导入按钮和弹窗调用逻辑 - 调整页面样式和表单布局 --- src/api/jnh/index.ts | 8 ++++ src/views/pages/jnh/import.vue | 86 ++++++++++++++++++++++++++++++++++ src/views/pages/jnh/index.vue | 25 +++++++--- 3 files changed, 112 insertions(+), 7 deletions(-) create mode 100644 src/views/pages/jnh/import.vue diff --git a/src/api/jnh/index.ts b/src/api/jnh/index.ts index cd4312f..b4995b2 100644 --- a/src/api/jnh/index.ts +++ b/src/api/jnh/index.ts @@ -35,3 +35,11 @@ export const updateStatus = (params: any) => { params, }); }; + +export const getUploadUrl = (data: any) => { + return request({ + url: '/jnh/accounts/import', + method: 'post', + data, + }); +}; diff --git a/src/views/pages/jnh/import.vue b/src/views/pages/jnh/import.vue new file mode 100644 index 0000000..17b2f21 --- /dev/null +++ b/src/views/pages/jnh/import.vue @@ -0,0 +1,86 @@ + + + + + diff --git a/src/views/pages/jnh/index.vue b/src/views/pages/jnh/index.vue index ae96073..c1f4342 100644 --- a/src/views/pages/jnh/index.vue +++ b/src/views/pages/jnh/index.vue @@ -2,12 +2,13 @@
- 创建 + 创建账号 + 批量导入
- + @@ -15,15 +16,15 @@ - + - + @@ -48,6 +49,7 @@ +
@@ -58,6 +60,7 @@ import { getAccounts, deleteAccount, updateStatus } from '/@/api/jnh'; import tableComponents from '/@/components/tableComponents/index.vue'; import { ElMessage, ElMessageBox } from 'element-plus'; import addDialog from '/@/views/pages/jnh/add.vue'; +import importDialog from '/@/views/pages/jnh/import.vue'; const form = reactive({ keyword: '', @@ -87,11 +90,15 @@ const tableData = reactive({ size: 20, }); -const addDialogRef = ref(addDialog); +const addDialogRef = ref(); // 新增弹窗打开 function addOpen(data) { addDialogRef.value.open(data); } +const importDialogRef = ref(); +function addImport(data) { + importDialogRef.value.open(data); +} async function getData() { let { code, data } = await getAccounts({ @@ -147,7 +154,7 @@ onMounted(() => { margin-bottom: 30px; .input { - min-width: 150px; + width: 200px; } .form_content { @@ -166,5 +173,9 @@ onMounted(() => { font-weight: bold; color: #3e3e3e; } + + .form_button { + display: flex; + } }