<template>
  <my-dialog :print="print" title="UBM预约" :is-show="show" @close="closeDialog">
    <el-form id="UBMOrder" ref="form" :model="form" label-width="80px">
      <el-form-item label-width="100px" required label="选择患者:">
        <el-input suffix-icon="el-icon-search" />
      </el-form-item>
      <div class="patientDetail">
        <div style="font-size: 16px;font-weight: bold">患者信息</div>
        <div class="detailItem">
          <div>登记号：132456</div>
          <div>电话：19912132456</div>
        </div>
        <div class="detailItem">
          <div>姓名：张三</div>
          <div>性别：男</div>
          <div>生日：1991-08-08</div>
          <div>年龄：23</div>
          <div>来源：门诊/住院</div>
        </div>
      </div>
      <el-form-item label-width="100px" required label="负责医生:">
        <el-col :span="12">
          <el-select v-model="value" placeholder="请选择">
            <el-option
              v-for="item in options"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            />
          </el-select>
        </el-col>
        <el-col :span="12">
          已开医嘱: <el-radio v-model="radio" label="1">是</el-radio>
          <el-radio v-model="radio" label="2">否</el-radio>
        </el-col>
      </el-form-item>
      <el-form-item label-width="100px" required label="预约时间:">
        <el-col :span="11">
          <el-date-picker v-model="form.date1" type="date" placeholder="选择日期" style="width: 100%;" />
        </el-col>
        <el-col class="line" :span="1">-</el-col>
        <el-col :span="11">
          <el-time-picker v-model="form.date2" placeholder="选择时间" style="width: 100%;" />
        </el-col>
      </el-form-item>
    </el-form>
  </my-dialog>
</template>

<script>
import MyDialog from '@/page-subspecialty/views/modules/nurseManagement/myDialog.vue'

export default {
  name: 'UBMOrder',
  components: { MyDialog },
  props: {
    isShow: {
      type: Boolean,
      default: false
    },
    patientInfo: {
      type: Object,
      default: () => {}
    }
  },
  data() {
    return {
      show: false,
      radio: '1',
      print: {
        id: 'UBMOrder'
      },
      form: {
        date1: '',
        date2: ''
      },
      options: [{
        value: '选项1',
        label: '黄金糕'
      }, {
        value: '选项2',
        label: '双皮奶'
      }, {
        value: '选项3',
        label: '蚵仔煎'
      }, {
        value: '选项4',
        label: '龙须面'
      }, {
        value: '选项5',
        label: '北京烤鸭'
      }],
      value: ''
    }
  },
  watch: {
    isShow(val) {
      this.show = val
    }
  },
  methods: {
    closeDialog(val) {
      this.show = val
      this.$emit('close', val)
    }
  }
}
</script>

<style lang="scss" scoped>
::v-deep .el-form-item__label{
  font-size: 14px;
}
.patientDetail{
  border: 1px solid #6EB1FF;
  border-radius:  8px;
  background: #E8F5FF;
  padding: 16px;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.88);
  margin-bottom: 22px;
}
.detailItem{
  display:flex;
  margin: 8px 0;
  div{
    margin-right: 20px;
  }
}
</style>
