<template>
  <div class="app-container" v-loading="loading">
    <h3 class="toolbar">
      <span class="title">消息信息</span>
    </h3>
    <table class="table_view">
      <tr>
        <th>通知类型</th>
        <td>{{info.noticeType}}</td>
        <th>状态</th>
        <td>{{info.status}}</td>
      </tr>
      <tr>
        <th>发送时间</th>
        <td>{{info.createTime}}</td>
      </tr>
      <tr>
        <th>内容</th>
        <td>{{info.noticeContent}}</td>
      </tr>

    </table>
  </div>
</template>

<script>
  import { noticeByIdApi } from "@/api/admin/msg/msg"
  export default {
    data () {
      return {
        loading: false,
        noticeId: undefined,
        roleType: '',
        info: {
        },
      }
    },
    created () {
      this.noticeId = this.$route.params.noticeId || undefined;
      if(this.noticeId) {
        this.getData()
      }
    },
    methods: {
      getData() {
        noticeByIdApi(this.noticeId).then(res => {
          this.info = res.data.records || {}
        })
      },
      cancel() {
        this.$store.dispatch("tagsView/delView", this.$route); // 关闭当前tab
        this.$router.go(-1);
      }
    }
  }
</script>

<style>
</style>
