yxh
2026-09-29 e41cb44dc302b51534036b3cf114dd2d5bc4f809
src/views/ecg/doctor/index.vue
@@ -1,5 +1,11 @@
<!--设备领用操作界面-->
<script setup lang="ts">
// 设备领用页。
// 原本缺少组件 name。keep-alive 的 :include 依赖【路由 name】匹配,
// 而路由 name 取菜单 system_menu(2812).component_name,故此处必须声明且保持一致,
// 否则切回标签页会重新加载并刷新数据。
defineOptions({ name: 'doctor' })
import TitlePanel from "@/views/ecg/doctor/components/TitlePanel.vue";
import QueuePanel from "@/views/ecg/doctor/components/QueuePanel.vue";
import {DoctorApi, PatientStatisticVO, RoomBedVO} from '@/api/ecg/doctor';
@@ -18,10 +24,10 @@
    opType: null
}
const onStagePatient = ref<QueueVO>({
let onStagePatient: QueueVO = {
  bedNo: "", bookCheckType: 0, bookTimeslot: 0, expired: 0, id: 0, jumpFlag: 0, passed: 0,
  patGender: 0, patId: "", patName: "", roomId: 0, roomName: "", seqNum: 0, status: 0
})
}
const patientStat = ref<PatientStatisticVO>({
    finishedNum: 0,
@@ -48,7 +54,7 @@
    getOnstagePatient()
    // 用于解决 左侧重置后 获取当前 【就诊中】患者
    setOnStagePatient(onStagePatient.value)
    setOnStagePatient(onStagePatient)
  } finally {
    finishFlag.value = false
  }
@@ -70,11 +76,11 @@
}
const getOnstagePatient = () => {
  const tempPatient : QueueVO | undefined = patientList.value.find(item => item.status === 30)
  if (undefined === tempPatient) {
  const tempPatient : QueueVO | undefined | null = patientList.value.find(item => item.status === 30)
  if (tempPatient == null) {
    // setOnStagePatient(undefined)
  } else if (tempPatient.patId !== onStagePatient.value.patId) {
    onStagePatient.value = tempPatient
  } else if (tempPatient.patId !== onStagePatient.patId) {
    onStagePatient = tempPatient
    setOnStagePatient(tempPatient)
  }
}
@@ -152,10 +158,11 @@
})
const onEventDevReady = () => {
   //console.info("onDevRentPanelEvent...")
  onStagePatient.value.patId = ""
  onStagePatient = {
    bedNo: "", bookCheckType: 0, bookTimeslot: 0, expired: 0, id: 0, jumpFlag: 0, passed: 0,
    patGender: 0, patId: "", patName: "", roomId: 0, roomName: "", seqNum: 0, status: 0
  }
  console.info("autoCall " + autoCall.value)
  if (autoCall.value) {
    finishNextPatient()
  } else {
@@ -169,7 +176,7 @@
/** 患者变更操作 */
const devReadyPanelRef = ref()
const setOnStagePatient = (tempPatient: QueueVO | undefined) => {
const setOnStagePatient = (tempPatient: QueueVO | undefined | null) => {
  devReadyPanelRef.value.setPatient(tempPatient)
}