|
|
@@ -1,75 +1,64 @@
|
|
|
<script setup lang="ts">
|
|
|
-import NotificationCard from '@/views/SystemMessage/src/components/NotificationCard.vue'
|
|
|
+import NotificationMessageCard from '@/components/NotificationMessageCard/src/NotificationMessageCard.vue'
|
|
|
|
|
|
const drawerModel = defineModel('drawerModel', { type: Boolean, default: false })
|
|
|
|
|
|
-function confirmClick() {
|
|
|
- ElMessageBox.confirm(`Are you confirm to chose ?`)
|
|
|
- .then(() => {
|
|
|
- drawerModel.value = false
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- // catch error
|
|
|
- })
|
|
|
-}
|
|
|
-
|
|
|
const notificationList = [
|
|
|
{
|
|
|
- numericRecords: 3,
|
|
|
- isRead: true,
|
|
|
- title: 'Milestone Update',
|
|
|
- mode: 'Ocean Freight',
|
|
|
- no: 'HBOL: SHJN2301234',
|
|
|
- tag: 'Booking Confirmed',
|
|
|
- location: 'Hong Kong',
|
|
|
- time: 'Jan 10, 2025 14:30 UTC+8'
|
|
|
+ notificationType: 'feature',
|
|
|
+ info: {
|
|
|
+ title: 'Feature Update',
|
|
|
+ header: 'New feature online: Quick search has been released!',
|
|
|
+ content:
|
|
|
+ 'We are pleased to announce that the quick search function is now officially online! You can now quickly find what you need by entering keywords, greatly improving your work efficiency. Go and experience it!'
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
- numericRecords: 0,
|
|
|
- isRead: false,
|
|
|
- title: 'Milestone Update Daily Summary (Jan 10, 2025)',
|
|
|
- mode: 'Air Freight',
|
|
|
- no: 'HBOL: SHJN2301234',
|
|
|
- tag: 'Booking Confirmed',
|
|
|
- location: 'Hong Kong',
|
|
|
- time: 'Jan 10, 2025 14:30 UTC+8'
|
|
|
+ notificationType: 'event',
|
|
|
+ info: {
|
|
|
+ type: 'milestone',
|
|
|
+ isMultiple: true,
|
|
|
+ numericRecords: 3,
|
|
|
+ isRead: true,
|
|
|
+ title: 'Milestone Update',
|
|
|
+ mode: 'Ocean Freight',
|
|
|
+ no: 'HBOL: SHJN2301234',
|
|
|
+ tag: 'Booking Confirmed',
|
|
|
+ location: 'Hong Kong',
|
|
|
+ time: 'Jan 10, 2025 14:30 UTC+8'
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
- numericRecords: 0,
|
|
|
- isRead: false,
|
|
|
- title: '',
|
|
|
- mode: 'Air Freight',
|
|
|
- no: 'HBOL: SHJN2301234',
|
|
|
- tag: 'Booking Confirmed',
|
|
|
- location: 'Hong Kong',
|
|
|
- time: 'Jan 10, 2025 14:30 UTC+8',
|
|
|
- previous: 'Previous: Departure from Shanghai (08:15 UTC+8)'
|
|
|
- }
|
|
|
-]
|
|
|
-
|
|
|
-const passwordExpirationList = [
|
|
|
+ notificationType: 'password',
|
|
|
+ info: {
|
|
|
+ title: 'Password Notifications',
|
|
|
+ isExpiration: true,
|
|
|
+ tips: 'Password Expiration in 311 Days',
|
|
|
+ content:
|
|
|
+ 'Your password will expire in 7 days. To ensure the security of your account, please change your password as soon as possible.'
|
|
|
+ }
|
|
|
+ },
|
|
|
{
|
|
|
- title: 'Password Notifications',
|
|
|
- isExpiration: true,
|
|
|
- tips: 'Password Expiration in 3 Days',
|
|
|
- content:
|
|
|
- 'Your password will expire in 7 days. To ensure the security of your account, please change your password as soon as possible.'
|
|
|
+ notificationType: 'password',
|
|
|
+ info: {
|
|
|
+ title: 'Password Notifications',
|
|
|
+ isExpiration: false,
|
|
|
+ tips: 'Password Expiration in 3 Days',
|
|
|
+ content:
|
|
|
+ 'Your password will expire in 7 days. To ensure the security of your account, please change your password as soon as possible.'
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
- title: 'Password Notifications',
|
|
|
- isExpiration: false,
|
|
|
- tips: 'Password Expiration in 3 Days',
|
|
|
- content:
|
|
|
- 'Your password will expire in 7 days. To ensure the security of your account, please change your password as soon as possible.'
|
|
|
+ notificationType: 'password',
|
|
|
+ info: {
|
|
|
+ title: 'Password Notifications',
|
|
|
+ isExpiration: true,
|
|
|
+ tips: 'Password Expiration in 31111 Days',
|
|
|
+ content:
|
|
|
+ 'Your password will expire in 7 days. To ensure the security of your account, please change your password as soon as possible.'
|
|
|
+ }
|
|
|
}
|
|
|
]
|
|
|
-const passwordExpiration = {
|
|
|
- title: 'Password Notifications',
|
|
|
- isExpiration: true,
|
|
|
- tips: 'Password Expiration in 3 Days',
|
|
|
- content:
|
|
|
- 'Your password will expire in 7 days. To ensure the security of your account, please change your password as soon as possible.'
|
|
|
-}
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
@@ -96,67 +85,7 @@ const passwordExpiration = {
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="notification-content">
|
|
|
- <NotificationCard
|
|
|
- class="notification-item"
|
|
|
- v-for="(item, index) in notificationList"
|
|
|
- :key="index"
|
|
|
- :data="item"
|
|
|
- ></NotificationCard>
|
|
|
- <div
|
|
|
- class="password-notifications"
|
|
|
- v-for="(item, index) in passwordExpirationList"
|
|
|
- :key="index"
|
|
|
- >
|
|
|
- <div class="header" v-if="item.title">
|
|
|
- <div class="status-icon"></div>
|
|
|
- <div class="title">{{ item.title }}</div>
|
|
|
- </div>
|
|
|
- <div class="card-content" :class="{ 'is-expired': item.isExpiration }">
|
|
|
- <div class="title">
|
|
|
- <span class="font_family icon-icon_password_b"></span>
|
|
|
- <span>{{ item.tips }}</span>
|
|
|
- </div>
|
|
|
- <div class="details">
|
|
|
- {{ item.content }}
|
|
|
- </div>
|
|
|
- <div class="change-btn" style="text-align: center">
|
|
|
- <el-button class="el-button--main" style="height: 40px" @click="confirmClick">
|
|
|
- <span class="font_family icon-icon_edit_b" style="margin-right: 4px"></span>
|
|
|
- <span>Change Password</span></el-button
|
|
|
- >
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="feature-update">
|
|
|
- <div class="header">
|
|
|
- <div class="status-icon"></div>
|
|
|
- <div class="title">Feature Update</div>
|
|
|
- </div>
|
|
|
- <div class="card-content">
|
|
|
- <div class="title">
|
|
|
- <!-- <span class="font_family icon-icon_password_b"></span> -->
|
|
|
- <img style="margin-right: 5px" src="../images/icon_publish.png" alt="" />
|
|
|
- <span>New feature online: Quick search has been released!</span>
|
|
|
- </div>
|
|
|
- <div class="details">
|
|
|
- <span
|
|
|
- >We are pleased to announce that the quick search function is now officially online!
|
|
|
- You can now quickly find what you need by entering keywords, greatly improving your
|
|
|
- work efficiency. Go and experience it!</span
|
|
|
- >
|
|
|
- <img src="../images/test.png" style="margin-top: 12px; border-radius: 12px" alt="" />
|
|
|
- </div>
|
|
|
- <div class="change-btn" style="text-align: center">
|
|
|
- <el-button
|
|
|
- class="el-button--main"
|
|
|
- style="height: 40px; padding: 0 32px"
|
|
|
- @click="confirmClick"
|
|
|
- >
|
|
|
- View more</el-button
|
|
|
- >
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <NotificationMessageCard :data="notificationList" />
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-drawer>
|
|
|
@@ -165,8 +94,6 @@ const passwordExpiration = {
|
|
|
div.layout-toolbar {
|
|
|
.notification-content {
|
|
|
padding: 16px;
|
|
|
- .notification-item {
|
|
|
- }
|
|
|
}
|
|
|
.password-notifications {
|
|
|
margin-bottom: 16px;
|
|
|
@@ -264,9 +191,12 @@ div.layout-toolbar {
|
|
|
.notification-header {
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
+ position: sticky;
|
|
|
+ top: 0;
|
|
|
height: 40px;
|
|
|
padding: 0 16px;
|
|
|
line-height: 40px;
|
|
|
+ background-color: white;
|
|
|
border-bottom: 1px solid var(--color-border);
|
|
|
.mark-all-read {
|
|
|
span {
|