更新最近计划

This commit is contained in:
chenjianxing 2020-05-09 10:44:15 +08:00
parent e20f091f7a
commit 366ae5e95c
2 changed files with 15 additions and 5 deletions

View File

@ -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') {

View File

@ -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();
});
}
},