|
|
|
@ -145,122 +145,6 @@ function onloadPdf(scanPages, sources) {
|
|
|
|
|
|
|
|
|
|
|
|
var iframe = document.getElementById("iframe1");
|
|
|
|
var iframe = document.getElementById("iframe1");
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 加载打印预览所需图片
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
//定义打印预览加载图片进度
|
|
|
|
|
|
|
|
function selectPrintPic(patientId, rootPaths, scanPages, sources) {
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
|
|
|
type: 'post',
|
|
|
|
|
|
|
|
url: path + "/font/selectPrintPic",
|
|
|
|
|
|
|
|
data: {
|
|
|
|
|
|
|
|
patientId: patientId,
|
|
|
|
|
|
|
|
rootPaths: rootPaths,
|
|
|
|
|
|
|
|
names: scanPages,
|
|
|
|
|
|
|
|
sources: sources
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
datType: 'json',
|
|
|
|
|
|
|
|
success: function (data) {
|
|
|
|
|
|
|
|
if (data.code == 0) {
|
|
|
|
|
|
|
|
var resultList = data.data;
|
|
|
|
|
|
|
|
if (null != resultList) {
|
|
|
|
|
|
|
|
var img = '';
|
|
|
|
|
|
|
|
for (var i = 0; i < resultList.length; i++) {
|
|
|
|
|
|
|
|
img += "<img src='" + resultList[i] + "' width='850' height='1190'>";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
var interval = setInterval(function () {
|
|
|
|
|
|
|
|
if ($("#iframeLoad").val() == 1) {
|
|
|
|
|
|
|
|
iframe.contentDocument.getElementById("printContainer1").innerHTML = img;
|
|
|
|
|
|
|
|
$("#printPicLoaded").val(1);
|
|
|
|
|
|
|
|
iframe.contentDocument.getElementById("printLoading").style.display = 'none';
|
|
|
|
|
|
|
|
iframe.contentDocument.getElementById("print").style.display = 'block';
|
|
|
|
|
|
|
|
clearInterval(interval);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}, 200);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
toastr.error(data.msg);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
//查询进度定时器
|
|
|
|
|
|
|
|
var interval1 = setInterval(function () {
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
|
|
|
type: 'get',
|
|
|
|
|
|
|
|
url: path + "/commom/getPrintPicLoading",
|
|
|
|
|
|
|
|
data: {patientId: $("#patientId").val()},
|
|
|
|
|
|
|
|
dataType: 'json',
|
|
|
|
|
|
|
|
success: function (data) {
|
|
|
|
|
|
|
|
if (data.code == 0) {
|
|
|
|
|
|
|
|
var value = data.data;
|
|
|
|
|
|
|
|
$("#loading").val(value + "%");
|
|
|
|
|
|
|
|
if (value == 100) {
|
|
|
|
|
|
|
|
//杀死进度定时器
|
|
|
|
|
|
|
|
clearInterval(interval1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
toastr.error(data.msg);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}, 100000);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function selectPrintPic2(patientId, scanPages, sources) {
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
|
|
|
type: 'post',
|
|
|
|
|
|
|
|
url: path + "/commom/selectPrintPic2",
|
|
|
|
|
|
|
|
data: {
|
|
|
|
|
|
|
|
patientId: patientId,
|
|
|
|
|
|
|
|
names: scanPages,
|
|
|
|
|
|
|
|
sources: sources
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
datType: 'json',
|
|
|
|
|
|
|
|
success: function (data) {
|
|
|
|
|
|
|
|
if (data.code == 0) {
|
|
|
|
|
|
|
|
var resultList = data.data;
|
|
|
|
|
|
|
|
if (null != resultList) {
|
|
|
|
|
|
|
|
var img = '';
|
|
|
|
|
|
|
|
for (var i = 0; i < resultList.length; i++) {
|
|
|
|
|
|
|
|
img += "<img src='" + resultList[i] + "' width='850' height='1190'>";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
var interval = setInterval(function () {
|
|
|
|
|
|
|
|
if ($("#iframeLoad").val() == 1) {
|
|
|
|
|
|
|
|
iframe.contentDocument.getElementById("printContainer1").innerHTML = img;
|
|
|
|
|
|
|
|
$("#printPicLoaded").val(1);
|
|
|
|
|
|
|
|
iframe.contentDocument.getElementById("printLoading").style.display = 'none';
|
|
|
|
|
|
|
|
iframe.contentDocument.getElementById("print").style.display = 'block';
|
|
|
|
|
|
|
|
clearInterval(interval);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}, 200);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
toastr.error(data.msg);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
//查询进度定时器
|
|
|
|
|
|
|
|
var interval1 = setInterval(function () {
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
|
|
|
type: 'get',
|
|
|
|
|
|
|
|
url: path + "/font/getPrintPicLoading",
|
|
|
|
|
|
|
|
data: {patientId: $("#patientId").val()},
|
|
|
|
|
|
|
|
dataType: 'json',
|
|
|
|
|
|
|
|
success: function (data) {
|
|
|
|
|
|
|
|
if (data.code == 0) {
|
|
|
|
|
|
|
|
var value = data.data;
|
|
|
|
|
|
|
|
$("#loading").val(value + "%");
|
|
|
|
|
|
|
|
if (value == 100) {
|
|
|
|
|
|
|
|
//杀死进度定时器
|
|
|
|
|
|
|
|
clearInterval(interval1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
toastr.error(data.msg);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}, 1000000);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (iframe.attachEvent) {
|
|
|
|
if (iframe.attachEvent) {
|
|
|
|
iframe.attachEvent("onreadystatechange", function () {
|
|
|
|
iframe.attachEvent("onreadystatechange", function () {
|
|
|
|
|