<template>
    <div style="background-color: #f0f2f5; padding-bottom: 20px; min-height: 100%; " >
      <div style="padding: 20px; background-color: #fff;">
        医案科普详情
      </div>
<div class="contentx" >
  <div class="desct"> 医案科普详情</div>
 <el-descriptions title="" :column="3" border>
            <el-descriptions-item label="封面图" >
              <el-image
                      style="width: 100px"
                      :src="item.imgUrl"
                      :preview-src-list="[item.imgUrl]">
              </el-image>
            </el-descriptions-item>
            <el-descriptions-item label="分类" > <dict-tag v-if="item.articleType!=null" :options="articleTypeOptions" :value="item.articleType"/> </el-descriptions-item>
            <el-descriptions-item label="标题" >
                <span v-if="item!=null">{{item.title}}</span>
            </el-descriptions-item>
            <el-descriptions-item label="浏览量" >
                <span v-if="item!=null">{{item.views}}</span>
            </el-descriptions-item>
            <el-descriptions-item label="创建时间" >
                <span v-if="item!=null">{{item.createTime}}</span>
            </el-descriptions-item>
            <el-descriptions-item label="更新时间" >
                <span v-if="item!=null">{{item.updateTime}}</span>
            </el-descriptions-item>
            <el-descriptions-item label="内容" >
                <span v-html="item.contents"></span>
            </el-descriptions-item>
        </el-descriptions>

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

<script>
import { listCaseArticle, getCaseArticle, delCaseArticle, addCaseArticle, updateCaseArticle, exportCaseArticle } from "@/api/his/caseArticle";
  export default {
    name: "caseArticledetails",
    props:["data"],
    data() {
      return {
        // 医案科普分类字典
        articleTypeOptions: [],
        // 状态字典
        statusOptions: [],
        item:null,
      }
    },
    created() {
     this.getDicts("sys_case_article_type").then(response => {
       this.articleTypeOptions = response.data;
     });
     this.getDicts("sys_company_status").then(response => {
       this.statusOptions = response.data;
     });
    },
    methods: {
      getDetails(orderId) {
        this.item=null;
        getCaseArticle(orderId).then(response => {
          this.item = response.data;
        });
      },
    }
  }
</script>
<style>

  .contentx{
      height: 100%;
      background-color: #fff;
      padding: 0px 20px 20px;
      margin: 20px;
  }
  .el-descriptions-item__label.is-bordered-label{
    font-weight: normal;
  }
  .el-descriptions-item__content {
    max-width: 150px;
    min-width: 100px;
  }
  .desct{
      padding-top: 20px;
      padding-bottom: 20px;
      color: #524b4a;
      font-weight: bold;
    }
</style>
