| | |
| | | </div> |
| | | </div> |
| | | |
| | | <PopUpFrame :isOpen.sync="showDrawer" :drawerSize=" '95%' "> |
| | | <PopUpFrame :isOpen.sync="showDrawer"> |
| | | <div class="qaTextTitle mdTxt"> |
| | | <strong>想要詢問的問題</strong> |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | | import { Vue, Component, State, Action, Watch } from 'nuxt-property-decorator'; |
| | | import { Vue, Component, State, Action, Watch, namespace } from 'nuxt-property-decorator'; |
| | | import { addFavoriteConsultant, appointmentDemand, AppointmentParams, AppointmentRequests ,editAppointment,RegisterInfo } from '~/assets/ts/api/consultant'; |
| | | import { getRequestQuestionFromStorage, getRequestsFromStorage, removeRequestQuestionFromStorage, setRequestsToStorage } from '~/assets/ts/storageRequests'; |
| | | import _ from 'lodash'; |
| | | import { isLogin } from '~/assets/ts/auth'; |
| | | import { Consultant } from '~/assets/ts/models/consultant.model'; |
| | | import { ContactType } from '~/assets/ts/models/enum/ContactType'; |
| | | import { Gender } from '~/assets/ts/models/enum/Gender'; |
| | | import { Role } from '~/assets/ts/models/enum/Role'; |
| | | |
| | | const roleStorage = namespace('localStorage'); |
| | | @Component |
| | | export default class Questionnaire extends Vue { |
| | | @State('myConsultantList') myConsultantList!: Consultant[]; |
| | | @Action storeConsultantList!: () => Promise<number>; |
| | | @roleStorage.Getter currentRole!:string; |
| | | |
| | | genderOptions=[ |
| | | { |
| | |
| | | { |
| | | title:'41-50 歲', |
| | | label:'41-50' |
| | | }, |
| | | { |
| | | title:'46-55 歲', |
| | | label:'46-55', |
| | | }, |
| | | { |
| | | title:'51-60 歲', |
| | |
| | | |
| | | beforeRouteEnter(to: any, from: any, next: any) { |
| | | next(vm => { |
| | | if (from.name === 'login' && !isLogin()) { |
| | | if (from.name === 'login' && !vm.isLogin) { |
| | | vm.$router.go(-1); |
| | | return; |
| | | } |
| | | |
| | | if (!isLogin()) { |
| | | if (!vm.isLogin) { |
| | | vm.$router.push('/login'); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | async fetch() { |
| | | if (isLogin()) { |
| | | if (this.isLogin) { |
| | | await this.storeConsultantList(); |
| | | }; |
| | | } |
| | |
| | | } |
| | | |
| | | get isLogin() { |
| | | return isLogin(); |
| | | return this.currentRole === Role.USER; |
| | | } |
| | | |
| | | private isHopeContactTimeDone():boolean{ |
| | |
| | | //詳細問題drawer中間內容空間大小設置 |
| | | .qa-dialog{ |
| | | overflow-y:auto; |
| | | height: 500px; |
| | | height: 60vh; |
| | | margin-top: 20px; |
| | | } |
| | | |