diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsMyMessageController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsMyMessageController.java
index 48658f1..73023b9 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsMyMessageController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsMyMessageController.java
@@ -121,10 +121,15 @@ public class EhsMyMessageController extends BaseController
ehsMyMessage.setMyMessageType("0");
ehsMyMessage.setMyUserId(SecurityUtils.getUserId());
EhsMyMessage msg = ehsMyMessageService.selectEhsMyMessageByMyMessageMax(ehsMyMessage);
- if(msg.getMyMessageState().equals("N"))
- ajr.put("msgHD","1");
- else
+ if(msg == null){
ajr.put("msgHD","0");
+ }else{
+ if(msg.getMyMessageState().equals("N"))
+ ajr.put("msgHD","1");
+ else
+ ajr.put("msgHD","0");
+ }
+
//分析是否有本人的未读消息通知
//消息通知的每一记录,我的消息都应该有一条记录,如果没有,说明未读,并向我的消息插入一条记录,并设置为未读
//消息通知模块点击阅读按钮后,需要同时修改我的消息的已读标志
diff --git a/ruoyi-ui/src/layout/components/Navbar.vue b/ruoyi-ui/src/layout/components/Navbar.vue
index 721c9a9..a31bd07 100644
--- a/ruoyi-ui/src/layout/components/Navbar.vue
+++ b/ruoyi-ui/src/layout/components/Navbar.vue
@@ -32,13 +32,14 @@
-
-
+
+ 隐患消息
+
-
+
消息通知
@@ -121,6 +122,20 @@
}
},
methods: {
+ goHD(msgC){
+ if(msgC!=0){
+ this.$router.push({
+ path: '/ehsHiddenDangerMenu/ehsHiddenDanger', query: {overTime: "10" }
+ });
+ }
+ },
+ goMsg(msgC){
+ if(msgC!=0){
+ this.$router.push({
+ path: '/ehsNoticeMessage/ehsNoticeMessageDept', query: {noticeType: "0" }
+ });
+ }
+ },
getUnread() {
console.log("定时任务");
getUnread().then(response => {