From cebe6f93db84937da0cf6e0fa7fd514a8e5864f4 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 1 Apr 2023 00:04:28 +0800 Subject: [PATCH] =?UTF-8?q?REVIEW=20=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86?= =?UTF-8?q?=EF=BC=88=E5=AF=BC=E5=85=A5=E7=94=A8=E6=88=B7=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/user/index.ts | 2 +- src/views/bpm/model/ModelImportForm.vue | 6 +- src/views/system/user/UserImportForm.vue | 129 +++++++++++++++ .../system/user/components/UserImportForm.vue | 154 ------------------ src/views/system/user/index.vue | 6 +- 5 files changed, 136 insertions(+), 161 deletions(-) create mode 100644 src/views/system/user/UserImportForm.vue delete mode 100644 src/views/system/user/components/UserImportForm.vue diff --git a/src/api/system/user/index.ts b/src/api/system/user/index.ts index b53a77c5..6224f0e8 100644 --- a/src/api/system/user/index.ts +++ b/src/api/system/user/index.ts @@ -48,7 +48,7 @@ export const exportUser = (params) => { } // 下载用户导入模板 -export const importUserTemplateApi = () => { +export const importUserTemplate = () => { return request.download({ url: '/system/user/get-import-template' }) } diff --git a/src/views/bpm/model/ModelImportForm.vue b/src/views/bpm/model/ModelImportForm.vue index ac26ac08..fe542622 100644 --- a/src/views/bpm/model/ModelImportForm.vue +++ b/src/views/bpm/model/ModelImportForm.vue @@ -8,7 +8,7 @@ :data="formData" name="bpmnFile" v-model:file-list="fileList" - :drag="true" + drag :auto-upload="false" accept=".bpmn, .xml" :limit="1" @@ -77,7 +77,7 @@ const open = async () => { } defineExpose({ open }) // 提供 open 方法,用于打开弹窗 -/** 重置表单 */ +/** 提交表单 */ const submitForm = async () => { // 校验表单 if (!formRef) return @@ -98,7 +98,7 @@ const submitForm = async () => { /** 文件上传成功 */ const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调 -const submitFormSuccess = async (response: any): Promise => { +const submitFormSuccess = async (response: any) => { if (response.code !== 0) { message.error(response.msg) formLoading.value = false diff --git a/src/views/system/user/UserImportForm.vue b/src/views/system/user/UserImportForm.vue new file mode 100644 index 00000000..0e96bf29 --- /dev/null +++ b/src/views/system/user/UserImportForm.vue @@ -0,0 +1,129 @@ + + diff --git a/src/views/system/user/components/UserImportForm.vue b/src/views/system/user/components/UserImportForm.vue deleted file mode 100644 index f63936e2..00000000 --- a/src/views/system/user/components/UserImportForm.vue +++ /dev/null @@ -1,154 +0,0 @@ - - - diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index aa2d2566..19990ca9 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -194,7 +194,7 @@ import download from '@/utils/download' import { CommonStatusEnum } from '@/utils/constants' import * as UserApi from '@/api/system/user' import UserForm from './UserForm.vue' -import UserImportForm from './components/UserImportForm.vue' +import UserImportForm from './UserImportForm.vue' import UserAssignRoleForm from './UserAssignRoleForm.vue' import DeptTree from './DeptTree.vue' const message = useMessage() // 消息弹窗 @@ -250,10 +250,10 @@ const openForm = (type: string, id?: number) => { formRef.value.open(type, id) } -// 用户导入 +/** 用户导入 */ const importFormRef = ref() const handleImport = () => { - importFormRef.value?.openForm() + importFormRef.value.open() } /** 修改用户状态 */