| | |
| | | <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> |
| | |
| | | @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]; |
| | |
| | | featureLabel = '我的顧問清單'; |
| | | break; |
| | | case 'agentInfo': |
| | | featureLabel = '業務員資訊' |
| | | featureLabel = _.isEqual(this.currentRole,Role.ADMIN) ? '查看帳號資訊' : '業務員資訊' |
| | | break; |
| | | default: |
| | | featureLabel = '回首頁'; |
| | |
| | | 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> |