diff --git a/frontend/src/business/components/track/case/TestCase.vue b/frontend/src/business/components/track/case/TestCase.vue index 13e194f2f5..4fc8131eb7 100644 --- a/frontend/src/business/components/track/case/TestCase.vue +++ b/frontend/src/business/components/track/case/TestCase.vue @@ -117,7 +117,7 @@ } } if (!hasCurrentProject) { - this.currentProject = null; + this.setCurrentProject(this.projects[0]); } } else { if(this.projects.length > 0){ @@ -189,6 +189,7 @@ this.$get('/project/get/' + id, response => { let project = response.data; this.setCurrentProject(project); + this.$router.push('/track/case/all'); }); } if (id === 'all') { diff --git a/frontend/src/business/components/track/plan/view/comonents/TestPlanTestCaseList.vue b/frontend/src/business/components/track/plan/view/comonents/TestPlanTestCaseList.vue index c4602698ee..433e9e3643 100644 --- a/frontend/src/business/components/track/plan/view/comonents/TestPlanTestCaseList.vue +++ b/frontend/src/business/components/track/plan/view/comonents/TestPlanTestCaseList.vue @@ -195,16 +195,14 @@ }, watch: { planId() { - this.getTestPlanById(); - this.initTableData(); + this.refreshTableAndPlan(); }, selectNodeIds() { this.search(); } }, mounted() { - this.getTestPlanById(); - this.initTableData(); + this.refreshTableAndPlan(); }, methods: { initTableData() { @@ -224,6 +222,16 @@ this.selectIds.clear(); this.$emit('refresh'); }, + refreshTableAndPlan() { + this.getTestPlanById(); + this.initTableData(); + }, + refreshTestPlanRecent() { + let param = {}; + param.id = this.planId; + param.updateTime = Date.now(); + this.$post('/test/plan/edit', param); + }, search() { this.initTableData(); }, @@ -298,6 +306,7 @@ if (this.planId) { this.$post('/test/plan/get/' + this.planId, {}, response => { this.testPlan = response.data; + this.refreshTestPlanRecent(); }); } },