| | |
| | | // 医生 API |
| | | export const DoctorApi = { |
| | | |
| | | // 医生暂停,暂时不接收患者 |
| | | bedDoctorPause: async (params) => { |
| | | return await request.get({ url: `/ecg/doctor/bed-doctor-pause`, params }) |
| | | }, |
| | | |
| | | // 医生恢复,恢复接收患者 |
| | | bedDoctorResume: async (params) => { |
| | | return await request.get({ url: `/ecg/doctor/bed-doctor-resume`, params }) |
| | | }, |
| | | |
| | | // 医生入座, |
| | | bedDoctorOn: async (params) => { |
| | | return await request.get({ url: `/ecg/doctor/bed-doctor-on`, params }) |
| | | }, |
| | | |
| | | // 医生离座, |
| | | bedDoctorOff: async (params) => { |
| | | return await request.get({ url: `/ecg/doctor/bed-doctor-off`, params }) |
| | | }, |
| | | |
| | | // 获取医生的工位信息 |
| | | bedDoctorGet: async (params) => { |
| | | return await request.get({ url: `/ecg/doctor/bed-doctor-get`, params }) |
| | | }, |
| | | |
| | | // 看完,取下一位患者 |
| | | finishNextPatient: async (params: RoomBedVO) => { |
| | | return await request.get({ url: `/ecg/doctor/finish-next-patient`, params }) |
| | |
| | | return await request.get({ url: `/ecg/queue/bed-close`, params }) |
| | | }, |
| | | |
| | | // 医生暂停,暂时不接收患者 |
| | | bedDoctorPause: async (params) => { |
| | | return await request.get({ url: `/ecg/queue/bed-doctor-pause`, params }) |
| | | }, |
| | | |
| | | // 医生恢复,恢复接收患者 |
| | | bedDoctorResume: async (params) => { |
| | | return await request.get({ url: `/ecg/queue/bed-doctor-resume`, params }) |
| | | }, |
| | | |
| | | // 医生入座, |
| | | bedDoctorOn: async (params) => { |
| | | return await request.get({ url: `/ecg/queue/bed-doctor-on`, params }) |
| | | }, |
| | | |
| | | // 医生离座, |
| | | bedDoctorOff: async (params) => { |
| | | return await request.get({ url: `/ecg/queue/bed-doctor-off`, params }) |
| | | }, |
| | | |
| | | // 获取医生的工位信息 |
| | | bedDoctorGet: async (params) => { |
| | | return await request.get({ url: `/ecg/queue/bed-doctor-get`, params }) |
| | | }, |
| | | |
| | | // |
| | | resetSchedule: async () => { |
| | | return await request.get({ url: `/ecg/queue/reset-scheduler` }) |
| | |
| | | import QueuePanel from "@/views/ecg/doctor/components/QueuePanel.vue"; |
| | | import {DoctorApi, PatientStatisticVO, RoomBedVO} from '@/api/ecg/doctor'; |
| | | import {useUserStore} from "@/store/modules/user"; |
| | | import {QueueApi, QueueVO} from "@/api/ecg/queue"; |
| | | import {QueueVO} from "@/api/ecg/queue"; |
| | | |
| | | const userStore = useUserStore(); |
| | | |
| | |
| | | const initLoad = async () => { |
| | | list.value = await DoctorApi.getPatientList(roomBedVO) |
| | | patientStat.value = await DoctorApi.getPatientStatistic(roomBedVO) |
| | | const queueVO2 = await QueueApi.bedDoctorGet(roomBedVO) |
| | | const queueVO2 = await DoctorApi.bedDoctorGet(roomBedVO) |
| | | if (queueVO2.status === 20) |
| | | state.value = true |
| | | else if (queueVO2.status === 30) |
| | |
| | | const bedControl = async () => { |
| | | bedControlFlag.value = true |
| | | if (state.value) { |
| | | await QueueApi.bedDoctorPause(roomBedVO) |
| | | await DoctorApi.bedDoctorPause(roomBedVO) |
| | | state.value = false |
| | | } else { |
| | | await QueueApi.bedDoctorResume(roomBedVO) |
| | | await DoctorApi.bedDoctorResume(roomBedVO) |
| | | state.value = true |
| | | } |
| | | bedControlFlag.value = false |
| | |
| | | class="!w-240px" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="创建时间" prop="createTime"> |
| | | <el-date-picker |
| | | v-model="queryParams.createTime" |
| | | value-format="YYYY-MM-DD HH:mm:ss" |
| | | type="daterange" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]" |
| | | class="!w-220px" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button> |
| | | <el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button> |
| | |
| | | expired: undefined, |
| | | roomId: undefined, |
| | | bedNo: undefined, |
| | | createTime: [] |
| | | }) |
| | | const queryFormRef = ref() // 搜索的表单 |
| | | const exportLoading = ref(false) // 导出的加载中 |
| | |
| | | <script setup lang="ts"> |
| | | import {RoomBedSelect} from "@/components/RoomBedSelect" |
| | | import { RoomApi, RoomVO } from '@/api/ecg/room' |
| | | import { QueueApi } from '@/api/ecg/queue' |
| | | import {useUserStore} from "@/store/modules/user"; |
| | | import {ElMessage, ElMessageBox} from "element-plus"; |
| | | import {isStringEmpty} from "@/utils/stringUtil"; |
| | | import {cloneDeep} from "lodash-es"; |
| | | import {DoctorApi} from "@/api/ecg/doctor"; |
| | | const { push } = useRouter() |
| | | |
| | | defineOptions({ name: 'RoomLoginSelect' }) |
| | |
| | | if (newRoomVO !== curSel.value) { |
| | | let data; |
| | | if (curSel.value.docId !== null) { |
| | | data = await QueueApi.bedDoctorOff(curSel.value) |
| | | data = await DoctorApi.bedDoctorOff(curSel.value) |
| | | if (data !== 0) { |
| | | ElMessage({ |
| | | message: '内部错误!' + data, |
| | |
| | | const tempRoomVO = cloneDeep(newRoomVO) |
| | | tempRoomVO.docId = curUser.id |
| | | tempRoomVO.docName = curUser.nickname |
| | | data = await QueueApi.bedDoctorOn(tempRoomVO) |
| | | data = await DoctorApi.bedDoctorOn(tempRoomVO) |
| | | if (data !== 0) { |
| | | ElMessage({ |
| | | message: '内部错误!' + data, |
| | |
| | | |
| | | const leaveSeatConfirm = async () => { |
| | | if (curSel.value.docId !== null) { |
| | | let data = await QueueApi.bedDoctorOff(curSel.value) |
| | | let data = await DoctorApi.bedDoctorOff(curSel.value) |
| | | if (data !== 0) { |
| | | ElMessage({ |
| | | message: '内部错误!' + data, |