优化打印预览备份(未完成)
parent
c3ea22c7e2
commit
398ac2fda2
File diff suppressed because it is too large
Load Diff
@ -1,45 +0,0 @@
|
|||||||
package com.emr.entity;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author:hjl
|
|
||||||
* @Date:Creatid in 15:44 2019/4/6
|
|
||||||
* @Description:
|
|
||||||
*/
|
|
||||||
public class Paper {
|
|
||||||
private long paperId;
|
|
||||||
private String paperName;
|
|
||||||
private int paperNum;
|
|
||||||
private String paperDetail;
|
|
||||||
|
|
||||||
public long getPaperId() {
|
|
||||||
return paperId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPaperId(long paperId) {
|
|
||||||
this.paperId = paperId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPaperName() {
|
|
||||||
return paperName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPaperName(String paperName) {
|
|
||||||
this.paperName = paperName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getPaperNum() {
|
|
||||||
return paperNum;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPaperNum(int paperNum) {
|
|
||||||
this.paperNum = paperNum;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPaperDetail() {
|
|
||||||
return paperDetail;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPaperDetail(String paperDetail) {
|
|
||||||
this.paperDetail = paperDetail;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,27 +1,33 @@
|
|||||||
#power权限系统的服务器地址头
|
#power\u6743\u9650\u7CFB\u7EDF\u7684\u670D\u52A1\u5668\u5730\u5740\u5934
|
||||||
POWER_IP = localhost
|
POWER_IP = 192.168.1.3
|
||||||
POWER_URLHEAD = http://localhost:8081/power
|
POWER_URLHEAD = http://192.168.1.3:8080/power
|
||||||
|
|
||||||
POWER_JSPHEAD = localhost
|
POWER_JSPHEAD = 192.168.1.3
|
||||||
POWER_JSP = http://localhost:8081/power
|
POWER_JSP = http://192.168.1.3:8080/power
|
||||||
|
|
||||||
|
#\u672C\u8EAB\u7CFB\u7EDF\u7684\u670D\u52A1\u5668\u5730\u5740\u5934
|
||||||
|
EMR_RECORD_JSP = http://192.168.1.3:8083/emr_record
|
||||||
|
|
||||||
#webSocket服务器地址
|
|
||||||
|
#webSocket\u670D\u52A1\u5668\u5730\u5740
|
||||||
WEBSOCKET_URLHEAD = ${POWER_JSPHEAD}:8088
|
WEBSOCKET_URLHEAD = ${POWER_JSPHEAD}:8088
|
||||||
#通知字符串间隔符
|
#\u901A\u77E5\u5B57\u7B26\u4E32\u95F4\u9694\u7B26
|
||||||
STR_SPLIT = *^:|,.
|
STR_SPLIT = *^:|,.
|
||||||
|
|
||||||
#日志保留天数
|
#\u65E5\u5FD7\u4FDD\u7559\u5929\u6570
|
||||||
log.days = 180
|
log.days = 180
|
||||||
|
|
||||||
#session过期时间
|
#session\u8FC7\u671F\u65F6\u95F4ms
|
||||||
TOKEN_EXPIRE_TIME = 1200000
|
TOKEN_EXPIRE_TIME = 3600000
|
||||||
|
|
||||||
#pdf水印
|
#pdf\u6C34\u5370
|
||||||
pdfWater = 广东省英德市人民医院
|
pdfWater = \u5E7F\u4E1C\u7701\u82F1\u5FB7\u5E02\u4EBA\u6C11\u533B\u9662
|
||||||
|
|
||||||
#icd版本
|
#icd\u7248\u672C
|
||||||
icdVersion = 10
|
icdVersion = 10
|
||||||
|
|
||||||
#水印图片目录
|
#\u6C34\u5370\u56FE\u7247\u76EE\u5F55
|
||||||
picPath = static/pdfWaterSet/upload/
|
picPath = static/pdfWaterSet/upload/
|
||||||
|
|
||||||
|
#\u751F\u6210\u52A0\u4E0A\u6C34\u5370\u540E\u7684\u56FE\u7247\u7684\u66F4\u76EE\u5F55
|
||||||
|
waterPicPath = D:/jiashi/reload/
|
||||||
|
|||||||
@ -1,21 +0,0 @@
|
|||||||
record.jdbc.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
|
|
||||||
#jdbc.url=jdbc\:sqlserver\://120.27.212.36:1433;databaseName=emr_record
|
|
||||||
#jdbc.username=sa
|
|
||||||
#jdbc.password=docus@702
|
|
||||||
|
|
||||||
record.jdbc.url=jdbc\:sqlserver\://localhost:1433;databaseName=blgd_java
|
|
||||||
record.jdbc.username=sa
|
|
||||||
record.jdbc.password=docus702
|
|
||||||
|
|
||||||
#hibernate config
|
|
||||||
hibernate.dialect=org.hibernate.dialect.SQLServerDialect
|
|
||||||
hibernate.show_sql=true
|
|
||||||
hibernate.format_sql=true
|
|
||||||
hibernate.hbm2ddl.auto=update
|
|
||||||
#hibernate.current_session_context_class=org.springframework.orm.hibernate5.SpringSessionContext
|
|
||||||
hibernate.current_session_context_class=thread
|
|
||||||
hibernate.jdbc.batch_size=50
|
|
||||||
hibernate.enable_lazy_load_no_trans=true
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 670 KiB |
@ -0,0 +1,124 @@
|
|||||||
|
/* @Print.js
|
||||||
|
* DH (http://denghao.me)
|
||||||
|
* 2017-7-14
|
||||||
|
*/
|
||||||
|
(function (window, document) {
|
||||||
|
var Print = function (dom, options) {
|
||||||
|
if (!(this instanceof Print)) return new Print(dom, options);
|
||||||
|
|
||||||
|
this.options = this.extend({
|
||||||
|
noPrint: '.no-print',
|
||||||
|
onStart: function () { },
|
||||||
|
onEnd: function () { }
|
||||||
|
}, options);
|
||||||
|
|
||||||
|
if ((typeof dom) === "string") {
|
||||||
|
this.dom = document.querySelector(dom);
|
||||||
|
} else {
|
||||||
|
this.dom = dom;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.init();
|
||||||
|
};
|
||||||
|
Print.prototype = {
|
||||||
|
init: function () {
|
||||||
|
var content = this.getStyle() + this.getHtml();
|
||||||
|
this.writeIframe(content);
|
||||||
|
},
|
||||||
|
extend: function (obj, obj2) {
|
||||||
|
for (var k in obj2) {
|
||||||
|
obj[k] = obj2[k];
|
||||||
|
}
|
||||||
|
return obj;
|
||||||
|
},
|
||||||
|
|
||||||
|
getStyle: function () {
|
||||||
|
var str = "",
|
||||||
|
styles = document.querySelectorAll('style,link');
|
||||||
|
for (var i = 0; i < styles.length; i++) {
|
||||||
|
str += styles[i].outerHTML;
|
||||||
|
}
|
||||||
|
str += "<style>" + (this.options.noPrint ? this.options.noPrint : '.no-print') + "{display:none;}</style>";
|
||||||
|
|
||||||
|
return str;
|
||||||
|
},
|
||||||
|
|
||||||
|
getHtml: function () {
|
||||||
|
var inputs = document.querySelectorAll('input');
|
||||||
|
var textareas = document.querySelectorAll('textarea');
|
||||||
|
var selects = document.querySelectorAll('select');
|
||||||
|
|
||||||
|
for (var k in inputs) {
|
||||||
|
if (inputs[k].type == "checkbox" || inputs[k].type == "radio") {
|
||||||
|
if (inputs[k].checked == true) {
|
||||||
|
inputs[k].setAttribute('checked', "checked")
|
||||||
|
} else {
|
||||||
|
inputs[k].removeAttribute('checked')
|
||||||
|
}
|
||||||
|
} else if (inputs[k].type == "text") {
|
||||||
|
inputs[k].setAttribute('value', inputs[k].value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (var k2 in textareas) {
|
||||||
|
if (textareas[k2].type == 'textarea') {
|
||||||
|
textareas[k2].innerHTML = textareas[k2].value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (var k3 in selects) {
|
||||||
|
if (selects[k3].type == 'select-one') {
|
||||||
|
var child = selects[k3].children;
|
||||||
|
for (var i in child) {
|
||||||
|
if (child[i].tagName == 'OPTION') {
|
||||||
|
if (child[i].selected == true) {
|
||||||
|
child[i].setAttribute('selected', "selected")
|
||||||
|
} else {
|
||||||
|
child[i].removeAttribute('selected')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.dom.outerHTML;
|
||||||
|
},
|
||||||
|
|
||||||
|
writeIframe: function (content) {
|
||||||
|
var w, doc, iframe = document.createElement('iframe'),
|
||||||
|
f = document.body.appendChild(iframe);
|
||||||
|
iframe.id = "myIframe";
|
||||||
|
iframe.style = "position:absolute;width:0;height:0;top:-10px;left:-10px;";
|
||||||
|
|
||||||
|
w = f.contentWindow || f.contentDocument;
|
||||||
|
doc = f.contentDocument || f.contentWindow.document;
|
||||||
|
doc.open();
|
||||||
|
doc.write(content);
|
||||||
|
doc.close();
|
||||||
|
this.toPrint(w, function () {
|
||||||
|
document.body.removeChild(iframe)
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
toPrint: function (w, cb) {
|
||||||
|
var _this = this;
|
||||||
|
w.onload = function () {
|
||||||
|
try {
|
||||||
|
setTimeout(function () {
|
||||||
|
w.focus();
|
||||||
|
typeof _this.options.onStart === 'function' && _this.options.onStart();
|
||||||
|
if (!w.document.execCommand('print', false, null)) {
|
||||||
|
w.print();
|
||||||
|
}
|
||||||
|
typeof _this.options.onEnd === 'function' && _this.options.onEnd();
|
||||||
|
w.close();
|
||||||
|
cb && cb()
|
||||||
|
});
|
||||||
|
} catch (err) {
|
||||||
|
console.log('err', err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
window.Print = Print;
|
||||||
|
}(window, document));
|
||||||
Loading…
Reference in New Issue