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

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

View File

@ -216,7 +216,6 @@
placeholder="请选择文件服务"
:options="[
{ label: 'LOCAL', value: 'LOCAL' },
{ label: 'MINIO', value: 'MINIO' },
{ label: 'OSS', value: 'OSS' },
]"
/>
@ -481,7 +480,6 @@ const columns: DataTableColumns<SysFileVo> = [
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.fileService] || { type: 'info', text: '未知' }
@ -780,8 +778,8 @@ async function customUpload({ file, onProgress, onFinish, onError }: any) {
//
onProgress({ percent: 10 })
// API
await uploadFile(fileObj, folderName, 2, '-1')
// API
await uploadFile(fileObj, folderName, 2, '-1', uploadForm.value.fileService)
//
onProgress({ percent: 100 })