From 246f174b2ec6fed8fcd1e97e5cc0c5a42dd3a638 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Fri, 4 Nov 2022 14:34:01 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-80695=20=E6=A8=A1=E6=9D=BF=E5=85=A8?= =?UTF-8?q?=E5=B1=80=E7=BA=A7=E5=88=AB=E6=9F=A5=E6=89=BE=E6=9B=BF=E6=8D=A2?= =?UTF-8?q?=E4=BA=8C=E6=9C=9F=20=E4=BF=AE=E6=94=B9=E9=92=BB=E5=8F=96?= =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E7=9A=84=E8=8E=B7=E5=8F=96=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SearchChartCollectionFormulaAction.java | 5 ++++ .../actions/replace/utils/SearchJSUtils.java | 29 ++++++++++++++++--- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/chart/SearchChartCollectionFormulaAction.java b/designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/chart/SearchChartCollectionFormulaAction.java index 40e5283ce9..69b763248c 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/chart/SearchChartCollectionFormulaAction.java +++ b/designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/chart/SearchChartCollectionFormulaAction.java @@ -34,6 +34,7 @@ import com.fr.plugin.chart.custom.CustomPlotFactory; import com.fr.plugin.chart.custom.VanChartCustomPlot; import com.fr.plugin.chart.custom.type.CustomPlotType; +import com.fr.plugin.chart.drillmap.VanChartDrillMapPlot; import com.fr.plugin.chart.map.VanChartMapPlot; import com.fr.stable.StringUtils; @@ -106,6 +107,10 @@ public class SearchChartCollectionFormulaAction { customContent.addOtherPos(CustomPlotFactory.getTitle(CustomPlotFactory.getCustomType(plot.getCustomPlotList().get(i)))); dealPlot(formulaInfos, customContent, plot.getCustomPlotList().get(i)); } + } else if (chart.getPlot() instanceof VanChartDrillMapPlot) { + ITContent drillContent = ITContent.copy(conditionContent); + drillContent.addOtherPos(Toolkit.i18nText("Fine-Design_Chart_Drill_Dir")); + dealNameJavaScriptGroup(formulaInfos, drillContent, ((VanChartDrillMapPlot) chart.getPlot()).getDrillUpHyperLink()); } else if (chart.getPlot() != null) { dealPlot(formulaInfos, conditionContent, chart.getPlot()); } diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/utils/SearchJSUtils.java b/designer-realize/src/main/java/com/fr/design/actions/replace/utils/SearchJSUtils.java index 8901f76edb..dbec52eefc 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/utils/SearchJSUtils.java +++ b/designer-realize/src/main/java/com/fr/design/actions/replace/utils/SearchJSUtils.java @@ -26,6 +26,7 @@ import com.fr.plugin.chart.base.VanChartHtmlLabel; import com.fr.plugin.chart.custom.CustomPlotFactory; import com.fr.plugin.chart.custom.VanChartCustomPlot; import com.fr.plugin.chart.custom.type.CustomPlotType; +import com.fr.plugin.chart.drillmap.VanChartDrillMapPlot; import com.fr.plugin.chart.map.VanChartMapPlot; import com.fr.plugin.chart.map.attr.AttrMapLabel; import com.fr.plugin.chart.map.attr.AttrMapTooltip; @@ -338,6 +339,8 @@ public class SearchJSUtils { VanChart chart = ((VanChart) chartCollection.getChart(i)); if (isCustomMapPlot(chart.getPlot())) { dealMapNameJavaScript(content, chart.getPlot(), jsInfos); + } else if (chart.getPlot() instanceof VanChartDrillMapPlot) { + dealDrillNameJavaScript(content, chart.getPlot(), jsInfos); } else { NameJavaScriptGroup nameJavaScriptGroup = chart.getPlot().getHotHyperLink(); addNameJavaScript2Array(nameJavaScriptArrayList, nameJavaScriptGroup); @@ -347,6 +350,19 @@ public class SearchJSUtils { return nameJavaScriptArrayList; } + private static void dealDrillNameJavaScript(ITContent content, VanChartDrillMapPlot plot, List jsInfos) { + ITContent chartContent = ITContent.copy(content); + chartContent.addOtherPos( + Toolkit.i18nText("Fine-Design_Chart_Chart"), + Toolkit.i18nText("Fine-Design_Chart_Animation_Special"), + Toolkit.i18nText("Fine-Design_Chart_Interactive"), + Toolkit.i18nText("Fine-Design_Chart_Drill_Dir") + ); + List list = new ArrayList<>(); + addNameJavaScript2Array(list, plot.getDrillUpHyperLink()); + addJSInfosFromNameJS(chartContent, list, jsInfos); + } + /** * 是否是组合地图 * @param plot 图表的plot @@ -366,14 +382,19 @@ public class SearchJSUtils { List areaJavaScriptList = new ArrayList<>(); List lineJavaScriptList = new ArrayList<>(); List pointJavaScriptList = new ArrayList<>(); - + ITContent chartContent = ITContent.copy(content); + chartContent.addOtherPos( + Toolkit.i18nText("Fine-Design_Chart_Chart"), + Toolkit.i18nText("Fine-Design_Chart_Animation_Special"), + Toolkit.i18nText("Fine-Design_Chart_Interactive") + ); addNameJavaScript2Array(areaJavaScriptList, plot.getAreaHotHyperLink()); addNameJavaScript2Array(lineJavaScriptList, plot.getLineHotHyperLink()); addNameJavaScript2Array(pointJavaScriptList, plot.getPointHotHyperLink()); - addJSInfosFromNameJS(ShowValueUtils.getCustomMapContent(content, Toolkit.i18nText("Fine-Design_Chart_Region_Map")), areaJavaScriptList, jsInfos); - addJSInfosFromNameJS(ShowValueUtils.getCustomMapContent(content, Toolkit.i18nText("Fine-Design_Chart_LineMap")), lineJavaScriptList, jsInfos); - addJSInfosFromNameJS(ShowValueUtils.getCustomMapContent(content, Toolkit.i18nText("Fine-Design_Chart_PointMap")), pointJavaScriptList, jsInfos); + addJSInfosFromNameJS(ShowValueUtils.getCustomMapContent(chartContent, Toolkit.i18nText("Fine-Design_Chart_Region_Map")), areaJavaScriptList, jsInfos); + addJSInfosFromNameJS(ShowValueUtils.getCustomMapContent(chartContent, Toolkit.i18nText("Fine-Design_Chart_LineMap")), lineJavaScriptList, jsInfos); + addJSInfosFromNameJS(ShowValueUtils.getCustomMapContent(chartContent, Toolkit.i18nText("Fine-Design_Chart_PointMap")), pointJavaScriptList, jsInfos); } private static void addNameJavaScript2Array(List nameJavaScriptArrayList, NameJavaScriptGroup nameJavaScriptGroup) { From 588ee54b08b5f7c8b99155f1c24a55364402e3b9 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Fri, 4 Nov 2022 14:42:10 +0800 Subject: [PATCH 2/2] =?UTF-8?q?REPORT-80695=20=E6=A8=A1=E6=9D=BF=E5=85=A8?= =?UTF-8?q?=E5=B1=80=E7=BA=A7=E5=88=AB=E6=9F=A5=E6=89=BE=E6=9B=BF=E6=8D=A2?= =?UTF-8?q?=E4=BA=8C=E6=9C=9F=20=E4=BF=AE=E6=94=B9=E9=92=BB=E5=8F=96?= =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E7=9A=84=E8=8E=B7=E5=8F=96=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../actions/replace/utils/SearchJSUtils.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/utils/SearchJSUtils.java b/designer-realize/src/main/java/com/fr/design/actions/replace/utils/SearchJSUtils.java index dbec52eefc..2a1a4ef188 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/utils/SearchJSUtils.java +++ b/designer-realize/src/main/java/com/fr/design/actions/replace/utils/SearchJSUtils.java @@ -64,6 +64,14 @@ public class SearchJSUtils { */ public static final String CATEGORY_LABEL = ShowValueUtils.joinStr4Position(Toolkit.i18nText("Fine-Design_Basic_Style"), Toolkit.i18nText("Fine-Design_Chart_Data_Label"), Toolkit.i18nText("Fine-Design_Chart_Category_Label")); + /** + * 条件属性 + */ + public static final String CONDITION = ShowValueUtils.joinStr4Position( + Toolkit.i18nText("Fine-Design_Chart_Chart"), + Toolkit.i18nText("Fine-Design_Chart_Animation_Special"), + Toolkit.i18nText("Fine-Design_Chart_Interactive")); + /** * 从Listener中获取JS */ @@ -353,9 +361,7 @@ public class SearchJSUtils { private static void dealDrillNameJavaScript(ITContent content, VanChartDrillMapPlot plot, List jsInfos) { ITContent chartContent = ITContent.copy(content); chartContent.addOtherPos( - Toolkit.i18nText("Fine-Design_Chart_Chart"), - Toolkit.i18nText("Fine-Design_Chart_Animation_Special"), - Toolkit.i18nText("Fine-Design_Chart_Interactive"), + CONDITION, Toolkit.i18nText("Fine-Design_Chart_Drill_Dir") ); List list = new ArrayList<>(); @@ -383,11 +389,7 @@ public class SearchJSUtils { List lineJavaScriptList = new ArrayList<>(); List pointJavaScriptList = new ArrayList<>(); ITContent chartContent = ITContent.copy(content); - chartContent.addOtherPos( - Toolkit.i18nText("Fine-Design_Chart_Chart"), - Toolkit.i18nText("Fine-Design_Chart_Animation_Special"), - Toolkit.i18nText("Fine-Design_Chart_Interactive") - ); + chartContent.addOtherPos(CONDITION); addNameJavaScript2Array(areaJavaScriptList, plot.getAreaHotHyperLink()); addNameJavaScript2Array(lineJavaScriptList, plot.getLineHotHyperLink()); addNameJavaScript2Array(pointJavaScriptList, plot.getPointHotHyperLink());