eight
2024-11-19 fca3269349f91fd115c0af6a3fa1b13880bfaa5f
手动时间段选择 …
已添加1个文件
已修改1个文件
46 ■■■■■ 文件已修改
src/api/ecg/queuesequence/index.ts 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/ecg/appointment/CheckItemPanel.vue 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/ecg/queuesequence/index.ts
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
import request from '@/config/axios'
// æŽ’队 VO
export interface QueueSequenceVO {
  id: number // id
  checkType: number // é¢„约检查类型
  timeSlot: number
  queueNo: number
  queueVipNo: number
  queueFull: number
  queueVipFull: number
}
// æŽ’队 API
export const QueueSequenceApi = {
  // èŽ·å¾—å½“å¤©æœªæ»¡çš„VIP时间段
  getTimeslotByCheckType: async (checkType: number) => {
    return await request.get({ url: `/ecg/queue-sequence/get-timeslot-by-checktype`, checkType })
  }
}
src/views/ecg/appointment/CheckItemPanel.vue
@@ -2,9 +2,10 @@
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";
import {QueueSequenceApi, QueueSequenceVO} from "@/api/ecg/queuesequence";
import {formatDate} from "../../../utils/formatTime";
defineComponent({
  name: 'CheckItemPanel'
@@ -18,6 +19,8 @@
})
const checkTypeStore = useCheckTypeStore();
const bookTimeSlotVip = ref<number>()
const _confirmAppointment = async () => {
  if (!isCurrentDay(props.appointment.bookDate)) {
@@ -35,7 +38,10 @@
            type: 'success',
            message: 'Delete completed',
          })
          const data = await AppointmentApi.confirmAppointmentVip(props.appointment)
          const tempAppointment = cloneDeep(props.appointment)
          tempAppointment.bookTimeslot = bookTimeSlotVip
          const data = await AppointmentApi.confirmAppointmentVip(tempAppointment)
          ElNotification({
            title: '温馨提示',
            message: data,
@@ -64,7 +70,18 @@
  <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>
    <div v-if="isCurrentDay(appointment.bookDate)">{{formatTimeslot(appointment.bookTimeslot)}}</div>
    <el-select v-else v-model="bookTimeSlotVip" placeholder="请选择预约时间段">
      <el-option
          v-for="item in QueueSequenceApi.getTimeslotByCheckType(appointment.bookCheckType)"
          :key="item.id"
          :label="formatTimeslot(item.timeSlot)"
          :value="item.timeSlot"
          :disabled="item.queueVipNo === item.queueVipFull"
      />
    </el-select>
    <el-divider/>
    <el-button :type="isCurrentDay(appointment.bookDate)?'primary':'warning'" @click="_confirmAppointment"><Icon icon="ep:refresh" class="mr-5px" /> æŽ’队 </el-button>
  </el-card>