Browse Source

导出报表延时

TonyKang 5 years ago
parent
commit
d85f665c87
2 changed files with 7 additions and 6 deletions
  1. 2 2
      modules/reports/util/rpt_excel_util.js
  2. 5 4
      web/building_saas/report/js/rpt_main.js

+ 2 - 2
modules/reports/util/rpt_excel_util.js

@@ -808,9 +808,9 @@ function writeSheet(pageData, sheetData, paperSize, sharedStrList, stylesObj, ap
     let colStr = private_getCellIdxStr(xPos.length - 3);
     rst.push('<dimension ref="A1:' + colStr + '' + yPos.length + '"/>');
     if (isFirstSheet) {
-        rst.push('<sheetViews><sheetView tabSelected="1" workbookViewId="0">');
+        rst.push('<sheetViews><sheetView showGridLines="1" tabSelected="1" workbookViewId="0">');
     } else {
-        rst.push('<sheetViews><sheetView workbookViewId="0">');
+        rst.push('<sheetViews><sheetView showGridLines="1" workbookViewId="0">');
     }
     //rst.push('<selection sqref="A1:' + colStr + '1"/>');
     rst.push('<selection sqref="A1:A1"/>');

+ 5 - 4
web/building_saas/report/js/rpt_main.js

@@ -7,6 +7,7 @@ const PRE_PAGE_OFFSET = 150;
 const NEXT_PAGE_OFFSET = 160;
 const FIRST_PAGE_OFFSET = 50;
 const LAST_PAGE_OFFSET = 60;
+const WAIT_TIME_EXPORT = 300000;
 
 let fontSuffixMapObj = {"表标题": "title", "列标题": "column", "正文内容": "content", "合计": "summary", "表眉/表脚": "header_footer"};
 
@@ -409,7 +410,7 @@ let rptControlObj = {
             params.custCfg = zTreeOprObj.reportPageCfg;
             params.option = "normal";
             $.bootstrapLoading.start();
-            CommonAjax.postEx("report_api/createExcelFilesInOneBook", params, 20000, true, function(result){
+            CommonAjax.postEx("report_api/createExcelFilesInOneBook", params, WAIT_TIME_EXPORT, true, function(result){
                     if (result) {
                         $.bootstrapLoading.end();
                         let uuIdUrls = [];
@@ -449,7 +450,7 @@ let rptControlObj = {
             params.custCfg = zTreeOprObj.reportPageCfg;
             params.option = "normal";
             $.bootstrapLoading.start();
-            CommonAjax.postEx("report_api/createExcelFiles", params, 20000, true, function(result){
+            CommonAjax.postEx("report_api/createExcelFiles", params, WAIT_TIME_EXPORT, true, function(result){
                     if (result) {
                         $.bootstrapLoading.end();
                         let uuIdUrls = [];
@@ -507,7 +508,7 @@ let rptControlObj = {
             params.orientation = ((zTreeOprObj.checkedRptTplNodes.length > 1)?null:me.getCurrentOrientation());
             params.custCfg = zTreeOprObj.reportPageCfg;
             params.option = "normal";
-            CommonAjax.postEx("report_api/createPdfFiles", params, 20000, true, function(result){
+            CommonAjax.postEx("report_api/createPdfFiles", params, WAIT_TIME_EXPORT, true, function(result){
                     if (result) {
                         let uuIdUrls = [];
                         for (let uuIdObj of result) {
@@ -555,7 +556,7 @@ let rptControlObj = {
                 rpt_names.push(tplNode.name);
             }
             params.rpt_ids = rptIds.join(",");
-            CommonAjax.postEx("report_api/getMultiReports", params, 30000, true,
+            CommonAjax.postEx("report_api/getMultiReports", params, WAIT_TIME_EXPORT, true,
                 function(result){
                     $.bootstrapLoading.end();
                     if ($('#ini_PDF_cover').is(':visible')) {