From 9a9420f423c9709a2b2a134ff92199b827e32026 Mon Sep 17 00:00:00 2001 From: ChenYi <296215406@outlook.com> Date: Mon, 28 Jul 2025 17:41:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=96=87=E4=BB=B6=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/locales/langs/en-US/common.json | 3 +- .../src/locales/langs/zh-CN/common.json | 3 +- .../src/views/system/abpfiles/AddModal.vue | 279 +++++++++++++++++- .../src/views/system/abpfiles/schema.ts | 35 +-- 4 files changed, 289 insertions(+), 31 deletions(-) diff --git a/apps/web-antd/src/locales/langs/en-US/common.json b/apps/web-antd/src/locales/langs/en-US/common.json index 147f4d0..e45fe19 100644 --- a/apps/web-antd/src/locales/langs/en-US/common.json +++ b/apps/web-antd/src/locales/langs/en-US/common.json @@ -54,5 +54,6 @@ "exportFailed": "Data export failed", "getDataFailed": "Failed to get data", "PhoneNumberFormatError": "PhoneNumber Format Error", - "IoTPlatform": "IoTPlatform" + "IoTPlatform": "IoTPlatform", + "note": "note" } diff --git a/apps/web-antd/src/locales/langs/zh-CN/common.json b/apps/web-antd/src/locales/langs/zh-CN/common.json index ba04083..89c6154 100644 --- a/apps/web-antd/src/locales/langs/zh-CN/common.json +++ b/apps/web-antd/src/locales/langs/zh-CN/common.json @@ -55,5 +55,6 @@ "getDataFailed": "获取数据失败", "IsEnabled": "是否启用", "PhoneNumberFormatError": "手机号码格式错误", - "IoTPlatform": "物联网平台" + "IoTPlatform": "物联网平台", + "note": "备注" } diff --git a/apps/web-antd/src/views/system/abpfiles/AddModal.vue b/apps/web-antd/src/views/system/abpfiles/AddModal.vue index ec0d58f..cd2b4e1 100644 --- a/apps/web-antd/src/views/system/abpfiles/AddModal.vue +++ b/apps/web-antd/src/views/system/abpfiles/AddModal.vue @@ -1,12 +1,26 @@ - + + + + + + + + + 点击或拖拽文件到此区域上传 + + 支持单个或批量上传,严禁上传公司数据或其他敏感文件 + + + + + + + 已选择的文件: + + + {{ file.name }} + {{ formatFileSize(file.size) }} + + 删除 + + + + + diff --git a/apps/web-antd/src/views/system/abpfiles/schema.ts b/apps/web-antd/src/views/system/abpfiles/schema.ts index 8590eea..4e52915 100644 --- a/apps/web-antd/src/views/system/abpfiles/schema.ts +++ b/apps/web-antd/src/views/system/abpfiles/schema.ts @@ -10,6 +10,9 @@ import { postFilesDelete } from '#/api-client/index'; import { $t } from '#/locales'; const userStore = useUserStore(); + + + export const querySchema = computed(() => [ { component: 'RangePicker', @@ -66,33 +69,13 @@ export const tableSchema: any = computed((): VxeGridProps['columns'] => [ ]); export const addFormSchema = computed(() => [ + // 文件上传现在在AddModal中处理 { - component: 'Upload', - fieldName: 'files', - label: $t('abp.file.file'), - componentProps: () => { - return { - listType: 'picture-card', - autoUpload: true, - multiple: true, - name: 'files', - action: `${import.meta.env.VITE_APP_API_ADDRESS}/Files/Upload?access_token=${ - userStore.userInfo?.token - }`, - onPreview: () => {}, - onRemove: async (file: any) => { - await postFilesDelete({ - body: { - id: file.response[0].id, - }, - }); - }, - }; - }, - renderComponentContent: () => { - return { - default: () => 'Upload', - }; + component: 'Input', + fieldName: 'note', + label: $t('common.note'), + componentProps: { + placeholder: '请输入备注信息', }, }, ]);
+ +
点击或拖拽文件到此区域上传
+ 支持单个或批量上传,严禁上传公司数据或其他敏感文件 +