From 9e20a90811ef633bfabeea45ed684ada9522afec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=86=8A=E6=88=90=E5=BC=BA?= Date: Mon, 23 Nov 2020 17:02:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/kpi/set/index.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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: {}