| | |
| | | import QueuePanel from "@/views/ecg/doctor/components/QueuePanel.vue"; |
| | | import {DoctorApi, PatientStatisticVO, RoomBedVO} from '@/api/ecg/doctor'; |
| | | import {useUserStore} from "@/store/modules/user"; |
| | | import {queueVO} from "@/api/ecg/queue"; |
| | | import {queueApi, queueVO} from "@/api/ecg/queue"; |
| | | |
| | | const userStore = useUserStore(); |
| | | |
| | | const roomBedVO: RoomBedVO = { |
| | | roomId: userStore.room.roomId, |
| | | bedNo: userStore.room.bedNo |
| | | roomId: userStore.room!.roomId, |
| | | bedNo: userStore.room!.bedNo |
| | | } |
| | | |
| | | const patientStat = ref<PatientStatisticVO>({ |
| | |
| | | queuingNum: 0 |
| | | }) |
| | | |
| | | let state: 'normal' | 'paused' = "normal"; |
| | | const state = ref<boolean>(true) |
| | | |
| | | const list = ref<queueVO[]>([]) |
| | | |
| | | const finishNextPatient = async () => { |
| | | const data = await DoctorApi.finishNextPatient(roomBedVO) |
| | | list.value = data |
| | | |
| | | const data2 = await DoctorApi.getPatientStatistic(roomBedVO) |
| | | patientStat.value = data2 |
| | | list.value = await DoctorApi.finishNextPatient(roomBedVO) |
| | | patientStat.value = await DoctorApi.getPatientStatistic(roomBedVO) |
| | | } |
| | | |
| | | const passNextPatient = async () => { |
| | | const data = await DoctorApi.passNextPatient(roomBedVO) |
| | | list.value = data |
| | | |
| | | const data2 = await DoctorApi.getPatientStatistic(roomBedVO) |
| | | patientStat.value = data2 |
| | | list.value = await DoctorApi.passNextPatient(roomBedVO) |
| | | patientStat.value = await DoctorApi.getPatientStatistic(roomBedVO) |
| | | } |
| | | |
| | | const getPatientList = async () => { |
| | | const data = await DoctorApi.getPatientList(roomBedVO) |
| | | list.value = data |
| | | |
| | | const data2 = await DoctorApi.getPatientStatistic(roomBedVO) |
| | | patientStat.value = data2 |
| | | list.value = await DoctorApi.getPatientList(roomBedVO) |
| | | patientStat.value = await DoctorApi.getPatientStatistic(roomBedVO) |
| | | } |
| | | |
| | | const pause = async () => { |
| | | state = 'paused' |
| | | const pauseQueue = async () => { |
| | | state.value = false |
| | | queueApi.bedDoctorPause(roomBedVO) |
| | | } |
| | | |
| | | const resume = async () => { |
| | | state = 'normal' |
| | | const resumeQueue = async () => { |
| | | state.value = true |
| | | queueApi.bedDoctorResume(roomBedVO) |
| | | } |
| | | |
| | | /** 初始化 **/ |
| | |
| | | <QueuePanel :queue="list"/> |
| | | </el-aside> |
| | | </el-container> |
| | | <el-container style="justify-content: center;"> |
| | | <el-container style="justify-content: center; margin-top: 30px"> |
| | | <el-button type="primary" @click="finishNextPatient">叫号</el-button> |
| | | <el-button type="primary" @click="passNextPatient">过号</el-button> |
| | | <el-button v-if="state==='normal'" type="primary" @click="pause">暂停</el-button> |
| | | <el-button v-else type="primary" @click="resume">恢复</el-button> |
| | | <el-button v-if="state" type="primary" @click="pauseQueue">暂停</el-button> |
| | | <el-button v-else type="primary" @click="resumeQueue">恢复</el-button> |
| | | </el-container> |
| | | </el-container> |
| | | </template> |