Merge remote-tracking branch 'origin/master'
| | |
| | | }; |
| | | |
| | | function showErrorMessageBox(error:any):void{ |
| | | // console.log('error', error, error.response); |
| | | if(!_.includes(notRequireInterceptorErrorUrl,error.config.url)){ |
| | | switch (error.response.status) { |
| | | case 401: |
| | | ErrorMessageBox('登入逾時').then(()=>{ |
| | | location.href='/'; |
| | | window.$nuxt.$store.commit('localStorage/storageClear'); |
| | | location.href='/'; |
| | | }); |
| | | break; |
| | | default: |
| | | ErrorMessageBox(); |
| | | ErrorMessageBox('', error); |
| | | break; |
| | | } |
| | | |
| | |
| | | import { MessageBox } from 'element-ui'; |
| | | import { MessageBoxData } from 'element-ui/types/message-box'; |
| | | |
| | | export default function ErrorMessageBox(errorMsg?:string):Promise<MessageBoxData>{ |
| | | export default function ErrorMessageBox(errorMsg?:string, errorObj?: any):Promise<MessageBoxData>{ |
| | | errorMsg && console.info('Error: ', errorMsg); |
| | | errorObj && console.error('Error Details: ', errorObj?.response || errorObj); |
| | | |
| | | return MessageBox({ |
| | | message: errorMsg ? errorMsg:'系統發生錯誤', |
| | | message: errorMsg |
| | | ? errorMsg |
| | | : `系統發生錯誤: ${errorObj?.response?.status} <p/><p/> ${errorObj?.response?.data?.detail}`, |
| | | dangerouslyUseHTMLString: true, |
| | | showClose:false, |
| | | showConfirmButton:true, |
| | | confirmButtonText:'確認', |
| | |
| | | } |
| | | } |
| | | pushRouterByLoginRole():void{ |
| | | const link = _.isEqual(this.currentRole,Role.ADMIN)? '/myAppointmentList/appointmentList':'/'; |
| | | this.$router.push(link); |
| | | this.$router.go(-1); |
| | | } |
| | | } |
| | | </script> |
| | |
| | | selected:false |
| | | }, |
| | | { |
| | | name:'防疫保單相關', |
| | | name:'分紅保單', |
| | | selected:false |
| | | } |
| | | ]; |
| | |
| | | @Component |
| | | export default class NavBar extends Vue { |
| | | @roleStorage.Mutation storageClear!: () => void; |
| | | @roleStorage.Mutation storageClearQuickFilter!: () => void; |
| | | @roleStorage.Mutation storageClearRecommendConsultant!: () => void; |
| | | @roleStorage.Getter idToken!: string | null; |
| | | @roleStorage.Getter currentRole!: string | null; |
| | | |
| | |
| | | // TODO: 僅OTP認證開發前 暫時使用 |
| | | fakeLogout(): void { |
| | | this.storageClear(); |
| | | this.storageClearQuickFilter(); |
| | | this.storageClearRecommendConsultant(); |
| | | _.isEqual(this.$route.name, 'index') ? location.reload() : this.$router.push('/'); |
| | | } |
| | | } |
| | |
| | | @Prop() isOpenQuestionPopUp!: boolean; |
| | | @Prop() confirmItem!: Selected[]; |
| | | |
| | | @Watch('isOpenQuestionPopUp') onPopUpChange() { |
| | | @Watch('isOpenQuestionPopUp', {immediate: true}) onPopUpChange() { |
| | | this.pickedItem = { |
| | | communicationStyles: this.communicationStyles, |
| | | status: '', |
| | |
| | | ]; |
| | | |
| | | quesAboutList = [ |
| | | { |
| | | title:'健康與保障', |
| | | content:'突發的意外或疾病,往往造成個人或家庭沉重的經濟負擔,周全的保險才能擁有一個無憂的未來。' |
| | | }, |
| | | { |
| | | title:'子女教育', |
| | | content:'利用分紅保單,規劃教育基金 提早為子女作準備,讓生活更有保障!' |
| | | }, |
| | | { |
| | | title:'資產規劃', |
| | | content:'當財務責任加重時,規劃充足的保障、提供經濟上的庇護,是人生最堅強的後盾。' |
| | | }, |
| | | { |
| | | title:'樂活退休', |
| | | content:'兼具保險與投資雙重功能,可靈活搭配各種附約,順應人生不同階段的靈活需要。' |
| | | }, |
| | | { |
| | | title:'保單健檢/規劃', |
| | | content:'全面檢視自己的保障結構是否符合現在或未來的風險移轉需求,透過「斷、捨、離」把錢花在刀口上。' |
| | | }, |
| | | { |
| | | title:'防疫保單', |
| | | content:'匹配度是透過嚴選配對或快速篩選後,將每一位保險顧問資料進行比對後排序推薦給您的媒合數值,您可以作為選擇適合顧問的參考值。' |
| | | } |
| | | { |
| | | title:'健康與保障', |
| | | content:'唯有把身體照顧好,才是保障幸福之本,不做盲目燃燒的蠟燭,只做綻開的陽光,陪孩子多走一哩路,人生的美正要開展。' |
| | | }, |
| | | { |
| | | title:'子女教育', |
| | | content:'孩子,我們是雙方的導師也是學生,面對未來要並肩作戰,學會勇敢無畏、克服挫折、善於理財,這條路上我們一起學。' |
| | | }, |
| | | { |
| | | title:'資產規劃', |
| | | content:'真正的財富來自嚴謹規劃資產傳承,為人生蓋一堵抵禦財務風險的牆,確保資產穩健成長,替全家族的未來做好萬全準備。' |
| | | }, |
| | | { |
| | | title:'樂活退休', |
| | | content:'拼一輩子,退休後的日子要輕鬆快活,就得提早透過保險商品規劃退休財務,替自己創造穩定收入,為精彩的熟年人生揭開序幕。' |
| | | }, |
| | | { |
| | | title:'保單健檢/規劃', |
| | | content:'全面檢視自己的保障結構是否符合現在或未來的風險移轉需求。' |
| | | }, |
| | | { |
| | | title:'分紅保單', |
| | | content:'分紅保單 分紅保單是兼具「分攤風險」與「紅利共享」特色的保單,具有一定穩定度,讓你可以同時享有壽險保障及紅利!' |
| | | } |
| | | ]; |
| | | |
| | | myRequest: AppointmentRequests = { |
| | |
| | | } |
| | | |
| | | </style> |
| | | |
| | |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | | import { Vue, Component } from 'nuxt-property-decorator'; |
| | | import { Vue, Component, namespace } from 'nuxt-property-decorator'; |
| | | import { Consultants, FastQueryParams } from '~/assets/ts/api/consultant'; |
| | | import { Selected } from '~/components/QuickFilter/QuickFilterSelector.vue'; |
| | | import { fastQuery } from '~/assets/ts/api/consultant'; |
| | | |
| | | const localStorage = namespace('localStorage'); |
| | | @Component |
| | | export default class QuickFilter extends Vue { |
| | | @localStorage.Mutation storageQuickFilter!: (token: string) => void; |
| | | @localStorage.Getter quickFilterSelectedData!: Selected[]; |
| | | |
| | | isOpenQuestionPopUp = false; |
| | | consultantList: Consultants[] = []; |
| | | questionOption = {}; |
| | |
| | | // type: 'radio' |
| | | // } |
| | | ]; |
| | | |
| | | mounted() { |
| | | if (this.quickFilterSelectedData && this.quickFilterSelectedData.length > 0) { |
| | | this.confirmItem = this.quickFilterSelectedData; |
| | | this.getRecommendList(); |
| | | } |
| | | } |
| | | |
| | | gender(): string { |
| | | const filter = this.confirmItem.filter(item => item.option === 'gender').map(i => i.value); |
| | |
| | | status: '' |
| | | } |
| | | |
| | | fastQuery(data).then((res) => this.consultantList = res.data) |
| | | fastQuery(data).then((res) => { |
| | | this.consultantList = res.data; |
| | | this.storageQuickFilter(JSON.stringify(this.confirmItem)) |
| | | }) |
| | | } |
| | | |
| | | } |
| | |
| | | import { |
| | | Vue, |
| | | Component, |
| | | Mutation |
| | | Mutation, |
| | | namespace |
| | | } from 'nuxt-property-decorator'; |
| | | import {strictQuery} from '~/assets/ts/api/consultant'; |
| | | import * as _ from 'lodash'; |
| | | import { strictQuery } from '~/assets/ts/api/consultant'; |
| | | |
| | | const localStorage = namespace('localStorage'); |
| | | |
| | | @Component |
| | | export default class RecommendConsultant extends Vue { |
| | | isVisiblePopUp = false; |
| | | strictQueryDto={ |
| | | strictQueryDto: StrictQueryDto ={ |
| | | gender:'', |
| | | area:'', |
| | | status:'', |
| | | requirements:[], |
| | | requirements: [], |
| | | otherRequirement:'', |
| | | seniority:'', |
| | | avgScore:0, |
| | | popularTags:[], |
| | | popularTags: [], |
| | | otherPopularTags:'', |
| | | }; |
| | | genderOptions=[ |
| | |
| | | queaAboutList = [ |
| | | { |
| | | title: '健康與保障', |
| | | content: '突發的意外或疾病,往往造成個人或家庭沉重的經濟負擔,周全的保險才能擁有一個無憂的未來。' |
| | | content: '唯有把身體照顧好,才是保障幸福之本,不做盲目燃燒的蠟燭,只做綻開的陽光,陪孩子多走一哩路,人生的美正要開展。' |
| | | }, |
| | | { |
| | | title: '子女教育', |
| | | content: '利用分紅保單,規劃教育基金 提早為子女作準備,讓生活更有保障!' |
| | | content: '孩子,我們是雙方的導師也是學生,面對未來要並肩作戰,學會勇敢無畏、克服挫折、善於理財,這條路上我們一起學。' |
| | | }, |
| | | { |
| | | title: '資產規劃', |
| | | content: '當財務責任加重時,規劃充足的保障、提供經濟上的庇護,是人生最堅強的後盾。' |
| | | content: '真正的財富來自嚴謹規劃資產傳承,為人生蓋一堵抵禦財務風險的牆,確保資產穩健成長,替全家族的未來做好萬全準備。' |
| | | }, |
| | | { |
| | | title: '樂活退休', |
| | | content: '兼具保險與投資雙重功能,可靈活搭配各種附約,順應人生不同階段的靈活需要。' |
| | | content: '拼一輩子,退休後的日子要輕鬆快活,就得提早透過保險商品規劃退休財務,替自己創造穩定收入,為精彩的熟年人生揭開序幕。' |
| | | }, |
| | | { |
| | | title: '保單健檢/規劃', |
| | | content: '全面檢視自己的保障結構是否符合現在或未來的風險移轉需求,透過「斷、捨、離」把錢花在刀口上。' |
| | | content: '全面檢視自己的保障結構是否符合現在或未來的風險移轉需求。' |
| | | }, |
| | | { |
| | | title: '防疫保單', |
| | | content: '匹配度是透過嚴選配對或快速篩選後,將每一位保險顧問資料進行比對後排序推薦給您的媒合數值,您可以作為選擇適合顧問的參考值。' |
| | | }, |
| | | { |
| | | title: '其他', |
| | | content: '匹配度是透過嚴選配對或快速篩選後,將每一位保險顧問資料進行比對後排序推薦給您的媒合數值,您可以作為選擇適合顧問的參考值。' |
| | | }, |
| | | title: '分紅保單', |
| | | content: '分紅保單 分紅保單是兼具「分攤風險」與「紅利共享」特色的保單,具有一定穩定度,讓你可以同時享有壽險保障及紅利!' |
| | | } |
| | | ]; |
| | | showDialog = false; |
| | | showAddress = false; |
| | | |
| | | @Mutation updateStrictQueryList!: (data: any) => void; |
| | | @localStorage.Mutation storageRecommendConsultant!: (data: any) => void; |
| | | @localStorage.State recommendConsultantItem!: string; |
| | | |
| | | mounted() { |
| | | if (!!this.recommendConsultantItem) { |
| | | this.strictQueryDto = JSON.parse(this.recommendConsultantItem); |
| | | } |
| | | } |
| | | makePair():void{ |
| | | strictQuery(this.strictQueryDto).then(res=>{ |
| | | console.log('resultData',res.data); |
| | | this.storageRecommendConsultant(JSON.stringify(this.strictQueryDto)); |
| | | this.updateStrictQueryList(res.data); |
| | | if (res.data.length === 0) { |
| | | this.isVisiblePopUp = true; |
| | |
| | | } |
| | | get notFinishByRequireRules():boolean{ |
| | | const area = this.strictQueryDto.area; |
| | | const requirementLength = this.strictQueryDto.requirements.length; |
| | | const requirementLength = this.strictQueryDto.requirements |
| | | ? this.strictQueryDto.requirements.length |
| | | : 0; |
| | | return !(area && requirementLength >0) |
| | | } |
| | | |
| | |
| | | MALE="male", |
| | | FEMALE="female", |
| | | } |
| | | |
| | | export interface StrictQueryDto { |
| | | gender: string, |
| | | area: string, |
| | | status: string, |
| | | requirements: string[], |
| | | otherRequirement: string, |
| | | seniority: string, |
| | | avgScore: number, |
| | | popularTags: string[], |
| | | otherPopularTags: string |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" > |
| | | <style lang="scss"> |
| | | |
| | | .pam-rec-cosultant-page { |
| | | .rec-pop-container{ |
| | |
| | | overflow-y: auto; |
| | | height: 500px; |
| | | margin-top: 20px; |
| | | text-align: justify; |
| | | } |
| | | |
| | | .qaTextTitle { |
| | |
| | | flex-wrap: wrap; |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | import { Selected } from '~/components/QuickFilter/QuickFilterSelector.vue'; |
| | | import { Module, Mutation, VuexModule } from 'vuex-module-decorators'; |
| | | |
| | | @Module |
| | | export default class LocalStorage extends VuexModule { |
| | | id_token = localStorage.getItem('id_token'); |
| | | role_State= localStorage.getItem('current_role'); |
| | | quickFilterSelectedItem = localStorage.getItem('quickFilter'); |
| | | recommendConsultantItem = localStorage.getItem('recommendConsultantItem'); |
| | | |
| | | get idToken(): string|null { |
| | | return this.id_token; |
| | |
| | | get currentRole(): string|null { |
| | | return this.role_State; |
| | | }; |
| | | |
| | | get quickFilterSelectedData(): Selected[] { |
| | | return JSON.parse(this.quickFilterSelectedItem || '[]') as Selected[]; |
| | | } |
| | | |
| | | @Mutation storageIdToken(token: string): void { |
| | | localStorage.setItem('id_token', token); |
| | |
| | | this.role_State = localStorage.getItem('current_role'); |
| | | }; |
| | | |
| | | @Mutation storageQuickFilter(selected: string): void { |
| | | localStorage.setItem('quickFilter', selected); |
| | | this.quickFilterSelectedItem = localStorage.getItem('quickFilter'); |
| | | }; |
| | | |
| | | @Mutation storageRecommendConsultant(selected: string): void { |
| | | localStorage.setItem('recommendConsultantItem', selected); |
| | | this.recommendConsultantItem = localStorage.getItem('recommendConsultantItem'); |
| | | } |
| | | |
| | | @Mutation storageClear(): void { |
| | | localStorage.removeItem('userInfo') |
| | | localStorage.removeItem('id_token'); |
| | |
| | | this.id_token = localStorage.getItem('id_token'); |
| | | this.role_State = localStorage.getItem('current_role'); |
| | | } |
| | | |
| | | @Mutation storageClearQuickFilter() { |
| | | localStorage.removeItem('quickFilter'); |
| | | this.quickFilterSelectedItem = localStorage.getItem('quickFilter'); |
| | | } |
| | | |
| | | @Mutation storageClearRecommendConsultant() { |
| | | localStorage.removeItem('recommendConsultantItem'); |
| | | this.recommendConsultantItem = localStorage.getItem('recommendConsultantItem'); |
| | | } |
| | | |
| | | } |