eight
2024-09-01 7ba919309de8f52db122b0555a676f8b5afbd41c
update
已修改1个文件
34 ■■■■ 文件已修改
src/views/ecg/doctor/index.vue 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/ecg/doctor/index.vue
@@ -4,6 +4,7 @@
import {DoctorApi, PatientStatisticVO, RoomBedVO} from '@/api/ecg/doctor';
import {useUserStore} from "@/store/modules/user";
import {QueueVO} from "@/api/ecg/queue";
import {ElMessage} from "element-plus";
const userStore = useUserStore();
@@ -22,7 +23,7 @@
const state = ref<boolean>()
const list = ref<QueueVO[]>([])
const patientList = ref<QueueVO[]>([])
let timerRunFlag : boolean = false
const bedControlFlag = ref<boolean>(true);
@@ -31,20 +32,26 @@
const finishNextPatient = async () => {
  finishFlag.value = true
  list.value = await DoctorApi.finishNextPatient(roomBedVO)
  try {
    patientList.value = await DoctorApi.finishNextPatient(roomBedVO)
  patientStat.value = await DoctorApi.getPatientStatistic(roomBedVO)
  } finally {
  finishFlag.value = false
  }
}
const passNextPatient = async () => {
  passFlag.value = true
  list.value = await DoctorApi.passNextPatient(roomBedVO)
  try {
    patientList.value = await DoctorApi.passNextPatient(roomBedVO)
  patientStat.value = await DoctorApi.getPatientStatistic(roomBedVO)
  } finally {
  passFlag.value = false
  }
}
const initLoad = async () => {
  list.value = await DoctorApi.getPatientList(roomBedVO)
  patientList.value = await DoctorApi.getPatientList(roomBedVO)
  patientStat.value = await DoctorApi.getPatientStatistic(roomBedVO)
  const queueVO2 = await DoctorApi.bedDoctorGet(roomBedVO)
  if (queueVO2.status === 20)
@@ -55,6 +62,7 @@
const bedControl = async () => {
  bedControlFlag.value = true
  try {
  if (state.value) {
    await DoctorApi.bedDoctorPause(roomBedVO)
    state.value = false
@@ -62,7 +70,9 @@
    await DoctorApi.bedDoctorResume(roomBedVO)
    state.value = true
  }
  } finally {
  bedControlFlag.value = false
  }
}
const doctorTimer = () => {
@@ -83,13 +93,19 @@
    roomBedVO.roomId = userStore.room!.roomId
    roomBedVO.roomName = userStore.room!.roomName
    roomBedVO.bedNo = userStore.room!.bedNo
  } else {
    roomBedVO.roomId = null
    roomBedVO.bedNo = null
  }
  timerRunFlag = true
  doctorTimer()
  } else {
    roomBedVO.roomId = null
    roomBedVO.bedNo = null
    ElMessage({
      message: '请先入座!',
      type: 'info',
      duration: 3000 // 自动关闭时间,默认为3000ms
    })
  }
  bedControlFlag.value = false
  finishFlag.value = false
@@ -113,7 +129,7 @@
        装机界面
      </el-main>
      <el-aside width="300px" style="background-color: var(--el-color-primary-light-7);">
        <QueuePanel :queue="list"/>
        <QueuePanel :queue="patientList"/>
      </el-aside>
    </el-container>
    <el-container style="justify-content: center; margin-top: 30px">