保誠-保戶業務員媒合平台
PAMapp/pages/recommendConsultant/index.vue
@@ -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" >