From 045092b13b4c08037aff8da18d3484592412ab38 Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Wed, 13 Mar 2024 15:24:47 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=8E=A5=E5=8F=A3=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=8E=A5=E5=8F=A3=E7=94=A8=E4=BE=8B=E5=9B=9E?= =?UTF-8?q?=E6=94=B6=E7=AB=99=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/api/modules/api-test/management.ts | 33 + .../src/api/requrls/api-test/management.ts | 13 +- .../components/recycle/case/caseTable.vue | 582 ++++++++++++++++++ .../management/components/recycle/index.vue | 5 +- .../views/api-test/management/locale/en-US.ts | 7 + .../views/api-test/management/locale/zh-CN.ts | 6 + 6 files changed, 643 insertions(+), 3 deletions(-) create mode 100644 frontend/src/views/api-test/management/components/recycle/case/caseTable.vue diff --git a/frontend/src/api/modules/api-test/management.ts b/frontend/src/api/modules/api-test/management.ts index 50ba1a75cd..57c091b414 100644 --- a/frontend/src/api/modules/api-test/management.ts +++ b/frontend/src/api/modules/api-test/management.ts @@ -7,9 +7,11 @@ import { BatchCleanOutApiUrl, BatchDeleteCaseUrl, BatchDeleteDefinitionUrl, + BatchDeleteRecycleCaseUrl, BatchEditCaseUrl, BatchMoveDefinitionUrl, BatchRecoverApiUrl, + BatchRecoverCaseUrl, BatchUpdateDefinitionUrl, CasePageUrl, CheckDefinitionScheduleUrl, @@ -23,6 +25,7 @@ import { DeleteMockUrl, DeleteModuleUrl, DeleteRecycleApiUrl, + DeleteRecycleCaseUrl, GetDefinitionDetailUrl, GetDefinitionScheduleUrl, GetEnvModuleUrl, @@ -34,8 +37,10 @@ import { ImportDefinitionUrl, MoveModuleUrl, OperationHistoryUrl, + RecoverCaseUrl, RecoverDefinitionUrl, RecoverOperationHistoryUrl, + RecycleCasePageUrl, SaveOperationHistoryUrl, SortCaseUrl, SortDefinitionUrl, @@ -345,6 +350,34 @@ export function dragSort(data: DragSortParams) { return MSR.post({ url: SortCaseUrl, data }); } +/** + * 接口用例回收站 + */ +// 获取回收站接口用例列表 +export function getRecycleCasePage(data: ApiCasePageParams) { + return MSR.post>({ url: RecycleCasePageUrl, data }); +} + +// 恢复接口用例 +export function recoverCase(id: string) { + return MSR.get({ url: RecoverCaseUrl, params: id }); +} + +// 批量恢复接口用例 +export function batchRecoverCase(data: ApiCaseBatchParams) { + return MSR.post({ url: BatchRecoverCaseUrl, data }); +} + +// 彻底删除接口用例 +export function deleteRecycleCase(id: string) { + return MSR.get({ url: DeleteRecycleCaseUrl, params: id }); +} + +// 批量彻底删除接口用例 +export function batchDeleteRecycleCase(data: ApiCaseBatchParams) { + return MSR.post({ url: BatchDeleteRecycleCaseUrl, data }); +} + // 添加接口用例 export function addCase(data: AddApiCaseParams) { return MSR.post({ url: AddCaseUrl, data }); diff --git a/frontend/src/api/requrls/api-test/management.ts b/frontend/src/api/requrls/api-test/management.ts index 393acb561a..bfafb2a3cf 100644 --- a/frontend/src/api/requrls/api-test/management.ts +++ b/frontend/src/api/requrls/api-test/management.ts @@ -57,8 +57,17 @@ export const GetTrashModuleCountUrl = '/api/definition/module/trash/count'; // export const CasePageUrl = '/api/case/page'; // 接口用例列表 export const UpdateCaseStatusUrl = '/api/case/update-status'; // 接口用例更新状态 export const UpdateCasePriorityUrl = '/api/case/update-priority'; // 接口用例更新等级 -export const DeleteCaseUrl = '/api/case/delete'; // 删除接口用例 -export const BatchDeleteCaseUrl = '/api/case/batch/delete'; // 批量删除接口用例 +export const DeleteCaseUrl = '/api/case/delete-to-gc'; // 删除接口用例 +export const BatchDeleteCaseUrl = '/api/case/batch/delete-to-gc'; // 批量删除接口用例 export const BatchEditCaseUrl = '/api/case/batch/edit'; // 批量编辑接口用例 export const SortCaseUrl = '/api/case/edit/pos'; // 接口用例拖拽 + +/** + * 接口用例回收站 + */ +export const RecycleCasePageUrl = '/api/case/trash/page'; // 接口用例回收站列表 +export const RecoverCaseUrl = '/api/case/recover'; // 接口用例恢复 +export const BatchRecoverCaseUrl = '/api/case/batch/recover'; // 接口用例批量恢复 +export const DeleteRecycleCaseUrl = '/api/case/delete'; // 接口用例彻底删除 +export const BatchDeleteRecycleCaseUrl = '/api/case/batch/delete'; // 接口用例批量彻底删除 export const AddCaseUrl = '/api/case/add'; // 添加用例 diff --git a/frontend/src/views/api-test/management/components/recycle/case/caseTable.vue b/frontend/src/views/api-test/management/components/recycle/case/caseTable.vue new file mode 100644 index 0000000000..caf71d95ff --- /dev/null +++ b/frontend/src/views/api-test/management/components/recycle/case/caseTable.vue @@ -0,0 +1,582 @@ + + + + + diff --git a/frontend/src/views/api-test/management/components/recycle/index.vue b/frontend/src/views/api-test/management/components/recycle/index.vue index 3fe89ec3ec..9ddc96515a 100644 --- a/frontend/src/views/api-test/management/components/recycle/index.vue +++ b/frontend/src/views/api-test/management/components/recycle/index.vue @@ -9,12 +9,15 @@ :protocol="protocol" /> - + + +