Browse Source

界面优化

TonyKang 6 years atrás
parent
commit
d62bbd4d4f
1 changed files with 28 additions and 4 deletions
  1. 28 4
      web/building_saas/report/js/rpt_main.js

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

@@ -416,16 +416,26 @@ let rptControlObj = {
             params.orientation = ((zTreeOprObj.checkedRptTplNodes.length > 1)?null:me.getCurrentOrientation());
             params.custCfg = zTreeOprObj.reportPageCfg;
             params.option = "normal";
+            $.bootstrapLoading.start();
             CommonAjax.postEx("report_api/createExcelFilesInOneBook", params, 20000, true, function(result){
                     if (result) {
+                        $.bootstrapLoading.end();
                         let uuIdUrls = [];
                         let uuIdUrl =  "/report_api/getFileByUUID/" + result.uuid + "/" + stringUtil.replaceAll(result.reportName, "#", "_") + "/xlsx";
                         uuIdUrls.push(uuIdUrl);
                         downloadReport(uuIdUrls);
                     } else {
-                        //
+                        $.bootstrapLoading.end();
                     }
-                }, null, null
+                },
+                function(failRst){
+                    $.bootstrapLoading.end();
+                    console.log(failRst);
+                },
+                function(exceptionRst){
+                    $.bootstrapLoading.end();
+                    console.log(exceptionRst);
+                }
             );
         }
     },
@@ -446,8 +456,10 @@ let rptControlObj = {
             params.isOneSheet = true;
             params.custCfg = zTreeOprObj.reportPageCfg;
             params.option = "normal";
+            $.bootstrapLoading.start();
             CommonAjax.postEx("report_api/createExcelFiles", params, 20000, true, function(result){
                     if (result) {
+                        $.bootstrapLoading.end();
                         let uuIdUrls = [];
                         for (let uuIdObj of result) {
                             let uuIdUrl =  "/report_api/getFileByUUID/" + uuIdObj.uuid + "/" + stringUtil.replaceAll(uuIdObj.reportName, "#", "_") + "/xlsx";
@@ -455,9 +467,17 @@ let rptControlObj = {
                         }
                         downloadReport(uuIdUrls);
                     } else {
-                        //
+                        $.bootstrapLoading.end();
                     }
-                }, null, null
+                },
+                function(failRst){
+                    $.bootstrapLoading.end();
+                    console.log(failRst);
+                },
+                function(exceptionRst){
+                    $.bootstrapLoading.end();
+                    console.log(exceptionRst);
+                }
             );
         }
     },
@@ -519,6 +539,7 @@ let rptControlObj = {
     },
     getPDFPre: function () {
         let me = rptControlObj;
+        $.bootstrapLoading.start();
         if (rptTplObj.pdfFont['SmartSimsun'].length === 2) {
             me.getPDFEx();
         } else {
@@ -543,6 +564,7 @@ let rptControlObj = {
             params.rpt_ids = rptIds.join(",");
             CommonAjax.postEx("report_api/getMultiReports", params, 30000, true,
                 function(result){
+                    $.bootstrapLoading.end();
                     let pageSize = rptControlObj.getCurrentPageSize();
                     for (let idx = 0; idx < result.length; idx++) {
                         let pageData = result[idx];
@@ -550,10 +572,12 @@ let rptControlObj = {
                     }
                 },
                 function(failRst){
+                    $.bootstrapLoading.end();
                     sessionStorage.currentPageData = null;
                     console.log(failRst);
                 },
                 function(exceptionRst){
+                    $.bootstrapLoading.end();
                     sessionStorage.currentPageData = null;
                     console.log(exceptionRst);
                 }