|
@@ -657,11 +657,17 @@ let rptControlObj = {
|
|
|
);
|
|
|
}
|
|
|
},
|
|
|
+ _hidePdfIniPage: function () {
|
|
|
+ if ($('#ini_PDF_cover').is(':visible')) {
|
|
|
+ $("#ini_PDF_Btn_Cancel").trigger("click");
|
|
|
+ }
|
|
|
+ },
|
|
|
getPdfFontCallback: function(fontProperty) {
|
|
|
let me = rptControlObj;
|
|
|
rptTplObj.pdfFont['SmartSimsun'].push(fontProperty);
|
|
|
if (rptTplObj.pdfFont['SmartSimsun'].length === 2) {
|
|
|
- me.getPDFEx();
|
|
|
+ me._hidePdfIniPage();
|
|
|
+ setTimeout(me.getPDFEx(), 20); // 20毫秒足够关闭PDF初始化page了吧
|
|
|
}
|
|
|
},
|
|
|
getPDFPre: function () {
|
|
@@ -715,10 +721,7 @@ let rptControlObj = {
|
|
|
CommonAjax.postEx("report_api/getMultiReports", params, WAIT_TIME_EXPORT, true,
|
|
|
function(result){
|
|
|
$.bootstrapLoading.end();
|
|
|
- if ($('#ini_PDF_cover').is(':visible')) {
|
|
|
- $("#ini_PDF_Btn_Cancel").trigger("click");
|
|
|
- // $("#ini_PDF_cover").remove();
|
|
|
- }
|
|
|
+ rptControlObj._hidePdfIniPage();
|
|
|
let pageSize = rptControlObj.getCurrentPageSize();
|
|
|
downloadPDFReport(result, pageSize, rpt_names);
|
|
|
// for (let idx = 0; idx < result.length; idx++) {
|
|
@@ -728,19 +731,13 @@ let rptControlObj = {
|
|
|
},
|
|
|
function(failRst){
|
|
|
$.bootstrapLoading.end();
|
|
|
- if ($('#ini_PDF_cover').is(':visible')) {
|
|
|
- $("#ini_PDF_Btn_Cancel").trigger("click");
|
|
|
- // $("#ini_PDF_cover").remove();
|
|
|
- }
|
|
|
+ rptControlObj._hidePdfIniPage();
|
|
|
sessionStorage.currentPageData = null;
|
|
|
console.log(failRst);
|
|
|
},
|
|
|
function(exceptionRst){
|
|
|
$.bootstrapLoading.end();
|
|
|
- if ($('#ini_PDF_cover').is(':visible')) {
|
|
|
- $("#ini_PDF_Btn_Cancel").trigger("click");
|
|
|
- // $("#ini_PDF_cover").remove();
|
|
|
- }
|
|
|
+ rptControlObj._hidePdfIniPage();
|
|
|
sessionStorage.currentPageData = null;
|
|
|
console.log(exceptionRst);
|
|
|
}
|