保誠-保戶業務員媒合平台
Tomas
2021-12-14 90875849eb280eb8eb68331698b573aa44dd4eaa
Merge branch 'master' of ssh://192.168.0.10:29418/pcalife/PAM
修改11個檔案
新增2個檔案
289 ■■■■ 已變更過的檔案
PAMapp/assets/ts/api/consultant.ts 10 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/assets/ts/const/quickFilter-questionList.ts 36 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/assets/ts/models/quickFilter.model.ts 24 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/components/Consultant/ConsultantCard.vue 18 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/components/QuickFilter/QuickFilterConsultantList.vue 17 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/components/QuickFilter/QuickFilterSelector.vue 13 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/components/careerSelect.vue 4 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/components/phoneContactTimePicker.vue 28 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/pages/login/index.vue 18 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/pages/questionnaire/_agentNo.vue 10 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/pages/quickFilter/index.vue 107 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/pages/recommendConsultant/index.vue 2 ●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/store/localStorage.ts 2 ●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/assets/ts/api/consultant.ts
@@ -5,6 +5,7 @@
import { UserSetting } from '../models/account.model';
import { Consultant } from '~/assets/ts/models/consultant.model';
import { http } from '../services/httpClient';
import { FastQueryParams } from '../models/quickFilter.model';
// é¡§å®¢ç™»å…¥(TODO: OTP認證開發前 æš«æ™‚使用)
export function login(user: any) {
@@ -34,7 +35,7 @@
// å¿«é€Ÿç¯©é¸
export function fastQuery(data: FastQueryParams) {
    return http.post('/consultant/fastQuery', data)
    return http.post<Consultant[]>('/consultant/fastQuery', data).then(res => res.data);
}
// åš´é¸é…å°
@@ -138,13 +139,6 @@
        Authorization: 'Bearer ' + localStorage.getItem('id_token')
    }
    return http.put('/appointment', editAppointmentParams, {headers});
}
export interface FastQueryParams {
    gender             : string,
    communicationStyles: string[],
    avgScore           : number,
    status             : string
}
export interface AppointmentRequests {
PAMapp/assets/ts/const/quickFilter-questionList.ts
¤ñ¹ï·sÀÉ®×
@@ -0,0 +1,36 @@
import { QuestionOption } from "../models/quickFilter.model";
export const questionList: QuestionOption[] = [
    {
        name: 'gender',
        title: '顧問性別',
        detail: [
            { name: '男性', value: 'male', className: 'btn_man'},
            { name: '女性', value: 'female', className: 'btn_woman'}
        ],
        type: 'radio'
    },
    // { TODO:隱藏滿意度
    //     name: 'avgScore',
    //     title: '顧問滿意度',
    //     detail: [],
    //     type: ''
    // },
    {
        name: 'communicationStyles',
        title: '溝通風格',
        detail: [
            { value: '謹慎務實', className: 'btn_owl'},
            { value: '明快主動', className: 'btn_tiger'},
            { value: '耐心傾聽', className: 'btn_koala'},
            { value: '健談風趣', className: 'btn_peacock'}
        ],
        type: 'checkbox'
    },
    // {
    //     name: 'status',
    //     title: '上線狀態',
    //     detail: [],
    //     type: 'radio'
    // }
];
PAMapp/assets/ts/models/quickFilter.model.ts
¤ñ¹ï·sÀÉ®×
@@ -0,0 +1,24 @@
export interface QuestionOption {
    title: string;
    detail: Detail[];
    type: string;
    name: string;
}
interface Detail {
    value: string;
    name?: string;
    className: string;
}
export interface FastQueryParams {
    gender             : string,
    communicationStyles: string[],
    avgScore           : number,
    status             : string
}
export interface Selected {
    option: string;
    value: any;
}
PAMapp/components/Consultant/ConsultantCard.vue
@@ -75,14 +75,14 @@
                        :key="index"
                    >連絡時段{{index + 1 | formatNumber}}:{{ item | formatHopeContactTime }}</p>
                    <div v-if="appointmentDetail.satisfactionScore">
                      <div class="mdTxt mt-10 mb-10">滿意度</div>
                      <el-rate
                      :value="appointmentDetail.satisfactionScore"
                      class="pam-myDemand-dialog__rate"
                      disabled>
                      </el-rate>
                        <div class="mdTxt mt-10 mb-10">滿意度</div>
                        <el-rate
                        :value="appointmentDetail.satisfactionScore"
                        class="pam-myDemand-dialog__rate"
                        disabled>
                        </el-rate>
                    </div>
                  </div>
                </div>
                <div v-if="agentInfo.contactStatus === 'contacted'
                        && !appointmentDetail.satisfactionScore" class="dialogInfo-btn">
@@ -115,8 +115,8 @@
        <PopUpFrame :isOpen.sync="isCancelPopup">
            <div class="text--center mdTxt">是否取消此筆預約?</div>
            <div class="text--center mt-30">
                <el-button @click="isCancelPopup = false">取消</el-button>
                <el-button @click="cancel" type="primary">確定</el-button>
                <el-button @click="isCancelPopup = false">否</el-button>
                <el-button @click="cancel" type="primary">是</el-button>
            </div>
        </PopUpFrame>
PAMapp/components/QuickFilter/QuickFilterConsultantList.vue
@@ -96,6 +96,15 @@
    endYPosition = 0;
    hideReviews = hideReviews ;
    openPopUp(txt: string) {
        this.popUpTxt = txt;
        this.isVisiblePopUp = true;
    }
    showAgentDetail(agentNo: string): void {
        this.$router.push(`/agentInfo/${agentNo}`);
    }
    moveStart(event: TouchEvent) {
        this.startPosition = event.changedTouches[0].clientX;
        this.startYPosition = event.changedTouches[0].clientY;
@@ -124,14 +133,6 @@
        (this.$refs.carouselRef as ElCarousel).prev();
    }
    openPopUp(txt: string) {
        this.popUpTxt = txt;
        this.isVisiblePopUp = true;
    }
    showAgentDetail(agentNo: string): void {
        this.$router.push(`/agentInfo/${agentNo}`);
    }
}
</script>
PAMapp/components/QuickFilter/QuickFilterSelector.vue
@@ -66,13 +66,10 @@
<script lang="ts">
import { Vue, Component, Prop, Watch, Emit } from 'nuxt-property-decorator';
import { FastQueryParams } from '~/assets/ts/api/consultant';
import { QuestionOption } from '~/pages/quickFilter/index.vue';
import { hideReviews } from '~/assets/ts/const/hide-reviews';
import { FastQueryParams, QuestionOption, Selected } from '~/assets/ts/models/quickFilter.model';
@Component
export default class QuickFilterDrawer extends Vue {
    pickedItem: FastQueryParams = {
        communicationStyles: [],
        status: '',
@@ -80,7 +77,7 @@
        avgScore: 0
    }
    hideReviews = hideReviews ;
    @Prop() questionOption!: QuestionOption;
    @Prop() isOpenQuestionPopUp!: boolean;
    @Prop() confirmItem!: Selected[];
@@ -131,12 +128,6 @@
            value: this.pickedItem[name]
        }
    }
}
export interface Selected {
    option: string;
    value: any;
}
</script>
PAMapp/components/careerSelect.vue
@@ -1,6 +1,6 @@
<template>
  <div>
    <div class="mdTxt pt-10 pb-10">職業</div>
    <div class="mdTxt pt-10 pb-10">您的職業</div>
      <div class="ques-career__select" @click="openPopUp">
        <div class="ques-career__select-input">
          <span v-if="!syncCareerSelect">請選擇</span>
@@ -12,7 +12,7 @@
      </div>
      <PopUpFrame :isOpen.sync="showJobDrawer">
        <div class="pam-career">
          <div class="subTitle">職業</div>
          <div class="subTitle">您的職業</div>
          <el-radio-group class="pam-single__select--col" v-model="career" @change="handleChange">
            <el-radio-button v-for="(career,index) in options"
              :key="index"
PAMapp/components/phoneContactTimePicker.vue
@@ -80,31 +80,31 @@
      selectAll:'每天',
      options:[
        {
          title:'禮拜一',
          label:'禮拜一'
          title:'星期一',
          label:'星期一'
        },
         {
          title:'禮拜二',
          label:'禮拜二'
          title:'星期二',
          label:'星期二'
        },
         {
          title:'禮拜三',
          label:'禮拜三'
          title:'星期三',
          label:'星期三'
        },
         {
          title:'禮拜四',
          label:'禮拜四'
          title:'星期四',
          label:'星期四'
        },
         {
          title:'禮拜五',
          label:'禮拜五'
          title:'星期五',
          label:'星期五'
        }, {
          title:'禮拜六',
          label:'禮拜六'
          title:'星期六',
          label:'星期六'
        },
         {
          title:'禮拜日',
          label:'禮拜日'
          title:'星期日',
          label:'星期日'
        },
      ],
    };
PAMapp/pages/login/index.vue
@@ -197,8 +197,7 @@
              @scroll="detectContractReadStatus">
              <h3>蒐集個人資料告知事項</h3>
              <p class="mt-10">
              éµå®ˆå€‹äººè³‡æ–™ä¿è­·æ³•規定,在您提供個人資料予本處前,依法告
              çŸ¥ä¸‹åˆ—事項:
              éµå®ˆå€‹äººè³‡æ–™ä¿è­·æ³•規定,在您提供個人資料予本處前,依法告知下列事項:
              <p>
              <p class="mt-10">
@@ -217,13 +216,11 @@
              </p>
              <p class="mt-10">
              å››ã€é™¤è’é›†ä¹‹ç›®çš„æ¶‰åŠåœ‹é𛿥­å‹™æˆ–活動外,本處僅於中華民國領域內利用您的個人資
              æ–™ã€‚
              å››ã€é™¤è’é›†ä¹‹ç›®çš„æ¶‰åŠåœ‹é𛿥­å‹™æˆ–活動外,本處僅於中華民國領域內利用您的個人資料。
              </p>
              <p class="mt-10">
              äº”、本處將於原蒐集之特定目的、本次以外之產業之推廣、宣導及輔導、以及其他公
              å‹™æ©Ÿé—œè«‹æ±‚行政協助之目的範圍內,合理利用您的個人資料。
              äº”、本處將於原蒐集之特定目的、本次以外之產業之推廣、宣導及輔導、以及其他公務機關請求行政協助之目的範圍內,合理利用您的個人資料。
              </p>
              <p class="mt-10">
@@ -356,14 +353,14 @@
  phoneNumber = '';
  otpCode = '';
  onPhoneVerifyStep: 'APPLY_OTP' | 'INPUT_OTP' | 'SUBMIT_OTP' = 'APPLY_OTP';
  otpCounterSec = 900;
  otpCounterSec = 300;
  otpResendCounter = 30;
  otpInterval: any;
  phoneOtpInfo!: OtpInfo;
  email = '';
  onEmailVerifyResendStatus: 'APPLY_OTP' | 'CAN_RESEND' = 'APPLY_OTP';
  emailCounterSec = 900;
  emailCounterSec = 300;
  emailResendCounter = 30;
  emailOtpCode = '';
  emailResendInterval: any;
@@ -610,11 +607,11 @@
    if (type === 'MOBILE') {
      clearInterval(this.otpInterval);
      this.otpResendCounter = 30;
      this.otpCounterSec = 900;
      this.otpCounterSec = 300;
    } else {
      clearInterval(this.emailResendInterval);
      this.emailResendCounter = 30;
      this.emailCounterSec = 900;
      this.emailCounterSec = 300;
    }
  }
@@ -747,6 +744,7 @@
  $ALIGN_PADDING: 60px;
  $TOP_CONTENT_HEIGHT: 186px;
  $BOTTOM_CONTENT_HEIGHT: 131px;
  // text-align:start;
  max-height: calc(100vh - $DEVICE_EXTRA_HEIGHT - $ALIGN_PADDING - $TOP_CONTENT_HEIGHT - $BOTTOM_CONTENT_HEIGHT);
  overflow-y: scroll;
  border-radius: 6px;
PAMapp/pages/questionnaire/_agentNo.vue
@@ -6,7 +6,7 @@
          class="ques-header__info"
          v-if="myRequest.contactType==='phone'">
          <div class="text--middle">
              <div class="mdTxt">你指定的聯繫方式</div>
              <div class="mdTxt">您指定的聯繫方式</div>
              <div class="mt-10">
                  <span>手機:</span>
                  <span>{{myRequest.phone}}</span>
@@ -31,7 +31,7 @@
        </div>
        <div class="ques-header__info" v-else>
          <div class="text--middle">
              <div class="mdTxt">你指定的聯繫方式</div>
              <div class="mdTxt">您指定的聯繫方式</div>
              <div class="mt-10 ques-header__input-block">
                  <span>Email:</span>
                  <span>{{myRequest.email}}</span>
@@ -80,7 +80,7 @@
          :options="genderOptions" />
      </div>
      <div class="pam-paragraph">
        <div class="mdTxt">年齡</div>
        <div class="mdTxt">您的年齡</div>
        <SingleSelectBtn class="mt-10"
          :singleSelected.sync="myRequest.age"
          :options="ageRangeOptions" />
@@ -116,7 +116,7 @@
    <PopUpFrame :isOpen.sync="sendReserve" @update:isOpen="closeReservePopUp">
        <div class="text--middle  mt-30 sendReserve-txt">預約成功!您預約的保險顧問會</div>
        <div class="text--middle  sendReserve-txt">儘速與您聯絡!</div>
        <div class="text--middle sendReserve-txt">儘速與您聯絡!</div>
        <div class="text--center mdTxt">
          <el-button type="primary"
            @click="closeReservePopUp">
@@ -246,7 +246,7 @@
                  },
                  {
                      title:'分紅保單',
                      content:'分紅保單 åˆ†ç´…保單是兼具「分攤風險」與「紅利共享」特色的保單,具有一定穩定度,讓你可以同時享有壽險保障及紅利!'
                      content:'分紅保單是兼具「分攤風險」與「紅利共享」特色的保單,具有一定穩定度,讓你可以同時享有壽險保障及紅利!'
                  }
    ];
PAMapp/pages/quickFilter/index.vue
@@ -66,10 +66,10 @@
<script lang="ts">
import { Vue, Component, namespace } from 'nuxt-property-decorator';
import { FastQueryParams } from '~/assets/ts/api/consultant';
import { Consultant } from '~/assets/ts/models/consultant.model';
import { Selected } from '~/components/QuickFilter/QuickFilterSelector.vue';
import { fastQuery } from '~/assets/ts/api/consultant';
import { questionList } from '~/assets/ts/const/quickFilter-questionList';
import { FastQueryParams, QuestionOption, Selected } from '~/assets/ts/models/quickFilter.model';
const localStorage = namespace('localStorage');
@Component
@@ -81,41 +81,9 @@
    consultantList: Consultant[] = [];
    questionOption = {};
    confirmItem: Selected[] = [];
    questionList: QuestionOption[] = [
        {
            name: 'gender',
            title: '顧問性別',
            detail: [
                { name: '男性', value: 'male', className: 'btn_man'},
                { name: '女性', value: 'female', className: 'btn_woman'}
            ],
            type: 'radio'
        },
        // { TODO:隱藏滿意度
        //     name: 'avgScore',
        //     title: '顧問滿意度',
        //     detail: [],
        //     type: ''
        // },
        {
            name: 'communicationStyles',
            title: '溝通風格',
            detail: [
                { value: '謹慎務實', className: 'btn_owl'},
                { value: '明快主動', className: 'btn_tiger'},
                { value: '耐心傾聽', className: 'btn_koala'},
                { value: '健談風趣', className: 'btn_peacock'}
            ],
            type: 'checkbox'
        },
        // {
        //     name: 'status',
        //     title: '上線狀態',
        //     detail: [],
        //     type: 'radio'
        // }
    ];
    questionList = questionList;
    //////////////// lifecycle ////////////////
    mounted() {
        if (this.quickFilterSelectedData && this.quickFilterSelectedData.length > 0) {
            this.confirmItem = this.quickFilterSelectedData;
@@ -123,26 +91,8 @@
        }
    }
    gender(): string {
        const filter = this.confirmItem.filter(item => item.option === 'gender').map(i => i.value);
        return filter.length === 0 ? '' : filter[0];
    }
    avgScore(): number {
        const filter = this.confirmItem.filter(item => item.option === 'avgScore').map(i => i.value);
        return filter.length === 0 ? '' : filter[0];
    }
    communicationStyles(): string[] {
        return this.confirmItem.filter(item => item.option === 'communicationStyles').map(i => i.value);
    }
    isActive(name: string) {
        return name === 'gender' && !!this.gender()
            || name === 'avgScore' && !!this.avgScore()
            || name === 'communicationStyles' && !!this.communicationStyles().length
    }
    //////////////////////////////////////////
    openPopUp(question: QuestionOption) {
        this.questionOption = question;
        this.isOpenQuestionPopUp =true;
@@ -159,7 +109,29 @@
        this.isOpenQuestionPopUp = false;
    }
    setConfirmData(event: Selected) {
    isActive(name: string) {
        return name === 'gender' && !!this.gender()
            || name === 'avgScore' && !!this.avgScore()
            || name === 'communicationStyles' && !!this.communicationStyles().length
    }
    //////////////// private ////////////////
    private gender(): string {
        const filter = this.confirmItem.filter(item => item.option === 'gender').map(i => i.value);
        return filter.length === 0 ? '' : filter[0];
    }
    private avgScore(): number {
        const filter = this.confirmItem.filter(item => item.option === 'avgScore').map(i => i.value);
        return filter.length === 0 ? '' : filter[0];
    }
    private communicationStyles(): string[] {
        return this.confirmItem.filter(item => item.option === 'communicationStyles').map(i => i.value);
    }
    private setConfirmData(event: Selected) {
        if (event.option === 'communicationStyles') {
            this.filterCommunicationStyles(event);
        } else {
@@ -168,7 +140,7 @@
        }
    }
    filterCommunicationStyles(event: Selected) {
    private filterCommunicationStyles(event: Selected) {
        const confirmValue = this.confirmItem
            .filter(item => item.option === 'communicationStyles')
            .map(i => i.value);
@@ -188,7 +160,7 @@
        }
    }
    getRecommendList() {
    private getRecommendList() {
        const data: FastQueryParams = {
            gender: this.gender(),
            communicationStyles: this.communicationStyles(),
@@ -196,25 +168,12 @@
            status: ''
        }
        fastQuery(data).then((res) => {
            this.consultantList = res.data;
        fastQuery(data).then((consultantList) => {
            this.consultantList = consultantList;
            this.storageQuickFilter(JSON.stringify(this.confirmItem))
        })
    }
}
export interface QuestionOption {
    title: string;
    detail: Detail[];
    type: string;
    name: string;
}
interface Detail {
    value: string;
    name?: string;
    className: string;
}
</script>
@@ -240,7 +199,7 @@
    .quickBtnBlock {
        display: flex;
        width: 100%;
        height: 132px;
        // height: 132px;
        flex-wrap: wrap;
        justify-content: space-between;
PAMapp/pages/recommendConsultant/index.vue
@@ -224,7 +224,7 @@
      },
      {
        title: '分紅保單',
        content: '分紅保單 åˆ†ç´…保單是兼具「分攤風險」與「紅利共享」特色的保單,具有一定穩定度,讓你可以同時享有壽險保障及紅利!'
        content: '分紅保單是兼具「分攤風險」與「紅利共享」特色的保單,具有一定穩定度,讓你可以同時享有壽險保障及紅利!'
      }
    ];
    showDialog = false;
PAMapp/store/localStorage.ts
@@ -1,6 +1,6 @@
import { Selected } from '~/components/QuickFilter/QuickFilterSelector.vue';
import { Module, Mutation, VuexModule ,Action } from 'vuex-module-decorators';
import { Role } from '~/assets/ts/models/enum/Role';
import { Selected } from '~/assets/ts/models/quickFilter.model';
@Module
export default class LocalStorage extends VuexModule {
  id_token = localStorage.getItem('id_token');