From b6d1adb8f93b21df0cf69c8cc7c024cefa5a0dda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=A4=87?= <刘备@gentronhealth.com> Date: Tue, 12 May 2026 23:29:30 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#458:=20=E9=97=A8=E8=AF=8A=E5=8C=BB?= =?UTF-8?q?=E7=94=9F=E7=AB=99=EF=BC=9A=E8=AF=8A=E7=96=97=E7=B1=BB=E5=8C=BB?= =?UTF-8?q?=E5=98=B1=E4=BF=9D=E5=AD=98=E6=88=90=E5=8A=9F=E5=90=8E=EF=BC=8C?= =?UTF-8?q?=E5=88=97=E8=A1=A8"=E5=8C=BB=E5=98=B1=E7=B1=BB=E5=9E=8B"?= =?UTF-8?q?=E5=88=97=E6=98=BE=E7=A4=BA=E4=B8=BA=E7=A9=BA=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因:mapAdviceTypeLabel 函数依赖 drord_doctor_type 字典数据进行类型映射, 当字典中缺少 value=3(诊疗)的条目时,find() 返回 undefined,函数返回空字符串, 导致保存后刷新列表时"医嘱类型"列显示为空白。 修复:在 mapAdviceTypeLabel 中为诊疗/手术类医嘱(wor_activity_definition 表) 添加兜底映射逻辑:type 3→诊疗, 6→手术, 4→手术, 1→检验, 2→检查, 5→其他, 确保即使字典缺失对应条目也能正确显示类型标签。 Co-Authored-By: Claude Opus 4.7 --- .../prescription/prescriptionlist.vue | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue b/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue index a7bf93c3..df298f38 100755 --- a/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue +++ b/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue @@ -1013,15 +1013,29 @@ const mapAdviceTypeLabel = (type, adviceTableName) => { if (type === 2 && adviceTableName === 'adm_device_definition') { return '耗材'; } - + // 🔧 Bug Fix: 处理检查类型(adviceType=23) // 检查类型属于诊疗类,应该显示为"检查" if (type === 23) { return '检查'; } - + const found = adviceTypeList.value.find((item) => item.value === type); - return found ? found.label : ''; + if (found) { + return found.label; + } + + // 🔧 Bug #458 Fix: 诊疗/手术类型字典缺失时的兜底,避免保存后"医嘱类型"列显示为空 + if (adviceTableName === 'wor_activity_definition' || adviceTableName === 'wor_service_request') { + if (type === 6) return '手术'; + if (type === 4) return '手术'; + if (type === 1) return '检验'; + if (type === 2) return '检查'; + if (type === 5) return '其他'; + return '诊疗'; + } + + return ''; }; // 西药处方管理相关变量