| | |
| | | } |
| | | |
| | | // 排队 API |
| | | export const queueApi = { |
| | | export const QueueApi = { |
| | | // 查询排队分页 |
| | | getqueuePage: async (params: any) => { |
| | | return await request.get({ url: `/ecg/queue/page`, params }) |
| | |
| | | return await request.get({ url: `/clinic/room/list-simple-room` }) |
| | | }, |
| | | |
| | | |
| | | // 获取诊床Map |
| | | getAllBedMap: async () => { |
| | | return await request.get({ url: `/clinic/room/list-all-bed` }) |
| | | }, |
| | | |
| | | // |
| | | resetRoom: async () => { |
| | | return await request.get({ url: `/clinic/room/reset-room` }) |
| | | } |
| | | } |
| | |
| | | <script lang="ts" setup> |
| | | import { RoomApi, RoomVO } from '@/api/ecg/room' |
| | | import { queueApi } from '@/api/ecg/queue' |
| | | import { QueueApi } from '@/api/ecg/queue' |
| | | import {PropType} from "vue"; |
| | | const emit = defineEmits(['refresh']) |
| | | |
| | |
| | | }) |
| | | |
| | | const openBed = async (item) => { |
| | | await queueApi.bedOpen(item) |
| | | await QueueApi.bedOpen(item) |
| | | emit('refresh') |
| | | } |
| | | |
| | | const closeBed = async (item) => { |
| | | await queueApi.bedClose(item) |
| | | await QueueApi.bedClose(item) |
| | | emit('refresh') |
| | | } |
| | | |
| | |
| | | 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 {QueueApi, 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 QueueApi.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 QueueApi.bedDoctorPause(roomBedVO) |
| | | state.value = false |
| | | } else { |
| | | await queueApi.bedDoctorResume(roomBedVO) |
| | | await QueueApi.bedDoctorResume(roomBedVO) |
| | | state.value = true |
| | | } |
| | | bedControlFlag.value = false |
| | |
| | | </Dialog> |
| | | </template> |
| | | <script setup lang="ts"> |
| | | import { queueApi, QueueVO } from '@/api/ecg/queue' |
| | | import { QueueApi, QueueVO } from '@/api/ecg/queue' |
| | | |
| | | /** 排队 表单 */ |
| | | defineOptions({ name: 'queueForm' }) |
| | |
| | | if (id) { |
| | | formLoading.value = true |
| | | try { |
| | | formData.value = await queueApi.getqueue(id) |
| | | formData.value = await QueueApi.getqueue(id) |
| | | } finally { |
| | | formLoading.value = false |
| | | } |
| | |
| | | try { |
| | | const data = formData.value as unknown as QueueVO |
| | | if (formType.value === 'create') { |
| | | await queueApi.createqueue(data) |
| | | await QueueApi.createqueue(data) |
| | | message.success(t('common.createSuccess')) |
| | | } else { |
| | | await queueApi.updatequeue(data) |
| | | await QueueApi.updatequeue(data) |
| | | message.success(t('common.updateSuccess')) |
| | | } |
| | | dialogVisible.value = false |
| | |
| | | <script setup lang="ts"> |
| | | import { dateFormatter } from '@/utils/formatTime' |
| | | import download from '@/utils/download' |
| | | import { queueApi, QueueVO } from '@/api/ecg/queue' |
| | | import { QueueApi, QueueVO } from '@/api/ecg/queue' |
| | | import queueForm from './QueueForm.vue' |
| | | import {DICT_TYPE, getIntDictOptions} from '@/utils/dict' |
| | | |
| | |
| | | const getList = async () => { |
| | | loading.value = true |
| | | try { |
| | | const data = await queueApi.getqueuePage(queryParams) |
| | | const data = await QueueApi.getqueuePage(queryParams) |
| | | list.value = data.list |
| | | total.value = data.total |
| | | } finally { |
| | |
| | | // 删除的二次确认 |
| | | await message.delConfirm() |
| | | // 发起删除 |
| | | await queueApi.deletequeue(id) |
| | | await QueueApi.deletequeue(id) |
| | | message.success(t('common.delSuccess')) |
| | | // 刷新列表 |
| | | await getList() |
| | |
| | | else |
| | | item.jumpFlag = 0 |
| | | |
| | | const data = await queueApi.jumpQueue(item) |
| | | const data = await QueueApi.jumpQueue(item) |
| | | message.success(data) |
| | | // 刷新列表 |
| | | await getList() |
| | |
| | | await message.exportConfirm() |
| | | // 发起导出 |
| | | exportLoading.value = true |
| | | const data = await queueApi.exportqueue(queryParams) |
| | | const data = await QueueApi.exportqueue(queryParams) |
| | | download.excel(data, '排队.xls') |
| | | } catch { |
| | | } finally { |
| | |
| | | <script setup lang="ts"> |
| | | import {RoomBedSelect} from "@/components/RoomBedSelect" |
| | | import { RoomApi, RoomVO } from '@/api/ecg/room' |
| | | import { queueApi } from '@/api/ecg/queue' |
| | | import { QueueApi } from '@/api/ecg/queue' |
| | | import {useUserStore} from "@/store/modules/user"; |
| | | import {ElMessage, ElMessageBox} from "element-plus"; |
| | | import {isStringEmpty} from "@/utils/stringUtil"; |
| | |
| | | if (newRoomVO !== curSel.value) { |
| | | let data; |
| | | if (curSel.value.docId !== null) { |
| | | data = await queueApi.bedDoctorOff(curSel.value) |
| | | data = await QueueApi.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 QueueApi.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 QueueApi.bedDoctorOff(curSel.value) |
| | | if (data !== 0) { |
| | | ElMessage({ |
| | | message: '内部错误!' + data, |
| | |
| | | </div> |
| | | </div> |
| | | <el-button @click="startBiz"> 手动开诊 </el-button> |
| | | <el-button @click="resetRoom"> 重置诊室 </el-button> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import {RoomStatus} from "@/components/RoomStatus" |
| | | import { RoomApi, RoomVO } from '@/api/ecg/room' |
| | | import { queueApi, QueueVO } from '@/api/ecg/queue' |
| | | import { QueueApi } from '@/api/ecg/queue' |
| | | |
| | | defineOptions({ name: 'RoomStatusSetting' }) |
| | | |
| | |
| | | } |
| | | |
| | | const startBiz = async () => { |
| | | await queueApi.startBiz(); |
| | | await QueueApi.startBiz(); |
| | | } |
| | | |
| | | const resetRoom = async () => { |
| | | await RoomApi.resetRoom(); |
| | | getList() |
| | | } |
| | | |
| | | /** 初始化 **/ |