update: 顧問-登入後將顧問細節設定到 store, 供預約單的發送約訪通知時使用
| | |
| | | |
| | | <el-input |
| | | type="textarea" |
| | | autosize="true" |
| | | :autosize="true" |
| | | placeholder="ç´è¨ªéç¥" |
| | | resize="none" |
| | | v-model="isInterviewTxt"> |
| | |
| | | </div> |
| | | </template> |
| | | <script lang="ts"> |
| | | import { Vue, Component, Prop, PropSync, Emit, Action } from 'nuxt-property-decorator'; |
| | | import { Vue, Component, Prop, PropSync, Emit, Action, namespace } from 'nuxt-property-decorator'; |
| | | |
| | | import appointmentService from '~/shared/services/appointment.service'; |
| | | import { Appointment, ToInformAppointment } from '~/shared/models/appointment.model'; |
| | | import { AgentInfo } from '~/shared/models/agent-info.model'; |
| | | |
| | | const loginStore = namespace('login.store'); |
| | | |
| | | @Component |
| | | export default class InterviewMsg extends Vue { |
| | |
| | | closeDialog() { |
| | | return; |
| | | } |
| | | |
| | | @loginStore.State |
| | | loginConsultant!: AgentInfo; |
| | | |
| | | isShowSuccessAlert = false; |
| | | |
| | |
| | | } |
| | | |
| | | get isInterviewTxt() : string{ |
| | | return this.interviewTxt = "æ¨å¥½ï¼ææ¯ä¿èª åªåå¹³å°çä¿éªé¡§å" + "agentName"+"ï¼æè¬æ¨çé ç´ï¼æé è¨æå¨ä¸è¿°çæéèæ¨è¯ç¹«"+"\n"+"以䏿¯æçé»è©±è碼/Emailï¼"+"\n"+"agentPhone"+"\n"+"agentEmail"+"\n"+"è¥æ¤æé䏿¹ä¾¿ï¼è«èæè¯ç¹«ï¼è¬è¬ï¼" |
| | | return this.interviewTxt = "æ¨å¥½ï¼ææ¯ä¿èª åªåå¹³å°çä¿éªé¡§å" + this.loginConsultant.name + "ï¼æè¬æ¨çé ç´ï¼æé è¨æå¨ä¸è¿°çæéèæ¨è¯ç¹«"+"\n"+"以䏿¯æçé»è©±è碼/Emailï¼"+"\n" + this.loginConsultant.phoneNumber + "\n" + this.loginConsultant.email + "\n"+"è¥æ¤æé䏿¹ä¾¿ï¼è«èæè¯ç¹«ï¼è¬è¬ï¼" |
| | | } |
| | | |
| | | } |
| | |
| | | import { Role } from '~/shared/models/enum/Role'; |
| | | import messageBoxService from '~/shared/services/message-box.service'; |
| | | import loginService from '~/shared/services/login.service' |
| | | import { AgentInfo } from '~/shared/models/agent-info.model'; |
| | | |
| | | const loginStore = namespace('login.store'); |
| | | const roleStorage = namespace('localStorage'); |
| | | |
| | | @Component({ |
| | | layout: 'home' |
| | | }) |
| | |
| | | |
| | | @roleStorage.Mutation |
| | | storageConsultantId!:(id:string) => void; |
| | | |
| | | @loginStore.Action |
| | | getLoginConsultantDetail!: (agentNo: string) => Promise<AgentInfo>; |
| | | |
| | | consultantDto = { |
| | | password: '', |
| | |
| | | private verify():void{ |
| | | loginService.getVerificationStatus(this.verificationCode).then( verifySuccess => { |
| | | if(verifySuccess.data){ |
| | | this.loginWithConsultant() |
| | | this.loginWithConsultant(); |
| | | }else{ |
| | | this.clearValue(); |
| | | this.regenerateImgOfVerification(); |
| | |
| | | |
| | | private loginWithConsultant(): void { |
| | | loginService.logInToConsultant(this.consultantDto).then(res => { |
| | | this.getLoginConsultantDetail(this.consultantDto.username); |
| | | this.storageIdToken(res.data.id_token); |
| | | this.storageRole(Role.ADMIN); |
| | | this.storageConsultantId(this.consultantDto.username) |
| | |
| | | export interface AgentInfo { |
| | | name : string; |
| | | agentNo : string; |
| | | role : string; |
| | | img : string; |
| | | avgScore : number; |
| | | title : string; |
| | | phoneNumber : string; |
| | | serveArea : string; |
| | | companyAddress : string; |
| | | latestLoginTime : Date ; |
| | | seniority : string; |
| | | suitability : number; |
| | | evaluation : number; |
| | | expertise : string[]; |
| | | concept : string; |
| | | experiences : string; |
| | | awards : string; |
| | | gender : string, |
| | | agentNo : string; |
| | | avgScore : number; |
| | | awards : string; |
| | | communicationStyle: string; |
| | | companyAddress : string; |
| | | concept : string; |
| | | email? : string; |
| | | evaluation : number; |
| | | experiences : string; |
| | | expertise : string[]; |
| | | gender : string, |
| | | img : string; |
| | | latestLoginTime : Date ; |
| | | name : string; |
| | | phoneNumber : string; |
| | | role : string; |
| | | seniority : string; |
| | | serveArea : string; |
| | | suitability : number; |
| | | title : string; |
| | | } |
| | |
| | | localStorage.removeItem('current_role'); |
| | | localStorage.removeItem('consultant_id'); |
| | | localStorage.removeItem('appointment'); |
| | | localStorage.removeItem('login_consultant'); |
| | | this.id_token = localStorage.getItem('id_token'); |
| | | this.current_role = localStorage.getItem('current_role'); |
| | | this.consultant_id = localStorage.getItem('consultant_id'); |
¤ñ¹ï·sÀÉ®× |
| | |
| | | import { Module, VuexModule, Mutation, Action } from 'vuex-module-decorators' |
| | | |
| | | import myConsultantService from '~/shared/services/my-consultant.service'; |
| | | import { AgentInfo } from '~/shared/models/agent-info.model'; |
| | | |
| | | @Module |
| | | export default class AppointmentStore extends VuexModule { |
| | | |
| | | loginConsultant?: AgentInfo = JSON.parse(localStorage.getItem('login_consultant')!); |
| | | |
| | | ////////////////////////////////////////////////////////////////////// |
| | | |
| | | ////////////////////////////////////////////////////////////////////// |
| | | |
| | | @Mutation |
| | | SET_LOGIN_CONSULTANT(agentInfo: AgentInfo): void { |
| | | this.loginConsultant = agentInfo; |
| | | localStorage.setItem('login_consultant', JSON.stringify(agentInfo)); |
| | | } |
| | | |
| | | ////////////////////////////////////////////////////////////////////// |
| | | |
| | | @Action({ commit: 'SET_LOGIN_CONSULTANT' }) |
| | | async getLoginConsultantDetail(agentNo: string): Promise<AgentInfo> { |
| | | return await myConsultantService.getConsultantDetail(agentNo).then((res) => res); |
| | | } |
| | | |
| | | } |