diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/dto/FunctionalCaseTestPlanDTO.java b/backend/services/case-management/src/main/java/io/metersphere/functional/dto/FunctionalCaseTestPlanDTO.java
index 3dfa198edd..882d549c7f 100644
--- a/backend/services/case-management/src/main/java/io/metersphere/functional/dto/FunctionalCaseTestPlanDTO.java
+++ b/backend/services/case-management/src/main/java/io/metersphere/functional/dto/FunctionalCaseTestPlanDTO.java
@@ -8,9 +8,12 @@ import lombok.Data;
public class FunctionalCaseTestPlanDTO extends TestPlanFunctionalCase {
@Schema(description = "测试计划ID")
- private String testPlanNum;
+ private Long testPlanNum;
- @Schema(description = "所属项目")
+ @Schema(description = "测试计划名称")
+ private String testPlanName;
+
+ @Schema(description = "所属项目名称")
private String projectName;
@Schema(description = "计划状态")
diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtFunctionalCaseTestMapper.xml b/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtFunctionalCaseTestMapper.xml
index d9c3d0892e..abd5d390c2 100644
--- a/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtFunctionalCaseTestMapper.xml
+++ b/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtFunctionalCaseTestMapper.xml
@@ -58,7 +58,7 @@
@@ -133,5 +136,22 @@
-
+
+
+
+
+
+
+ AND tp.status in
+
+
+
+ AND tpfc.last_exec_result in
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/frontend/src/api/modules/case-management/featureCase.ts b/frontend/src/api/modules/case-management/featureCase.ts
index b820874d56..b353b04c44 100644
--- a/frontend/src/api/modules/case-management/featureCase.ts
+++ b/frontend/src/api/modules/case-management/featureCase.ts
@@ -36,6 +36,7 @@ import {
GetAssociatedDebuggerUrl,
GetAssociatedDrawerCaseUrl,
GetAssociatedFilePageUrl,
+ GetAssociatedTestPlanUrl,
GetAssociationPublicCaseModuleCountUrl,
GetAssociationPublicCasePageUrl,
GetAssociationPublicModuleTreeUrl,
@@ -96,6 +97,7 @@ import type {
} from '@/models/caseManagement/featureCase';
import type { CommonList, ModuleTreeNode, MoveModules, TableQueryParams } from '@/models/common';
import { ProjectListItem } from '@/models/setting/project';
+import { AssociateFunctionalCaseItem, TestPlanItem } from '@/models/testPlan/testPlan';
// 获取模块树
export function getCaseModuleTree(params: TableQueryParams) {
@@ -428,4 +430,9 @@ export function getAssociatedProjectOptions(orgId: string, module: string) {
return MSR.get({ url: `${associatedProjectOptionsUrl}/${orgId}/${module}` });
}
+// 获取已关联测试计划列表
+export function getLinkedCaseTestPlanList(data: TableQueryParams) {
+ return MSR.post>({ url: GetAssociatedTestPlanUrl, data });
+}
+
export default {};
diff --git a/frontend/src/api/requrls/case-management/featureCase.ts b/frontend/src/api/requrls/case-management/featureCase.ts
index 856e93f6be..83721fd205 100644
--- a/frontend/src/api/requrls/case-management/featureCase.ts
+++ b/frontend/src/api/requrls/case-management/featureCase.ts
@@ -151,3 +151,6 @@ export const getChangeHistoryListUrl = '/functional/case/operation-history';
export const cancelDisassociate = '/functional/case/test/disassociate/case';
// 关联用例关联功能用例项目下拉
export const associatedProjectOptionsUrl = '/project/list/options';
+
+// 获取详情已关联测试计划列表
+export const GetAssociatedTestPlanUrl = '/functional/case/test/has/associate/plan/page';
diff --git a/frontend/src/models/testPlan/testPlan.ts b/frontend/src/models/testPlan/testPlan.ts
index 686143cea7..a1fd57135c 100644
--- a/frontend/src/models/testPlan/testPlan.ts
+++ b/frontend/src/models/testPlan/testPlan.ts
@@ -21,6 +21,14 @@ export interface TestPlanItem {
groupId: string;
}
+export interface AssociateFunctionalCaseItem {
+ testPlanId: string;
+ testPlanNum: number;
+ testPlanName: string;
+ projectName: string;
+ planStatus: string;
+}
+
export interface ResourcesItem {
id: string;
name: string;
diff --git a/frontend/src/views/case-management/caseManagementFeature/components/caseDetailDrawer.vue b/frontend/src/views/case-management/caseManagementFeature/components/caseDetailDrawer.vue
index 641bbfcbd6..b968cec7fd 100644
--- a/frontend/src/views/case-management/caseManagementFeature/components/caseDetailDrawer.vue
+++ b/frontend/src/views/case-management/caseManagementFeature/components/caseDetailDrawer.vue
@@ -141,7 +141,7 @@
-
+
@@ -666,6 +666,12 @@
canHide: true,
isShow: true,
},
+ {
+ value: 'testPlan',
+ label: t('caseManagement.featureCase.testPlan'),
+ canHide: true,
+ isShow: true,
+ },
{
value: 'comments',
label: t('caseManagement.featureCase.comments'),
diff --git a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabTestPlan.vue b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabTestPlan.vue
index ad70430a4d..363cd36ba0 100644
--- a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabTestPlan.vue
+++ b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabTestPlan.vue
@@ -7,14 +7,101 @@
:placeholder="t('caseManagement.featureCase.searchByNameAndId')"
allow-clear
class="mx-[8px] w-[240px]"
+ @search="searchList"
+ @press-enter="searchList"
+ @clear="searchList"
>
-
- {{ record.name }}
+
+ {{ record.testPlanNum }}
-
-
+
+
+
+
+
+
+ {{ t(columnConfig.title as string) }}
+
+
+
+
+
+
+
+
+ {{ t(planStatusMap[key as planStatusType].label) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ t(columnConfig.title as string) }}
+
+
+
+
+
+
+
+
+ {{ executionResultMap[key]?.statusText || '' }}
+
+
+
+
+
+
+
@@ -22,34 +109,48 @@
diff --git a/frontend/src/views/case-management/caseManagementFeature/components/utils.ts b/frontend/src/views/case-management/caseManagementFeature/components/utils.ts
index 6557a54349..3e9b634bba 100644
--- a/frontend/src/views/case-management/caseManagementFeature/components/utils.ts
+++ b/frontend/src/views/case-management/caseManagementFeature/components/utils.ts
@@ -65,12 +65,12 @@ export const executionResultMap: Record = {
statusText: t('caseManagement.featureCase.passed'),
color: '',
},
- SKIPPED: {
+ /* SKIPPED: {
key: 'SKIPPED',
icon: StatusType.SKIPPED,
statusText: t('caseManagement.featureCase.skip'),
color: 'text-[rgb(var(--link-6))]',
- },
+ }, */
BLOCKED: {
key: 'BLOCKED',
icon: StatusType.BLOCKED,