| | |
| | | :key="index" |
| | | class="subTitle quickBtn" |
| | | :disabled="question.name === 'onlineState'" |
| | | |
| | | @click="openPopUp(question)" |
| | | >{{question.title}}</el-button> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <h5 class="mdTxt mb-10 mt-30">快速篩選推薦</h5> |
| | | <div class="mb-10 mt-30"> |
| | | <span class="mdTxt">快速篩選推薦</span> |
| | | <span class="smTxt_bold text--prudential_grey ml-10">共 0 筆</span> |
| | | </div> |
| | | <div class="recommend"> |
| | | <img class="img" src="~/assets/images/quickFilter/recommend.svg" alt=""> |
| | | |
| | | <template v-if="consultantList.length > 0"> |
| | | <QuickFilterConsultantList></QuickFilterConsultantList> |
| | | </template> |
| | | |
| | | <template v-else> |
| | | <div class="emptyBox bg-white"></div> |
| | | <div class="emptyBox text--mid_grey recommendStyle"> |
| | | <p class="smTxt">尚無推薦資料</p> |
| | | </div> |
| | | </template> |
| | | </div> |
| | | |
| | | <Ui-Drawer |
| | | :isVisible.sync="questionDrawer" |
| | |
| | | ></QuickFilterSelector> |
| | | </Ui-Drawer> |
| | | |
| | | <Ui-Dialog :isVisible.sync="dialog" |
| | | <Ui-Dialog :isVisible.sync="questionDialog" |
| | | @closeDialog="closePopUp" |
| | | > |
| | | <QuickFilterSelector |
| | |
| | | import { Consultants } from '~/assets/ts/api/consultant'; |
| | | import { isMobileDevice } from '~/assets/ts/device'; |
| | | import QuickFilterDrawer from '~/components/QuickFilter/QuickFilterSelector.vue'; |
| | | import { fastQuery } from '~/assets/ts/api/consultant'; |
| | | |
| | | @Component |
| | | export default class QuickFilter extends Vue { |
| | | dialog = false; |
| | | questionDialog = false; |
| | | consultantList = []; |
| | | questionDrawer = false; |
| | | questionOption = {}; |
| | |
| | | { |
| | | name: 'gender', |
| | | title: '顧問性別', |
| | | detail: ['男性', '女性'], |
| | | type: 'radio' |
| | | detail: [ |
| | | { |
| | | value: '男性', |
| | | className: 'btn_man' |
| | | }, { |
| | | value: '女性', |
| | | className: 'btn_woman' |
| | | }], |
| | | type: 'radio', |
| | | }, |
| | | { |
| | | name: 'satisfaction', |
| | |
| | | { |
| | | name: 'style', |
| | | title: '溝通風格', |
| | | detail: ['謹慎務實', '明快主動', '耐心傾聽', '健談風趣'], |
| | | detail: [ |
| | | { |
| | | value: '謹慎務實', |
| | | className: 'btn_owl' |
| | | },{ |
| | | value: '明快主動', |
| | | className: 'btn_tiger' |
| | | },{ |
| | | value: '耐心傾聽', |
| | | className: 'btn_koala' |
| | | }, { |
| | | value: '健談風趣', |
| | | className: 'btn_peacock' |
| | | }], |
| | | type: 'checkbox' |
| | | }, |
| | | { |
| | |
| | | async asyncData(context: Context) { |
| | | let consultantList: Consultants[] = []; |
| | | |
| | | await context.$service.home.recommendConsultantList().then((result: Consultants[]) => { |
| | | consultantList = result; |
| | | }) |
| | | // await context.$service.home.recommendConsultantList().then((result: Consultants[]) => { |
| | | // consultantList = result; |
| | | // }) |
| | | |
| | | return { |
| | | consultantList, |
| | |
| | | |
| | | openPopUp(question: QuestionOption) { |
| | | this.questionOption = question; |
| | | isMobileDevice() ? this.questionDrawer = true : this.dialog = true; |
| | | isMobileDevice() ? this.questionDrawer = true : this.questionDialog = true; |
| | | } |
| | | |
| | | removeTag(type: string, index: number = 0) { |
| | |
| | | |
| | | closePopUp() { |
| | | this.selectedItem = JSON.parse(JSON.stringify((this.$refs.quickFilterRef as QuickFilterDrawer).pickedItem)); |
| | | |
| | | const data = { |
| | | gender: 'male', |
| | | communicationStyle: '謹慎務實', |
| | | avgScore: 5, |
| | | status: 'online' |
| | | } |
| | | |
| | | fastQuery(data).then((res) => console.log(res)) |
| | | } |
| | | |
| | | } |
| | | |
| | | export interface QuestionOption { |
| | | title: string; |
| | | detail: string[]; |
| | | detail: Detail[]; |
| | | type: string; |
| | | name: string; |
| | | } |
| | | |
| | | interface Detail { |
| | | value: string; |
| | | className: string; |
| | | } |
| | | |
| | | export interface selectedItem { |
| | |
| | | .emptyBox { |
| | | width: 100%; |
| | | height: 100px; |
| | | |
| | | border: solid 1px $LIGHT_GREY; |
| | | text-align: center; |
| | | border-radius: 10px; |
| | | |
| | | .smTxt { |
| | | line-height: 100px; |
| | | } |
| | | } |
| | | |
| | | .bg-white { |
| | | .recommendStyle { |
| | | box-shadow: 0 0 6px #00000029; |
| | | background-color: $PRIMARY_WHITE; |
| | | } |
| | | |
| | |
| | | height: 56px; |
| | | text-align: center; |
| | | box-shadow: 0 0 6px #22222229; |
| | | border-color: $PRIMARY_WHITE; |
| | | border-radius: 10px; |
| | | color: $PRIMARY_BLACK; |
| | | |
| | | &:hover,&:focus { |
| | | color: $PRIMARY_BLACK; |
| | | border-color: $PRIMARY_WHITE; |
| | | background-color: $PRIMARY_WHITE; |
| | | } |
| | | color: $PRIMARY_WHITE; |
| | | background-size: cover; |
| | | background-position: center; |
| | | background-repeat: no-repeat; |
| | | background-image: url('~/assets/images/quickFilter/btn_bg.svg'); |
| | | |
| | | &:disabled { |
| | | color: $PRIMARY_WHITE; |
| | | border-color: $LIGHT_GREY; |
| | | background-color: $LIGHT_GREY; |
| | | background-image: none; |
| | | } |
| | | } |
| | | .quickBtn+.quickBtn { |
| | | margin-left: 0; |
| | | } |
| | | |
| | | .is-disabled { |
| | | background-color: $LIGHT_GREY; |
| | | color: $PRIMARY_WHITE; |
| | | } |
| | | |
| | | &:hover,&:focus { |
| | | color: $PRIMARY_WHITE; |
| | | border-color: $LIGHT_GREY; |
| | | background-color: $LIGHT_GREY; |
| | | .recommend { |
| | | position: relative; |
| | | |
| | | .img { |
| | | position: absolute; |
| | | top: -50px; |
| | | right: 10px; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | </style> |