浏览代码

增加显示屏蔽功能

TonyKang 6 年之前
父节点
当前提交
f8393f2c84
共有 2 个文件被更改,包括 11 次插入7 次删除
  1. 7 0
      public/scHintBox.html
  2. 4 7
      web/building_saas/report/js/rpt_main.js

+ 7 - 0
public/scHintBox.html

@@ -34,6 +34,7 @@
         </div>
         </div>
     </div>
     </div>
 </div>
 </div>
+<div class="modal" id="waitBox_form" style="z-index: 9999; cursor: wait"></div>
 
 
 <script>
 <script>
     const hintBox = {
     const hintBox = {
@@ -159,6 +160,12 @@
             $('#hintBox_btn_no').click(hintBox.defalultEvent);
             $('#hintBox_btn_no').click(hintBox.defalultEvent);
 
 
             $("#hintBox_form").modal('show');
             $("#hintBox_form").modal('show');
+        },
+        waitBox: function () {
+            $(`#waitBox_form`).modal({'backdrop': false});
+        },
+        unWaitBox: function () {
+            $('#waitBox_form').modal('hide');
         }
         }
     };
     };
 
 

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

@@ -242,10 +242,7 @@ let zTreeOprObj = {
     },
     },
     requestReport: function (params) {
     requestReport: function (params) {
         let me = zTreeOprObj;
         let me = zTreeOprObj;
-        // $("rptCanvas").css("cursor")
-        let canvas = document.getElementById("rptCanvas");
-        canvas.style.cursor = "wait";
-        canvas.parentNode.style.cursor = "wait";
+        hintBox.waitBox();
         CommonAjax.postEx("report_api/getReport", params, 5000, true,
         CommonAjax.postEx("report_api/getReport", params, 5000, true,
             function(result){
             function(result){
                 let pageRst = result;
                 let pageRst = result;
@@ -264,12 +261,12 @@ let zTreeOprObj = {
                         canvas.height = size[1] + 50;
                         canvas.height = size[1] + 50;
                     }
                     }
                     me.showPage(1, canvas);
                     me.showPage(1, canvas);
-                    canvas.parentNode.style.cursor = "default";
+                    hintBox.unWaitBox();
                 }
                 }
             }, function(err){
             }, function(err){
-                canvas.parentNode.style.cursor = "default";
+                hintBox.unWaitBox();
             }, function(ex){
             }, function(ex){
-                canvas.parentNode.style.cursor = "default";
+                hintBox.unWaitBox();
             }
             }
         );
         );
     },
     },