Browse Source

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

Merge in DESIGN/design from ~DESTINY.LIN/design:release/11.0 to release/11.0

* commit '588ee54b08b5f7c8b99155f1c24a55364402e3b9':
  REPORT-80695 模板全局级别查找替换二期 修改钻取地图的获取逻辑
  REPORT-80695 模板全局级别查找替换二期 修改钻取地图的获取逻辑
release/11.0
Destiny.Lin-林锦龙 2 years ago
parent
commit
64c7ced556
  1. 5
      designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/chart/SearchChartCollectionFormulaAction.java
  2. 31
      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());
}

31
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;
@ -63,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
*/
@ -338,6 +347,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 +358,17 @@ public class SearchJSUtils {
return nameJavaScriptArrayList;
}
private static void dealDrillNameJavaScript(ITContent content, VanChartDrillMapPlot plot, List<JSInfo> jsInfos) {
ITContent chartContent = ITContent.copy(content);
chartContent.addOtherPos(
CONDITION,
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 +388,15 @@ 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(CONDITION);
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