| | |
| | | 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=[ |
| | |
| | | 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" > |