<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="科室名称" >
                <span v-if="item!=null">{{item.deptName}}</span>
            </el-descriptions-item>
            <el-descriptions-item label="科室编码" >
                <span v-if="item!=null">{{item.deptCode}}</span>
            </el-descriptions-item>
            <el-descriptions-item label="图标" >
              <el-popover
                placement="right"
                title=""
                trigger="hover">
                <img slot="reference" :src="item.iconUrl" width="50px">
                <img :src="item.iconUrl" style="max-width: 150px;">          
              </el-popover>

            </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="isTuiOptions" :value="item.isTui"/>
             </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.createBy}}</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-if="item!=null">{{item.updateBy}}</span>
            </el-descriptions-item>



        </el-descriptions>
    </div>
    </div>
</template>

<script>
  import { listDepartment, getDepartment, delDepartment, addDepartment, updateDepartment, exportDepartment } from "@/api/his/department";
  export default {
    name: "depdetails",
    props:["data"],
    data() {
      return {
        statusOptions: [],
        isTuiOptions: [],
        item:null,
        form: {
          sreason: '',
        }
      }
    },
    created() {
      this.getDicts("sys_company_status").then(response => {
        this.statusOptions = response.data;
      });
      this.getDicts("sys_company_or").then(response => {
          this.isTuiOptions = response.data;
        });
    },
    methods: {
      getDetails(orderId) {
        this.item=null;
        getDepartment(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>
