|
@@ -166,12 +166,24 @@
|
|
|
sessionStorage.pageSize = 'A4';
|
|
|
window.open('/printReport/A4');
|
|
|
},
|
|
|
+
|
|
|
+ _getPdfFontCallback: function(fontProperty) {
|
|
|
+ let me = auditRptPrintHelper;
|
|
|
+ if (rptTplObj.pdfFont['SmartSimsun'].indexOf(fontProperty) < 0) {
|
|
|
+ rptTplObj.pdfFont['SmartSimsun'].push(fontProperty);
|
|
|
+ }
|
|
|
+ if (rptTplObj.pdfFont['SmartSimsun'].length >= 2) {
|
|
|
+ $.bootstrapLoading.end();
|
|
|
+ downloadPDFReport([tesRpttData], 'A4', ['测试审核表'], [], [], [-1], []);
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
directPDF: function() {
|
|
|
- if (rptTplObj.pdfFont['SmartSimsun'].length === 2) {
|
|
|
+ if (rptTplObj.pdfFont['SmartSimsun'].length >= 2) {
|
|
|
downloadPDFReport([tesRpttData], 'A4', ['测试审核表'], [], [], [-1], []);
|
|
|
} else {
|
|
|
- dynamicLoadJs('https://d2.smartcost.com.cn/cach/SmartSimsun-normal2.js', 'normal', getPdfFontCallback);
|
|
|
- dynamicLoadJs('https://d2.smartcost.com.cn/cach/SmartSimsun-bold.js', 'bold', getPdfFontCallback);
|
|
|
+ dynamicLoadJs('https://d2.smartcost.com.cn/cach/SmartSimsun-normal2.js', 'normal', this._getPdfFontCallback);
|
|
|
+ dynamicLoadJs('https://d2.smartcost.com.cn/cach/SmartSimsun-bold.js', 'bold', this._getPdfFontCallback);
|
|
|
}
|
|
|
},
|
|
|
};
|