Kaynağa Gözat

加强代码稳定性

TonyKang 5 yıl önce
ebeveyn
işleme
b71781ec4d

+ 0 - 7
app/controller/report_controller.js

@@ -373,13 +373,6 @@ module.exports = app => {
             const uuid = ctx.params.uuid;
             const rptName = ctx.params.rptName;
             const suffix = '.' + ctx.params.suffix;
-            function getUuidFile(filestream) {
-                return new Promise(function(resolve, reject) {
-                    filestream.on('data', function(chunk) {
-                        resolve(chunk);
-                    });
-                });
-            }
             try {
                 const rptNameURI = encodeURI(rptName);
                 const filePath = this.app.baseDir + '/app/public/download/';

+ 1 - 1
app/reports/util/rpt_excel_util.js

@@ -616,7 +616,7 @@ function writeSheet(pageData, sheetData, paperSize, sharedStrList, stylesObj, ap
                 }
             }
         } else {
-            if (cell[JV.PROP_AREA][borderStr] === mergeBorder[borderStr]) {
+            if (mergeBorder && mergeBorder[borderStr] && cell[JV.PROP_AREA][borderStr] === mergeBorder[borderStr]) {
                 const destStyle = pageData[JV.NODE_STYLE_COLLECTION][mergeBand[JV.PROP_STYLE][JV.PROP_ID]];
                 if (needFurtherChk) {
                     if (cell[JV.PROP_AREA][JV.PROP_TOP] >= mergeBorder[JV.PROP_TOP] &&