diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanMapper.java index b9a69c7aee..b9537289a5 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanMapper.java +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanMapper.java @@ -8,4 +8,6 @@ import java.util.List; public interface ExtTestPlanMapper { List list(@Param("request") QueryTestPlanRequest params); + + List listRelate(@Param("request") QueryTestPlanRequest params); } diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanMapper.xml index 3e2197db92..842b72b2d1 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanMapper.xml @@ -30,4 +30,19 @@ + + \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.java index 32f8149e92..5d68f74c22 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.java +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.java @@ -15,4 +15,5 @@ public interface ExtTestPlanTestCaseMapper { List list(@Param("request") QueryTestPlanCaseRequest request); + List findRelateTestPlanId(String userId); } diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml index 4915e5db7c..889fdcb874 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml @@ -58,5 +58,9 @@ + + \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/track/controller/TestPlanController.java b/backend/src/main/java/io/metersphere/track/controller/TestPlanController.java index 6a7e02549a..6f5d040328 100644 --- a/backend/src/main/java/io/metersphere/track/controller/TestPlanController.java +++ b/backend/src/main/java/io/metersphere/track/controller/TestPlanController.java @@ -36,6 +36,10 @@ public class TestPlanController { return testPlanService.listTestAllPlan(currentWorkspaceId); } + @PostMapping("/list/all/relate") + public List listRelateAll() { + return testPlanService.listRelateAllPlan(); + } @GetMapping("recent/{count}") public List recentTestPlans(@PathVariable int count) { diff --git a/backend/src/main/java/io/metersphere/track/request/testcase/QueryTestPlanRequest.java b/backend/src/main/java/io/metersphere/track/request/testcase/QueryTestPlanRequest.java index a6c597fea8..3087573d39 100644 --- a/backend/src/main/java/io/metersphere/track/request/testcase/QueryTestPlanRequest.java +++ b/backend/src/main/java/io/metersphere/track/request/testcase/QueryTestPlanRequest.java @@ -4,9 +4,12 @@ import io.metersphere.base.domain.TestPlan; import lombok.Getter; import lombok.Setter; +import java.util.List; + @Getter @Setter public class QueryTestPlanRequest extends TestPlan { private boolean recent = false; + private List planIds; } diff --git a/backend/src/main/java/io/metersphere/track/service/TestPlanService.java b/backend/src/main/java/io/metersphere/track/service/TestPlanService.java index 99b5ab23d4..d840f4ec76 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestPlanService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestPlanService.java @@ -6,8 +6,11 @@ import io.metersphere.base.mapper.TestCaseMapper; import io.metersphere.base.mapper.TestPlanMapper; import io.metersphere.base.mapper.TestPlanTestCaseMapper; import io.metersphere.base.mapper.ext.ExtTestPlanMapper; +import io.metersphere.base.mapper.ext.ExtTestPlanTestCaseMapper; import io.metersphere.commons.constants.TestPlanStatus; import io.metersphere.commons.exception.MSException; +import io.metersphere.commons.user.SessionUser; +import io.metersphere.commons.utils.SessionUtils; import io.metersphere.track.request.testcase.PlanCaseRelevanceRequest; import io.metersphere.track.request.testcase.QueryTestPlanRequest; import io.metersphere.track.dto.TestPlanDTO; @@ -33,6 +36,9 @@ public class TestPlanService { @Resource ExtTestPlanMapper extTestPlanMapper; + @Resource + ExtTestPlanTestCaseMapper extTestPlanTestCaseMapper; + @Resource TestCaseMapper testCaseMapper; @@ -132,4 +138,14 @@ public class TestPlanService { testPlanExample.createCriteria().andWorkspaceIdEqualTo(currentWorkspaceId); return testPlanMapper.selectByExample(testPlanExample); } + + public List listRelateAllPlan() { + SessionUser user = SessionUtils.getUser(); + QueryTestPlanRequest request = new QueryTestPlanRequest(); + request.setPrincipal(user.getId()); + request.setWorkspaceId(SessionUtils.getCurrentWorkspaceId()); + request.setWorkspaceId(SessionUtils.getCurrentWorkspaceId()); + request.setPlanIds(extTestPlanTestCaseMapper.findRelateTestPlanId(user.getId())); + return extTestPlanMapper.listRelate(request); + } } diff --git a/frontend/src/business/components/track/common/tableItems/plan/PlanStageTableItem.vue b/frontend/src/business/components/track/common/tableItems/plan/PlanStageTableItem.vue new file mode 100644 index 0000000000..7bfa553e2a --- /dev/null +++ b/frontend/src/business/components/track/common/tableItems/plan/PlanStageTableItem.vue @@ -0,0 +1,26 @@ + + + + + diff --git a/frontend/src/business/components/track/home/TrackHome.vue b/frontend/src/business/components/track/home/TrackHome.vue index 3e84da9852..e344ff0ffd 100644 --- a/frontend/src/business/components/track/home/TrackHome.vue +++ b/frontend/src/business/components/track/home/TrackHome.vue @@ -1,13 +1,32 @@ diff --git a/frontend/src/business/components/track/home/components/HomeBaseComponent.vue b/frontend/src/business/components/track/home/components/HomeBaseComponent.vue new file mode 100644 index 0000000000..0f309bb24b --- /dev/null +++ b/frontend/src/business/components/track/home/components/HomeBaseComponent.vue @@ -0,0 +1,34 @@ + + + + + diff --git a/frontend/src/business/components/track/home/components/PendingTestCaseList.vue b/frontend/src/business/components/track/home/components/PendingTestCaseList.vue new file mode 100644 index 0000000000..6c6b4d2bff --- /dev/null +++ b/frontend/src/business/components/track/home/components/PendingTestCaseList.vue @@ -0,0 +1,19 @@ + + + + + diff --git a/frontend/src/business/components/track/home/components/RecentTestCaseList.vue b/frontend/src/business/components/track/home/components/RecentTestCaseList.vue new file mode 100644 index 0000000000..802b58e38b --- /dev/null +++ b/frontend/src/business/components/track/home/components/RecentTestCaseList.vue @@ -0,0 +1,17 @@ + + + + + diff --git a/frontend/src/business/components/track/home/components/RelatedTestPlanList.vue b/frontend/src/business/components/track/home/components/RelatedTestPlanList.vue new file mode 100644 index 0000000000..c206163c3a --- /dev/null +++ b/frontend/src/business/components/track/home/components/RelatedTestPlanList.vue @@ -0,0 +1,100 @@ + + + + + diff --git a/frontend/src/business/components/track/plan/components/TestPlanList.vue b/frontend/src/business/components/track/plan/components/TestPlanList.vue index b93d91eda8..def87da4bb 100644 --- a/frontend/src/business/components/track/plan/components/TestPlanList.vue +++ b/frontend/src/business/components/track/plan/components/TestPlanList.vue @@ -34,12 +34,7 @@ :label="$t('test_track.plan.plan_stage')" show-overflow-tooltip>