'+ currentPage +'_' + assortName + '
\n' + + ''+ currentPage +'_' + assortName + '
\n'; + $("#page_" + currentPage).html(newHtml); + } else { + // 新增HTML内容 + $("#rightContentHtml").append(rightContentHtml); + } + //放入数据 + assortIdArray.push(assortId); + assortTexteArray.push(currentPage +'_' + assortName) + pageDataArray.push(currentPage); + } else { + toastr.warning("请先上传pdf文件") + } + } +} +async function getBlobAsBase64(blobUrl) { + const response = await fetch(blobUrl); + const blob = await response.blob(); + return new Promise((resolve, reject) => { + const reader = new FileReader(); + reader.onloadend = () => resolve(reader.result); + reader.onerror = reject; + reader.readAsDataURL(blob); + }); +} +function backPage(){ + Common.confirm({ + title: "提示", + message: "是否要回上一页?", + operate: function (result) { + if (result) { + pageNum = pageNum - 2; + currentPage--; + turningPage(assortName,true); + } + } + }) +} +function submitIndex(){ + if(base64DataArray.length == 0){ + return toastr.warning("索引分类为空,请先对图像进行索引分类") + } + var patientId = $("#patientId").val(); + Common.confirm({ + title: "提示", + message: "确认提交以上索引分类吗?", + operate: function (result) { + if (result) { + $.ajax({ + type: 'post', + contentType: 'application/json; charset=utf-8', // 设置内容类型为 application/json + url: path+'/commom/savePdfPage', + data: JSON.stringify({ + base64Data: base64DataArray, + assortIdData: assortIdArray, + pageData: pageDataArray, + patientId: patientId + }), + success:function(data){ + if(data.code == 0){ + toastr.warning("合并成功!") + //记录已提交的索引分类 + //saveSubmitAssort(patientId); + } + } + }) + } + } + }) +} +function saveSubmitAssort(patientId){ + $.ajax({ + type: 'post', + contentType: 'application/json; charset=utf-8', // 设置内容类型为 application/json + url: path+'/commom/saveSubmitAssortLog', + data: JSON.stringify({ + patientId: patientId, + assortIdData: assortIdArray, + assortTexteData: assortTexteArray, + pageData: pageDataArray, + }), + success:function(data){ + + } + }) +} \ No newline at end of file diff --git a/src/main/webapp/static/js/recordManage/commomSearch/showMegerRecordIframeBlood.js b/src/main/webapp/static/js/recordManage/commomSearch/showMegerRecordIframeBlood.js new file mode 100644 index 0000000..62ace67 --- /dev/null +++ b/src/main/webapp/static/js/recordManage/commomSearch/showMegerRecordIframeBlood.js @@ -0,0 +1,90 @@ +let pdfUrl = ''; +let pageNum = 1; +$().ready(function (data) { + document.getElementById('pdf-file-input').addEventListener('change', function(event) { + const file = event.target.files[0]; + if (file) { + const fileReader = new FileReader(); + fileReader.onload = function() { + pdfUrl = URL.createObjectURL(new Blob([this.result], { type: 'application/pdf' })); + document.getElementById('showMegerPdfIframe').src = `${pdfUrl}#page=${pageNum}×tamp=${Date.now()}`; + //updatePage(); + }; + fileReader.readAsArrayBuffer(file); + } + }); + + // document.getElementById('download-page').addEventListener('click', function() { + // const iframe = document.getElementById('iframe1'); + // const pdfUrl = iframe.src; + // const pageNum = getSelectedPageNumber(); // 假设有一个函数getSelectedPageNumber()来获取当前页码 + // + // if (pdfUrl) { + // getBlobAsBase64(pdfUrl).then(base64Data => { + // fetch(path + '/commom/savePdfPage', { + // method: 'POST', + // headers: { + // 'Content-Type': 'application/json' + // }, + // body: JSON.stringify({ base64Data, pageNum }) + // }) + // .then(response => response.json()) + // .then(data => { + // if(data.status == 'success'){ + // toastr.success(data.message); + // } + // }) + // .catch(error => { + // toastr.error(error); + // }); + // }) + // } + // }); + + // document.getElementById('next-page-btn').addEventListener('click', function() { + // pageNum++; + // updatePage(); + // }); + // + // document.getElementById('prev-page-btn').addEventListener('click', function() { + // if (pageNum > 1) { + // pageNum--; + // updatePage(); + // } + // }); +}); + +function updatePage() { + if (pdfUrl) { + document.getElementById('current-page').textContent = pageNum; + const iframe = document.getElementById('showMegerPdfIframe'); + // 重新创建 iframe 元素以强制重新加载 + const newIframe = document.createElement('iframe'); + newIframe.id = 'showMegerPdfIframe'; + newIframe.width = '100%'; + newIframe.height = '100%'; + newIframe.src = `${pdfUrl}#page=${pageNum}×tamp=${Date.now()}`; + // 替换旧的 iframe 元素 + iframe.parentNode.replaceChild(newIframe, iframe) + } +} + +var iframe = document.getElementById("showMegerPdfIframe"); +if (iframe.attachEvent) { + iframe.attachEvent("onreadystatechange", function () { + //此事件在内容没有被载入时候也会被触发,所以我们要判断状态 + //有时候会比较怪异 readyState状态会跳过 complete 所以我们loaded状态也要判断 + if (iframe.readyState === "complete" || iframe.readyState == "loaded") { + //代码能执行到这里说明已经载入成功完毕了 + //要清除掉事件 + iframe.detachEvent("onreadystatechange", arguments.callee); + //这里是回调函数 + } + }); +} else { + iframe.addEventListener("load", function () { + $("#iframeLoad").val(1); + //代码能执行到这里说明已经载入成功完毕了 + this.removeEventListener("load", arguments.call, false); + }, false); +} \ No newline at end of file From 9ff5a4ebfe36fe82aa5d78994e3ad8cc9f1089f5 Mon Sep 17 00:00:00 2001 From: Godblessyou <824612544@qq.com> Date: Wed, 16 Jul 2025 11:43:23 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BC=98=E5=8C=962.0=E6=A0=87=E5=87=86?= =?UTF-8?q?=E7=89=88=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commomSearch/scanReviewList.jsp | 176 ++++++++++++++++++ 1 file changed, 176 insertions(+) create mode 100644 src/main/webapp/WEB-INF/views/recordManage/commomSearch/scanReviewList.jsp diff --git a/src/main/webapp/WEB-INF/views/recordManage/commomSearch/scanReviewList.jsp b/src/main/webapp/WEB-INF/views/recordManage/commomSearch/scanReviewList.jsp new file mode 100644 index 0000000..6326b43 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/recordManage/commomSearch/scanReviewList.jsp @@ -0,0 +1,176 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +