保誠-保戶業務員媒合平台
PAMapp/pages/recommendConsultant/index.vue
@@ -6,7 +6,7 @@
      <div class="pb-10 mdTxt required">顧問所在地區</div>
      <div class="job-pick cursor--pointer"
        @click="showAddress = true">
        <input class="fz-20 input cursor--pointer pl-10"
        <input class="text--middle  input cursor--pointer pl-10"
          :value="strictQueryDto.area"
          placeholder="請選擇">
        <i class="icon-down down-icon"></i>
@@ -27,7 +27,7 @@
      </div>
      <MultiSelectBtn :mutiSelect.sync="strictQueryDto.requirements" :options="requirementOptions" class="rec-multi-select" />
    </div>
    <div class="pam-paragraph pam-tags">
    <div class="pam-paragraph">
      <div class="pb-10 mdTxt">顧問年資</div>
        <SingleSelectBtn :singleSelected.sync="strictQueryDto.seniority" :options="seniorityOptions"/>
    </div>
@@ -86,22 +86,26 @@
  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=[
@@ -225,10 +229,18 @@
    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;
@@ -239,7 +251,9 @@
    }
    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)
    }
@@ -253,6 +267,18 @@
    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" >