| | |
| | | <el-tooltip class="item" effect="dark" content="全屏" placement="bottom"> |
| | | <screenfull id="screenfull" class="right-menu-item hover-effect" /> |
| | | </el-tooltip> |
| | | |
| | | <el-tooltip class="item" effect="dark" content="我的消息" placement="bottom"> |
| | | <el-badge :is-dot="$store.state.settings.isDot" class="item right-menu-item hover-effect"> |
| | | <i class="el-icon-bell" @click="$message('点击了我的消息!');$store.state.settings.isDot=false" /> |
| | | </el-badge> |
| | | </el-tooltip> |
| | | |
| | | <div style=" font-size: 18px;font-family: 'Microsoft YaHei';color:#AAAAAA;padding:0 8px;cursor: pointer"> |
| | | {{ stu_torgname }} |
| | | </div> |
| | |
| | | this.username = getCookie('username') |
| | | this.stu_torgname = getCookie('stu_torgname') === '' ? '系统管理员' : getCookie('stu_torgname') |
| | | }, |
| | | mounted() { |
| | | this.$signalr.off('SendAll') |
| | | this.$signalr.on('SendAll', (res) => { |
| | | this.$notify({ |
| | | offset: 80, |
| | | type: 'warning', |
| | | title: '消息提醒', |
| | | message: res |
| | | }) |
| | | this.$store.state.settings.isDot = true |
| | | }) |
| | | }, |
| | | computed: { |
| | | ...mapGetters([ |
| | | 'sidebar', |
| | |
| | | this.$store.dispatch('app/toggleSideBar') |
| | | }, |
| | | async logout() { |
| | | this.$signalr.off('SendAll') |
| | | await this.$store.dispatch('user/logout') |
| | | this.$message.success('退出成功!') |
| | | this.$router.push(`/login`) |
| | |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | ::v-deep .el-badge__content { |
| | | position: absolute !important; |
| | | top: 12px !important; |
| | | right: 10px !important; |
| | | } |
| | | |
| | | .display_btw { |
| | | display: flex; |
| | | justify-content: space-between; |