From 91d4dbb579831da006e57643770e42d7dc184d05 Mon Sep 17 00:00:00 2001
From: Crunchy <3114200645@qq.com>
Date: 星期四, 25 四月 2024 17:36:15 +0800
Subject: [PATCH] 2024-4-25 资源要求-设备管理前端调整
---
src/view/index.vue | 24 +++++++++++++++++++++---
1 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/src/view/index.vue b/src/view/index.vue
index 77afae7..827cf8e 100644
--- a/src/view/index.vue
+++ b/src/view/index.vue
@@ -295,7 +295,7 @@
</div>
<div class="label">LIMS瀹為獙瀹ょ鐞嗙郴缁�</div>
<div class="user">
- <el-badge is-dot style="cursor: pointer;margin-right: 10px;">
+ <el-badge :is-dot="newMsg" style="cursor: pointer;margin-right: 10px;">
<i class="el-icon-bell" style="font-size: 20px;" @click="openNotice"></i>
</el-badge>
<el-dropdown trigger="click" @command="handleCommand">
@@ -427,7 +427,9 @@
activeIndex: 0,
power: [],
editVisible:false,
- query:{}
+ query:{},
+ newMsg:false,
+ timer:null,
};
},
created() {
@@ -458,6 +460,10 @@
this.activeBox = 0
}
this.getPower()
+ this.timer&&clearInterval(this.timer);
+ this.timer = setInterval(()=>{
+ this.checkForUnreadData()
+ },20000)
},
methods: {
saveClick(){
@@ -616,7 +622,19 @@
},
openNotice(){
this.$refs.notice.open()
+ this.$refs.notice.handleType()
+ },
+ checkForUnreadData(){
+ this.$axios.get(this.$api.informationNotification.checkForUnreadData).then(res => {
+ if (res.code == 201) {
+ return
+ }
+ this.newMsg = res.data
+ })
}
- }
+ },
+ destroyed() {
+ this.timer&&clearInterval(this.timer);
+ }
};
</script>
--
Gitblit v1.9.3