diff --git a/src/main/java/com/emr/controller/FontShowRecordController.java b/src/main/java/com/emr/controller/FontShowRecordController.java index 1ad5b9b..510ce23 100644 --- a/src/main/java/com/emr/controller/FontShowRecordController.java +++ b/src/main/java/com/emr/controller/FontShowRecordController.java @@ -71,7 +71,7 @@ public class FontShowRecordController { user.setUserId(-999); user.setRoleId(-999); Set menu = new TreeSet<>(); - menu.add("/commom/printPdf"); + //menu.add("/commom/printPdf"); user.setMenus(menu); UsernamePasswordToken userToken = new UsernamePasswordToken(user.getUserName(), "123456"); Subject subject = SecurityUtils.getSubject(); diff --git a/src/main/java/com/emr/controller/commomSearch/CommomSearchController.java b/src/main/java/com/emr/controller/commomSearch/CommomSearchController.java index 5228469..0c7503a 100644 --- a/src/main/java/com/emr/controller/commomSearch/CommomSearchController.java +++ b/src/main/java/com/emr/controller/commomSearch/CommomSearchController.java @@ -477,7 +477,7 @@ public class CommomSearchController { model.addAttribute("isDownload", isDownload); //查询是否有打印权限 Integer printFlag = 0; - /* Set menus = user.getMenus(); + Set menus = user.getMenus(); for (String menu : menus) { if (StringUtils.isNotBlank(menu)) { if ("/commom/printPdf".equals(menu)) { @@ -485,7 +485,7 @@ public class CommomSearchController { break; } } - }*/ + } model.addAttribute("printFlag", printFlag); model.addAttribute("flag", flag); return "recordManage/commomSearch/showRecordIframeBlood"; diff --git a/src/main/webapp/WEB-INF/views/font/showPdfFrameFont.jsp b/src/main/webapp/WEB-INF/views/font/showPdfFrameFont.jsp new file mode 100644 index 0000000..2290ea7 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/font/showPdfFrameFont.jsp @@ -0,0 +1,58 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + + + + + + 预览PDF + + + + + + + + + + + + + + + diff --git a/src/main/webapp/WEB-INF/views/font/showRecordFont.jsp b/src/main/webapp/WEB-INF/views/font/showRecordFont.jsp index db9f7be..009cf08 100644 --- a/src/main/webapp/WEB-INF/views/font/showRecordFont.jsp +++ b/src/main/webapp/WEB-INF/views/font/showRecordFont.jsp @@ -16,7 +16,7 @@ - + @@ -128,7 +128,7 @@
- +
diff --git a/src/main/webapp/WEB-INF/views/font/showRecordIframeFont.jsp b/src/main/webapp/WEB-INF/views/font/showRecordIframeFont.jsp index 4254627..4da632c 100644 --- a/src/main/webapp/WEB-INF/views/font/showRecordIframeFont.jsp +++ b/src/main/webapp/WEB-INF/views/font/showRecordIframeFont.jsp @@ -105,7 +105,8 @@ aria-labelledby="myModalLabel" aria-hidden="true">
- + +
diff --git a/src/main/webapp/WEB-INF/views/recordManage/commomSearch/showRecord174.jsp b/src/main/webapp/WEB-INF/views/recordManage/commomSearch/showRecord174.jsp index a1328f4..520d682 100644 --- a/src/main/webapp/WEB-INF/views/recordManage/commomSearch/showRecord174.jsp +++ b/src/main/webapp/WEB-INF/views/recordManage/commomSearch/showRecord174.jsp @@ -1,6 +1,7 @@ <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%@ include file="/WEB-INF/jspf/common.jspf" %> <%@ include file="/WEB-INF/jspf/ztreeCommom.jsp" %> <%@ include file="/WEB-INF/jspf/boostrapSelect.jspf" %> @@ -13,15 +14,16 @@ + - <%@ include file="/WEB-INF/jspf/common.jspf" %> + - + - + - + - - + + - + - + - + - +
diff --git a/src/main/webapp/static/js/font/showRecordFont.js b/src/main/webapp/static/js/font/showRecordFont.js index 6c3449d..180896a 100644 --- a/src/main/webapp/static/js/font/showRecordFont.js +++ b/src/main/webapp/static/js/font/showRecordFont.js @@ -24,15 +24,15 @@ var isIE = function(ver) { } //初始化函数 $(function(){ - var ie = isIE(8); + $('.contentDiv').css('height', '100%').css('height', '-=140px'); + $("#iframe").prop("src",path+"/commom/showRecordIframeBlood?patientId="+$("#patientId").val()+"&flag=file_path"+"&rootPaths="+$("#rootPaths").val()); + /*var ie = isIE(8); if(ie) { - $('.contentDiv').css('height', '100%').css('height', '-=140px'); //加载iframe $("#iframe").prop("src",path+"/font/showRecordIframeBloodFont?patientId="+$("#patientId").val()+"&flag=file_path"); }else{ - //$("#iframe").prop("src",path+"/font/showRecordIframeBloodFont?patientId="+$("#patientId").val()+"&flag=file_path"); $("#iframe").prop("src",path+"/commom/showRecordIframeBlood?patientId="+$("#patientId").val()+"&flag=file_path"+"&rootPaths="+$("#rootPaths").val()); - } + }*/ //加载其他诊断名称鼠标滑过显示全部文本 //loadQtip('.otherDiagName'); //加载病案信息 diff --git a/src/main/webapp/static/js/font/showRecordIframeBloodFont.js b/src/main/webapp/static/js/font/showRecordIframeBloodFont.js index a992d6c..4eb8d40 100644 --- a/src/main/webapp/static/js/font/showRecordIframeBloodFont.js +++ b/src/main/webapp/static/js/font/showRecordIframeBloodFont.js @@ -1,9 +1,12 @@ +// var obj = new ActiveXObject("AcroPDF.PDF.1"); window.onload = function () { var pdfresult = isAcrobatPluginInstall(); if(!pdfresult){ alert("对不起,您还没有安装PDF阅读器软件呢,为了方便预览PDF文档,请选择安装!"); location = path + "/static/js/font/AdbeRdr70_chs_full.exe"; } + // obj.LoadFile("http://192.168.1.3:8083/emr_record/reload/pdfTemp/09.pdf") + } //树操作 /*var data = [ @@ -110,11 +113,48 @@ function onloadPdf(){ if(data.code == 0){ if(data.msg != ''){ $("#iframe1").prop("src",data.msg); + var html = ''; + $("#iframe1").append(html); } } } }) } +function fireKeyEvent(el, evtType, keyCode) { + var evtObj; + if (document.createEvent) { + if (window.KeyEvent) {//firefox 浏览器下模拟事件 + evtObj = document.createEvent('KeyEvents'); + evtObj.initKeyEvent(evtType, true, true, window, true, false, false, false, keyCode, 0); + } else {//chrome 浏览器下模拟事件 + evtObj = document.createEvent('UIEvents'); + evtObj.initUIEvent(evtType, true, true, window, 1); + + delete evtObj.keyCode; + if (typeof evtObj.keyCode === "undefined") {//为了模拟keycode + Object.defineProperty(evtObj, "keyCode", { value: keyCode }); + } else { + evtObj.key = String.fromCharCode(keyCode); + } + + if (typeof evtObj.ctrlKey === 'undefined') {//为了模拟ctrl键 + Object.defineProperty(evtObj, "ctrlKey", { value: true }); + } else { + evtObj.ctrlKey = true; + } + } + el.dispatchEvent(evtObj); + + } else if (document.createEventObject) {//IE 浏览器下模拟事件 + console.log(2) + evtObj = document.createEventObject(); + evtObj.keyCode = keyCode + el.fireEvent('on' + evtType, evtObj); + } +} + //记录打印记录 function printInfoBlood(){ var patientId = "'"+$("#patientId").val()+"'"; diff --git a/src/main/webapp/static/js/otherManage/bootstrap-colorpicker.js b/src/main/webapp/static/js/otherManage/bootstrap-colorpicker.js index 9de542a..3fd901e 100644 --- a/src/main/webapp/static/js/otherManage/bootstrap-colorpicker.js +++ b/src/main/webapp/static/js/otherManage/bootstrap-colorpicker.js @@ -1316,7 +1316,7 @@ var Color = function (_tinycolor) { key: '_validOrFallback', value: function _validOrFallback() { if (!this.isValid()) { - var fallbackOptions = Object.assign({}, this.options); + var fallbackOptions = this.options; if (!fallbackOptions.format) { fallbackOptions.format = defaultFallbackFormat; diff --git a/src/main/webapp/static/js/recordManage/commomSearch/showRecord174.js b/src/main/webapp/static/js/recordManage/commomSearch/showRecord174.js index fa6a7aa..153194d 100644 --- a/src/main/webapp/static/js/recordManage/commomSearch/showRecord174.js +++ b/src/main/webapp/static/js/recordManage/commomSearch/showRecord174.js @@ -9,7 +9,7 @@ $(function(){ //加载iframe $("#iframe").prop("src",path+"/commom/showRecordIframeBlood?patientId="+$("#patientId").val()+"&flag=file_path"); }) -/*//封装其他诊断名称鼠标滑过显示全部文本 +//封装其他诊断名称鼠标滑过显示全部文本 function loadQtip(selector){ $(selector).qtip({ content: {text:$('#otherDiagName').val()}, @@ -24,7 +24,7 @@ function loadQtip(selector){ } } }); -}*/ +} //加载病案信息 function loadRecord(){ @@ -67,7 +67,9 @@ function loadRecord(){ rootPaths += data.newFile; } $("#rootPaths").val(rootPaths); - //$("#otherDiagName").val(data.otherDiagName); + $("#otherDiagName").val(data.otherDiagName); + //重新加载其他诊断名称鼠标滑过显示全部文本 + loadQtip('.otherDiagName'); } } }) @@ -106,13 +108,15 @@ $("#admissTimes").change(function () { $.ajax({ type:'post', url:path+"/commom/getOtherDiagNameByAdmissTimesAndInpatientNo", - data:{name:$("#name").val(),admissTimes:val,inpatientNo:$("#inpatientNo").val(),startTime2:$("#disDate").val()}, + data:{name:name,admissTimes:val,inpatientNo:inpatientNo,startTime2:$("#disDate").val()}, dataType:'json', success:function(d){ if(d != null){ $("#patientId").val(d.patientId); - $("#iframe").prop("src",path+"/commom/showRecordIframe?patientId="+d.patientId); - $("#disDate").val(d.disDate); + $("#iframe").prop("src",path+"/commom/showRecordIframeBlood?patientId="+d.patientId); + var disDate = d.disDate; + disDate = covertDate(disDate); + $("#disDate").val(disDate); $("#disDeptName").val(d.disDept); $("#diagName").val(d.mainDiagName); $("#otherDiagName").val(d.otherDiagName); diff --git a/src/main/webapp/static/js/recordManage/commomSearch/showRecordIframeBlood.js b/src/main/webapp/static/js/recordManage/commomSearch/showRecordIframeBlood.js index 0d33312..de5b10a 100644 --- a/src/main/webapp/static/js/recordManage/commomSearch/showRecordIframeBlood.js +++ b/src/main/webapp/static/js/recordManage/commomSearch/showRecordIframeBlood.js @@ -131,7 +131,7 @@ function onloadPdf(scanPages,sources){ selectPrintPic(patientId,rootPaths,scanPages,sources); } } - +var iframe = document.getElementById("iframe1"); /** * 加载打印预览所需图片 */ @@ -157,10 +157,10 @@ function selectPrintPic(patientId,rootPaths,scanPages,sources){ } var interval = setInterval(function () { if($("#iframeLoad").val() == 1) { - window.frames['iframe1'].contentDocument.getElementById("printContainer1").innerHTML = img; + iframe.contentDocument.getElementById("printContainer1").innerHTML = img; $("#printPicLoaded").val(1); - window.frames['iframe1'].contentDocument.getElementById("printLoading").style.display = 'none'; - window.frames['iframe1'].contentDocument.getElementById("print").style.display = 'block'; + iframe.contentDocument.getElementById("printLoading").style.display = 'none'; + iframe.contentDocument.getElementById("print").style.display = 'block'; clearInterval(interval); } },200); @@ -192,7 +192,6 @@ function selectPrintPic(patientId,rootPaths,scanPages,sources){ }) },100); } -var iframe = window.frames['iframe1']; if(iframe.attachEvent){ iframe.attachEvent("onreadystatechange", function() { //此事件在内容没有被载入时候也会被触发,所以我们要判断状态 diff --git a/src/main/webapp/static/pdfjs/web/viewer1.html b/src/main/webapp/static/pdfjs/web/viewer1.html index a0a5365..fa1d4d5 100644 --- a/src/main/webapp/static/pdfjs/web/viewer1.html +++ b/src/main/webapp/static/pdfjs/web/viewer1.html @@ -257,7 +257,7 @@ http://sourceforge.net/adobe/cmap/wiki/License/ -
+