diff --git a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/applicationShow/examineApplication.vue b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/applicationShow/examineApplication.vue index c840ccf3b..63483c935 100755 --- a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/applicationShow/examineApplication.vue +++ b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/applicationShow/examineApplication.vue @@ -511,13 +511,6 @@ const hasMatchedFields = computed(() => { return Object.keys(descJsonData.value).some((key) => isFieldMatched(key)); }); -// Ordered field keys for detail display and print, matching the bug requirement order -const orderedDescFieldKeys = [ - 'targetDepartment', 'urgencyLevel', 'allergyHistory', 'examinationPurpose', - 'expectedExaminationTime', 'medicalHistorySummary', 'symptom', 'sign', - 'clinicalDiagnosis', 'otherDiagnosis', 'relatedResult', 'attention', -]; - /** 查询科室 */ const getLocationInfo = async () => { try { @@ -685,20 +678,18 @@ const handlePrint = async (row) => { }); } - // 构建 descJson 字段行(与详情弹窗展示的字段一致) - const fieldKeys = orderedDescFieldKeys; + // 构建 descJson 字段行(与详情弹窗展示的字段一致,遍历所有key并通过isFieldMatched过滤) let descFieldsHtml = ''; - fieldKeys.forEach((key) => { + for (const key in descData) { + if (!(key in labelMap)) continue; const label = labelMap[key] || key; const value = transformField(key, descData[key]); - if (descData[key] != null && descData[key] !== '' && value != null && value !== '') { - descFieldsHtml += ` + descFieldsHtml += `
${label}: - ${value} + ${value || '-'}
`; - } - }); + } // 构建完整打印HTML const printContent = `