From 10e738edd966a5d4c68ba3a47058e168fc53661c Mon Sep 17 00:00:00 2001 From: chenqi Date: Tue, 30 Dec 2025 22:49:14 +0800 Subject: [PATCH] =?UTF-8?q?feat(notice):=20=E6=96=B0=E5=A2=9E=E5=85=AC?= =?UTF-8?q?=E5=91=8A=E4=BC=98=E5=85=88=E7=BA=A7=E5=92=8C=E6=9C=AA=E8=AF=BB?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E5=8A=9F=E8=83=BD=EF=BC=8C=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=85=AC=E5=91=8A=E5=B1=95=E7=A4=BA=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- openhis-ui-vue3/src/components/NoticePopup/index.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/openhis-ui-vue3/src/components/NoticePopup/index.vue b/openhis-ui-vue3/src/components/NoticePopup/index.vue index effd4cbc..d00f1740 100644 --- a/openhis-ui-vue3/src/components/NoticePopup/index.vue +++ b/openhis-ui-vue3/src/components/NoticePopup/index.vue @@ -241,7 +241,9 @@ const loadNotices = async () => { try { const res = await getUserNotices() if (res.code === 200) { - noticeList.value = res.data || [] + noticeList.value = (res.data || []).sort((a, b) => { + return new Date(b.createTime) - new Date(a.createTime) + }) // 设置第一个未读公告为激活状态,如果没有未读则设置第一个 const firstUnread = noticeList.value.find(n => !n.isRead) if (firstUnread) { @@ -359,7 +361,8 @@ defineExpose({ } .notice-list { - width: 380px; + width: 25%; + min-width: 200px; border-right: 1px solid #e4e7ed; background: #fafafa; @@ -368,6 +371,7 @@ defineExpose({ cursor: pointer; border-bottom: 1px solid #e4e7ed; transition: all 0.3s; + position: relative; &:hover { background: #f0f2f5;