设置
逻辑判断
This commit is contained in:
parent
00df0b006b
commit
5bcc8bf019
@ -48,15 +48,37 @@ export default {
|
||||
tryTarget
|
||||
},
|
||||
created () {
|
||||
const index = this.$route.query.activeIndex
|
||||
switch (index) {
|
||||
case '0':
|
||||
if (this.auth.evaluationSet) {
|
||||
this.activeIndex = '0'
|
||||
} else if (!this.auth.roleSet) {
|
||||
this.activeIndex = '1'
|
||||
} else if (!this.auth.setIndicatrix) {
|
||||
this.activeIndex = '2'
|
||||
} else {
|
||||
this.activeIndex = '0'
|
||||
}
|
||||
break
|
||||
case '1':
|
||||
if (this.auth.roleSet) {
|
||||
this.activeIndex = '1'
|
||||
}
|
||||
break
|
||||
case '2':
|
||||
if (this.auth.setIndicatrix) {
|
||||
this.activeIndex = '2'
|
||||
}
|
||||
break
|
||||
default:
|
||||
console.log('错误***************************')
|
||||
this.activeIndex = '0'
|
||||
break
|
||||
}
|
||||
// } else if (this.auth.evaluationSet) {
|
||||
// this.activeIndex = '0'
|
||||
// } else if (!this.auth.roleSet) {
|
||||
// this.activeIndex = '1'
|
||||
// } else if (!this.auth.setIndicatrix) {
|
||||
// this.activeIndex = '2'
|
||||
// } else {
|
||||
// this.activeIndex = '0'
|
||||
// }
|
||||
if (this.auth.evaluationSet && this.auth.roleSet && this.auth.setIndicatrix) {
|
||||
this.activeIndex = this.$route.query.activeIndex || '0'
|
||||
}
|
||||
@ -65,9 +87,11 @@ export default {
|
||||
mounted () { },
|
||||
methods: {
|
||||
handleSelect (key, keyPath) {
|
||||
if (this.activeIndex !== key || !this.$route.query.activeIndex) {
|
||||
this.activeIndex = key
|
||||
this.$router.replace({ name: 'set', query: { activeIndex: key } })
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user