<template>
  <div class="app-container">
    <el-form>
      <el-form-item label="新闻标题：">
        <span>{{ info.title }}</span>
      </el-form-item>
      <!-- <el-form-item label="新闻副标题：">
        <span>{{info.title}}</span>
      </el-form-item> -->
      <el-form-item label="新闻简介：">
        <span>{{ info.introduction }}</span>
      </el-form-item>
      <el-form-item label="发布时间：">
        <span>{{ info.releaseTime | parseTime }}</span>
      </el-form-item>
    </el-form>
    <Editor v-model="info.content" style="width: 100%" :disabled="true"/>
  </div>
</template>

<script>
import Editor from "@/components/UEditor/index.vue";
import { getWorkBookInfo } from "@/api/workBook";

export default {
  data() {
    return {
      id: this.$route.query.id,
      info: {}
    };
  },
  components: { Editor },
  created() {
    this.getInfo();
  },
  methods: {
    getInfo() {
      // console.log(this.id);
      getWorkBookInfo({ id: this.id }).then(res => {
        // console.log(res);
        this.info = res.d;
      });
    }
  }
};
</script>

<style></style>
