From 8ca457138687568c86b82054254abf732f4c1bc7 Mon Sep 17 00:00:00 2001 From: wangjian963 <15215920+aprilry@user.noreply.gitee.com> Date: Mon, 29 Jun 2026 16:39:24 +0800 Subject: [PATCH] =?UTF-8?q?824=20=E3=80=90=E4=BD=8F=E9=99=A2=E5=8C=BB?= =?UTF-8?q?=E7=94=9F=E5=B7=A5=E4=BD=9C=E7=AB=99-=E4=BD=8F=E9=99=A2?= =?UTF-8?q?=E7=97=85=E5=8E=86=E3=80=91=E9=80=89=E6=8B=A9=E4=B8=80=E5=90=8D?= =?UTF-8?q?=E6=82=A3=E8=80=85=E6=97=B6=EF=BC=8C=E4=BF=9D=E5=AD=98=E4=BD=8F?= =?UTF-8?q?=E9=99=A2=E7=97=85=E5=8E=86=E6=97=A0=E6=B3=95=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E6=88=90=E5=8A=9F=EF=BC=8C=E7=82=B9=E5=87=BB=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E6=97=A0=E5=93=8D=E5=BA=94=20838=20=E3=80=90?= =?UTF-8?q?=E4=BD=8F=E9=99=A2=E5=8C=BB=E7=94=9F=E5=B7=A5=E4=BD=9C=E7=AB=99?= =?UTF-8?q?-=E8=AF=8A=E6=96=AD=E5=BD=95=E5=85=A5=E3=80=91=E5=BC=95?= =?UTF-8?q?=E5=85=A5/=E9=80=89=E6=8B=A9=E9=97=A8=E8=AF=8A=E5=85=A5?= =?UTF-8?q?=E9=99=A2=E8=AF=8A=E6=96=AD=E6=97=B6=EF=BC=8C=E8=AF=8A=E6=96=AD?= =?UTF-8?q?=E7=B1=BB=E5=88=AB=E5=88=97=E9=94=99=E8=AF=AF=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=B8=BA=E5=AD=97=E5=85=B8=E4=BB=A3=E7=A0=81=E2=80=9C11?= =?UTF-8?q?=E2=80=9D=E8=80=8C=E9=9D=9E=E6=96=87=E6=9C=AC=E2=80=9C=E9=97=A8?= =?UTF-8?q?/=E6=80=A5=E8=AF=8A=E8=AF=8A=E6=96=AD=E2=80=9D=20840=20?= =?UTF-8?q?=E3=80=90=E4=BD=8F=E9=99=A2=E5=8C=BB=E7=94=9F=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E7=AB=99-=E4=B8=B4=E5=BA=8A=E5=8C=BB=E5=98=B1=E3=80=91?= =?UTF-8?q?=E5=8C=BB=E5=98=B1=E6=96=B0=E5=A2=9E/=E4=BF=9D=E5=AD=98/?= =?UTF-8?q?=E7=AD=BE=E5=8F=91=E5=90=8E=EF=BC=8C=E5=8C=BB=E5=98=B1=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E5=88=97=E7=9A=84=E5=86=85=E5=AE=B9=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA=E7=99=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/AdviceManageAppServiceImpl.java | 4 ++- .../home/components/diagnosis/diagnosis.vue | 26 ++++++++++++--- .../home/components/order/index.vue | 33 +++++++++++++++++-- .../views/inpatientDoctor/home/emr/index.vue | 11 ++++++- 4 files changed, 66 insertions(+), 8 deletions(-) diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/regdoctorstation/appservice/impl/AdviceManageAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/regdoctorstation/appservice/impl/AdviceManageAppServiceImpl.java index cebf7313b..fddbef93f 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/regdoctorstation/appservice/impl/AdviceManageAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/regdoctorstation/appservice/impl/AdviceManageAppServiceImpl.java @@ -349,8 +349,9 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService { } } else if (ItemType.ACTIVITY.getValue().equals(adviceType) + || ItemType.TEXT.getValue().equals(adviceType) || (adviceType != null && (adviceType == 26 || adviceType == 31))) { - // 诊疗活动删除(包括护理type=26和未知类型type=31) + // 诊疗活动删除(包括文字医嘱type=8、护理type=26和未知类型type=31) ServiceRequest serviceRequest = iServiceRequestService.getById(requestId); if (serviceRequest != null) { if (!RequestStatus.DRAFT.getValue().equals(serviceRequest.getStatusEnum())) { @@ -1087,6 +1088,7 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService { List activityList = paramList.stream() .filter(e -> ItemType.ACTIVITY.getValue().equals(e.getAdviceType()) || ItemType.SURGERY.getValue().equals(e.getAdviceType()) + || ItemType.TEXT.getValue().equals(e.getAdviceType()) || (e.getAdviceType() != null && e.getAdviceType() == 26)) .collect(Collectors.toList()); List activityRequestIds diff --git a/healthlink-his-ui/src/views/inpatientDoctor/home/components/diagnosis/diagnosis.vue b/healthlink-his-ui/src/views/inpatientDoctor/home/components/diagnosis/diagnosis.vue index b8515fbd0..85309fd19 100755 --- a/healthlink-his-ui/src/views/inpatientDoctor/home/components/diagnosis/diagnosis.vue +++ b/healthlink-his-ui/src/views/inpatientDoctor/home/components/diagnosis/diagnosis.vue @@ -194,6 +194,13 @@ placeholder=" " style="width: 150px" > + + String(item.value) === codeStr)) return null; + // 从 med_type 中查找对应标签 + return med_type.value.find(item => String(item.value) === codeStr) || null; +} const rules = ref({ name: [{ required: true, message: '请选择诊断', trigger: 'change' }], medTypeCode: [{ required: true, message: '请选择诊断类型', trigger: 'change' }], @@ -547,7 +564,8 @@ function getList() { syndromeGroupNo: '', showPopover: false, diagnosisTime: formatDisplayDate(item.diagnosisTime), - syndromeOptions: [] + syndromeOptions: [], + medTypeCode: item.medTypeCode != null ? String(item.medTypeCode) : '', }; if (obj.diagSrtNo == null) { obj.diagSrtNo = 1; @@ -584,7 +602,7 @@ function getList() { syndromeDefinitionId: syndromeId, syndromeOptions: syndromeCode ? [{ value: syndromeCode, label: syndromeName, id: syndromeId }] : [], diagSrtNo: item.diagSrtNo, - medTypeCode: item.medTypeCode, + medTypeCode: item.medTypeCode != null ? String(item.medTypeCode) : '', maindiseFlag: item.maindiseFlag, verificationStatusEnum: item.verificationStatusEnum, diagnosisDesc: item.diagnosisDesc || '', diff --git a/healthlink-his-ui/src/views/inpatientDoctor/home/components/order/index.vue b/healthlink-his-ui/src/views/inpatientDoctor/home/components/order/index.vue index 30747f702..749f0e3fd 100755 --- a/healthlink-his-ui/src/views/inpatientDoctor/home/components/order/index.vue +++ b/healthlink-his-ui/src/views/inpatientDoctor/home/components/order/index.vue @@ -24,7 +24,7 @@ @@ -401,7 +401,17 @@ - {{ scope.row.adviceName }} + + + {{ getAdviceTypeLabel(scope.row) }} + + {{ scope.row.adviceName }} + { organization.value = res?.data?.records ?? res?.data ?? []; + }).catch(() => { + // 科室树加载失败不应阻塞主数据渲染,静默降级 + organization.value = []; }); getPrescriptionList(localPatient.value.encounterId).then((res) => { // 等待科室树加载完成后再处理处方数据,确保 resolveOrgId 能正确匹配 + // 使用 finally 确保无论科室树成功与否,loading 都能被重置 orgTreePromise.then(() => { loading.value = false; prescriptionList.value = res.data @@ -1114,6 +1128,10 @@ function getListInfo(addNewRow) { unitCodeList: unitCodeListData, // 确保 therapyEnum 被正确设置,优先使用 contentJson 中的值 therapyEnum: String(parsedContent?.therapyEnum ?? item.therapyEnum ?? '1'), + // 🔧 Bug #840: 确保 adviceType 优先使用 contentJson 中的值 + // item.adviceType 来自 DB 可能为 null,会覆盖 parsedContent 中的正确值 + adviceType: parsedContent?.adviceType ?? item.adviceType, + categoryCode: parsedContent?.categoryCode ?? item.categoryCode ?? '', // 🔧 修复:确保 orgId 为 String 类型,与 organization 树的 id 类型一致 // 确保 skinTestFlag 是数字类型(1 或 0),从 contentJson 恢复 skinTestFlag: parsedContent?.skinTestFlag !== undefined && parsedContent?.skinTestFlag !== null @@ -1280,6 +1298,17 @@ function getRowSelectValue(row) { return row.adviceType; } +/** + * 根据行的 adviceType + categoryCode 获取中文类型标签 + * 供非编辑模式下显示医嘱类型(如"西药"、"中成药"、"文字"等) + */ +function getAdviceTypeLabel(row) { + if (!row.adviceType) return ''; + const selectValue = getRowSelectValue(row); + const item = adviceTypeList.value.find((opt) => opt.value === selectValue); + return item ? item.label : ''; +} + // 新增医嘱 function handleAddPrescription() { // 校验是否选中患者 diff --git a/healthlink-his-ui/src/views/inpatientDoctor/home/emr/index.vue b/healthlink-his-ui/src/views/inpatientDoctor/home/emr/index.vue index 7fc28b0d4..e6ae93820 100755 --- a/healthlink-his-ui/src/views/inpatientDoctor/home/emr/index.vue +++ b/healthlink-his-ui/src/views/inpatientDoctor/home/emr/index.vue @@ -626,9 +626,18 @@ const onNursingStatus = () => { openDrawer.value = true; }; const save = async () => { + // Bug #824: 校验动态组件和模板是否已正确加载,避免可选链静默吞掉 null 导致"无响应" + if (!emrComponentRef.value) { + ElMessage.warning(t('inpatientDoctor.emr.pleaseSelectEmrTemplate')); + return; + } + if (!currentSelectTemplate.value?.id) { + ElMessage.warning(t('inpatientDoctor.emr.pleaseSelectEmrTemplate')); + return; + } try { currentOperate.value = 'add'; - await emrComponentRef.value?.submit(); + await emrComponentRef.value.submit(); } catch (error) { console.log('error=============>', error);