| | |
| | | return today.diff(birthday, 'year'); |
| | | } |
| | | |
| | | export function isCurrentDay( _date: Date) { |
| | | const today = dayjs(new Date()); |
| | | return today.isSame( dayjs(_date), 'day' ) |
| | | } |
| | | |
| | | export const dateUtil = dayjs |
| | |
| | | import {AppointmentApi, AppointmentVO} from "@/api/ecg/appointment"; |
| | | import {dateFormatter2, formatDate} from "@/utils/formatTime"; |
| | | import {formatTimeslot} from "@/utils/formatter"; |
| | | import {isCurrentDay} from "@/utils/dateUtil"; |
| | | |
| | | defineComponent({ |
| | | name: 'CheckItemPanel' |
| | |
| | | <div>{{formatDate(appointment.bookDate, 'YYYY-MM-DD')}}</div> |
| | | <div>{{formatTimeslot(appointment.bookTimeslot)}}</div> |
| | | <el-divider/> |
| | | <el-button type="primary" @click="_confirmAppointment"><Icon icon="ep:refresh" class="mr-5px" /> 排队 </el-button> |
| | | <el-button :type="isCurrentDay(appointment.bookDate)?'primary':'warning'" @click="_confirmAppointment"><Icon icon="ep:refresh" class="mr-5px" /> 排队 </el-button> |
| | | </el-card> |
| | | </template> |
| | | |