修改病案预览重新加载住院次数bug及禁用非管理加载住院次数

master
zengwh 6 years ago
parent 043762a36b
commit f4818e9357

@ -71,7 +71,7 @@ public class FontShowRecordController {
user.setUserId(-999); user.setUserId(-999);
user.setRoleId(-999); user.setRoleId(-999);
Set<String> menu = new TreeSet<>(); Set<String> menu = new TreeSet<>();
menu.add("/commom/printPdf"); //menu.add("/commom/printPdf");
user.setMenus(menu); user.setMenus(menu);
UsernamePasswordToken userToken = new UsernamePasswordToken(user.getUserName(), "123456"); UsernamePasswordToken userToken = new UsernamePasswordToken(user.getUserName(), "123456");
Subject subject = SecurityUtils.getSubject(); Subject subject = SecurityUtils.getSubject();

@ -477,7 +477,7 @@ public class CommomSearchController {
model.addAttribute("isDownload", isDownload); model.addAttribute("isDownload", isDownload);
//查询是否有打印权限 //查询是否有打印权限
Integer printFlag = 0; Integer printFlag = 0;
/* Set<String> menus = user.getMenus(); Set<String> menus = user.getMenus();
for (String menu : menus) { for (String menu : menus) {
if (StringUtils.isNotBlank(menu)) { if (StringUtils.isNotBlank(menu)) {
if ("/commom/printPdf".equals(menu)) { if ("/commom/printPdf".equals(menu)) {
@ -485,7 +485,7 @@ public class CommomSearchController {
break; break;
} }
} }
}*/ }
model.addAttribute("printFlag", printFlag); model.addAttribute("printFlag", printFlag);
model.addAttribute("flag", flag); model.addAttribute("flag", flag);
return "recordManage/commomSearch/showRecordIframeBlood"; return "recordManage/commomSearch/showRecordIframeBlood";

@ -0,0 +1,58 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<c:set var="path" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>预览PDF</title>
<meta http-equiv=X-UA-Compatible IE=EmulateIE7>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<!--[if lt IE 9]>
<script src="${path}/static/js/jquery-1.11.3.min.js"></script>
<script src="${path}/static/js/html5shiv.js"></script>
<script src="${path}/static/js/respond.min.js"></script>
<![endif]-->
<script src="${path}/static/js/jquery-1.11.3.min.js"></script>
<link rel="shortcut icon" href="${path}/static/js/favicon.ico">
<script>
var path = "${path}";
</script>
<style type="text/css">
html,body{
width:100%;
height:100%;
margin:0;
padding:0;
background-color: #F2F2F2;
}
</style>
</head>
<body onkeydown="disabledPrint()">
<input hidden type="hidden" id="httpFilePath" value="${httpFilePath}">
<script type="text/javascript" src="${path}/static/js/font/showRecordIframeBloodCommom.js"></script>
<script>
location.href = $("#httpFilePath").val();
//屏蔽鼠标右键
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;
}
}
$("#buttons").remove();
</script>
</body>
</html>

@ -16,7 +16,7 @@
<![endif]--> <![endif]-->
<link rel="shortcut icon" href="${path}/static/js/favicon.ico"> <link rel="shortcut icon" href="${path}/static/js/favicon.ico">
<link rel="stylesheet" href="${path}/static/css/comm.css"/> <link rel="stylesheet" href="${path}/static/css/comm.css"/>
<script src="${path}/static/js/jquery-3.3.1.js"></script> <script src="${path}/static/js/jquery-1.11.3.min.js"></script>
<script> <script>
var path = "${path}"; var path = "${path}";
</script> </script>
@ -128,7 +128,7 @@
<div class="form-group"> <div class="form-group">
<label class="control-label labelDiv">住院次数:</label> <label class="control-label labelDiv">住院次数:</label>
<div class="textInputDiv"> <div class="textInputDiv">
<select class="form-control input input-sm admissTimes" id="admissTimes"></select> <select class="form-control input input-sm admissTimes" id="admissTimes" disabled></select>
</div> </div>
<div type="hidden" id="admissTimesValue"></div> <div type="hidden" id="admissTimesValue"></div>
</div> </div>

@ -105,7 +105,8 @@ aria-labelledby="myModalLabel" aria-hidden="true">
</div> </div>
</div> </div>
<div class="content-right"> <div class="content-right">
<iframe width="100%" height="100%" src="" id="iframe1" frameborder="0" onkeydown="disabledPrint()"></iframe> <iframe type="application/pdf" width="100%" height="100%" src="" id="iframe1" frameborder="0" onkeydown="disabledPrint()"></iframe>
</div> </div>
<script type="text/javascript" src="${path}/static/js/font/showRecordIframeBloodFont.js"></script> <script type="text/javascript" src="${path}/static/js/font/showRecordIframeBloodFont.js"></script>
<script type="text/javascript" src="${path}/static/js/font/showRecordIframeBloodCommom.js"></script> <script type="text/javascript" src="${path}/static/js/font/showRecordIframeBloodCommom.js"></script>

@ -1,6 +1,7 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ page contentType="text/html;charset=UTF-8" language="java" %>
<c:set var="path" value="${pageContext.request.contextPath}"/> <c:set var="path" value="${pageContext.request.contextPath}"/>
<%@ include file="/WEB-INF/jspf/common.jspf" %>
<%@ include file="/WEB-INF/jspf/ztreeCommom.jsp" %> <%@ include file="/WEB-INF/jspf/ztreeCommom.jsp" %>
<%@ include file="/WEB-INF/jspf/boostrapSelect.jspf" %> <%@ include file="/WEB-INF/jspf/boostrapSelect.jspf" %>
<!DOCTYPE html> <!DOCTYPE html>
@ -13,15 +14,16 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link href="${path}/static/css/updatePic/common.css" type="text/css" rel="stylesheet"> <link href="${path}/static/css/updatePic/common.css" type="text/css" rel="stylesheet">
<link href="${path}/static/css/updatePic/index.css" type="text/css" rel="stylesheet"> <link href="${path}/static/css/updatePic/index.css" type="text/css" rel="stylesheet">
<link href="${path}/static/js/recordManage/templateSearch/jquery.qtip.min.css" type="text/css" rel="stylesheet">
<!--[if lt IE 9]> <!--[if lt IE 9]>
<script src="http://libs.baidu.com/jquery/1.9.1/jquery.min.js"></script> <script src="${path}/static/js/jquery-1.11.3.min.js"></script>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> <script src="${path}/static/js/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> <script src="${path}/static/js/respond.min.js"></script>
<![endif]--> <![endif]-->
<%@ include file="/WEB-INF/jspf/common.jspf" %>
<script> <script>
var path = "${path}"; var path = "${path}";
</script> </script>
<script src="${path}/static/js/recordManage/templateSearch/jquery.qtip.min.js"></script>
<script type="text/javascript" src="${path}/static/js/udpatePic/imgUp.js"></script> <script type="text/javascript" src="${path}/static/js/udpatePic/imgUp.js"></script>
<style type="text/css"> <style type="text/css">
body{ body{
@ -192,7 +194,15 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-5 control-label labelDiv">住院次数:</label> <label class="col-sm-5 control-label labelDiv">住院次数:</label>
<div class="col-sm-7"> <div class="col-sm-7">
<c:choose>
<c:when test="${user.roleId == 0 || user.roleId == -100}">
<select class="form-control input input-sm admissTimes" id="admissTimes"></select> <select class="form-control input input-sm admissTimes" id="admissTimes"></select>
</c:when>
<c:otherwise>
<select class="form-control input input-sm admissTimes" id="admissTimes" disabled></select>
</c:otherwise>
</c:choose>
</div> </div>
<div type="hidden" id="admissTimesValue"></div> <div type="hidden" id="admissTimesValue"></div>
</div> </div>

@ -44,24 +44,24 @@
</style> </style>
</head> </head>
<body style="scroll:auto" onkeydown="disabledPrint()"> <body style="scroll:auto" onkeydown="disabledPrint()">
<input hidden id="patientId" value="${patientId}"> <input type="hidden" id="patientId" value="${patientId}">
<!--初始化及树复选框勾选的文件名称集合--> <!--初始化及树复选框勾选的文件名称集合-->
<input hidden id="assortIds"> <input type="hidden" id="assortIds">
<!--初始化及树复选框勾选的文件来源集合--> <!--初始化及树复选框勾选的文件来源集合-->
<input hidden id="sources"> <input type="hidden" id="sources">
<!--树节点点击选中的文件名称--> <!--树节点点击选中的文件名称-->
<input type="hidden" id="assortIdByClick"> <input type="hidden" id="assortIdByClick">
<!--树节点点击选中的文件来源--> <!--树节点点击选中的文件来源-->
<input hidden id="sourceByClick"> <input type="hidden" id="sourceByClick">
<input hidden id="flag" value="${flag}"> <input type="hidden" id="flag" value="${flag}">
<!--是否有打印权限--> <!--是否有打印权限-->
<input hidden id="print" value="${printFlag}"> <input type="hidden" id="print" value="${printFlag}">
<!--文件路径--> <!--文件路径-->
<input hidden id="filePath"> <input type="hidden" id="filePath">
<!--定义iframe1加载完成标识--> <!--定义iframe1加载完成标识-->
<input hidden id="iframeLoad"> <input type="hidden" id="iframeLoad">
<!--定义打印预览的图片加载完成标识--> <!--定义打印预览的图片加载完成标识-->
<input hidden id="printPicLoaded"> <input type="hidden" id="printPicLoaded">
<!--定义打印预览的图片加载进度--> <!--定义打印预览的图片加载进度-->
<input type="hidden" id="loading"> <input type="hidden" id="loading">
<div class="content-left"> <div class="content-left">

@ -24,15 +24,15 @@ var isIE = function(ver) {
} }
//初始化函数 //初始化函数
$(function(){ $(function(){
var ie = isIE(8);
if(ie) {
$('.contentDiv').css('height', '100%').css('height', '-=140px'); $('.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) {
//加载iframe //加载iframe
$("#iframe").prop("src",path+"/font/showRecordIframeBloodFont?patientId="+$("#patientId").val()+"&flag=file_path"); $("#iframe").prop("src",path+"/font/showRecordIframeBloodFont?patientId="+$("#patientId").val()+"&flag=file_path");
}else{ }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()); $("#iframe").prop("src",path+"/commom/showRecordIframeBlood?patientId="+$("#patientId").val()+"&flag=file_path"+"&rootPaths="+$("#rootPaths").val());
} }*/
//加载其他诊断名称鼠标滑过显示全部文本 //加载其他诊断名称鼠标滑过显示全部文本
//loadQtip('.otherDiagName'); //loadQtip('.otherDiagName');
//加载病案信息 //加载病案信息

@ -1,9 +1,12 @@
// var obj = new ActiveXObject("AcroPDF.PDF.1");
window.onload = function () { window.onload = function () {
var pdfresult = isAcrobatPluginInstall(); var pdfresult = isAcrobatPluginInstall();
if(!pdfresult){ if(!pdfresult){
alert("对不起,您还没有安装PDF阅读器软件呢,为了方便预览PDF文档,请选择安装!"); alert("对不起,您还没有安装PDF阅读器软件呢,为了方便预览PDF文档,请选择安装!");
location = path + "/static/js/font/AdbeRdr70_chs_full.exe"; 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 = [ /*var data = [
@ -110,11 +113,48 @@ function onloadPdf(){
if(data.code == 0){ if(data.code == 0){
if(data.msg != ''){ if(data.msg != ''){
$("#iframe1").prop("src",data.msg); $("#iframe1").prop("src",data.msg);
var html = '<script>';
html += 'for(var i = 0;i<30;i++){fireKeyEvent(document.getElementsByTagName(\'body\'),\'keydown\',33);}';
html += '</script>';
$("#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(){ function printInfoBlood(){
var patientId = "'"+$("#patientId").val()+"'"; var patientId = "'"+$("#patientId").val()+"'";

@ -1316,7 +1316,7 @@ var Color = function (_tinycolor) {
key: '_validOrFallback', key: '_validOrFallback',
value: function _validOrFallback() { value: function _validOrFallback() {
if (!this.isValid()) { if (!this.isValid()) {
var fallbackOptions = Object.assign({}, this.options); var fallbackOptions = this.options;
if (!fallbackOptions.format) { if (!fallbackOptions.format) {
fallbackOptions.format = defaultFallbackFormat; fallbackOptions.format = defaultFallbackFormat;

@ -9,7 +9,7 @@ $(function(){
//加载iframe //加载iframe
$("#iframe").prop("src",path+"/commom/showRecordIframeBlood?patientId="+$("#patientId").val()+"&flag=file_path"); $("#iframe").prop("src",path+"/commom/showRecordIframeBlood?patientId="+$("#patientId").val()+"&flag=file_path");
}) })
/*//封装其他诊断名称鼠标滑过显示全部文本 //封装其他诊断名称鼠标滑过显示全部文本
function loadQtip(selector){ function loadQtip(selector){
$(selector).qtip({ $(selector).qtip({
content: {text:$('#otherDiagName').val()}, content: {text:$('#otherDiagName').val()},
@ -24,7 +24,7 @@ function loadQtip(selector){
} }
} }
}); });
}*/ }
//加载病案信息 //加载病案信息
function loadRecord(){ function loadRecord(){
@ -67,7 +67,9 @@ function loadRecord(){
rootPaths += data.newFile; rootPaths += data.newFile;
} }
$("#rootPaths").val(rootPaths); $("#rootPaths").val(rootPaths);
//$("#otherDiagName").val(data.otherDiagName); $("#otherDiagName").val(data.otherDiagName);
//重新加载其他诊断名称鼠标滑过显示全部文本
loadQtip('.otherDiagName');
} }
} }
}) })
@ -106,13 +108,15 @@ $("#admissTimes").change(function () {
$.ajax({ $.ajax({
type:'post', type:'post',
url:path+"/commom/getOtherDiagNameByAdmissTimesAndInpatientNo", 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', dataType:'json',
success:function(d){ success:function(d){
if(d != null){ if(d != null){
$("#patientId").val(d.patientId); $("#patientId").val(d.patientId);
$("#iframe").prop("src",path+"/commom/showRecordIframe?patientId="+d.patientId); $("#iframe").prop("src",path+"/commom/showRecordIframeBlood?patientId="+d.patientId);
$("#disDate").val(d.disDate); var disDate = d.disDate;
disDate = covertDate(disDate);
$("#disDate").val(disDate);
$("#disDeptName").val(d.disDept); $("#disDeptName").val(d.disDept);
$("#diagName").val(d.mainDiagName); $("#diagName").val(d.mainDiagName);
$("#otherDiagName").val(d.otherDiagName); $("#otherDiagName").val(d.otherDiagName);

@ -131,7 +131,7 @@ function onloadPdf(scanPages,sources){
selectPrintPic(patientId,rootPaths,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 () { var interval = setInterval(function () {
if($("#iframeLoad").val() == 1) { if($("#iframeLoad").val() == 1) {
window.frames['iframe1'].contentDocument.getElementById("printContainer1").innerHTML = img; iframe.contentDocument.getElementById("printContainer1").innerHTML = img;
$("#printPicLoaded").val(1); $("#printPicLoaded").val(1);
window.frames['iframe1'].contentDocument.getElementById("printLoading").style.display = 'none'; iframe.contentDocument.getElementById("printLoading").style.display = 'none';
window.frames['iframe1'].contentDocument.getElementById("print").style.display = 'block'; iframe.contentDocument.getElementById("print").style.display = 'block';
clearInterval(interval); clearInterval(interval);
} }
},200); },200);
@ -192,7 +192,6 @@ function selectPrintPic(patientId,rootPaths,scanPages,sources){
}) })
},100); },100);
} }
var iframe = window.frames['iframe1'];
if(iframe.attachEvent){ if(iframe.attachEvent){
iframe.attachEvent("onreadystatechange", function() { iframe.attachEvent("onreadystatechange", function() {
//此事件在内容没有被载入时候也会被触发,所以我们要判断状态 //此事件在内容没有被载入时候也会被触发,所以我们要判断状态

@ -257,7 +257,7 @@ http://sourceforge.net/adobe/cmap/wiki/License/
<!--<button id="openFile" class="toolbarButton openFile hiddenLargeView" title="Open File" tabindex="32" data-l10n-id="open_file"> <!--<button id="openFile" class="toolbarButton openFile hiddenLargeView" title="Open File" tabindex="32" data-l10n-id="open_file">
<span data-l10n-id="open_file_label">Open</span> <span data-l10n-id="open_file_label">Open</span>
</button>--> </button>-->
<div id="printLoading" class="progress" title="打印预览加载中..."> <div id="printLoading" class="progress" title="打印预览加载中..." style="display: none">
<div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100"></div> <div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100"></div>
<p style="margin-top: 6px;">0%</p> <p style="margin-top: 6px;">0%</p>
</div> </div>

Loading…
Cancel
Save