eight
2025-04-15 589bcdb26f8e9d3e0d5ef46d27acc901c96d50ea
src/views/ecg/doctor/components/DevInstallPanel.vue
@@ -7,7 +7,7 @@
      v-loading="formLoading"
    >
      <el-form-item label="检查项目" prop="">
        {{formData?.checkType && getCheckTypeName(formData?.checkType)}}
        {{getCheckTypeName(formData.checkType)}}
      </el-form-item>
      <el-row :gutter="20">
        <el-col :span="12">
@@ -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