保誠-保戶業務員媒合平台
Tomas
2021-12-08 5730601f103ea285d129bf3d89acd649e86c114a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import {Vue,Component, State, namespace, Action} from 'nuxt-property-decorator';
import { AgentOfStrictQuery } from '~/assets/ts/api/consultant';
 
const localStorage = namespace('localStorage');
 
@Component
export default class RecommendConsultantResult extends Vue{
    @State('strictQueryList') strictQueryList!: AgentOfStrictQuery[];
    @Action storeStrictQueryList!: (data: any) => Promise<number>;
    @localStorage.State recommendConsultantItem!: string;
 
    pageList: any[] = [];
    isVisiblePopUp = false;
    popUpTxt = '';
    mounted() {
        if (this.recommendConsultantItem && this.strictQueryList.length === 0) {
            const strictQueryDto = JSON.parse(this.recommendConsultantItem);
            this.storeStrictQueryList(strictQueryDto);
        }
    }
 
    changePage(pageList: any[]) {
        this.pageList = pageList;
    }
    showAgentDetail(agentNo: string): void {
        this.$router.push(`/agentInfo/${agentNo}`);
    }
    openPopUp(txt: string) {
        this.popUpTxt = txt;
        this.isVisiblePopUp = true;
    }
}