| | |
| | | return await request.download({ url: `/ecg/queue/export-excel`, params }) |
| | | }, |
| | | |
| | | // 初始化队列信息,用于开诊设置 |
| | | openingSetting: async () => { |
| | | return await request.get({ url: `/ecg/queue/opening-setting` }) |
| | | }, |
| | | |
| | | // 手动开诊 |
| | | startBiz: async () => { |
| | | return await request.get({ url: `/ecg/queue/startbiz` }) |
| | | }, |
| | | |
| | | // 工位开通 |
| | | bedOpen: async (params) => { |
| | | return await request.get({ url: `/ecg/queue/bed-open`, params }) |
| | | }, |
| | | |
| | | // 工位关闭 |
| | | bedClose: async (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 }) |
| | | }, |
| | | |
| | | // 医生入座, |
| | | 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 }) |
| | | } |
| | | |
| | | } |
| | |
| | | roomId: number // 诊室编号 |
| | | roomName: string // 诊室名称 |
| | | bedNo: string // 诊疗床编号 |
| | | status: number //开诊状态 |
| | | doctor_name: string //医生名 |
| | | status: number //开诊状态 0-关闭 1-关闭中 10-已开通 20-有医生 30-暂停 |
| | | docId: number |
| | | docName: string |
| | | } |
| | | |
| | | // 诊室和诊疗床 API |
| | |
| | | <script lang="ts" setup> |
| | | import { RoomApi, RoomVO } from '@/api/ecg/room' |
| | | import {PropType} from "vue"; |
| | | import {useUserStore} from "@/store/modules/user"; |
| | | |
| | | defineComponent({ |
| | | name: 'RoomBedSelect' |
| | |
| | | } |
| | | }) |
| | | |
| | | const userStore = useUserStore() |
| | | const curUser = userStore.getUser |
| | | |
| | | const emit = defineEmits<{ |
| | | (e: 'update:modelValue', message: string): void; |
| | | }>(); |
| | |
| | | <img v-if="modelValue.roomId !== bedItem.roomId || modelValue.bedNo !== bedItem.bedNo" |
| | | src="@/assets/room/desk.png" |
| | | style="width: 100%" |
| | | @click = onclick(bedItem) |
| | | /> |
| | | <img v-else |
| | | src="@/assets/room/desk-doctor.jpeg" |
| | | style="width: 100%" |
| | | @click = onclick(bedItem) |
| | | /> |
| | | <div>{{bedItem.bedNo}}</div> |
| | | <div>{{bedItem.bedNo}} - {{bedItem.docName}}</div> |
| | | <el-button v-if="modelValue.docId === 0" @click = onclick(bedItem)> |
| | | 入座 |
| | | </el-button> |
| | | </div> |
| | | </div> |
| | | </el-card> |
| | |
| | | <script lang="ts" setup> |
| | | import { RoomApi, RoomVO } from '@/api/ecg/room' |
| | | import { queueApi } from '@/api/ecg/queue' |
| | | import {PropType} from "vue"; |
| | | |
| | | |
| | |
| | | } |
| | | }) |
| | | |
| | | const onclick = async (item) => { |
| | | item.status = !item.status; |
| | | await RoomApi.updateRoom(item) |
| | | const openBed = async (item) => { |
| | | await queueApi.bedOpen(item) |
| | | } |
| | | |
| | | const closeBed = async (item) => { |
| | | await queueApi.bedClose(item) |
| | | } |
| | | |
| | | </script> |
| | |
| | | <el-card style="width: 200px" shadow="hover" > |
| | | <template #header>{{title}}</template> |
| | | <div v-for="(bedItem, index) in bedList" :key="index"> |
| | | <img v-if="bedItem.status === 0" |
| | | <img v-if="bedItem.status === 0 || bedItem.status === 1" |
| | | src="@/assets/room/close.jpg" |
| | | style="width: 100%" |
| | | @click = onclick(bedItem) |
| | | @click = openBed(bedItem) |
| | | /> |
| | | <img v-else-if="bedItem.status === 10" |
| | | src="@/assets/room/open.jpg" |
| | | style="width: 100%" |
| | | @click = closeBed(bedItem) |
| | | /> |
| | | <img v-else-if="bedItem.status === 20 || bedItem.status === 30" |
| | | src="@/assets/room/doctor.png" |
| | | style="width: 100%" |
| | | @click = onclick(bedItem) |
| | | /> |
| | | <img v-else-if="bedItem.status === 20" |
| | | src="@/assets/room/doctor-off.jpeg" |
| | | style="width: 100%" |
| | | @click = onclick(bedItem) |
| | | /> |
| | | {{bedItem.bedNo}} - {{bedItem.doctor_name}} |
| | | {{bedItem.bedNo}} - {{bedItem.docName}} - {{bedItem.status === 30?"暂停":""}} |
| | | </div> |
| | | </el-card> |
| | | </template> |
| | |
| | | <script setup lang="ts"> |
| | | import {RoomBedSelect} from "@/components/RoomBedSelect" |
| | | import { RoomApi, RoomVO } from '@/api/ecg/room' |
| | | import { queueApi, queueVO } from '@/api/ecg/queue' |
| | | import {useUserStore} from "@/store/modules/user"; |
| | | import {CACHE_KEY, useCache} from "@/hooks/web/useCache"; |
| | | import {ElMessage} from "element-plus"; |
| | |
| | | const route = useRoute(); |
| | | |
| | | const userStore = useUserStore() |
| | | const curUser = userStore.getUser |
| | | |
| | | const bedMap = ref<Map<String, RoomVO[]>>() // 列表的数据 |
| | | const bedMap = ref<Map<string, RoomVO[]>>() // 列表的数据 |
| | | |
| | | const originalSel = ref<RoomVO>({ |
| | | id: 0, |
| | | roomId: 0, |
| | | roomName: "", |
| | | bedNo: "", |
| | | status: 0, |
| | | docId: 0, |
| | | docName: "" |
| | | }); |
| | | |
| | | const curSel = ref<RoomVO>({ |
| | | id: 0, |
| | | roomId: 0, |
| | | roomName: "", |
| | | bedNo: "", |
| | | onstage: true |
| | | status: 0, |
| | | docId: 0, |
| | | docName: "" |
| | | }); |
| | | |
| | | /** 查询列表 */ |
| | | const getList = async () => { |
| | | const data = await RoomApi.getOnstageBedMap() |
| | | bedMap.value = data as Map<String, RoomVO[]> |
| | | bedMap.value = data; |
| | | |
| | | for (const key in data) { |
| | | const roomVOArray = data[key] as RoomVO[]; |
| | | roomVOArray.forEach((roomVO) => { |
| | | if (roomVO.docId === curUser.id) { |
| | | originalSel.value = roomVO |
| | | curSel.value = roomVO |
| | | return |
| | | } |
| | | } ) |
| | | } |
| | | } |
| | | |
| | | const roomConfirm = () => { |
| | | const roomConfirm = async () => { |
| | | console.info(curSel.value) |
| | | |
| | | if (curSel.value.roomId === 0) { |
| | |
| | | return |
| | | } |
| | | |
| | | if (curSel.value !== originalSel.value) { |
| | | const data = await queueApi.bedDoctorOn(curSel.value) |
| | | if (data !== 0) { |
| | | ElMessage({ |
| | | message: '内部错误!' + data, |
| | | type: 'info', |
| | | duration: 3000 // 自动关闭时间,默认为3000ms |
| | | }); |
| | | return |
| | | } |
| | | } |
| | | |
| | | userStore.setRoomInfoAction(curSel.value) |
| | | if (isStringEmpty(route.redirectedFrom?.fullPath)) |
| | | push({ path: "/"}) |
| | | else if(route.redirectedFrom?.fullPath === "/login-room-select" ) |
| | | push({ path: "/"}) |
| | | else |
| | | push({ path: route.redirectedFrom?.fullPath}) |
| | | } |