Prechádzať zdrojové kódy

增加显示屏蔽功能

TonyKang 6 rokov pred
rodič
commit
f8393f2c84

+ 7 - 0
public/scHintBox.html

@@ -34,6 +34,7 @@
         </div>
     </div>
 </div>
+<div class="modal" id="waitBox_form" style="z-index: 9999; cursor: wait"></div>
 
 <script>
     const hintBox = {
@@ -159,6 +160,12 @@
             $('#hintBox_btn_no').click(hintBox.defalultEvent);
 
             $("#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) {
         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,
             function(result){
                 let pageRst = result;
@@ -264,12 +261,12 @@ let zTreeOprObj = {
                         canvas.height = size[1] + 50;
                     }
                     me.showPage(1, canvas);
-                    canvas.parentNode.style.cursor = "default";
+                    hintBox.unWaitBox();
                 }
             }, function(err){
-                canvas.parentNode.style.cursor = "default";
+                hintBox.unWaitBox();
             }, function(ex){
-                canvas.parentNode.style.cursor = "default";
+                hintBox.unWaitBox();
             }
         );
     },