Tony Kang преди 2 години
родител
ревизия
b305a2a8d2
променени са 1 файла, в които са добавени 6 реда и са изтрити 1 реда
  1. 6 1
      app/view/report/rpt_individual.ejs

+ 6 - 1
app/view/report/rpt_individual.ejs

@@ -131,6 +131,10 @@
                 let canvas = document.getElementById("rptIndividualCanvas");
 
                 if (currentPageRst && currentPageRst.items && currentPageRst.items.length > 0) {
+                    if (currentPageRst.items.length > 1) {
+                        //理论上要清理冗余数据
+                        currentPageRst.items = currentPageRst.items.slice(0,1);
+                    }
                     let size = JpcCanvasOutput.getReportSizeInPixel(currentPageRst, SCREEN_DPI);
                     canvas.width = size[0] + 20;
                     if (size[1] > size[0]) {
@@ -206,7 +210,8 @@
             if (pdfFont['SmartSimsun'].length === 2) {
                 JpcJsPDFHelper.outputAsPdf(currentPageRst, PAGE_SIZE, currentReportName, [], []);
             } else {
-                dynamicLoadJs('https://d2.smartcost.com.cn/cach/SmartSimsun-normal.js', 'normal', _getPdfFontCallback);
+                // dynamicLoadJs('https://d2.smartcost.com.cn/cach/SmartSimsun-normal.js', 'normal', _getPdfFontCallback);
+                dynamicLoadJs('https://d2.smartcost.com.cn/cach/SmartSimsun-normal2.js', 'normal', _getPdfFontCallback);
                 dynamicLoadJs('https://d2.smartcost.com.cn/cach/SmartSimsun-bold.js', 'bold', _getPdfFontCallback);
             }
         }