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 @@