This commit is contained in:
Captain.B 2020-03-26 17:52:49 +08:00
parent ff3ec3ff15
commit 9e26edb62c
3 changed files with 8 additions and 4 deletions

View File

@ -82,6 +82,10 @@
return; return;
} }
if (to.name !== 'editPerTest') {
return;
}
let testId = to.path.split('/')[4]; // find testId let testId = to.path.split('/')[4]; // find testId
if (testId) { if (testId) {
this.result = this.$get('/testplan/get/' + testId, response => { this.result = this.$get('/testplan/get/' + testId, response => {

View File

@ -218,8 +218,8 @@
} }
}, },
watch: { watch: {
'$route'(to, from) { '$route'(to) {
if (from.name !== 'createPerTest' && from.name !== 'editPerTest') { if (to.name !== 'createPerTest' && to.name !== 'editPerTest') {
return; return;
} }
let testId = to.path.split('/')[4]; let testId = to.path.split('/')[4];

View File

@ -131,8 +131,8 @@
this.getResourcePools(); this.getResourcePools();
}, },
watch: { watch: {
'$route'(to, from) { '$route'(to) {
if (from.name !== 'createPerTest' && from.name !== 'editPerTest') { if (to.name !== 'createPerTest' && to.name !== 'editPerTest') {
return; return;
} }
let testId = to.path.split('/')[4]; let testId = to.path.split('/')[4];