From 953fbc63d7e3f69b13254677657d93fdc3262d8c Mon Sep 17 00:00:00 2001 From: "Zhenfei.Li" Date: Thu, 22 Oct 2020 19:44:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=AF=B7=E6=B1=82=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E6=97=B6=E7=9A=84=E6=95=B0=E6=8D=AE=E5=88=B7=E6=96=B0=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- src/main/resources/com/fr/plugin/pack/req.js | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 350d050..fa5b396 100644 --- a/pom.xml +++ b/pom.xml @@ -53,7 +53,7 @@ - /Users/jonas/Desktop/代码/FineBI5.1/env/WebReport/WEB-INF/plugins/plugin-com.fr.plugin.pack.request-0.0.1/classes + /Users/leezerofly/env/direct-bi/WEB-INF/plugins/plugin-com.fr.plugin.pack.request-0.0.1/classes diff --git a/src/main/resources/com/fr/plugin/pack/req.js b/src/main/resources/com/fr/plugin/pack/req.js index e1c81c1..a0a76c1 100644 --- a/src/main/resources/com/fr/plugin/pack/req.js +++ b/src/main/resources/com/fr/plugin/pack/req.js @@ -16,6 +16,9 @@ BI.each(handlers, function (wId, handler) { handler.next(config); }); + widgets = {}; + handlers = {}; + count = 0; } else { BI.asyncAjax({ url: "widgets/data", @@ -34,14 +37,15 @@ }); }); }, - complete: BI.emptyFn, + complete: function () { + widgets = {}; + handlers = {}; + count = 0; + }, opt: {}, version: "url" }); } - widgets = {}; - handlers = {}; - count = 0; }, 300); // 不通过改写bi组件的方式去做,工作量太大且可维护性太差。使用巧妙的办法,直接通过拦截所有data请求,将其打包成一个请求发送到后端。