From e33204f265e0c5165966c5961c205acbd494c965 Mon Sep 17 00:00:00 2001 From: thug0bin Date: Thu, 5 Mar 2026 12:42:58 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20printPaaiResult=20=EC=A0=84=EC=97=AD=20?= =?UTF-8?q?=ED=95=A8=EC=88=98=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - async function → window.printPaaiResult = async function - WebSocket 이벤트에서 호출 가능하도록 전역 노출 --- backend/templates/pmr.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/templates/pmr.html b/backend/templates/pmr.html index cdb7407..423eaa4 100644 --- a/backend/templates/pmr.html +++ b/backend/templates/pmr.html @@ -2678,8 +2678,8 @@ } } - // PAAI 결과 인쇄 - async function printPaaiResult(preSerial, patientName, result) { + // PAAI 결과 인쇄 (전역) + window.printPaaiResult = async function(preSerial, patientName, result) { if (!autoPrintEnabled) { console.log('[AutoPrint] 비활성화됨'); return; @@ -2687,7 +2687,7 @@ try { console.log('[AutoPrint] 인쇄 요청:', preSerial); - const response = await fetch('/pmr/api/paai/print', { + var response = await fetch('/pmr/api/paai/print', { method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({ @@ -2697,7 +2697,7 @@ }) }); - const data = await response.json(); + var data = await response.json(); if (data.success) { console.log('[AutoPrint] 인쇄 완료'); showToast('인쇄 완료: ' + patientName, 'success');