<template>
  <div>
    <div class="con-title">消息通知</div>
    <div class="con-box">
      <el-collapse v-model="activeNames" @change="handleChange">
        <template v-for="(item, index) in msgList">
          <el-collapse-item v-bind:key="index" title="系统通知" :name="index">
            <div v-html="item.text"></div>
          </el-collapse-item>
        </template>
      </el-collapse>
      <div style="height: 0.3rem;"></div>
    </div>
  </div>
</template>

<script>
import { request } from '@actions'

export default {
  components: { },
  data () {
    return {
      activeNames: ['1'],
      msgList: []
    }
  },
  mounted () {
    request({
      component: this,
      actionName: 'msgAction',
      functionName: 'getMyMsg',
      data: {},
      thenCallback: data => {
        this.msgList = data
      },
      catchCallback: () => {},
      finallyCallback: () => {

      }
    })
  },
  methods: {
    handleChange (val) {
      console.log(val)
    }
  }
}
</script>


<style lang="scss" scoped>
.total-core, .compulsory-core, .elective-core {
  margin-top: 0.1rem;
  font-size: 16px;
  line-height: 36px;
  .title {
    float: left;
    // margin-left: 5px;
  }
  .core {
    float: right;
    margin-right: 3px;
    font-size: 12px;
  }
}
.color-box {
  padding: 0.1rem 0 0.2rem 0;
  text-align: right;
  .color {
    display: inline-block;
    vertical-align: text-bottom;
    width: 14px;
    height: 14px;
  }
  .txt {
    display: inline-block;
    padding: 0 0.2rem 0 0.1rem;
    font-size: 14px;
    line-height: 36px;
  }
}
</style>
