| | |
| | | // } |
| | | ]; |
| | | |
| | | get gender() { |
| | | gender(): string { |
| | | const filter = this.confirmItem.filter(item => item.option === 'gender').map(i => i.value); |
| | | return filter.length === 0 ? '' : filter[0]; |
| | | } |
| | | |
| | | get avgScore() { |
| | | avgScore(): number { |
| | | const filter = this.confirmItem.filter(item => item.option === 'avgScore').map(i => i.value); |
| | | return filter.length === 0 ? '' : filter[0]; |
| | | } |
| | | |
| | | get communicationStyles() { |
| | | 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 |
| | | return name === 'gender' && !!this.gender() |
| | | || name === 'avgScore' && !!this.avgScore() |
| | | || name === 'communicationStyles' && !!this.communicationStyles().length |
| | | } |
| | | |
| | | openPopUp(question: QuestionOption) { |
| | |
| | | this.confirmItem.length > 0 ? this.getRecommendList() : this.consultantList = []; |
| | | } |
| | | |
| | | confirm(event: any) { |
| | | confirm(event: Selected) { |
| | | this.setConfirmData(event); |
| | | this.confirmItem.length > 0 ? this.getRecommendList() : this.consultantList = []; |
| | | this.isOpenQuestionPopUp = false; |
| | |
| | | |
| | | getRecommendList() { |
| | | const data: FastQueryParams = { |
| | | gender: this.gender, |
| | | communicationStyles: this.communicationStyles, |
| | | avgScore: this.avgScore, |
| | | gender: this.gender(), |
| | | communicationStyles: this.communicationStyles(), |
| | | avgScore: this.avgScore(), |
| | | status: '' |
| | | } |
| | | |