diff --git a/src/api/file/file.ts b/src/api/file/file.ts index 11052330..c869fb28 100644 --- a/src/api/file/file.ts +++ b/src/api/file/file.ts @@ -1,14 +1,14 @@ import { UploadApiResp } from '/@/api/sys/model/uploadModel'; import { defHttp } from '/@/utils/http/axios'; import { ErrorMessageMode, UploadFileParams } from '/#/axios'; -import { BaseDataResp, BaseIDReq, BaseListReq, BaseResp } from '../model/baseModel'; +import { BaseDataResp, BaseIDsReq, BaseListReq, BaseResp } from '../model/baseModel'; import { FileListResp, updateFileInfoReq } from './model/fileModel'; import { AxiosProgressEvent } from 'axios'; enum Api { uploadFile = '/fms-api/upload', GetFileList = '/fms-api/file/list', - UpdateFileInfo = '/fms-api/file', + UpdateFileInfo = '/fms-api/file/update', SetFileStatus = '/fms-api/file/status', DownloadFile = '/fms-api/file/download', } @@ -55,7 +55,7 @@ export const UpdateFileInfo = (params: updateFileInfoReq, mode: ErrorMessageMode * author: Ryan Su * @description: delete api */ -export const deleteFile = (params: BaseIDReq, mode: ErrorMessageMode = 'modal') => { +export const deleteFile = (params: BaseIDsReq, mode: ErrorMessageMode = 'modal') => { return defHttp.delete( { url: Api.UpdateFileInfo, params: params }, { diff --git a/src/locales/lang/en/fileManager.ts b/src/locales/lang/en/fileManager.ts index 90e88148..8e1d01fd 100644 --- a/src/locales/lang/en/fileManager.ts +++ b/src/locales/lang/en/fileManager.ts @@ -20,4 +20,7 @@ export default { copyURLSuccess: 'Copy the path successfully', copyURL: 'Copy URL', uploadFirst: 'Please upload the file firstly', + + addFile: 'Add File', + editFile: 'Edit File', }; diff --git a/src/locales/lang/zh-CN/fileManager.ts b/src/locales/lang/zh-CN/fileManager.ts index 925a0243..f874afc6 100644 --- a/src/locales/lang/zh-CN/fileManager.ts +++ b/src/locales/lang/zh-CN/fileManager.ts @@ -20,4 +20,7 @@ export default { copyURLSuccess: '复制文件地址成功', copyURL: '复制地址', uploadFirst: '请先上传文件', + + addFile: '添加文件', + editFile: '编辑文件', }; diff --git a/src/views/file/FileDrawer.vue b/src/views/file/FileDrawer.vue index 8d31979a..614602ab 100644 --- a/src/views/file/FileDrawer.vue +++ b/src/views/file/FileDrawer.vue @@ -48,7 +48,7 @@ }); const getTitle = computed(() => - !unref(isUpdate) ? t('sys.apis.addApi') : t('sys.apis.editApi'), + !unref(isUpdate) ? t('fileManager.addFile') : t('fileManager.editFile'), ); async function handleSubmit() { diff --git a/src/views/file/index.vue b/src/views/file/index.vue index 2d90d9f9..a98290e9 100644 --- a/src/views/file/index.vue +++ b/src/views/file/index.vue @@ -1,6 +1,17 @@