diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataSourceOP.java b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataSourceOP.java index 61c578453c..25617541fa 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataSourceOP.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataSourceOP.java @@ -138,10 +138,11 @@ public class TableDataSourceOP implements UserObjectOP { Map templateDataMap; Map serverDataMap; Map storeProcedureMap; - - templateDataMap = this.init().get(0); - serverDataMap = this.init().get(1); - storeProcedureMap = this.init().get(2); + // init涉及到RPC,不要滥用 + List> initList = this.init(); + templateDataMap = initList.get(0); + serverDataMap = initList.get(1); + storeProcedureMap = initList.get(2); //所有的数据集 List list = new ArrayList<>(); diff --git a/designer-base/src/main/java/com/fr/design/gui/itree/filetree/ReportletPane.java b/designer-base/src/main/java/com/fr/design/gui/itree/filetree/ReportletPane.java index 69e5a2c8ae..b6724d9632 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itree/filetree/ReportletPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/itree/filetree/ReportletPane.java @@ -1,6 +1,7 @@ package com.fr.design.gui.itree.filetree; import com.fr.design.dialog.BasicPane; +import com.fr.design.file.TemplateTreePane; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.itextarea.UITextArea; import com.fr.design.layout.FRGUIPaneFactory; @@ -93,8 +94,9 @@ public class ReportletPane extends BasicPane { * 刷新Env */ public void refreshEnv() { - - this.templateReportletTree.refreshEnv(); + // 直接复用模板树的数据 + TemplateFileTree tree = TemplateTreePane.getInstance().getTemplateFileTree(); + this.templateReportletTree.setModel(tree.getModel()); this.classReportletTree.refreshEnv(); } diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java b/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java index f9c086a50b..8a7b0b0186 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java @@ -814,7 +814,7 @@ public class JWorkBook extends JTemplate { } reportComposite.setSelectedIndex(u.getSelectedReportIndex()); u.getSelectedEditingState().revert(); - TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()).refreshDockingView(); + TableDataTreePane.getInstanceWithoutRefreshEverytime(DesignModelAdapter.getCurrentModelAdapter()).refreshDockingView(); } this.undoState = u; } else { @@ -1319,7 +1319,7 @@ public class JWorkBook extends JTemplate { if (HistoryTemplateListCache.getInstance().getCurrentEditingTemplate() == this) { fireTargetModified(shouldCreateUndoState); reportComposite.setSelectedIndex(reportComposite.getSelectedIndex()); - TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()).refreshDockingView(); + TableDataTreePane.getInstanceWithoutRefreshEverytime(DesignModelAdapter.getCurrentModelAdapter()).refreshDockingView(); DesignerContext.getDesignerFrame().resetToolkitByPlus(HistoryTemplateListPane.getInstance().getCurrentEditingTemplate()); // 刷新参数面板界面 populateReportParameterAttr();