保誠-保戶業務員媒合平台
Mila
2021-11-01 d4a535ae7dd07f70cf2f59fbc8256a3fa1df8c93
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<template>
<div class="relative">
    <el-carousel
        height="600px"
        :autoplay="false"
        indicator-position="none"
        arrow="never"
        class="pam-consultant-carousel"
        ref="carouselRef"
    >
        <el-carousel-item
            v-for="(item, index) in 5"
            :key="index"
        >
            <div
                class="fill"
                @touchstart="touchStart"
                @touchend="moveCard"
            >
                <img class="avator cursor--pointer" @click="$router.push('/agentInfo')" src="" />
                <div class="mdTxt mt-30 mb-10">蔡美莓(伯樂保險經紀人)</div>
                <el-row>
                    <el-col :span="12">
                        <div class="smTxt_bold mb-10 text--prudential_grey">服務資歷</div>
                        <div class="mb-10">一年12個月</div>
                    </el-col>
                    <el-col :span="12">
                        <div class="smTxt_bold mb-10 text--prudential_grey">客戶滿意度</div>
                        <div>
                            <i class="icon-star pam-icon"></i>
                            4.8</div>
                    </el-col>
                </el-row>
                <div class="smTxt_bold mb-10 text--prudential_grey">專長領域</div>
                <div class="p bold">#財務規劃</div>
            </div>
            <div class="parallelBtns">
                <el-button @click="isVisibleDrawer = true">
                    <i class="icon-add smTxt"></i>
                    <span>顧問清單</span>
                </el-button>
                <el-button
                    @click="$router.push('/communication/myDemand')"
                    type="primary"
                >進行預約</el-button>
            </div>
        </el-carousel-item>
    </el-carousel>
 
    <div class="absolute arrow-left-position" @click="nextCard">
        <i class="icon-left pam-left-arrow"></i>
    </div>
    <div class="absolute arrow-right-position" @click="nextCard">
        <i class="icon-right pam-right-arrow"></i>
    </div>
 
    <Ui-Drawer
        :isVisible.sync="isVisibleDrawer"
    >
        <div class="text--center mdTxt">
            <p class="mb-50">成功加入顧問清單</p>
            <p class="text--primary" @click="isVisibleDrawer = false">我知道了</p>
        </div>
    </Ui-Drawer>
 
</div>
</template>
 
<script lang="ts">
import { ElCarousel } from 'element-ui/types/carousel';
import { Vue, Component, Prop } from 'vue-property-decorator';
 
@Component
export default class UiCardCarousel extends Vue {
    isVisibleDrawer = false;
    startPosition = 0;
    endPosition = 0;
 
    touchStart(event: TouchEvent) {
        this.startPosition = event.changedTouches[0].clientX;
    }
 
    moveCard(event: any) {
        this.endPosition = event.changedTouches[0].clientX;
        if (this.endPosition < this.startPosition) {
            this.nextCard();
            return;
        }
 
        if (this.endPosition > this.startPosition) {
            this.prevCard();
            return;
        }
    }
 
    nextCard() {
        (this.$refs.carouselRef as ElCarousel).next();
    }
 
    prevCard() {
        (this.$refs.carouselRef as ElCarousel).prev();
    }
 
}
</script>
 
<style lang="scss" scoped>
    .fill {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-content: center;
        padding: 20px 30px 30px 30px;
    }
 
    .avator {
        width: 200px;
        height: 200px;
        border-radius: 50%;
        background-color: $MID_GREY;
        margin: 0 auto;
    }
 
    .parallelBtns {
        display: flex;
        justify-content: center;
        position: fixed;
        bottom: 30px;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
 
        .el-button {
            padding: 10px 0;
            width: 45%;
        }
    }
 
    .pam-left-arrow,.pam-right-arrow {
        display: inline-block;
        width: 50px;
        height: 50px;
        border-radius: 50px;
        background-color: $LIGHT_GREY;
        color: $CORAL;
        z-index: 2;
        cursor: pointer;
 
        &:before {
            display: block;
            line-height: 50px;
        }
    }
 
    .pam-right-arrow {
        &:before {
            margin-left: 15px;
        }
    }
 
    .pam-left-arrow {
        &:before {
            margin-left: 25px;
        }
    }
 
    .arrow-right-position {
        top: 50%;
        right: -60px;
        transform: translateY(-50%);
    }
 
    .arrow-left-position {
        top: 50%;
        left: -60px;
        transform: translateY(-50%);
    }
 
    .relative {
        position: relative;
    }
 
        .absolute {
        position: absolute;
    }
 
</style>