From 3041bdc8daee6f17ab790bbab0bfdbf22f244573 Mon Sep 17 00:00:00 2001 From: Tomas <tomasysh@gmail.com> Date: 星期四, 27 一月 2022 10:18:51 +0800 Subject: [PATCH] update: [前單] 在相關功能顯示滿意度資訊、打開滿意度相關功能 --- PAMapp/components/QuickFilter/QuickFilterConsultantList.vue | 54 ++++++++++++++++++++++++++++++++++-------------------- 1 files changed, 34 insertions(+), 20 deletions(-) diff --git a/PAMapp/components/QuickFilter/QuickFilterConsultantList.vue b/PAMapp/components/QuickFilter/QuickFilterConsultantList.vue index 402eb5e..7daefd9 100644 --- a/PAMapp/components/QuickFilter/QuickFilterConsultantList.vue +++ b/PAMapp/components/QuickFilter/QuickFilterConsultantList.vue @@ -19,7 +19,7 @@ > <UiAvatar :size="200" - :fileName="item.img" + :agentNo="item.agentNo" class="mx-auto" @click.native="showAgentDetail(item.agentNo)" ></UiAvatar> @@ -31,7 +31,7 @@ <div class="smTxt_bold mb-10 text--prudential_grey">����風</div> <div class="mb-10">{{item.seniority}}</div> </el-col> - <el-col :span="12"> + <el-col :span="12" v-if="!hideReviews"> <div class="smTxt_bold mb-10 text--prudential_grey">摰X皛踵�漲</div> <div> <i class="icon-star pam-icon icon--yellow "></i> @@ -79,33 +79,55 @@ </template> <script lang="ts"> +import { Consultant } from '~/shared/models/consultant.model'; import { ElCarousel } from 'element-ui/types/carousel'; +import { hideReviews } from '~/shared/const/hide-reviews'; import { Vue, Component, Prop } from 'vue-property-decorator'; -import { Consultant } from '~/assets/ts/models/consultant.model'; - @Component export default class QuickFilterConsultantList extends Vue { - @Prop() consultantList!: Consultant[]; + @Prop() + consultantList!: Consultant[]; + isVisiblePopUp = false; popUpTxt = '����憿批��'; startPosition = 0; endPosition = 0; + startYPosition = 0; + endYPosition = 0; + hideReviews = hideReviews ; + + ////////////////////////////////////////////////////////////////// moveStart(event: TouchEvent) { this.startPosition = event.changedTouches[0].clientX; + this.startYPosition = event.changedTouches[0].clientY; } moveEnd(event: TouchEvent) { this.endPosition = event.changedTouches[0].clientX; - if (this.endPosition < this.startPosition) { - this.nextCard(); - return; - } + this.endYPosition = event.changedTouches[0].clientY; + if (Math.abs(this.endYPosition - this.startYPosition) < 50) { + if (this.endPosition < this.startPosition) { + this.nextCard(); + return; + } - if (this.endPosition > this.startPosition) { - this.prevCard(); + if (this.endPosition > this.startPosition) { + this.prevCard(); + } } + } + + ////////////////////////////////////////////////////////////////// + + openPopUp(txt: string) { + this.popUpTxt = txt; + this.isVisiblePopUp = true; + } + + showAgentDetail(agentNo: string): void { + this.$router.push(`/agentInfo/${agentNo}`); } nextCard() { @@ -116,14 +138,6 @@ (this.$refs.carouselRef as ElCarousel).prev(); } - openPopUp(txt: string) { - this.popUpTxt = txt; - this.isVisiblePopUp = true; - } - - showAgentDetail(agentNo: string): void { - this.$router.push(`/agentInfo/${agentNo}`); - } } </script> @@ -210,4 +224,4 @@ } } -</style> \ No newline at end of file +</style> -- Gitblit v1.8.0