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 cd137662c..95945dbb9 100755 --- a/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue +++ b/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue @@ -1026,7 +1026,7 @@ const mapAdviceTypeLabel = (type, adviceTableName) => { return found.label; } - // 🔧 Bug #458 Fix: 诊疗/手术类型字典缺失时的兜底,避免保存后"医嘱类型"列显示为空 + // 🔧 Bug #458 Fix: 诊疗/手术类型字典缺失或标签为空时的兜底 if (adviceTableName === 'wor_activity_definition' || adviceTableName === 'wor_service_request') { if (type === 6) return '手术'; if (type === 4) return '手术'; @@ -1036,6 +1036,15 @@ const mapAdviceTypeLabel = (type, adviceTableName) => { return '诊疗'; } + // 🔧 Bug #458 Fix: 兜底映射,确保所有有效 adviceType 都有显示标签 + // 不依赖字典数据和表名,直接返回标准类型名称 + if (type === 3) return '诊疗'; + if (type === 6) return '手术'; + if (type === 4) return '耗材'; + if (type === 1) return '西药'; + if (type === 2) return '中成药'; + if (type === 5) return '会诊'; + return ''; }; @@ -1658,12 +1667,16 @@ function getListInfo(addNewRow) { contentJson?.consultationRequestId; let adviceType = item.adviceType; - + // 🔧 Bug Fix: 后端保存时将耗材(4)转换为中成药(2),显示时需要转换回来 // 检查 adviceTableName,如果是耗材表则应该是耗材类型 const adviceTableName = contentJson?.adviceTableName || item.adviceTableName; - - let adviceType_dictText = item.adviceType_dictText || mapAdviceTypeLabel(adviceType, adviceTableName); + + // 🔧 Bug #458 Fix: 后端可能返回空字符串的 adviceType_dictText,需重新计算 + const backendDictText = item.adviceType_dictText; + let adviceType_dictText = (backendDictText && backendDictText.trim()) + ? backendDictText + : mapAdviceTypeLabel(adviceType, adviceTableName); // 如果是会诊类型,设置为会诊类型 if (isConsultation) {