Browse Source

feat: 新增system message detail页面

zhouyuhao 10 months ago
parent
commit
db594a409c

+ 5 - 0
src/router/index.ts

@@ -92,6 +92,11 @@ const router = createRouter({
           path: '/system-message',
           path: '/system-message',
           name: 'System Message',
           name: 'System Message',
           component: () => import('../views/SystemMessage')
           component: () => import('../views/SystemMessage')
+        },
+        {
+          path: '/system-message-detail',
+          name: 'System Message Detail',
+          component: () => import('../views/SystemMessage/src/components/SystemMessageDetail.vue')
         }
         }
       ]
       ]
     }
     }

+ 14 - 14
src/views/Layout/src/components/Header/components/NotificationDrawer.vue

@@ -134,8 +134,9 @@ const passwordExpiration = {
           </div>
           </div>
           <div class="card-content">
           <div class="card-content">
             <div class="title">
             <div class="title">
-              <span class="font_family icon-icon_password_b"></span>
-              <span>Feature Update</span>
+              <!-- <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>
             <div class="details">
             <div class="details">
               <span
               <span
@@ -143,6 +144,7 @@ const passwordExpiration = {
                 You can now quickly find what you need by entering keywords, greatly improving your
                 You can now quickly find what you need by entering keywords, greatly improving your
                 work efficiency. Go and experience it!</span
                 work efficiency. Go and experience it!</span
               >
               >
+              <img src="../images/test.png" style="margin-top: 12px; border-radius: 12px" alt="" />
             </div>
             </div>
             <div class="change-btn" style="text-align: center">
             <div class="change-btn" style="text-align: center">
               <el-button
               <el-button
@@ -164,10 +166,6 @@ div.layout-toolbar {
   .notification-content {
   .notification-content {
     padding: 16px;
     padding: 16px;
     .notification-item {
     .notification-item {
-      margin-bottom: 16px;
-      &:last-child {
-        margin-bottom: 0;
-      }
     }
     }
   }
   }
   .password-notifications {
   .password-notifications {
@@ -177,8 +175,8 @@ div.layout-toolbar {
       align-items: center;
       align-items: center;
       margin-bottom: 8px;
       margin-bottom: 8px;
       .status-icon {
       .status-icon {
-        width: 10px;
-        height: 10px;
+        width: 8px;
+        height: 8px;
         border-radius: 50%;
         border-radius: 50%;
         background-color: var(--color-theme);
         background-color: var(--color-theme);
         margin-right: 10px;
         margin-right: 10px;
@@ -210,13 +208,14 @@ div.layout-toolbar {
   }
   }
   .feature-update {
   .feature-update {
     margin-bottom: 16px;
     margin-bottom: 16px;
+
     .header {
     .header {
       display: flex;
       display: flex;
       align-items: center;
       align-items: center;
       margin-bottom: 8px;
       margin-bottom: 8px;
       .status-icon {
       .status-icon {
-        width: 10px;
-        height: 10px;
+        width: 8px;
+        height: 8px;
         border-radius: 50%;
         border-radius: 50%;
         background-color: var(--color-theme);
         background-color: var(--color-theme);
         margin-right: 10px;
         margin-right: 10px;
@@ -227,14 +226,15 @@ div.layout-toolbar {
     }
     }
     .card-content {
     .card-content {
       padding: 16px 8px 24px;
       padding: 16px 8px 24px;
-      background: linear-gradient(180deg, #ffe294 0%, #f6f8fa 100%);
+      background: linear-gradient(137deg, #fff4eb 12.41%, #f0f3ff 52.63%, #e0f7f9 93.28%);
       border-radius: 12px;
       border-radius: 12px;
-      &.is-expired {
-        background: linear-gradient(182deg, #ef99a0 2.2%, #f6f8fa 98.77%);
-      }
       .title {
       .title {
+        img {
+          vertical-align: middle;
+        }
         span {
         span {
           vertical-align: middle;
           vertical-align: middle;
+          display: inline-block;
           font-weight: 700;
           font-weight: 700;
         }
         }
         .font_family {
         .font_family {

BIN
src/views/Layout/src/components/Header/images/icon_publish.png


BIN
src/views/Layout/src/components/Header/images/test.png


+ 2 - 1
src/views/SystemMessage/src/SystemMessage.vue

@@ -103,7 +103,7 @@ const notificationList = [
     <div class="right-content">
     <div class="right-content">
       <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
       <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
         <el-tab-pane label="All Notifications" name="first">
         <el-tab-pane label="All Notifications" name="first">
-          <div style="display: flex; flex-direction: column; gap: 16px; padding: 10px 16px">
+          <div style="padding: 10px 16px 40px">
             <NotificationCard
             <NotificationCard
               v-for="(item, index) in notificationList"
               v-for="(item, index) in notificationList"
               :key="index"
               :key="index"
@@ -130,6 +130,7 @@ const notificationList = [
 }
 }
 .system-message {
 .system-message {
   display: flex;
   display: flex;
+  height: calc(100% - 72px);
 }
 }
 .left-nav {
 .left-nav {
   width: 280px;
   width: 280px;

+ 17 - 6
src/views/SystemMessage/src/components/NotificationCard.vue

@@ -1,8 +1,11 @@
 <script setup lang="ts">
 <script setup lang="ts">
 import { transportationMode } from '@/components/TransportationMode'
 import { transportationMode } from '@/components/TransportationMode'
+import { useRouter } from 'vue-router'
+
+const router = useRouter()
 const props = defineProps<{
 const props = defineProps<{
   data: {
   data: {
-    numericRecords: number
+    numericRecords?: number
     isRead: boolean
     isRead: boolean
     title?: string
     title?: string
     mode: string
     mode: string
@@ -13,6 +16,13 @@ const props = defineProps<{
     previous?: string
     previous?: string
   }
   }
 }>()
 }>()
+
+const handleSeeAll = () => {
+  console.log('see all')
+  router.push({
+    name: 'System Message Detail'
+  })
+}
 </script>
 </script>
 
 
 <template>
 <template>
@@ -24,7 +34,7 @@ const props = defineProps<{
     <div class="content">
     <div class="content">
       <div class="more-tips" v-if="data.numericRecords">
       <div class="more-tips" v-if="data.numericRecords">
         <span>Latest Status Updates ({{ data.numericRecords }})</span>
         <span>Latest Status Updates ({{ data.numericRecords }})</span>
-        <el-button class="see-all-icon el-button--text">
+        <el-button @click="handleSeeAll" class="see-all-icon el-button--text">
           See All
           See All
           <span class="font_family icon-icon_next_b"></span>
           <span class="font_family icon-icon_next_b"></span>
         </el-button>
         </el-button>
@@ -56,6 +66,7 @@ const props = defineProps<{
 <style lang="scss" scoped>
 <style lang="scss" scoped>
 .notification-card {
 .notification-card {
   max-width: 640px;
   max-width: 640px;
+  margin-bottom: 16px;
   &.is-read {
   &.is-read {
     .header {
     .header {
       .status-icon {
       .status-icon {
@@ -72,8 +83,8 @@ const props = defineProps<{
     align-items: center;
     align-items: center;
     margin-bottom: 8px;
     margin-bottom: 8px;
     .status-icon {
     .status-icon {
-      width: 10px;
-      height: 10px;
+      width: 8px;
+      height: 8px;
       border-radius: 50%;
       border-radius: 50%;
       background-color: var(--color-theme);
       background-color: var(--color-theme);
       margin-right: 10px;
       margin-right: 10px;
@@ -118,8 +129,8 @@ const props = defineProps<{
         padding-right: 6px;
         padding-right: 6px;
         line-height: 18px;
         line-height: 18px;
         background-color: #e6f1eb;
         background-color: #e6f1eb;
-        font-size: 10px;
-        font-weight: 700;
+        font-size: 12px;
+        font-weight: 600;
         border-radius: 3px;
         border-radius: 3px;
         color: #5bb462;
         color: #5bb462;
         .dot {
         .dot {

+ 86 - 0
src/views/SystemMessage/src/components/SystemMessageDetail.vue

@@ -0,0 +1,86 @@
+<script setup lang="ts">
+import NotificationCard from './NotificationCard.vue'
+
+const notificationData = {
+  title: 'Milestone Update Daily Summary (Jan 10, 2025)',
+  numericRecords: 3,
+  notificationList: [
+    {
+      isRead: true,
+      mode: 'Ocean Freight',
+      no: 'HBOL: SHJN2301234',
+      tag: 'Booking Confirmed',
+      location: 'Hong Kong',
+      time: 'Jan 10, 2025 14:30 UTC+8'
+    },
+    {
+      isRead: false,
+      mode: 'Air Freight',
+      no: 'HBOL: SHJN2301234',
+      tag: 'Booking Confirmed',
+      location: 'Hong Kong',
+      time: 'Jan 10, 2025 14:30 UTC+8'
+    },
+    {
+      isRead: false,
+      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)'
+    }
+  ]
+}
+</script>
+
+<template>
+  <div class="system-message-detail">
+    <div class="content">
+      <div class="header" v-if="notificationData.title">
+        <div class="status-icon"></div>
+        <div class="title">{{ notificationData.title }}</div>
+      </div>
+      <div class="total-tips">Latest Status Updates ({{ notificationData.numericRecords }})</div>
+      <NotificationCard
+        v-for="(item, index) in notificationData.notificationList"
+        :key="index"
+        :data="item"
+      />
+    </div>
+  </div>
+</template>
+
+<style lang="scss" scoped>
+.system-message-detail {
+  padding: 16px;
+  .content {
+    margin: auto;
+    width: 800px;
+  }
+  .notification-card {
+    max-width: 800px;
+  }
+  .header {
+    display: flex;
+    align-items: center;
+    margin-bottom: 8px;
+    .status-icon {
+      width: 8px;
+      height: 8px;
+      border-radius: 50%;
+      background-color: var(--color-theme);
+      margin-right: 10px;
+    }
+    .title {
+      font-weight: 700;
+      font-size: 24px;
+    }
+  }
+  .total-tips {
+    height: 40px;
+    line-height: 40px;
+    font-size: 12px;
+  }
+}
+</style>