feat(file): 优化文件管理页面,支持动态存储类型选择和界面统一
- 移除MinIO存储选项,简化存储类型配置 - 优化上传功能,支持动态选择存储类型 - 统一服务类型显示,移除MinIO相关的UI元素 - 改进上传接口调用,传递用户选择的存储类型 - 提升用户体验和系统一致性
This commit is contained in:
parent
3141ad03eb
commit
a93448b92d
@ -216,7 +216,6 @@
|
|||||||
placeholder="请选择文件服务"
|
placeholder="请选择文件服务"
|
||||||
:options="[
|
:options="[
|
||||||
{ label: 'LOCAL', value: 'LOCAL' },
|
{ label: 'LOCAL', value: 'LOCAL' },
|
||||||
{ label: 'MINIO', value: 'MINIO' },
|
|
||||||
{ label: 'OSS', value: 'OSS' },
|
{ label: 'OSS', value: 'OSS' },
|
||||||
]"
|
]"
|
||||||
/>
|
/>
|
||||||
@ -481,7 +480,6 @@ const columns: DataTableColumns<SysFileVo> = [
|
|||||||
render: (row) => {
|
render: (row) => {
|
||||||
const serviceMap: Record<string, { type: 'success' | 'info' | 'warning', text: string }> = {
|
const serviceMap: Record<string, { type: 'success' | 'info' | 'warning', text: string }> = {
|
||||||
1: { type: 'success', text: '本地存储' },
|
1: { type: 'success', text: '本地存储' },
|
||||||
2: { type: 'info', text: 'MinIO' },
|
|
||||||
3: { type: 'warning', text: '阿里云OSS' },
|
3: { type: 'warning', text: '阿里云OSS' },
|
||||||
}
|
}
|
||||||
const config = serviceMap[row.fileService] || { type: 'info', text: '未知' }
|
const config = serviceMap[row.fileService] || { type: 'info', text: '未知' }
|
||||||
@ -780,8 +778,8 @@ async function customUpload({ file, onProgress, onFinish, onError }: any) {
|
|||||||
// 设置进度
|
// 设置进度
|
||||||
onProgress({ percent: 10 })
|
onProgress({ percent: 10 })
|
||||||
|
|
||||||
// 调用上传API
|
// 调用上传API,传递选择的存储类型
|
||||||
await uploadFile(fileObj, folderName, 2, '-1')
|
await uploadFile(fileObj, folderName, 2, '-1', uploadForm.value.fileService)
|
||||||
|
|
||||||
// 设置完成进度
|
// 设置完成进度
|
||||||
onProgress({ percent: 100 })
|
onProgress({ percent: 100 })
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user