feat(picture): 优化图库管理页面,支持动态存储类型选择和界面统一

- 移除MinIO存储选项,简化存储类型配置
- 优化图片上传功能,支持动态选择存储类型
- 统一服务类型显示,移除MinIO相关的UI元素
- 改进上传接口调用,传递用户选择的存储类型和分类
- 提升图库管理的用户体验和系统一致性
This commit is contained in:
Leo 2025-07-09 10:18:46 +08:00
parent a93448b92d
commit 002b0d9af5

View File

@ -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<SysPictureVo> = [
render: (row) => {
const serviceMap: Record<string, { type: 'success' | 'info' | 'warning', text: string }> = {
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<string, string> = {
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 })