<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.foodName}}</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">{{item.action}}</span></el-descriptions-item>
          <el-descriptions-item label="食材"><span v-if="item!=null">{{item.food}}</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"> <dict-tag :options="statusOptions" :value="item.status"/></span></el-descriptions-item>
          <el-descriptions-item label="主治疾病" span="3"><span v-if="item!=null" >{{item.indications}}</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>
    </div>


    </div>
</template>

<script>
import { listMedicatedFood, getMedicatedFood, delMedicatedFood, addMedicatedFood, updateMedicatedFood, exportMedicatedFood } from "@/api/hisStore/medicatedFood";
  export default {
    name: "MedicatedFoodDetails",
    data() {
      return {
        item:null,
      }
    },
    created() {
        this.getDicts("sys_company_status").then(response => {
          this.statusOptions = response.data;
        });
    },
    methods: {
      getDetails(orderId) {
        this.item=null;
        getMedicatedFood(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>
