| | |
| | | </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"> |
| | |
| | | activeIndex: 0, |
| | | power: [], |
| | | editVisible:false, |
| | | query:{} |
| | | query:{}, |
| | | newMsg:false, |
| | | timer:null, |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | this.activeBox = 0 |
| | | } |
| | | this.getPower() |
| | | this.timer&&clearInterval(this.timer); |
| | | this.timer = setInterval(()=>{ |
| | | this.checkForUnreadData() |
| | | },10000) |
| | | }, |
| | | methods: { |
| | | saveClick(){ |
| | |
| | | }, |
| | | 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> |