<template>
  <div style="background-color: #f0f2f5; padding-bottom: 20px; min-height: 100%; " >
    <div style="padding: 20px; background-color: #fff;">
      用药报告
    </div>
    <div class="my-content" v-if="item!=null">
      <div class="my-title">
        报告信息
      </div>
      <el-descriptions title="" :column="3" border>
        <el-descriptions-item label="会员昵称" >
            <span v-if="item!=null">{{item.nickName}}</span>
        </el-descriptions-item>
        <el-descriptions-item label="咨询总结" >
            <span v-if="item!=null">{{item.reportSummary}}</span>
        </el-descriptions-item>
        <el-descriptions-item label="生活建议" >
            <span v-if="item!=null">{{item.reportAdvice}}</span>
        </el-descriptions-item>
        <el-descriptions-item label="状态" >
            <dict-tag :options="statusOptions" :value="item.status"/>
        </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.pingStar}}分</span>
        </el-descriptions-item>
        <el-descriptions-item label="评价内容" >
            <span v-if="item!=null">{{item.pingContent}}</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.remark}}</span>
        </el-descriptions-item>
      </el-descriptions>
    </div>
</div>
</template>

<script>
  import { getDrugReportById } from "@/api/drugReport";
  export default {
    name: "drugReport",
    props:["data"],
    data() {
      return {
        statusOptions: [],
        item:null,
        
      }
    },
    created() {
      this.getDicts("sys_drug_report_status").then(response => {
        this.statusOptions = response.data;
      });
    },
    methods: {
      getDetails(reportId) {
          this.item=null;
          var data={reportId:reportId}
          getDrugReportById(data).then(response => {
              this.item = response.data;
          });
      },
    }
  }
</script>
<style lang="scss" scoped>
  .my-content{
      background-color: #fff;
      padding: 20px;
      margin: 20px;
      .my-title{
        margin-bottom: 20px;
        color: #524b4a;
        font-weight: bold;
      }
      .btn-box{
        margin:15px 0px;
        text-align:right;
      }
  }
  .el-descriptions-item__label.is-bordered-label{
    font-weight: normal;
  }
  .el-descriptions-item__content {
    max-width: 500px;
    min-width: 100px;
  }
</style>