From 4fdcb1ca205b2c02d7449dfd96d36552abf35486 Mon Sep 17 00:00:00 2001 From: liukewei Date: Thu, 18 Jan 2024 14:12:34 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B4=AF=E8=AE=A1=E8=B7=9F=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/web/controller/ehs/EhsNoticeMessageController.java | 3 +++ ruoyi-ui/src/layout/components/Navbar.vue | 3 ++- ruoyi-ui/src/views/ehs/ehsExamples/indexHD.vue | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsNoticeMessageController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsNoticeMessageController.java index dad9d6d..dd92da6 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsNoticeMessageController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsNoticeMessageController.java @@ -130,6 +130,9 @@ public class EhsNoticeMessageController extends BaseController } ehsNoticeMessage.setDeptList(StringUtils.join(deptList, ",")); } + //直接发布,不在有先保存,再发布了。 + ehsNoticeMessage.setStatus("1"); + ehsNoticeMessage.setIssueTime(new Date()); return toAjax(ehsNoticeMessageService.save(ehsNoticeMessage)); } } diff --git a/ruoyi-ui/src/layout/components/Navbar.vue b/ruoyi-ui/src/layout/components/Navbar.vue index 66a5411..721c9a9 100644 --- a/ruoyi-ui/src/layout/components/Navbar.vue +++ b/ruoyi-ui/src/layout/components/Navbar.vue @@ -33,7 +33,7 @@ - + 隐患消息 @@ -147,6 +147,7 @@ }, mounted() { console.log("启动定时器"); + this.getUnread(); //一秒后执行一次get方法,打印1 this.timer = setInterval(this.getUnread, 10000);//十秒执行一次 }, diff --git a/ruoyi-ui/src/views/ehs/ehsExamples/indexHD.vue b/ruoyi-ui/src/views/ehs/ehsExamples/indexHD.vue index 79061aa..17023e0 100644 --- a/ruoyi-ui/src/views/ehs/ehsExamples/indexHD.vue +++ b/ruoyi-ui/src/views/ehs/ehsExamples/indexHD.vue @@ -1,5 +1,5 @@