From e247aac319a7f4388f79e14fe87373aa640f8e42 Mon Sep 17 00:00:00 2001 From: zhaoyun Date: Mon, 18 May 2026 14:18:47 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#540:=20=E6=A3=80=E6=9F=A5=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E6=89=93=E5=8D=B0=E5=8A=9F=E8=83=BD"=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E5=8D=95=E6=8F=8F=E8=BF=B0"=E5=8C=BA=E5=9F=9F?= =?UTF-8?q?=E4=B8=8E=E8=AF=A6=E6=83=85=E5=BC=B9=E7=AA=97=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=B8=8D=E4=B8=80=E8=87=B4=20=E2=80=94=20=E6=A0=B9=E5=9B=A0?= =?UTF-8?q?=EF=BC=9AhandlePrint=E5=87=BD=E6=95=B0=E4=BB=8D=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E5=9B=BA=E5=AE=9AorderedDescFieldKeys=E9=81=8D?= =?UTF-8?q?=E5=8E=86+=E7=A9=BA=E5=80=BC=E8=BF=87=E6=BB=A4=EF=BC=8C?= =?UTF-8?q?=E4=B8=8E=E5=B7=B2=E4=BF=AE=E5=A4=8D=E7=9A=84=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E4=B8=8D=E4=B8=80=E8=87=B4=EF=BC=9B=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=EF=BC=9A=E6=94=B9=E4=B8=BA=E9=81=8D=E5=8E=86descData?= =?UTF-8?q?=E6=89=80=E6=9C=89key=E5=B9=B6=E9=80=9A=E8=BF=87labelMap?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=EF=BC=8C=E7=A9=BA=E5=80=BC=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=B8=BA'-'=EF=BC=8C=E5=90=8C=E6=97=B6=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E5=B7=B2=E5=BA=9F=E5=BC=83=E7=9A=84orderedDescFieldKeys?= =?UTF-8?q?=E5=B8=B8=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 --- .../applicationShow/examineApplication.vue | 21 ++++++------------- 1 file changed, 6 insertions(+), 15 deletions(-) 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 = `