fix(测试跟踪): 切换工作空间后最近计划列表数据未更新

This commit is contained in:
shiziyuan9527 2021-04-22 16:54:35 +08:00 committed by 刘瑞斌
parent e968eeac46
commit cda0f5b969
3 changed files with 6 additions and 6 deletions

View File

@ -70,10 +70,10 @@ public class TestPlanController {
return testPlanService.listRelateAllPlan(); return testPlanService.listRelateAllPlan();
} }
@GetMapping("recent/{count}") @GetMapping("recent/{count}/{id}")
public List<TestPlan> recentTestPlans(@PathVariable int count) { public List<TestPlan> recentTestPlans(@PathVariable("count") int count, @PathVariable("id") String projectId) {
PageHelper.startPage(1, count, true); PageHelper.startPage(1, count, true);
return testPlanService.recentTestPlans(); return testPlanService.recentTestPlans(projectId);
} }
@PostMapping("/get/{testPlanId}") @PostMapping("/get/{testPlanId}")

View File

@ -562,8 +562,8 @@ public class TestPlanService {
} }
} }
public List<TestPlan> recentTestPlans() { public List<TestPlan> recentTestPlans(String projectId) {
return extTestPlanMapper.listRecent(SessionUtils.getUserId(), SessionUtils.getCurrentProjectId()); return extTestPlanMapper.listRecent(SessionUtils.getUserId(), projectId);
} }
public List<TestPlan> listTestAllPlan(String currentWorkspaceId) { public List<TestPlan> listTestAllPlan(String currentWorkspaceId) {

View File

@ -101,7 +101,7 @@ export default {
}, },
planRecent: { planRecent: {
title: this.$t('test_track.recent_plan'), title: this.$t('test_track.recent_plan'),
url: "/test/plan/recent/5", url: this.$store.state.projectId === '' ? "/test/plan/recent/5/" + undefined : "/test/plan/recent/5/" + this.$store.state.projectId,
index: function (item) { index: function (item) {
return '/track/plan/view/' + item.id; return '/track/plan/view/' + item.id;
}, },