eight
2025-04-15 aa2d6665f95a0701b61272fd8065663070565034
bug fix:  pat_id  dev_id 都为空时 不应该取患者列表
已修改6个文件
63 ■■■■ 文件已修改
src/views/ecg/doctor/DevInstall.vue 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/ecg/doctor/Routine.vue 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/ecg/doctor/components/DevInstallPanel.vue 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/ecg/doctor/components/DevReadyPanel.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/ecg/doctor/components/RoutinePanel.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/ecg/doctor/index.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/ecg/doctor/DevInstall.vue
@@ -3,7 +3,6 @@
import DevInstallPanel from "@/views/ecg/doctor/components/DevInstallPanel.vue";
import QueuePanel from "@/views/ecg/doctor/components/QueuePanel.vue";
import {DoctorApi, PatientStatisticVO, RoomBedVO} from '@/api/ecg/doctor';
import {useUserStore} from "@/store/modules/user";
import {QueueVO} from "@/api/ecg/queue";
import {ElNotification} from "element-plus";
import {useRoomStore} from "@/store/modules/room";
@@ -18,10 +17,10 @@
    opType: null
})
const installingPatient = ref<QueueVO>({
let installingPatient: 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,
@@ -49,7 +48,7 @@
    getInstallingPatient()
    // 用于解决 左侧重置后 获取当前 【安装中】患者
    setInstallingPatient(installingPatient.value)
    setInstallingPatient(installingPatient)
  } finally {
    finishFlag.value = false
  }
@@ -71,11 +70,11 @@
}
const getInstallingPatient = () => {
  const tempPatient : QueueVO | undefined = patientList.value.find(item => item.status === 36)
  if (undefined === tempPatient) {
  const tempPatient : QueueVO | undefined | null = patientList.value.find(item => item.status === 36)
  if (tempPatient == null) {
    //setInstallingPatient(undefined)
  } else if (tempPatient.patId !== installingPatient.value.patId) {
    installingPatient.value= tempPatient
  } else if (tempPatient.patId !== installingPatient.patId) {
    installingPatient = tempPatient
    setInstallingPatient(tempPatient)
  }
}
@@ -155,8 +154,7 @@
})
const onEventDevInstall = () => {
   //console.info("onDevInstallPanelEvent...")
  installingPatient.value.patId = ""
  installingPatient.patId = ""
  if (autoCall.value) {
    finishNextPatient()
src/views/ecg/doctor/Routine.vue
@@ -18,12 +18,12 @@
    opType: null
}
const onStagePatient = ref<QueueVO>({
let onStagePatient: QueueVO = {
  id: 0, patId: "", patName: "", patGender: 0,
  bookTimeslot: 0, bookCheckType: 0, isVip: 0, seqNum: 0, bookSeqNum: 0,
  passed: 0, expired: 0, jumpFlag: 0,
  roomId: 0, roomName: "", bedNo: "", status: 0
})
}
const patientStat = ref<PatientStatisticVO>({
    finishedNum: 0,
@@ -51,7 +51,7 @@
    getOnstagePatient()
    // 用于解决 左侧重置后 获取当前【就诊中】患者
    setOnStagePatient(onStagePatient.value)
    setOnStagePatient(onStagePatient)
  } finally {
    finishFlag.value = false
  }
@@ -76,9 +76,9 @@
  const tempPatient : QueueVO | undefined = patientList.value.find(item => item.status === 30)
  if (undefined === tempPatient) {
    // setOnStagePatient(undefined)
  } else if (tempPatient.patId !== onStagePatient.value.patId) {
    onStagePatient.value= tempPatient
    setOnStagePatient(onStagePatient.value)
  } else if (tempPatient.patId !== onStagePatient.patId) {
    onStagePatient = tempPatient
    setOnStagePatient(onStagePatient)
  }
}
@@ -156,7 +156,7 @@
const onEventRoutine = () => {
   //console.info("onDevRentPanelEvent...")
  onStagePatient.value.patId = ""
  onStagePatient.patId = ""
  if (autoCall.value) {
    finishNextPatient()
src/views/ecg/doctor/components/DevInstallPanel.vue
@@ -142,8 +142,6 @@
const { t } = useI18n() // 国际化
const message = useMessage() // 消息弹窗
const dialogVisible = ref(false) // 弹窗的是否展示
const formRef = ref() // 表单 Ref
const displayBarCode = ref<string> ()
@@ -180,14 +178,15 @@
const checkTypeStore = useCheckTypeStore()
const setPatient = (queueVO: QueueVO | undefined) => {
const setPatient = (queueVO: QueueVO | undefined | null) => {
  console.log("setPatient...", queueVO)
  resetForm()
  formData.value.applyNo = queueVO?.applyNo
  formData.value.episodeId = queueVO?.episodeId
  formData.value.patId = queueVO?.patId
  formData.value.patName = queueVO?.patName
  formData.value.checkType = queueVO?.bookCheckType
  getReadyRentInfo(formData.value)
  getReadyRentInfo(formData.value)    // 获取领用信息
  copyBarcode()
}
defineExpose({ setPatient }) // 提供 setPatient 方法,用于设置患者
@@ -207,12 +206,13 @@
    formData.value.bedNo = props.room.bedNo
    const data = formData.value as unknown as DevRentVO
    await DevRentApi.devInstall(data)
    message.success(t('操作成功'))
    dialogVisible.value = false
    // 发送操作成功的事件
    emit('event_dev_install')
    resetForm()
    getList()
    // 发送操作成功的事件
    emit('event_dev_install')
    message.success(t('操作成功'))
  } finally {
    formLoading.value = false
  }
@@ -271,6 +271,9 @@
// 获取患者的领用信息
const getReadyRentInfo = async (devRentVO) => {
  if ((devRentVO.devId == null || devRentVO.devId === '') && (devRentVO.patId == null || devRentVO.patId === '') )
    return
  const data = await DevRentApi.getReadyRent(devRentVO)
  if ( data == null)
    return
src/views/ecg/doctor/components/DevReadyPanel.vue
@@ -215,6 +215,9 @@
// 根据患者或设备, 获取 Free的租赁
const getFreeRentInfo = async (devRentVO) => {
  if ((devRentVO.devId == null || devRentVO.devId === '') && (devRentVO.patId == null || devRentVO.patId === '') )
    return
  const data = await DevRentApi.getFreeRent(devRentVO)
  if (null === data)
    return
src/views/ecg/doctor/components/RoutinePanel.vue
@@ -242,6 +242,9 @@
}
const getFreeRentInfo = async (devRentVO) => {
  if ((devRentVO.devId == null || devRentVO.devId === '') && (devRentVO.patId == null || devRentVO.patId === '') )
    return
  const data = await DevRentApi.getFreeRent(devRentVO)
  if (null === data)
    return
src/views/ecg/doctor/index.vue
@@ -152,12 +152,8 @@
})
const onEventDevReady = () => {
  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
  }
  onStagePatient.patId = ""
  console.info("autoCall " + autoCall.value)
  if (autoCall.value) {
    finishNextPatient()
  } else {