保誠-保戶業務員媒合平台
Jack
2022-01-24 f8ab133a7dc20562c25a092a402266f5e7b0b296
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
<template>
    <div>
        <div class="text--right mb-10" @click="showNotificationHint = true">
            <i class="satisfaction-icon icon-edit"></i>
        </div>
        <div
            v-if="isUserLogin && unReviewLogList.length"
            class="satisfaction-banner my-10 cursor--pointer"
            @click="$router.push('/satisfactionList')"
        >
            <p class="satisfaction-text text--center">請填寫滿意度調查</p>
        </div>
        <el-row
            v-for="(item, index) in notificationList"
            :key="index"
            type="flex"
            justify="space-between"
            align="middle"
            class="notification-card"
        >
            <el-col class="unRead" :span="3" v-if="!item.readDate"></el-col>
            <el-col :span="18">
                <p class="text">{{item.content}}</p>
            </el-col>
            <el-col :span="3" class="notification-period text--right">
                <div>
                    <UiDateFormat
                        class="date"
                        :date="item.createdDate"
                        onlyShowSection="DAY" />
                </div>
                <div>
                    <UiDateFormat
                        class="time"
                        :date="item.createdDate"
                        onlyShowSection="TIME" />
                </div>
 
            </el-col>
        </el-row>
 
        <PopUpFrame
             :isOpen.sync="showNotificationHint"
        >
            <div class="text--center mdTxt">
                <p class="mb-30">通知</p>
                <div class="mb-20 cursor--pointer">全部已讀</div>
                <div class="cursor--pointer">全部刪除</div>
                <div class="text--center mt-30">
                    <el-button
                        type="primary"
                        @click="showNotificationHint = false"
                    >確定</el-button>
                </div>
            </div>
        </PopUpFrame>
    </div>
</template>
 
<script lang="ts">
import { Component, State, Vue } from "nuxt-property-decorator";
import { AppointmentLog } from "~/shared/models/appointment.model";
import { NotificationList } from "~/shared/models/reviews.model";
import authService from "~/shared/services/auth.service";
 
@Component
export default class Notification extends Vue {
 
    @State
    unReviewLogList!: AppointmentLog[];
 
    @State
    notificationList!: NotificationList[];
 
    showNotificationHint = false;
    isUserLogin = false;
 
    ////////////////////////////////////////////////////////////
 
    mounted() {
        this.isUserLogin = authService.isUserLogin();
    }
 
}
</script>
 
<style lang="scss" scoped>
    .satisfaction-banner {
        width: 100%;
        height: 60px;
        background-image: url('~/assets/images/satisfaction/satisfactionBtn_mob.svg');
        background-repeat: no-repeat;
        background-size: cover;
        background-position: center;
        border-radius: 10px;
 
        .satisfaction-text {
            @extend .mdTxt;
            @extend .text--PRIMARY_WHITE;
            line-height: 60px;
        }
 
        @include desktop {
            height: 110px;
            background-image: url('~/assets/images/satisfaction/satisfactionBtn_web.svg');
 
            .satisfaction-text {
                font-size: 24px;
                line-height: 110px;
            }
        }
    }
 
    .notification-card {
        padding: 10px;
        border-bottom: solid 1px #CCCCCC;
 
        .unRead {
            width: 10px;
            height: 10px;
            border-radius: 50px;
            background-color: $YELLOW;
        }
 
        .notification-period {
            color: #707070;
            .date {
                font-size: 10px;
                line-height: 12px;
            }
            .time {
                font-size: 12px;
                line-height: 14px;
            }
        }
 
    }
 
    .satisfaction-icon {
        font-size: 24px;
        @extend .cursor--pointer;
    }
</style>