From 002b0d9af5ba6a8f019f40bd9e8d6ebffe7f7e7b Mon Sep 17 00:00:00 2001 From: Leo <98382335+gaoziman@users.noreply.github.com> Date: Wed, 9 Jul 2025 10:18:46 +0800 Subject: [PATCH] =?UTF-8?q?feat(picture):=20=E4=BC=98=E5=8C=96=E5=9B=BE?= =?UTF-8?q?=E5=BA=93=E7=AE=A1=E7=90=86=E9=A1=B5=E9=9D=A2=EF=BC=8C=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=8A=A8=E6=80=81=E5=AD=98=E5=82=A8=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E5=92=8C=E7=95=8C=E9=9D=A2=E7=BB=9F=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除MinIO存储选项,简化存储类型配置 - 优化图片上传功能,支持动态选择存储类型 - 统一服务类型显示,移除MinIO相关的UI元素 - 改进上传接口调用,传递用户选择的存储类型和分类 - 提升图库管理的用户体验和系统一致性 --- src/views/system/picture/index.vue | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/views/system/picture/index.vue b/src/views/system/picture/index.vue index 2f6fbce..47bde07 100644 --- a/src/views/system/picture/index.vue +++ b/src/views/system/picture/index.vue @@ -343,7 +343,6 @@ placeholder="请选择服务类型" :options="[ { label: 'LOCAL', value: 'LOCAL' }, - { label: 'MINIO', value: 'MINIO' }, { label: 'OSS', value: 'OSS' }, ]" /> @@ -591,7 +590,6 @@ const columns: DataTableColumns = [ render: (row) => { const serviceMap: Record = { 1: { type: 'success', text: '本地存储' }, - 2: { type: 'info', text: 'MinIO' }, 3: { type: 'warning', text: '阿里云OSS' }, } const config = serviceMap[row.pictureService] || { type: 'info', text: '未知' } @@ -807,7 +805,6 @@ function handleImageError(e: Event) { function getPictureServiceText(serviceType: string): string { const serviceMap: Record = { 1: '本地存储', - 2: 'MinIO存储', 3: '阿里云OSS', } return serviceMap[serviceType] || '未知' @@ -895,9 +892,9 @@ async function customUpload({ file, onProgress, onFinish, onError }: any) { // 设置进度 onProgress({ percent: 10 }) - // 调用上传API - 使用选择的分类 - // console.log('调用上传API:', { pictureType: uploadForm.value.pictureType, fileSize: 2 }) - await uploadPicture(fileObj, uploadForm.value.pictureType, 2) + // 调用上传API - 使用选择的分类和存储类型 + // console.log('调用上传API:', { pictureType: uploadForm.value.pictureType, pictureService: uploadForm.value.pictureService, fileSize: 2 }) + await uploadPicture(fileObj, uploadForm.value.pictureType, 2, uploadForm.value.pictureService) // 设置完成进度 onProgress({ percent: 100 })