diff --git a/src/service/api/system/file/types.ts b/src/service/api/system/file/types.ts index 41d8632..0fee1b7 100644 --- a/src/service/api/system/file/types.ts +++ b/src/service/api/system/file/types.ts @@ -58,11 +58,18 @@ export interface FileUploadResult { // 文件服务类型枚举 export enum FileServiceType { - LOCAL = '1', // 本地存储 - MINIO = '2', // MinIO对象存储 - OSS = '3', // 阿里云对象存储 + LOCAL = 'LOCAL', // 本地存储 + MINIO = 'MINIO', // MinIO对象存储 + OSS = 'OSS', // 阿里云对象存储 } +// 文件服务类型映射(用于数据库存储) +export const FileServiceTypeMapping = { + LOCAL: '1', + MINIO: '2', + OSS: '3', +} as const + // 文件类型枚举 export enum FileTypeEnum { ALL = '0', // 全部 @@ -93,3 +100,10 @@ export const FILE_SERVICE_OPTIONS = [ { label: 'MinIO存储', value: FileServiceType.MINIO }, { label: '阿里云OSS', value: FileServiceType.OSS }, ] + +// 文件服务类型数据库值选项(用于搜索) +export const FILE_SERVICE_DB_OPTIONS = [ + { label: '本地存储', value: '1' }, + { label: 'MinIO存储', value: '2' }, + { label: '阿里云OSS', value: '3' }, +] diff --git a/src/views/system/file/index.vue b/src/views/system/file/index.vue index ece7fac..5e41b11 100644 --- a/src/views/system/file/index.vue +++ b/src/views/system/file/index.vue @@ -72,7 +72,7 @@ v-model:value="searchForm.fileService" placeholder="请选择存储类型" clearable - :options="FILE_SERVICE_OPTIONS" + :options="FILE_SERVICE_DB_OPTIONS" /> @@ -309,7 +309,6 @@ import { PERMISSIONS } from '@/constants/permissions' import { batchDeleteSysFiles, deleteSysFile, - FILE_SERVICE_OPTIONS, getSysFileList, uploadFile, } from '@/service/api/system/file'