Browse Source

REPORT-80695 模板全局级别查找替换二期 修改钻取地图的获取逻辑

newui
Destiny.Lin 2 years ago
parent
commit
246f174b2e
  1. 5
      designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/chart/SearchChartCollectionFormulaAction.java
  2. 29
      designer-realize/src/main/java/com/fr/design/actions/replace/utils/SearchJSUtils.java

5
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());
}

29
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<JSInfo> 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<NameJavaScript> list = new ArrayList<>();
addNameJavaScript2Array(list, plot.getDrillUpHyperLink());
addJSInfosFromNameJS(chartContent, list, jsInfos);
}
/**
* 是否是组合地图
* @param plot 图表的plot
@ -366,14 +382,19 @@ public class SearchJSUtils {
List<NameJavaScript> areaJavaScriptList = new ArrayList<>();
List<NameJavaScript> lineJavaScriptList = new ArrayList<>();
List<NameJavaScript> 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<NameJavaScript> nameJavaScriptArrayList, NameJavaScriptGroup nameJavaScriptGroup) {

Loading…
Cancel
Save