diff --git a/frontend/src/api/modules/test-plan/testPlan.ts b/frontend/src/api/modules/test-plan/testPlan.ts index 8522c78720..bb04a7e1ed 100644 --- a/frontend/src/api/modules/test-plan/testPlan.ts +++ b/frontend/src/api/modules/test-plan/testPlan.ts @@ -5,9 +5,11 @@ import { archivedPlanUrl, batchCopyPlanUrl, batchDeletePlanUrl, + BatchDisassociateCaseUrl, batchMovePlanUrl, deletePlanUrl, DeleteTestPlanModuleUrl, + DisassociateCaseUrl, GetFeatureCaseModuleCountUrl, GetFeatureCaseModuleUrl, GetPlanDetailFeatureCaseListUrl, @@ -27,6 +29,8 @@ import type { CommonList, MoveModules, TableQueryParams } from '@/models/common' import { ModuleTreeNode } from '@/models/common'; import type { AddTestPlanParams, + BatchFeatureCaseParams, + DisassociateCaseParams, PlanDetailBugItem, PlanDetailFeatureCaseItem, PlanDetailFeatureCaseListQueryParams, @@ -124,3 +128,11 @@ export function getFeatureCaseModuleCount(data: PlanDetailFeatureCaseListQueryPa export function getFeatureCaseModule(planId: string) { return MSR.get({ url: `${GetFeatureCaseModuleUrl}/${planId}` }); } +// 计划详情-功能用例列表-取消关联用例 +export function disassociateCase(data: DisassociateCaseParams) { + return MSR.post({ url: DisassociateCaseUrl, data }); +} +// 计划详情-功能用例列表-批量取消关联用例 +export function batchDisassociateCase(data: BatchFeatureCaseParams) { + return MSR.post({ url: BatchDisassociateCaseUrl, data }); +} diff --git a/frontend/src/api/requrls/test-plan/testPlan.ts b/frontend/src/api/requrls/test-plan/testPlan.ts index a5354769b7..f6bb28e33a 100644 --- a/frontend/src/api/requrls/test-plan/testPlan.ts +++ b/frontend/src/api/requrls/test-plan/testPlan.ts @@ -38,3 +38,7 @@ export const GetPlanDetailFeatureCaseListUrl = '/test-plan/functional/case/page' export const GetFeatureCaseModuleCountUrl = '/test-plan/functional/case/module/count'; // 计划详情-功能用例模块树 export const GetFeatureCaseModuleUrl = '/test-plan/functional/case/tree'; +// 计划详情-功能用例-取消关联用例 +export const DisassociateCaseUrl = '/test-plan/functional/case/disassociate'; +// 计划详情-功能用例-批量取消关联用例 +export const BatchDisassociateCaseUrl = '/test-plan/functional/case/batch/disassociate'; diff --git a/frontend/src/models/testPlan/testPlan.ts b/frontend/src/models/testPlan/testPlan.ts index e5546a38e3..157ca1efd6 100644 --- a/frontend/src/models/testPlan/testPlan.ts +++ b/frontend/src/models/testPlan/testPlan.ts @@ -1,3 +1,5 @@ +import type { BatchActionQueryParams } from '@/components/pure/ms-table/type'; + import type { customFieldsItem } from '@/models/caseManagement/featureCase'; import type { TableQueryParams } from '@/models/common'; import { LastExecuteResults } from '@/enums/caseEnum'; @@ -148,5 +150,14 @@ export interface PlanDetailFeatureCaseListQueryParams extends TableQueryParams { testPlanId: string; projectId: string; } +export interface DisassociateCaseParams { + testPlanId: string; + id: string; +} + +export interface BatchFeatureCaseParams extends BatchActionQueryParams { + testPlanId: string; + moduleIds?: string[]; +} export default {}; diff --git a/frontend/src/views/test-plan/testPlan/detail/featureCase/components/caseTable.vue b/frontend/src/views/test-plan/testPlan/detail/featureCase/components/caseTable.vue index 3a63c47744..3fb58cc621 100644 --- a/frontend/src/views/test-plan/testPlan/detail/featureCase/components/caseTable.vue +++ b/frontend/src/views/test-plan/testPlan/detail/featureCase/components/caseTable.vue @@ -46,14 +46,23 @@ -