diff --git a/frontend/src/business/components/track/case/TestCase.vue b/frontend/src/business/components/track/case/TestCase.vue index 13e194f2f5c1bc38622e9e027bc9f72e52a095bc..4fc8131eb78e26b012f34247735ac3fc66257fd6 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 c4602698eeed648aefd8e8d09952faa45e7d851e..433e9e364327dfe2d5535b1c15ca4c3642b57cac 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(); }); } },