保誠-保戶業務員媒合平台
Mila
2021-10-27 1fbe99ac8b1d46f2596f652d8b56d4e352b1522d
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
<template>
    <div>
        <el-row type="flex" class="rowStyle">
            <el-col :xs="2" :sm="1" :class="{'state': agentInfo.new}"></el-col>
            <el-col :xs="22" :sm="23">
                <el-row type="flex">
                    <el-col class="flex_column" :xs="5" :sm="3">
                        <img class="avator" :src="agentInfo.img" alt="">
                        <div class="star">{{agentInfo.satisfaction}}</div>
                    </el-col>
                    <el-col class="flex_column" :xs="10" :sm="15">
                        <div class="smTxt_bold name">{{agentInfo.name}}</div>
                        <div class="tagStyle">
                            <span
                                class="tagTxt"
                                v-for="(tag, index) in agentInfo.tags" :key="index">#{{tag}}</span>
                        </div>
                        <div class="delete" @click="removeAgent">移除</div>
                    </el-col>
                    <el-col class="flex_column" :xs="9" :sm="6">
                        <el-button
                            class="smTxt_bold outline_btn"
                            @click="reserveCommunication"
                            :class="{'reservedBtn': agentInfo.reserve}"
                        >{{ agentInfo.reserve ? '已預約' : '進行預約'}}</el-button>
                        <div class="time">今天 10:00 加入</div>
                    </el-col>
                </el-row>
            </el-col>
        </el-row>
    </div>
</template>
 
<script lang="ts">
import { Vue, Component, Prop, Emit, Watch } from 'nuxt-property-decorator';
import { Agents } from '~/plugins/api/home';
 
@Component
export default class ConsultantCard extends Vue {
    @Prop() agentInfo!: Agents;
 
    reserveCommunication() {
        if (!this.agentInfo.reserve) {
            this.$router.push('/communication/myDemand')
        }
 
    }
 
    @Emit('removeAgent') removeAgent() {
        return this.agentInfo.id;
    }
}
</script>
 
<style lang="scss" scoped>
    .rowStyle {
        padding: 10px;
        background-color: #FFFFFF;
        margin-bottom: 10px;
        display: flex;
        justify-content: space-between;
 
        .state {
            width: 10px;
            height: 10px;
            border-radius: 50px;
            background-color: $yellow;
            margin: auto 0;
        }
 
        .avator {
            width: 50px;
            height: 50px;
            border-radius: 50px ;
        }
 
        .star {
            font-size: 12px;
            font-weight: bold;
 
            &:before {
                content: '\2605';
                color: $primaryRed;
                margin: 5px;
            }
        }
 
        .tagStyle {
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
            .tagTxt {
                font-size: 12px;
                font-weight: bold;
                margin-right: 5px;
            }
        }
 
        .delete {
            color: $primaryRed;
            font-size: 14px;
            font-weight: bold;
            cursor: pointer;
        }
 
        .reservedBtn {
            color: $skyBlue;
            cursor: auto;
 
            &:hover {
                color: $skyBlue;
                border-color: $skyBlue;
                background-color: $white;
            }
        }
 
        .time {
            font-size: 12px;
            font-weight: bold;
            color: #707070;
            text-align: right;
        }
    }
 
    .flex_column {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
 
</style>