<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.hospitalName}}</span>
            </el-descriptions-item>
            <el-descriptions-item label="医院类型" >
                <dict-tag :options="hospitalTypeOptions" :value="item.hospitalType"/>
            </el-descriptions-item>
            <el-descriptions-item label="医院等级" >
          <dict-tag :options="hospitalTypeOptions" :value="item.hospitalLevel"/>
            </el-descriptions-item>
    <el-descriptions-item label="联系电话" >
                <span v-if="item!=null">{{item.phone}}</span>
            </el-descriptions-item>

          <el-descriptions-item label="简介" >
                <span v-if="item!=null">{{item.descs}}</span>
            </el-descriptions-item>
            <el-descriptions-item label="省市区" >
             <span v-if="item!=null">{{item.province}}</span>
            </el-descriptions-item>
          <el-descriptions-item label="省" >
                <span v-if="item!=null">{{item.province}}</span>
            </el-descriptions-item>
            <el-descriptions-item label="市" >
                <span v-if="item!=null">{{item.city}}</span>
            </el-descriptions-item>
            <el-descriptions-item label="区" >
                <span v-if="item!=null">{{item.district}}</span>
            </el-descriptions-item>


          <el-descriptions-item label="详细地址" >
                <span v-if="item!=null">{{item.address}}</span>
            </el-descriptions-item>
            <el-descriptions-item label="经度" >
                <span v-if="item!=null">{{item.lng}}</span>
            </el-descriptions-item>
            <el-descriptions-item label="维度" >
                <span v-if="item!=null">{{item.lat}}</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">{{item.updateBy}}</span>
            </el-descriptions-item>
            <el-descriptions-item label="处方印章" >
                 <el-popover
                   placement="right"
                   title=""
                   trigger="hover">
                   <img slot="reference" :src="item.sealUrl" width="50px">
                   <img :src="item.sealUrl" style="max-width: 250px;">
                 </el-popover>
            </el-descriptions-item>
        <el-descriptions-item label="医院照片" >
        <el-popover
          placement="right"
          title=""
          trigger="hover">
          <img slot="reference" :src="item.imgUrl" width="50px">
          <img :src="item.imgUrl" style="max-width: 250px;">
        </el-popover>

        </el-descriptions-item>
        </el-descriptions>
    <dev>
  </dev>
</div>
</div>
</template>
<style>
.bm-view {
  width: 100%;
  height: 300px;
}
</style>
<script>
  import { listHospital, getHospital, delHospital, addHospital, updateHospital, exportHospital } from "@/api/his/hospital";
  export default {
    name: "hosdetails",
    props:["data"],
    data() {
      return {
       center: {lng: 156, lat: 39},
       zoom: 15,
       // 状态数据字典
       hospitalleveOptions: [],
       statusOptions: [],
       hospitalTypeOptions: [],
       item:null,
       form: {
          sreason: '',
        }
      }
    },
    created() {
     this.getDicts("sys_company_status").then(response => {
          this.statusOptions = response.data;
        });
     this.getDicts("sys_hospital_type").then(response => {
          this.hospitalTypeOptions = response.data;
        });
     this.getDicts("sys_hospital_level").then(response => {
             this.hospitalleveOptions = response.data;
        });
    },
    methods: {
      handler ({BMap, map}) {
            this.center.lng = 116.404
            this.center.lat = 39.915
            this.zoom = 15
          },
      getDetails(orderId) {
          this.item=null;
          getHospital(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>
