| | |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | | import { Vue, Component } from 'nuxt-property-decorator'; |
| | | import { Vue, Component, namespace } from 'nuxt-property-decorator'; |
| | | import { Consultants, FastQueryParams } from '~/assets/ts/api/consultant'; |
| | | import { Selected } from '~/components/QuickFilter/QuickFilterSelector.vue'; |
| | | import { fastQuery } from '~/assets/ts/api/consultant'; |
| | | |
| | | const localStorage = namespace('localStorage'); |
| | | @Component |
| | | export default class QuickFilter extends Vue { |
| | | @localStorage.Mutation storageQuickFilter!: (token: string) => void; |
| | | @localStorage.Getter quickFilterSelectedData!: Selected[]; |
| | | |
| | | isOpenQuestionPopUp = false; |
| | | consultantList: Consultants[] = []; |
| | | questionOption = {}; |
| | |
| | | // type: 'radio' |
| | | // } |
| | | ]; |
| | | |
| | | mounted() { |
| | | if (this.quickFilterSelectedData && this.quickFilterSelectedData.length > 0) { |
| | | this.confirmItem = this.quickFilterSelectedData; |
| | | this.getRecommendList(); |
| | | } |
| | | } |
| | | |
| | | gender(): string { |
| | | const filter = this.confirmItem.filter(item => item.option === 'gender').map(i => i.value); |
| | |
| | | status: '' |
| | | } |
| | | |
| | | fastQuery(data).then((res) => this.consultantList = res.data) |
| | | fastQuery(data).then((res) => { |
| | | this.consultantList = res.data; |
| | | this.storageQuickFilter(JSON.stringify(this.confirmItem)) |
| | | }) |
| | | } |
| | | |
| | | } |