This commit is contained in:
熊成强 2020-11-23 17:02:22 +08:00
parent 4ee72425d7
commit 9e20a90811

View File

@ -24,7 +24,7 @@ import tryAuthority from './authority'
export default { export default {
data () { data () {
return { return {
activeIndex: '0' activeIndex: this.$route.query.activeIndex || '0'
} }
}, },
components: { components: {
@ -34,17 +34,19 @@ export default {
created () { created () {
if (this.auth.evaluationSet) { if (this.auth.evaluationSet) {
this.activeIndex = '0' this.activeIndex = '0'
} else if (this.auth.roleSet) { } else if (!this.auth.roleSet) {
this.activeIndex = '1' this.activeIndex = '1'
} else { } else {
this.activeIndex = '' this.activeIndex = ''
} }
if (this.auth.evaluationSet && this.auth.roleSet) this.activeIndex = this.$route.query.activeIndex
}, },
beforeMount () { }, beforeMount () { },
mounted () { }, mounted () { },
methods: { methods: {
handleSelect (key, keyPath) { handleSelect (key, keyPath) {
this.activeIndex = key this.activeIndex = key
this.$router.replace({name: 'set', query: {activeIndex: key}})
} }
}, },
watch: {} watch: {}