保誠-保戶業務員媒合平台
HelenHuang
2022-06-09 9bdb95c9e34cef640534e5e5a1e2225a80442000
PAMapp/components/QuickFilter/QuickFilterConsultantList.vue
@@ -14,10 +14,12 @@
        >
            <div
                class="fill"
                @touchstart="moveStart"
                @touchend="moveEnd"
            >
                <UiAvatar
                    :size="200"
                    :fileName="item.img"
                    :agentNo="item.agentNo"
                    class="mx-auto"
                    @click.native="showAgentDetail(item.agentNo)"
                ></UiAvatar>
@@ -29,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">客戶滿意度</div>
                        <div>
                            <i class="icon-star pam-icon icon--yellow "></i>
@@ -77,15 +79,56 @@
</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 { Consultants } from '~/assets/ts/api/consultant';
@Component
export default class QuickFilterConsultantList extends Vue {
    @Prop() consultantList!: Consultants[];
    @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;
        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();
            }
        }
    }
    //////////////////////////////////////////////////////////////////
    openPopUp(txt: string) {
        this.popUpTxt = txt;
        this.isVisiblePopUp = true;
    }
    showAgentDetail(agentNo: string): void {
        this.$router.push(`/agentInfo/${agentNo}`);
    }
    nextCard() {
        (this.$refs.carouselRef as ElCarousel).next();
@@ -95,13 +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>
@@ -188,4 +224,4 @@
        }
    }
</style>
</style>