From 3b2586dc9499e16919a8a333b3b78c2ca792d416 Mon Sep 17 00:00:00 2001 From: Tomas <tomasysh@gmail.com> Date: 星期五, 10 十二月 2021 10:05:38 +0800 Subject: [PATCH] fixed: Consultant 型別錯誤 --- PAMapp/components/BackActionBar.vue | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/PAMapp/components/BackActionBar.vue b/PAMapp/components/BackActionBar.vue index a57cb21..83d03bb 100644 --- a/PAMapp/components/BackActionBar.vue +++ b/PAMapp/components/BackActionBar.vue @@ -1,6 +1,6 @@ <template> <nav class="pam-back-action-bar fix-chrome-click--issue"> - <a @click="pushRouterByLoginRole"> + <a @click="pushRouterByLoginRole" v-if="questionnaireState"> <i class="icon-left "></i>{{ label }} </a> </nav> @@ -16,6 +16,7 @@ @Component export default class UiCarousel extends Vue { @roleStorage.Getter currentRole!:string; + questionnaireState: boolean = true; get label(): string { if (this.$route.name) { const routeName = this.$route.name.split('-')[0]; @@ -34,7 +35,7 @@ featureLabel = '���“���'; break; case 'agentInfo': - featureLabel = '璆剖�鞈��' + featureLabel = _.isEqual(this.currentRole,Role.ADMIN) ? '���董�����' : '璆剖�鞈��' break; default: featureLabel = '�����'; @@ -60,8 +61,14 @@ return '�����'; } } + pushRouterByLoginRole():void{ - this.$router.go(-1); + const pathName = this.$route.name; + pathName?.includes('myConsultantList') ? this.$router.push('/') : this.$router.go(-1); + } + + set label(value) { + this.questionnaireState = value === '�脰����' ? this.currentRole === Role.USER : true; } } </script> -- Gitblit v1.8.0