diff --git a/frontend/src/api/modules/case-management/featureCase.ts b/frontend/src/api/modules/case-management/featureCase.ts index b0faebd412..c2d9bca22a 100644 --- a/frontend/src/api/modules/case-management/featureCase.ts +++ b/frontend/src/api/modules/case-management/featureCase.ts @@ -12,8 +12,10 @@ import { CreateCaseUrl, DeleteCaseModuleTreeUrl, DeleteCaseUrl, + deleteFileOrCancelAssociationUrl, DeleteRecycleCaseListUrl, DetailCaseUrl, + DownloadFileUrl, FollowerCaseUrl, GetAssociatedFilePageUrl, GetCaseListUrl, @@ -25,11 +27,14 @@ import { GetRecycleCaseModulesCountUrl, GetTrashCaseModuleTreeUrl, MoveCaseModuleTreeUrl, + PreviewFileUrl, RecoverRecycleCaseListUrl, RestoreCaseListUrl, + TransferFileUrl, UpdateCaseModuleTreeUrl, UpdateCaseUrl, UpdateDemandUrl, + UploadOrAssociationFileUrl, } from '@/api/requrls/case-management/featureCase'; import type { @@ -45,6 +50,7 @@ import type { DemandItem, ModulesTreeType, MoveModules, + OperationFile, UpdateModule, } from '@/models/caseManagement/featureCase'; import type { CommonList, TableQueryParams } from '@/models/common'; @@ -185,4 +191,34 @@ export function cancelAssociationDemand(id: string) { return MSR.get({ url: `${CancelAssociationDemandUrl}/${id}` }); } +// 附件 + +// 上传文件并关联用例 +export function uploadOrAssociationFile(data: Record) { + return MSR.uploadFile( + { url: UploadOrAssociationFileUrl }, + { request: data.request, fileList: data.fileList }, + 'file' + ); +} +// 转存文件 +export function transferFile(data: OperationFile) { + return MSR.post({ url: TransferFileUrl, data }); +} + +// 预览文件 +export function previewFile(data: OperationFile) { + return MSR.post({ url: PreviewFileUrl, data }); +} + +// 下载文件 +export function downloadFile(data: OperationFile) { + return MSR.post({ url: DownloadFileUrl, data }); +} + +// 删除文件或取消关联用例文件 +export function deleteFileOrCancelAssociation(data: any) { + return MSR.post({ url: DownloadFileUrl, data }); +} + export default {}; diff --git a/frontend/src/models/caseManagement/featureCase.ts b/frontend/src/models/caseManagement/featureCase.ts index a7f6d51840..62ebe21512 100644 --- a/frontend/src/models/caseManagement/featureCase.ts +++ b/frontend/src/models/caseManagement/featureCase.ts @@ -212,5 +212,12 @@ export interface CreateOrUpdateDemand { demandList?: DemandFormList[]; [key: string]: any; } +// 转存文件 +export interface OperationFile { + projectId: string; + caseId: string; + fileId: string; // 文件id + local: boolean; // 是否是本地 +} export type DemandList = DemandItem[]; diff --git a/frontend/src/views/case-management/caseManagementFeature/components/caseDetail.vue b/frontend/src/views/case-management/caseManagementFeature/components/caseDetail.vue index 00976dc2b8..81f27c2486 100644 --- a/frontend/src/views/case-management/caseManagementFeature/components/caseDetail.vue +++ b/frontend/src/views/case-management/caseManagementFeature/components/caseDetail.vue @@ -118,6 +118,8 @@ } else { title.value = t('caseManagement.featureCase.creatingCase'); } + const gatewayAddress = `${window.location.protocol}//${window.location.hostname}:${window.location.port}`; + console.log(gatewayAddress); }); diff --git a/frontend/src/views/case-management/caseManagementFeature/components/settingDrawer.vue b/frontend/src/views/case-management/caseManagementFeature/components/settingDrawer.vue index f24d589f53..581dcc30d1 100644 --- a/frontend/src/views/case-management/caseManagementFeature/components/settingDrawer.vue +++ b/frontend/src/views/case-management/caseManagementFeature/components/settingDrawer.vue @@ -2,14 +2,14 @@
{{ t('caseManagement.featureCase.displaySetting') }} + >{{ t('caseManagement.featureCase.detailDisplaySetting') }}