route
This commit is contained in:
parent
ff3ec3ff15
commit
9e26edb62c
|
@ -82,6 +82,10 @@
|
|||
return;
|
||||
}
|
||||
|
||||
if (to.name !== 'editPerTest') {
|
||||
return;
|
||||
}
|
||||
|
||||
let testId = to.path.split('/')[4]; // find testId
|
||||
if (testId) {
|
||||
this.result = this.$get('/testplan/get/' + testId, response => {
|
||||
|
|
|
@ -218,8 +218,8 @@
|
|||
}
|
||||
},
|
||||
watch: {
|
||||
'$route'(to, from) {
|
||||
if (from.name !== 'createPerTest' && from.name !== 'editPerTest') {
|
||||
'$route'(to) {
|
||||
if (to.name !== 'createPerTest' && to.name !== 'editPerTest') {
|
||||
return;
|
||||
}
|
||||
let testId = to.path.split('/')[4];
|
||||
|
|
|
@ -131,8 +131,8 @@
|
|||
this.getResourcePools();
|
||||
},
|
||||
watch: {
|
||||
'$route'(to, from) {
|
||||
if (from.name !== 'createPerTest' && from.name !== 'editPerTest') {
|
||||
'$route'(to) {
|
||||
if (to.name !== 'createPerTest' && to.name !== 'editPerTest') {
|
||||
return;
|
||||
}
|
||||
let testId = to.path.split('/')[4];
|
||||
|
|
Loading…
Reference in New Issue