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