<template>
  <div class="common-box">
    <el-card>
      <div class="consultationDetails-content-head">
        <h2 style="line-height: 50px">{{ article.msgTitle }}</h2>
        <div style="display: flex; justify-content: center; width: 100%">
          <ul class="flex">
            <li>时间：{{ article.msgPubdTime | formatDate }}</li>
            <li>发布者：{{ article.msgPubdUser }}</li>
          </ul>
        </div>
      </div>

      <div class="consultationDetails-content-main enlargeFont">
        <div
          style="border: none; border-top: 1px solid #ccc; padding-top: 30px"
        >
          <p
            class="editor-content-view editor-css"
            v-html="article.mainText"
          ></p>
        </div>
      </div>
    </el-card>
  </div>
</template>

<script>
import { getNoticeDetail } from "@/api/system/notice";
import moment from "moment";
export default {
  data() {
    return {
      article: {},
    };
  },
  // 创建阶段
  created() {
    this.getData();
  },
  filters: {
    formatDate(status) {
      if (status) {
        var time = moment(time).format("YYYY-MM-DD HH:mm:ss");
      }
      return time;
    },
  },
  methods: {
    // 获取数据
    getData() {
      // 接口获取第几页和每页显示个数
      getNoticeDetail({ id: this.$route.params.id }).then((response) => {
        this.article = response.data;
      });
    },
  },
};
</script>
 <style src="../../../../styles/wangEditor.css"></style> -->
<style lang="scss" scoped>
.consultationDetails-content-head {
  text-align: center;
  h2 {
    font-size: 30px;
  }

  ul {
    margin: 20px 0 20px;
    font-size: 14px;
    color: #999999;

    li {
      margin-right: 15px;
    }
  }
}
.consultationDetails-content-main {
  padding: 0px 65px;
  ::v-deep p {
    margin-bottom: 15px;
  }
}
</style>
