Procházet zdrojové kódy

添加消息提醒

qinhb před 1 týdnem
rodič
revize
b879b95e41

+ 19 - 1
src/layout/components/NavBar/components/NavbarRight.vue

@@ -157,6 +157,15 @@ const clickItem =(row) =>{
   if(row.msgId === '5'){
     window.open("/storage/warningInfo",'_blank')
   }
+  if(row.msgId === '7'){
+    window.open("/plan/prepare",'_blank')
+  }
+  if(row.msgId === '8'){
+    window.open("/storage/task",'_blank')
+  }
+  if(row.msgId === '9'){
+    window.open("/requisition",'_blank')
+  }
 }
 const openMessageDialog = () => {
   handleQuery();
@@ -272,9 +281,18 @@ const handleQuery1 = (params, done) => {
   };
   queryMessageList(querySearch, page1, pageData1, done);
 };
-
+const timer = ref(null)
 onMounted(() => {
   checkUnReadMessageNum();
+  timer.value = setInterval(() => {
+    checkUnReadMessageNum();
+  }, 20000);
+});
+onBeforeUnmount(()=>{
+  clearInterval(timer.value)
+})
+onUnmounted(()=>{
+  clearInterval(timer.value)
 });
 
 const userCenterRef = ref();