From 8e481e80c3f56fde242104af8c74d5b07fd6aef2 Mon Sep 17 00:00:00 2001 From: "han\\hanst" Date: Mon, 9 Feb 2026 13:43:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=92=E4=BA=A7=E5=92=8C=E4=B8=89=E6=96=B9?= =?UTF-8?q?=E7=A1=AE=E8=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/scss/approval-notification.scss | 137 ++++++- .../ApprovalNotificationManager.vue | 363 +++++++++--------- src/config/approval-notification.config.js | 11 +- 3 files changed, 316 insertions(+), 195 deletions(-) diff --git a/src/assets/scss/approval-notification.scss b/src/assets/scss/approval-notification.scss index 68b98b4..b05b526 100644 --- a/src/assets/scss/approval-notification.scss +++ b/src/assets/scss/approval-notification.scss @@ -1,6 +1,7 @@ /** * 审批通知样式 * 优化 Element UI Notification 组件的显示效果 + * 支持合并通知(经理审批、计划员排产、三方确认) */ /* 审批通知容器 */ @@ -10,13 +11,6 @@ border-left: 3px solid #E6A23C; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); - &:hover { - cursor: pointer; - box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25); - transform: translateX(-5px); - transition: all 0.3s ease; - } - /* 标题样式 */ .el-notification__title { font-size: 16px; @@ -52,6 +46,113 @@ } } +/* ========================================== + * 合并通知样式(包含多种待办类型) + * ========================================== */ +.el-notification.combined-notification { + width: 400px; + padding: 16px 20px; + border-left: 3px solid #E6A23C; + + .el-notification__title { + color: #E6A23C; + } + + /* 合并通知主体 */ + .combined-notification-body { + display: flex; + flex-direction: column; + gap: 0; + } + + /* 通知项(每一行可点击的区块) */ + .notification-item { + display: flex; + align-items: center; + padding: 10px 12px; + margin: 0 -12px; + border-radius: 6px; + cursor: pointer; + transition: all 0.25s ease; + border-bottom: 1px dashed #EBEEF5; + + &:last-child { + border-bottom: none; + } + + &:hover { + background-color: #F5F7FA; + transform: translateX(3px); + + .notification-item-link { + opacity: 1; + } + } + + &:active { + background-color: #EBEEF5; + } + } + + /* 通知项图标 */ + .notification-item-icon { + flex-shrink: 0; + width: 36px; + height: 36px; + display: flex; + align-items: center; + justify-content: center; + border-radius: 8px; + margin-right: 12px; + } + + /* 经理审批图标背景 */ + .manager-item .notification-item-icon { + background-color: rgba(230, 162, 60, 0.1); + } + + /* 计划员排产图标背景 */ + .planner-item .notification-item-icon { + background-color: rgba(64, 158, 255, 0.1); + } + + /* 三方确认图标背景 */ + .tri-confirm-item .notification-item-icon { + background-color: rgba(103, 194, 58, 0.1); + } + + /* 通知项内容区 */ + .notification-item-content { + flex: 1; + min-width: 0; + } + + /* 通知项文本 */ + .notification-item-text { + margin: 0 0 2px 0 !important; + font-size: 13px; + color: #303133; + line-height: 1.5 !important; + } + + /* 数字高亮 */ + .count-highlight { + font-size: 17px; + font-weight: bold; + padding: 0 3px; + } + + /* 点击提示链接 */ + .notification-item-link { + margin: 0 !important; + font-size: 12px; + color: #909399; + opacity: 0.7; + transition: opacity 0.25s ease; + line-height: 1.4 !important; + } +} + /* 新申请单通知 */ .el-notification.new-approval-notification { border-left-color: #409EFF; @@ -101,4 +202,26 @@ width: 320px; padding: 15px; } + + .el-notification.combined-notification { + width: 340px; + + .notification-item { + padding: 8px 10px; + } + + .notification-item-icon { + width: 30px; + height: 30px; + margin-right: 8px; + } + + .notification-item-text { + font-size: 12px; + } + + .count-highlight { + font-size: 15px; + } + } } diff --git a/src/components/ApprovalNotificationManager.vue b/src/components/ApprovalNotificationManager.vue index 02a9183..35ca0aa 100644 --- a/src/components/ApprovalNotificationManager.vue +++ b/src/components/ApprovalNotificationManager.vue @@ -4,17 +4,17 @@