eight
2024-11-08 34ec336308da8fcd8e306ad1d39aaad7c933f77b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<script setup lang="ts">
import {defineComponent, PropType} from "vue";
import {useCheckTypeStore} from "@/store/modules/checkType";
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'
})
 
const  props = defineProps({
  appointment: {
    type: Object as PropType<AppointmentVO>,
    required: true
  }
})
 
const checkTypeStore = useCheckTypeStore();
 
const _confirmAppointment = async () => {
  const data = await AppointmentApi.confirmAppointment(props.appointment)
  ElNotification({
    title: '温馨提示',
    message: data,
    type: 'warning'
  })
}
 
</script>
 
<template>
  <el-card style="width: 200px" shadow="hover" >
    <template #header>{{checkTypeStore.getCheckTypeName(appointment.bookCheckType)}}</template>
    <div>{{formatDate(appointment.bookDate, 'YYYY-MM-DD')}}</div>
    <div>{{formatTimeslot(appointment.bookTimeslot)}}</div>
    <el-divider/>
    <el-button :type="isCurrentDay(appointment.bookDate)?'primary':'warning'" @click="_confirmAppointment"><Icon icon="ep:refresh" class="mr-5px" /> 排队 </el-button>
  </el-card>
</template>
 
<style scoped lang="scss">
.el-card ::v-deep {
  .el-card__header {
    background-color: var(--el-color-primary-light-3);
    padding: 2px;
    text-align: center;
  }
  .el-card__body {
    //background-color: var(--el-color-primary-light-3);
    padding: 4px;
    text-align: center;
  }
}
</style>