<template>
  <div style="display: flex">
    <div style="display: flex; flex-wrap: wrap; width: 100%">      
      <div class="query">
        <span>检查医生</span>
        <el-input v-model="doctorCheck.RegisterCheckEdit.checkDoctorId" size="small" style="width: 110px" />
      </div>
      <div class="query">
        <span>检查日期</span>
        <el-date-picker v-model="doctorCheck.RegisterCheckEdit.checkDate" type="date" style="width: 130px" size="small" />
      </div> 
      <div class="query">
        <span>操作者</span>
        <el-input v-model="doctorCheck.RegisterCheckEdit.LastModifierId" size="small"  style="width: 110px" disabled/>
      </div>
      <div class="query">
        <span>操作日期</span>
        <el-input :value="doctorCheck.RegisterCheckEdit.LastModificationTime ? lmoment(doctorCheck.RegisterCheckEdit.LastModificationTime, 'yyyy-MM-DD') :''" style="width: 120px" size="small" disabled></el-input>
      </div>
      <div class="query">
        <span>状态</span>
        <el-select v-model="doctorCheck.RegisterCheckEdit.completeFlag" style="width: 80px" size="small" disabled>
          <el-option v-for="item in dict.checkCompleteFlag" :key="item.id" :label="item.displayName" :value="item.id" />
        </el-select>
      </div>      
    </div>   
  </div>
</template>
<script>
import moment from "moment";
import { mapState } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";

export default {
  components: {},
  data() {
    return {
      dialogVisible: false,

      pickerOptions: {
        shortcuts: [
          {
            text: "最近一周",
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
              picker.$emit("pick", [start, end]);
            },
          },
          {
            text: "最近一个月",
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
              picker.$emit("pick", [start, end]);
            },
          },
          {
            text: "最近三个月",
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
              picker.$emit("pick", [start, end]);
            },
          },
        ],
      },
    };
  },

  created() {},

  //挂载完成
  mounted() {},

  computed: {
    ...mapState(["dict", "doctorCheck","patientRegister", "customerOrg"]),
    lmoment(date, forMat) {
      return moment(new Date(date)).format(forMat);
    },
  },
  methods: {
    //查询
    btnQuery() {
      this.doctorCheck.RegisterCheckEdit.times++;
      console.log("this.doctorCheck.RegisterCheckEdit", this.doctorCheck.RegisterCheckEdit);
    },

    //读身份证
    readIdCard() {
      alert("读身份证");
    },
  },
};
</script>
<style scoped>
.query {
  margin-left: 10px;
}
</style>
