<template>
  <div>
    <el-badge :is-dot="hasNotice">
      <i class="el-icon-bell" @click="click" />
    </el-badge>

    <el-dialog :visible.sync="msgVisible" :title="'(通知)'+msg.title" width="800px" center>
      <!--div style="text-align: center;font-size: 16px;font-weight: bolder" >{{msg.title}}</div>-->
      <!--      {{ notice.admin }} 于 {{ msg.sendTime }}-->
<!--      <el-divider content-position="left"> 通知内容如下：</el-divider>-->
      <div v-html="msg.msgContent"  style="text-align: center"/>
      <div slot="footer" class="dialog-footer">
        <!-- <el-button type="primary" @click="afterRead">确定</el-button> -->
        <el-button v-if="msg.msgUrl!=null " type="primary" @click="handle(msg)">去处理</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script> 


export default {
  data() {
    return {
      hasNotice: false,
      timer: '',
      msgVisible:false,
      msg:{
        title:'',
        msgContent:'',
        msgUrl:''
      }
    }
  },
  mounted() {
    let that=this; 
  },
/*  beforeDestroy() {
    clearInterval(this.timer)
  },*/
  created() {
    // this.checkNotice()
     //this.getWindowsMsg();
  },
  methods: {
    click() { 
    }, 
  }
}
</script>

<style lang="scss" scoped>
/deep/ .el-badge__content.is-fixed.is-dot {
  right: 5px;
  top: 10px;
}

.el-icon-bell {
  font-size: 20px;
  cursor: pointer;
}
</style>
