<style>
  .noticeView {
    width: 1200px;
    margin: auto;
  }

  .noticeView .noticeContent {
    width: 100%;
    min-height: 300px;
    padding: 20px;
  }

  .noticeView .notice_dix {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
  }

  .noticeView .noticeBlue {
    color: #2961FE;
    font-weight: bold;
  }

  .noticeView .notice_Span {
    color: #111111;
    font-weight: bold;
  }

  .noticeView .noticeViewTitle {
    width: 100%;
    text-align: center;
    font-size: 28px;
    color: #000000;
    margin-top: 20px;
    font-weight: Medium;
  }

  .noticeView .notiveViewInner {
    margin-top: 20px;
    color: #333333;
    font-size: 15px;
    line-height: 26px;
  }

</style>
<template>
  <div class="noticeView">
    <div class="noticeTopBg">
      <img style="width:100%;height:100%;" src="../assets/images/noticeBigBg.png" />
    </div>
    <div class="noticeContent">
      <div class="notice_dix">
        <div>
          <span class="noticeBlue">Fr：</span>
          <span class="notice_Span">{{dataList.From}}</span>
        </div>
        <div>
          <span class="noticeBlue">编号：</span>
          <span class="notice_Span">{{dataList.Number}}</span>
        </div>
      </div>
      <div style="margin:10px 0;">
        <div>
          <span class="noticeBlue">To：</span>
          <span class="notice_Span">
            <span v-for="(item,index) in dataList.toList">{{item.DeptName}}
              <template v-if="index!=dataList.toList.length-1">、</template>
            </span>
          </span>
        </div>
      </div>
      <div>
        <div>
          <span class="noticeBlue">Cc：</span>
          <span class="notice_Span">
            <span v-for="(item,index) in dataList.ccList">{{item.EmName}}
              <template v-if="index!=dataList.ccList.length-1">、</template>
            </span>
          </span>
        </div>
      </div>
      <div style="margin:5px 0;">
        <div>
          <span class="noticeBlue">Time：</span>
          <span class="notice_Span">{{dataList.UpdateTime}}</span>
        </div>
      </div>
      <div class="noticeViewTitle">{{dataList.Title}}</div>
      <div class="notiveViewInner" v-html="dataList.Content">

      </div>
      <div style="margin-top:20px;">
        <div class="noticeFile" v-if="dataList.fileList.length>0" v-for="item in dataList.fileList">
          <span style="cursor:pointer;">
            <a :href="item.FileUrl" style="color:#2961FE;text-decoration:none;" target="_blank">
              <i class="iconfont icon-Download" style="margin-right:5px;"></i>{{item.FileName}}</a>
          </span>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
  import {
    SetNoticeOperation,
    GetNoticeInfo
  } from '../api/course/index'

  export default {
    data() {
      return {
        infoMsg: {
          NoticeId: 0
        },
        noticeMsg: {
          NoticeId: 0,
          Type: 5
        },
        dataList: {}
      }
    },
    created() {},

    mounted() {
      if (this.$route.query.NoticeId) {
        this.infoMsg.NoticeId = this.$route.query.NoticeId;
        this.noticeMsg.NoticeId = this.$route.query.NoticeId;
        this.getList();
        this.SetOperation();
      }
    },
    methods: {
      //关闭弹窗
      getList() {
        GetNoticeInfo(this.infoMsg).then(res => {
          if (res.Code == 1) {
            this.dataList = res.Data;
          }
        })
      },
      //查看详情
      SetOperation() {
        SetNoticeOperation(this.noticeMsg).then(res => {
          if (res.Code == 1) {

          }
        })
      }
    },
  }

</script>
