保誠-保戶業務員媒合平台
Tomas
2021-12-09 ac235850a9287dae6977c964213176fa7c86b140
PAMapp/components/QuickFilter/QuickFilterSelector.vue
@@ -7,7 +7,7 @@
            <span
                class="smTxt_bold text--primary"
                v-if="questionOption.name === 'communicationStyles'"
            >(可複選)</span>
            >(最多選擇兩種)</span>
            <span
                class="smTxt_bold text--primary"
                v-if="questionOption.name === 'avgScore'"
@@ -25,6 +25,7 @@
                    :label="i.value"
                    :name="i.value"
                    :class="i.className"
                    @change="selectedCommunicationStyles"
                ></el-checkbox>
            </el-checkbox-group>
        </div>
@@ -64,8 +65,9 @@
<script lang="ts">
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 { FastQueryParams } from '~/assets/ts/models/fast-query-params.model';
import { Selected } from '~/assets/ts/models/selected.model';
import { QuestionOption } from '~/assets/ts/models/question-option.model';
@Component
export default class QuickFilterDrawer extends Vue {
@@ -81,7 +83,7 @@
    @Prop() isOpenQuestionPopUp!: boolean;
    @Prop() confirmItem!: Selected[];
    @Watch('isOpenQuestionPopUp') onPopUpChange() {
    @Watch('isOpenQuestionPopUp', {immediate: true}) onPopUpChange() {
        this.pickedItem = {
            communicationStyles: this.communicationStyles,
            status: '',
@@ -113,6 +115,12 @@
            || 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;
@@ -124,10 +132,6 @@
}
export interface Selected {
    option: string;
    value: any;
}
</script>
<style lang="scss" scoped>
@@ -139,4 +143,4 @@
        flex-wrap: wrap;
    }
</style>
</style>