From 79db43c1a6a662d5499b959c5920c6192a430f71 Mon Sep 17 00:00:00 2001 From: obo Date: Wed, 21 Aug 2024 15:24:57 +0800 Subject: [PATCH 1/9] =?UTF-8?q?REPORT-119602=20fix:=E9=9F=A9=E8=AF=AD?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=99=A8=E9=BC=A0=E6=A0=87=E5=A4=B1=E7=84=A6?= =?UTF-8?q?=EF=BC=8C=E9=80=89=E4=B8=8D=E5=88=B0=E6=95=B0=E6=8D=AE=E8=84=B1?= =?UTF-8?q?=E6=95=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../model/DesensitizationCellPane.java | 44 ++++++++----------- 1 file changed, 18 insertions(+), 26 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/desensitization/model/DesensitizationCellPane.java b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/desensitization/model/DesensitizationCellPane.java index 818a26205d..c65a7eee73 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/desensitization/model/DesensitizationCellPane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/desensitization/model/DesensitizationCellPane.java @@ -1,6 +1,5 @@ package com.fr.design.mainframe.cell.settingpane.desensitization.model; -import com.fr.base.operator.org.OrganizationOperator; import com.fr.data.desensitize.rule.DesensitizationRuleManager; import com.fr.data.desensitize.rule.base.DesensitizationRule; import com.fr.data.desensitize.rule.base.DesensitizationRuleSource; @@ -10,27 +9,19 @@ import com.fr.design.data.datapane.preview.desensitization.view.rule.Desensitiza import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.event.UIObserverListener; -import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.icombocheckbox.UIComboCheckBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.i18n.Toolkit; import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.design.layout.TableLayout; -import com.fr.design.layout.TableLayoutHelper; -import com.fr.design.layout.VerticalFlowLayout; -import com.fr.design.mainframe.JTemplate; -import com.fr.design.mainframe.JTemplateActionListener; import com.fr.report.cell.desensitization.CellDesensitizationBean; import com.fr.stable.StringUtils; import com.fr.third.org.apache.commons.collections4.map.HashedMap; -import com.fr.workspace.WorkContext; import javax.swing.JComponent; import javax.swing.JPanel; import javax.swing.SwingUtilities; -import javax.swing.SwingWorker; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; @@ -43,7 +34,10 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; import java.util.Set; -import java.util.concurrent.ExecutionException; + +import static com.fine.swing.ui.layout.Layouts.cell; +import static com.fine.swing.ui.layout.Layouts.column; +import static com.fine.swing.ui.layout.Layouts.row; /** * 单元格脱敏规则设置面板 @@ -78,12 +72,10 @@ public class DesensitizationCellPane extends BasicBeanPane { } private void initComponent() { - editPanel = new JPanel(); - editPanel.setLayout(new VerticalFlowLayout(VerticalFlowLayout.TOP, 0, 0, true)); + editPanel = new JPanel(new BorderLayout()); label = new UILabel(); label.setEnabled(false); - editPanel.add(label); ruleButton = new UIButton(APOSTROPHE); @@ -102,25 +94,25 @@ public class DesensitizationCellPane extends BasicBeanPane { emptyTextField.setEnabled(false); emptyTextField.setOpaque(false); - editPanel.add(initTableCellPanel()); + editPanel.add( + column( + row(cell(label)), + cell(initTableCellPanel()).weight(2) + ).weight(1).getComponent() + ); + } /** * 初始化单元格中的panel */ - private JPanel initTableCellPanel() { - double f = TableLayout.FILL; - double p = TableLayout.PREFERRED; - - double[] rowSize = new double[]{f, f}; - double[] columnSize = new double[]{p, f}; - - Component[][] components = new Component[][]{ - new Component[]{ruleButton, ruleTextField}, - new Component[]{emptyTextField, rolesComboBox} - }; - return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, 0, 0); + private Component initTableCellPanel() { + + return column( + row(cell(ruleButton).weight(1), cell(ruleTextField).weight(4)), + row(cell(emptyTextField).weight(1), cell(rolesComboBox).weight(4)) + ).getComponent(); } private void addListener() { From a5d89b1e228673fedea8e4d3eceaa5b28f76bfcd Mon Sep 17 00:00:00 2001 From: obo Date: Wed, 21 Aug 2024 15:42:14 +0800 Subject: [PATCH 2/9] =?UTF-8?q?REPORT-117444=20fix:=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E4=B8=BB=E9=A2=98=E7=AE=A1=E7=90=862=E4=B8=AA=E7=9B=B8?= =?UTF-8?q?=E5=90=8C=E7=9A=84key=EF=BC=8C=E9=87=8D=E5=A4=8D=E5=8E=BB?= =?UTF-8?q?=E6=8E=89=E4=B8=80=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../theme/edit/widget/DesktopWidgetStyleEditPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/widgettheme/theme/edit/widget/DesktopWidgetStyleEditPane.java b/designer-base/src/main/java/com/fr/widgettheme/theme/edit/widget/DesktopWidgetStyleEditPane.java index 4af7b9b6d1..f57b995186 100644 --- a/designer-base/src/main/java/com/fr/widgettheme/theme/edit/widget/DesktopWidgetStyleEditPane.java +++ b/designer-base/src/main/java/com/fr/widgettheme/theme/edit/widget/DesktopWidgetStyleEditPane.java @@ -63,7 +63,7 @@ public class DesktopWidgetStyleEditPane extends WidgetS new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Border_Radius")), borderRadiusSpinner}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Icon_Color")), iconColorSelectBox}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Text_Style")), fontNameSelectBox}, - new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Text_Style")), WidgetStyleComponentCombiner.combineTextStyleComponent(fontSizePane, fontColorButton, italic, bold)}, + new Component[]{new UILabel(), WidgetStyleComponentCombiner.combineTextStyleComponent(fontSizePane, fontColorButton, italic, bold)}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Background_Select_Box")), selectBackgroundColorBox} }; } From f14b53bf60af72c90dd789393d2cec70d92c15ba Mon Sep 17 00:00:00 2001 From: Zhanying <2446962908@qq.com> Date: Wed, 4 Sep 2024 09:57:03 +0800 Subject: [PATCH 3/9] =?UTF-8?q?REPORT-132109=20fix:=20FVS=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=20=E6=B5=85=E8=89=B2=E4=B8=BB=E9=A2=98-=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC=E5=86=85=E5=90=88=E5=B9=B6=E5=8D=95=E5=85=83=E6=A0=BC?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E9=94=AE=E5=85=A5=E6=96=87=E5=AD=97=E9=A2=9C?= =?UTF-8?q?=E8=89=B2=E4=B8=BA=E7=99=BD=E8=89=B2(=E9=9D=9E=E9=BB=98?= =?UTF-8?q?=E8=AE=A4)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/grid/selection/CellSelection.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java b/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java index ca95a933df..30790428b5 100644 --- a/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java +++ b/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java @@ -407,7 +407,9 @@ public class CellSelection extends Selection { if (hasCellElement) { ec.merge(row, row + rowSpan - 1, column, column + columnSpan - 1); } else { - ec.addCellElement(DefaultThemedTemplateCellElementCase.createInstance(column, row, columnSpan, rowSpan, null), true); + TemplateCellElement cellElement = DefaultThemedTemplateCellElementCase.createInstance(column, row, columnSpan, rowSpan, null); + AdjustWorkBookDefaultStyleUtils.adjustCellElement(cellElement); + ec.addCellElement(cellElement, true); } return true; From 398b9397b57eccd340dd9ec275aa3945aca87ecf Mon Sep 17 00:00:00 2001 From: renekton Date: Wed, 4 Sep 2024 16:21:27 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E5=A2=9E=E5=8A=A0AppTypeFilter=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E6=8F=92=E4=BB=B6=E7=B1=BB=E5=9E=8B=EF=BC=8C=E5=A6=82?= =?UTF-8?q?=E6=9E=9C=E4=B8=BA=E7=A9=BA=E5=88=99=E4=B8=8D=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gui/itree/filetree/TemplateFileTree.java | 21 +++++++++++++++---- .../javascript/ExportJavaScriptPane.java | 1 + 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateFileTree.java b/designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateFileTree.java index b87a70b5b6..3b6e80874b 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateFileTree.java +++ b/designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateFileTree.java @@ -7,6 +7,7 @@ import com.fr.design.file.NodeAuthProcessor; import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; import com.fr.design.mainframe.App; import com.fr.design.mainframe.manager.search.TemplateTreeSearchManager; +import com.fr.file.filetree.AppTypeFilter; import com.fr.file.filetree.FileNode; import com.fr.log.FineLoggerFactory; import com.fr.stable.ArrayUtils; @@ -19,6 +20,7 @@ import javax.swing.tree.DefaultTreeModel; import javax.swing.tree.TreePath; import java.util.ArrayList; import java.util.Arrays; +import java.util.Collections; import java.util.Comparator; import java.util.HashSet; import java.util.List; @@ -38,6 +40,8 @@ public class TemplateFileTree extends EnvFileTree { private static final int MAX_NODE_EXPAND_NUM = 50; private static final int MAX_MATCHED_NODE_NUM = 500; + protected AppTypeFilter appTypeFilter; + public TemplateFileTree() { super(ProjectConstants.REPORTLETS_NAME, null, null); } @@ -155,12 +159,17 @@ public class TemplateFileTree extends EnvFileTree { supportTypes.add(FileExtension.parse(temp)); } } - Set apps = ExtraDesignClassManager.getInstance().getArray(App.MARK_STRING); - for (App temp : apps) { - for (String extendsion : temp.defaultExtensions()) { - supportTypes.add(FileExtension.parse(extendsion)); + if (appTypeFilter != null) { + Collections.addAll(supportTypes, appTypeFilter.getSupportedTypes()); + } else { + Set apps = ExtraDesignClassManager.getInstance().getArray(App.MARK_STRING); + for (App temp : apps) { + for (String extendsion : temp.defaultExtensions()) { + supportTypes.add(FileExtension.parse(extendsion)); + } } } + return supportTypes; } @@ -360,6 +369,10 @@ public class TemplateFileTree extends EnvFileTree { } } + public void setAppTypeFilter(AppTypeFilter filter) { + appTypeFilter = filter; + } + private boolean notContained(String parentPath, ExpandMutableTreeNode treeNode) { List childList = currentTreeMode.getOrDefault(parentPath, new ArrayList<>()); String name = ((FileNode) (treeNode.getUserObject())).getName(); diff --git a/designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java b/designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java index 6c2e46e985..dc9907f237 100644 --- a/designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java +++ b/designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java @@ -968,6 +968,7 @@ public class ExportJavaScriptPane extends AbstractHyperLinkPane new FileExtension[]{}); cardPane.add(t_panel = new JScrollPane(templateReportletTree), "TEMPLATE"); this.refreshEnv(); From f09af5d353acdb9ac918e472cac7d3d2e8612c45 Mon Sep 17 00:00:00 2001 From: obo Date: Sat, 14 Sep 2024 15:34:27 +0800 Subject: [PATCH 5/9] =?UTF-8?q?REPORT-106743=20fix:=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E5=9C=B0=E5=9B=BE=E8=8B=B1=E6=96=87=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/van/chart/map/designer/type/WMSLayerPane.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/WMSLayerPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/WMSLayerPane.java index 67369d826f..f8d0145f51 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/WMSLayerPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/WMSLayerPane.java @@ -57,14 +57,15 @@ public class WMSLayerPane extends JPanel implements UIObserver { public WMSLayerPane() { final double p = TableLayout.PREFERRED; double[] rowSize = {p}; - double[] COLUMN_SIZE = {TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH, 84, 44}; + double[] COLUMN_SIZE = {TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH, 84, 95}; wmsUrl = new UITextArea(); - connectButton = new UIButton(Toolkit.i18nText("Fine-Design_Chart_Connect_WMP")); - + String connectionButtonText = Toolkit.i18nText("Fine-Design_Chart_Connect_WMP"); + connectButton = new UIButton(connectionButtonText); + connectButton.setToolTipText(connectionButtonText); Component[][] comps = new Component[][]{ - new Component[]{new UILabel("url"), wmsUrl, connectButton} + new Component[]{new UILabel("URL"), wmsUrl, connectButton} }; JPanel northPane = TableLayout4VanChartHelper.createGapTableLayoutPane(comps, rowSize, COLUMN_SIZE); northPane.setBorder(TableLayout4VanChartHelper.SECOND_EDIT_AREA_BORDER); From d878d8a94783b492a3a6f4d394f0178e4f1fba7a Mon Sep 17 00:00:00 2001 From: obo Date: Sat, 14 Sep 2024 15:37:42 +0800 Subject: [PATCH 6/9] =?UTF-8?q?=E6=8C=89=E9=92=AE=E4=B8=8D=E7=94=A8?= =?UTF-8?q?=E5=8A=A0tooltip=EF=BC=8C=E5=9B=9E=E6=BB=9A=E4=B8=80=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/van/chart/map/designer/type/WMSLayerPane.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/WMSLayerPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/WMSLayerPane.java index f8d0145f51..438af39695 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/WMSLayerPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/WMSLayerPane.java @@ -61,9 +61,7 @@ public class WMSLayerPane extends JPanel implements UIObserver { wmsUrl = new UITextArea(); - String connectionButtonText = Toolkit.i18nText("Fine-Design_Chart_Connect_WMP"); - connectButton = new UIButton(connectionButtonText); - connectButton.setToolTipText(connectionButtonText); + connectButton = new UIButton(Toolkit.i18nText("Fine-Design_Chart_Connect_WMP")); Component[][] comps = new Component[][]{ new Component[]{new UILabel("URL"), wmsUrl, connectButton} }; From 05b06432a1676bf69b4a6e56335089b5c3e0c75f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Levy=2EXie-=E8=A7=A3=E5=AE=89=E6=A3=AE?= Date: Thu, 19 Sep 2024 14:03:40 +0800 Subject: [PATCH 7/9] =?UTF-8?q?REPORT-132457=20fix:=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E5=8F=82=E6=95=B0=E6=A0=8F=E7=BB=84=E4=BB=B6=E5=B0=8F?= =?UTF-8?q?=E7=AA=97=E8=AE=BE=E7=BD=AE=E5=B1=95=E7=A4=BA=E4=B8=8D=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/mainframe/EastRegionContainerPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java b/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java index 1357b48354..314e2dc1c2 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java @@ -84,7 +84,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { private static final int ARROW_RANGE_START = CONTENT_WIDTH - 30; // 弹出对话框高度 private static final int POPUP_MIN_HEIGHT = 145; - private static final int POPUP_DEFAULT_HEIGHT = 356; + private static final int POPUP_DEFAULT_HEIGHT = 600; public static final String KEY_CELL_ELEMENT = "cellElement"; public static final String KEY_CELL_ATTR = "cellAttr"; public static final String KEY_FLOAT_ELEMENT = "floatElement"; From 813ada35e87d3405b3ad84c080472c62b85f4d94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Sun, 29 Sep 2024 18:56:30 +0800 Subject: [PATCH 8/9] =?UTF-8?q?REPORT-135106=20=E8=A1=A8=E6=A0=BC=E5=AD=97?= =?UTF-8?q?=E4=BD=93=E5=8A=A0=E8=BD=BD=E9=97=AE=E9=A2=98=E5=92=8C=E8=AF=AD?= =?UTF-8?q?=E8=A8=80=E5=AF=BC=E8=87=B4=E7=9A=84=E5=9B=BE=E8=A1=A8=E6=B6=88?= =?UTF-8?q?=E5=A4=B1=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/editor/script/editor.js | 3 + .../com/fr/design/editor/script/i18n.js | 86 +++++++++++++++++-- 2 files changed, 84 insertions(+), 5 deletions(-) diff --git a/designer-chart/src/main/resources/com/fr/design/editor/script/editor.js b/designer-chart/src/main/resources/com/fr/design/editor/script/editor.js index ec4de690d8..54a268c63d 100644 --- a/designer-chart/src/main/resources/com/fr/design/editor/script/editor.js +++ b/designer-chart/src/main/resources/com/fr/design/editor/script/editor.js @@ -128,6 +128,9 @@ if (key === "src") { return; } + + value = window.transformI18nText(value); + str += " " + key + "=\"" + value + "\""; if (key === "alt" && dataIdMap[value.trim()]) { diff --git a/designer-chart/src/main/resources/com/fr/design/editor/script/i18n.js b/designer-chart/src/main/resources/com/fr/design/editor/script/i18n.js index 205117f3cd..f80cc05e7c 100644 --- a/designer-chart/src/main/resources/com/fr/design/editor/script/i18n.js +++ b/designer-chart/src/main/resources/com/fr/design/editor/script/i18n.js @@ -21,7 +21,12 @@ "BI-Basic_Save": "保存", "BI-Basic_More": "更多", "BI-Custom_Color": "自定义颜色", - "BI-Transparent_Color": "透明" + "BI-Transparent_Color": "透明", + "Fine-Design_Chart_Category_Use_Name": "分类名", + "Fine-Design_Chart_Series_Name": "系列名", + "Fine-Design_Chart_Use_Value": "值", + "Fine-Design_Chart_Use_Percent": "百分比", + "Fine-Design_Chart_Use_Summary_Value": "汇总值" }; var taiwan = { @@ -45,7 +50,12 @@ "BI-Basic_Save": "保存", "BI-Basic_More": "更多", "BI-Custom_Color": "自定義顏色", - "BI-Transparent_Color": "透明" + "BI-Transparent_Color": "透明", + "Fine-Design_Chart_Category_Use_Name": "分類名", + "Fine-Design_Chart_Series_Name": "系列名", + "Fine-Design_Chart_Use_Value": "值", + "Fine-Design_Chart_Use_Percent": "百分比", + "Fine-Design_Chart_Use_Summary_Value": "匯總值" }; var english = { @@ -69,7 +79,12 @@ "BI-Basic_Save": "Save", "BI-Basic_More": "More", "BI-Custom_Color": "Custom Color", - "BI-Transparent_Color": "Transparent Color" + "BI-Transparent_Color": "Transparent Color", + "Fine-Design_Chart_Category_Use_Name": "Category Name", + "Fine-Design_Chart_Series_Name": "Series", + "Fine-Design_Chart_Use_Value": "Value", + "Fine-Design_Chart_Use_Percent": "Percentage", + "Fine-Design_Chart_Use_Summary_Value": "Summary Value" }; var japanese = { @@ -93,7 +108,12 @@ "BI-Basic_Save": "セーブ", "BI-Basic_More": "もっと", "BI-Custom_Color": "カスタムカラー", - "BI-Transparent_Color": "トランスペアレント" + "BI-Transparent_Color": "トランスペアレント", + "Fine-Design_Chart_Category_Use_Name": "分類名", + "Fine-Design_Chart_Series_Name": "系列名", + "Fine-Design_Chart_Use_Value": "値", + "Fine-Design_Chart_Use_Percent": "パーセンテージ", + "Fine-Design_Chart_Use_Summary_Value": "まとめ値" }; var korean = { @@ -117,7 +137,12 @@ "BI-Basic_Save": "저장", "BI-Basic_More": "더", "BI-Custom_Color": "맞춤 색상", - "BI-Transparent_Color": "투명한" + "BI-Transparent_Color": "투명한", + "Fine-Design_Chart_Category_Use_Name": "카테고리 명", + "Fine-Design_Chart_Series_Name": "표시값", + "Fine-Design_Chart_Use_Value": "값", + "Fine-Design_Chart_Use_Percent": "백분율", + "Fine-Design_Chart_Use_Summary_Value": "요약 값" }; function transformI18n(language) { @@ -144,5 +169,56 @@ } } + /** + * 将一个text转换成当前国际化语言环境的text + * @param text + * @returns {*} + */ + function transformI18nText(text) { + var i18nKey = _findI18nKey(text); + return window.BI.i18nText(i18nKey); + } + + /** + * 根据text找到i18n的key + * @param text + * @returns {string} + * @private + */ + function _findI18nKey(text) { + for (var [key, value] of Object.entries(chinese)) { + if (value === text) { + return key; + } + } + + for ([key, value] of Object.entries(taiwan)) { + if (value === text) { + return key; + } + } + + for ([key, value] of Object.entries(english)) { + if (value === text) { + return key; + } + } + + for ([key, value] of Object.entries(japanese)) { + if (value === text) { + return key; + } + } + + for ([key, value] of Object.entries(korean)) { + if (value === text) { + return key; + } + } + + return ''; + } + window.transformI18n = transformI18n; + window.transformI18nText = transformI18nText; }()); \ No newline at end of file From daf94d29f4ca58bac106e1be0b967d539b592b6a Mon Sep 17 00:00:00 2001 From: lidongy <1879087903@qq.com> Date: Wed, 9 Oct 2024 09:40:55 +0800 Subject: [PATCH 9/9] =?UTF-8?q?REPORT-134932=E3=80=90=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E3=80=91=E5=8F=82=E6=95=B0=E9=9D=A2=E6=9D=BF=E7=9A=84?= =?UTF-8?q?=E8=83=8C=E6=99=AF=E9=A2=9C=E8=89=B2=E4=BC=9A=E5=9C=A8=E2=80=9C?= =?UTF-8?q?=E6=92=A4=E5=9B=9E"=E6=8A=A5=E8=A1=A8=E4=B8=BB=E4=BD=93?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E6=97=B6=E6=B6=88=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/mainframe/JTemplate.java | 4 ++-- .../src/main/java/com/fr/design/mainframe/JForm.java | 2 +- .../src/main/java/com/fr/design/mainframe/JWorkBook.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java index 9697113e27..9445d38d25 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java @@ -718,7 +718,7 @@ public abstract class JTemplate> public void undo() { this.getUndoManager().undo(); // 撤销前模版使用主题可能已经被删除或修改,需要重置模版样式 - checkAndResetTheme(); + checkAndResetTheme(true); fireSuperTargetModified(); } @@ -728,7 +728,7 @@ public abstract class JTemplate> public void redo() { this.getUndoManager().redo(); // 重做前模版使用主题可能已经被删除或修改,需要重置模版样式 - checkAndResetTheme(); + checkAndResetTheme(true); fireSuperTargetModified(); } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/JForm.java b/designer-form/src/main/java/com/fr/design/mainframe/JForm.java index 97488e7d83..eabbbbfcb1 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/JForm.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/JForm.java @@ -686,7 +686,7 @@ public class JForm extends JTemplate implements BaseJForm { protected void applyUndoState(WorkBookUndoState u) { try { WorkBook undoWorkBook = (WorkBook) u.getWorkBook().clone(); - undoWorkBook.checkAndResetTheme(); + undoWorkBook.checkAndResetTheme(true); undoWorkBook = (WorkBook) FineColorSynchronizer.flush(undoWorkBook, undoWorkBook.getTemplateTheme()); this.setTarget(undoWorkBook); if (!DesignerMode.isAuthorityEditing()) {