<template>
    <div style="background-color: #f0f2f5; padding-bottom: 20px; min-height: 100%; " >
      <div style="padding: 20px; background-color: #fff;">
         经典名方详情
      </div>
<div class="contentx" v-if="item!=null">
        <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="经典名方名称"><span v-if="item!=null">{{item.prescribeName}}</span></el-descriptions-item>
          <el-descriptions-item label="排序"><span v-if="item!=null">{{item.sort}}</span></el-descriptions-item>
          <el-descriptions-item label="状态"><span v-if="item!=null"> <dict-tag :options="statusOptions" :value="item.status"/></span></el-descriptions-item>
          <el-descriptions-item label="方剂类型"><span v-if="item!=null"> <dict-tag :options="prescribeTypeOptions" :value="item.prescribeType"/></span></el-descriptions-item>
           <el-descriptions-item label="主治疾病"><span v-if="item!=null">{{item.indication}}</span></el-descriptions-item>
          <el-descriptions-item label="归属书籍" span="3"><span v-if="item!=null">{{item.belongBook}}</span></el-descriptions-item>
          <el-descriptions-item label="药物作用"span="3"><span v-if="item!=null"><span v-html="item.action"></span></span></el-descriptions-item>
          <el-descriptions-item label="用药方法" span="3"><span v-if="item!=null"> <span v-html="item.usageMethod"></span></span></el-descriptions-item>
          <el-descriptions-item label="基本信息" span="3"><span v-if="item!=null"> <span v-html="item.descs"></span></span></el-descriptions-item>
          <el-descriptions-item label="注意事项" span="3"><span v-if="item!=null"> <span v-html="item.msg"></span></span></el-descriptions-item>
          <el-descriptions-item label="创建时间"><span v-if="item!=null">{{item.createTime}}</span></el-descriptions-item>

        </el-descriptions>
    </div>


    </div>
</template>

<script>
import { listFamousPrescribe, getFamousPrescribe, delFamousPrescribe, addFamousPrescribe, updateFamousPrescribe, exportFamousPrescribe } from "@/api/his/famousPrescribe";
  export default {
    name: "prescribeName",
    data() {
      return {
        // 方剂类型字典
        prescribeTypeOptions: [],
        // 状态字典
        statusOptions: [],
        item:null,
      }
    },
    created() {
        this.getDicts("sys_famous_prescribe_type").then(response => {
          this.prescribeTypeOptions = response.data;
        });
        this.getDicts("sys_company_status").then(response => {
          this.statusOptions = response.data;
        });
    },
    methods: {
      getDetails(orderId) {
        this.item=null;
        getFamousPrescribe(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>
