| | |
| | | <span |
| | | class="smTxt_bold text--primary" |
| | | v-if="questionOption.name === 'communicationStyles'" |
| | | >(可複選)</span> |
| | | >(最多選擇兩種)</span> |
| | | <span |
| | | class="smTxt_bold text--primary" |
| | | v-if="questionOption.name === 'avgScore'" |
| | |
| | | :label="i.value" |
| | | :name="i.value" |
| | | :class="i.className" |
| | | @change="selectedCommunicationStyles" |
| | | ></el-checkbox> |
| | | </el-checkbox-group> |
| | | </div> |
| | |
| | | </el-radio-group> |
| | | </div> |
| | | |
| | | <div v-else> |
| | | <div v-else> |
| | | <el-rate |
| | | v-if="!hideReviews" |
| | | class="pam-quickFilter-rate" |
| | | v-model="pickedItem.avgScore" |
| | | ></el-rate> |
| | |
| | | import { Vue, Component, Prop, Watch, Emit } from 'nuxt-property-decorator'; |
| | | import { FastQueryParams } from '~/assets/ts/api/consultant'; |
| | | import { QuestionOption } from '~/pages/quickFilter/index.vue'; |
| | | |
| | | import { hideReviews } from '~/assets/ts/const/hide-reviews'; |
| | | @Component |
| | | export default class QuickFilterDrawer extends Vue { |
| | | |
| | | |
| | | pickedItem: FastQueryParams = { |
| | | communicationStyles: [], |
| | |
| | | gender: '', |
| | | avgScore: 0 |
| | | } |
| | | |
| | | hideReviews = hideReviews ; |
| | | |
| | | @Prop() questionOption!: QuestionOption; |
| | | @Prop() isOpenQuestionPopUp!: boolean; |
| | | @Prop() confirmItem!: Selected[]; |
| | | |
| | | @Watch('isOpenQuestionPopUp') onPopUpChange() { |
| | | @Watch('isOpenQuestionPopUp', {immediate: true}) onPopUpChange() { |
| | | this.pickedItem = { |
| | | communicationStyles: this.communicationStyles, |
| | | status: '', |
| | |
| | | || name === 'communicationStyles' && !this.pickedItem[name].length |
| | | } |
| | | |
| | | selectedCommunicationStyles() { |
| | | if (this.pickedItem.communicationStyles.length > 2) { |
| | | this.pickedItem.communicationStyles.shift(); |
| | | } |
| | | } |
| | | |
| | | @Emit('confirm') |
| | | confirm() { |
| | | const name = this.questionOption.name; |