diff --git a/src/main/java/com/emr/controller/FontShowRecordController.java b/src/main/java/com/emr/controller/FontShowRecordController.java
index 510ce23..f35e40c 100644
--- a/src/main/java/com/emr/controller/FontShowRecordController.java
+++ b/src/main/java/com/emr/controller/FontShowRecordController.java
@@ -250,8 +250,7 @@ public class FontShowRecordController {
* @param flag
*/
@RequestMapping(value = "showRecordContentBloodFont")
- @ResponseBody
- public ResultUtil showRecordContentBloodFont(String patientId, String scanPages, String sources, String flag) throws Exception{
+ public String showRecordContentBloodFont(String patientId, String scanPages, String sources, String flag,Model model) throws Exception{
String pdfTempRoot = "pdfTemp";
//临时保存pdf的文件目录
String fileOutRoot = WATERPICPATH + pdfTempRoot;
@@ -266,6 +265,7 @@ public class FontShowRecordController {
//组织前台访问临时pdf路径
String httpFilePath = EMRRECORDJSP + "\\reload\\" + filePath;
commomService.showRecordContentBloodFont(patientId,scanPages,sources,flag,fileOutPath);
- return ResultUtil.ok(httpFilePath);
+ model.addAttribute("httpFilePath",httpFilePath);
+ return "font/showPdfFrameFont";
}
}
diff --git a/src/main/webapp/WEB-INF/views/font/showPdfFrameFont.jsp b/src/main/webapp/WEB-INF/views/font/showPdfFrameFont.jsp
index 2290ea7..0576862 100644
--- a/src/main/webapp/WEB-INF/views/font/showPdfFrameFont.jsp
+++ b/src/main/webapp/WEB-INF/views/font/showPdfFrameFont.jsp
@@ -2,57 +2,29 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-
-
-
- 预览PDF
-
-
-
-
-
-
+
+
+
+
+
+
+ pdf预览iframe框
-
-
-
-
-
-
-
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/webapp/WEB-INF/views/font/showRecordIframeFont.jsp b/src/main/webapp/WEB-INF/views/font/showRecordIframeFont.jsp
index 4da632c..4254627 100644
--- a/src/main/webapp/WEB-INF/views/font/showRecordIframeFont.jsp
+++ b/src/main/webapp/WEB-INF/views/font/showRecordIframeFont.jsp
@@ -105,8 +105,7 @@ aria-labelledby="myModalLabel" aria-hidden="true">
-
-
+
diff --git a/src/main/webapp/static/js/font/AdbeRdr70_chs_full.exe b/src/main/webapp/static/js/font/AdbeRdr60_chs_full.exe
similarity index 66%
rename from src/main/webapp/static/js/font/AdbeRdr70_chs_full.exe
rename to src/main/webapp/static/js/font/AdbeRdr60_chs_full.exe
index c75dff5..e2b3a97 100644
Binary files a/src/main/webapp/static/js/font/AdbeRdr70_chs_full.exe and b/src/main/webapp/static/js/font/AdbeRdr60_chs_full.exe differ
diff --git a/src/main/webapp/static/js/font/showRecordFont.js b/src/main/webapp/static/js/font/showRecordFont.js
index 180896a..1f71291 100644
--- a/src/main/webapp/static/js/font/showRecordFont.js
+++ b/src/main/webapp/static/js/font/showRecordFont.js
@@ -1,21 +1,3 @@
-//屏蔽鼠标右键
-document.oncontextmenu = function(e) {
- var e = e || window.event;
- e.returnValue = false;
- return false;
-}
-//禁止快捷键打印
-function disabledPrint(){
- if(event.keyCode==80 && event.ctrlKey){
- event.keyCode=0;
- event.returnValue=false;
- }
- if (event.ctrlKey && event.keyCode == 83) {
- event.preventDefault();
- event.returnValue = false;
- return false;
- }
-}
//判断是否是ie8
var isIE = function(ver) {
var b = document.createElement('b')
@@ -25,12 +7,15 @@ var isIE = function(ver) {
//初始化函数
$(function(){
$('.contentDiv').css('height', '100%').css('height', '-=140px');
+ //加载iframe
+ //谷歌
$("#iframe").prop("src",path+"/commom/showRecordIframeBlood?patientId="+$("#patientId").val()+"&flag=file_path"+"&rootPaths="+$("#rootPaths").val());
/*var ie = isIE(8);
if(ie) {
- //加载iframe
+ //ie8加载iframe
$("#iframe").prop("src",path+"/font/showRecordIframeBloodFont?patientId="+$("#patientId").val()+"&flag=file_path");
}else{
+ //谷歌
$("#iframe").prop("src",path+"/commom/showRecordIframeBlood?patientId="+$("#patientId").val()+"&flag=file_path"+"&rootPaths="+$("#rootPaths").val());
}*/
//加载其他诊断名称鼠标滑过显示全部文本
diff --git a/src/main/webapp/static/js/font/showRecordIframeBloodFont.js b/src/main/webapp/static/js/font/showRecordIframeBloodFont.js
index 4eb8d40..8b9315f 100644
--- a/src/main/webapp/static/js/font/showRecordIframeBloodFont.js
+++ b/src/main/webapp/static/js/font/showRecordIframeBloodFont.js
@@ -1,12 +1,11 @@
-// var obj = new ActiveXObject("AcroPDF.PDF.1");
+//下载adobe地址
+//http://ardownload.adobe.com/pub/adobe/reader/win/9.x/9.3/chs/AdbeRdr930_zh_CN.exe
window.onload = function () {
- var pdfresult = isAcrobatPluginInstall();
- if(!pdfresult){
- alert("对不起,您还没有安装PDF阅读器软件呢,为了方便预览PDF文档,请选择安装!");
- location = path + "/static/js/font/AdbeRdr70_chs_full.exe";
+ var checkAdobeReader = Check_AdobeReader();
+ if(checkAdobeReader != 'Acrobat Version: 6.0'){
+ alert("对不起,您还没有安装PDF阅读器软件呢,为了方便预览PDF文档,请选择安装!");
+ location = path + "/static/js/font/AdbeRdr60_chs_full.exe";
}
- // obj.LoadFile("http://192.168.1.3:8083/emr_record/reload/pdfTemp/09.pdf")
-
}
//树操作
/*var data = [
@@ -69,7 +68,58 @@ var tree = $('#data').data('jstree', false).empty().jstree({
"tie_selection": false
},
});
-
+function Check_AdobeReader() {
+ var displayString;
+ var acrobat = new Object();
+ acrobat.installed = false;
+ acrobat.version = "0.0";
+ if (navigator.plugins && navigator.plugins.length) {
+ for (x = 0; x < navigator.plugins.length; x++) {
+ if (navigator.plugins[x].description.indexOf("Adobe Acrobat") != -1) {
+ acrobat.version = parseFloat(navigator.plugins[x].description.split("Version ")[1]);
+ if (acrobat.version.toString().length == 1) acrobat.version += ".0";
+ acrobat.installed = true;
+ displayString = "Acrobat Version: " + acrobat.version;
+ break;
+ } else if (navigator.plugins[x].description.indexOf("Adobe PDF Plug-In") != -1) {
+ acrobat.installed = true;
+ acrobat.version = "8+";
+ displayString = "Acrobat Version 8 or Above";
+ }
+ }
+ } else if (window.ActiveXObject) {
+ for (x = 2; x < 10; x++) {
+ try {
+ oAcro = eval("new ActiveXObject('PDF.PdfCtrl." + x + "');");
+ if (oAcro) {
+ acrobat.installed = true;
+ acrobat.version = x + ".0";
+ displayString = "Acrobat Version: " + acrobat.version;
+ }
+ }
+ catch (e) { }
+ }
+ try {
+ oAcro4 = new ActiveXObject("PDF.PdfCtrl.1");
+ if (oAcro4) {
+ acrobat.installed = true;
+ acrobat.version = '4.0';
+ displayString = 'Acrobat Version: ' + acrobat.version;
+ }
+ }
+ catch (e) { }
+ try {
+ oAcro7 = new ActiveXObject('AcroPDF.PDF.1');
+ if (oAcro7) {
+ acrobat.installed = true;
+ acrobat.version = '7.0';
+ displayString = 'Acrobat Version: ' + acrobat.version;
+ }
+ }
+ catch (e) { }
+ }
+ return displayString;
+}
//checkBox选中、取消选中逻辑
function selectAssortIds(){
var instance = $('#data').jstree(true);//获取jstree对象
@@ -106,53 +156,7 @@ function onloadPdf(){
var sources = $("#sources").val();
var flag = $("#flag").val();
var url = path+"/font/showRecordContentBloodFont?flag="+flag+"&patientId="+patientId+"&scanPages="+assortIds+"&sources="+sources;
- $.ajax({
- type:'get',
- url:url,
- success:function(data){
- 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);
- }
+ $("#iframe1").prop("src",url);
}
//记录打印记录
@@ -165,37 +169,4 @@ function printInfoBlood(){
}
var flag = $("#flag").val();
post(path+'/template/printInfoBlood',{"patientIds":patientId,"assortIds":assortIds,"typeId":typeId,"flag":flag});
-}
-//判断是否ie8
-function isAcrobatPluginInstall() {
- var flag = false;
- if (window.ActiveXObject) {
- for (x = 2; x < 10; x++) {
- try {
- oAcro = eval("new ActiveXObject('PDF.PdfCtrl." + x + "');");
- if (oAcro) {
- flag = true;
- }
- } catch (e) {
- flag = false;
- }
- }
- try {
- oAcro4 = new ActiveXObject('PDF.PdfCtrl.1');
- if (oAcro4)
- flag = true;
- } catch (e) {
- flag = false;
- }
- try {
- oAcro7 = new ActiveXObject('AcroPDF.PDF.1');
- if (oAcro7)
- flag = true;
- } catch (e) {
- flag = false;
- }
- }else{
- flag = true;
- }
- return flag;
}
\ No newline at end of file