From 5c556cce382da557d2f17eea2fbb8a259ec3fcac Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 28 Sep 2020 17:08:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=A7=86=E5=9B=BE=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=8F=AF=E8=83=BD=E9=87=8D=E5=A4=8D=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- o2web/source/x_component_query_Query/Viewer.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/o2web/source/x_component_query_Query/Viewer.js b/o2web/source/x_component_query_Query/Viewer.js index 35b43341c4..6897f41090 100644 --- a/o2web/source/x_component_query_Query/Viewer.js +++ b/o2web/source/x_component_query_Query/Viewer.js @@ -392,6 +392,8 @@ MWF.xApplication.query.Query.Viewer = MWF.QViewer = new Class({ this.options.defaultPage = null; }, lookup: function(data, callback){ + if( this.lookuping )return; + this.lookuping = true; this.getLookupAction(function(){ if (this.json.application){ @@ -405,6 +407,7 @@ MWF.xApplication.query.Query.Viewer = MWF.QViewer = new Class({ if( this.noDataTextNode )this.noDataTextNode.destroy(); this.loadCurrentPageData( function () { this.fireEvent("postLoad"); //用户配置的事件 + this.lookuping = false; if(callback)callback(this); }.bind(this)); }else{ @@ -425,6 +428,7 @@ MWF.xApplication.query.Query.Viewer = MWF.QViewer = new Class({ this.loadingAreaNode = null; } this.fireEvent("postLoad"); //用户配置的事件 + this.lookuping = false; if(callback)callback(this); } }.bind(this)); @@ -433,6 +437,10 @@ MWF.xApplication.query.Query.Viewer = MWF.QViewer = new Class({ }, loadCurrentPageData: function( callback, async ){ //是否需要在翻页的时候清空之前的items ? + + if( this.pageloading )return; + this.pageloading = true; + this.items = []; var p = this.currentPage; @@ -463,8 +471,9 @@ MWF.xApplication.query.Query.Viewer = MWF.QViewer = new Class({ this.loadingAreaNode = null; } - this.fireEvent("loadView"); //options 传入的事件 + this.pageloading = false; + this.fireEvent("loadView"); //options 传入的事件 this.fireEvent("postLoadPage"); if(callback)callback(); @@ -636,6 +645,7 @@ MWF.xApplication.query.Query.Viewer = MWF.QViewer = new Class({ this.node.setStyle("display", "none"); }, reload: function(){ + if( this.lookuping || this.pageloading )return; this.node.setStyle("display", "block"); if (this.loadingAreaNode) this.loadingAreaNode.setStyle("display", "block"); @@ -1249,6 +1259,7 @@ MWF.xApplication.query.Query.Viewer = MWF.QViewer = new Class({ } }, setFilter : function( filter, callback ){ + if( this.lookuping || this.pageloading )return; if( !filter )filter = []; if( typeOf( filter ) === "object" )filter = [ filter ]; this.json.filter = filter; -- GitLab