Browse Source

REPORT-140524 【FVS数据集替换】x3.0.0.1做的看板,图表数据和标题使用的模板和数据集数据,都被识别未使用

release/11.0
Destiny.Lin 1 week ago
parent
commit
eb6901b462
  1. 40
      designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/chart/SearchChartCollectionFormulaAction.java

40
designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/chart/SearchChartCollectionFormulaAction.java

@ -63,29 +63,33 @@ public class SearchChartCollectionFormulaAction {
public void searchChartCollectionFormula(List<FormulaInfo> formulaInfos, ITContent content, ChartCollection chartCollection) { public void searchChartCollectionFormula(List<FormulaInfo> formulaInfos, ITContent content, ChartCollection chartCollection) {
for (int i = 0; i < chartCollection.getChartCount(); i++) { for (int i = 0; i < chartCollection.getChartCount(); i++) {
ITContent chartContent = ITContent.copy(content); ITContent chartContent = ITContent.copy(content);
searchChartPatternFormula(formulaInfos, chartContent, chartCollection.getChart(i)); Chart chart = chartCollection.getChart(i);
if (chart == null) {
continue;
}
searchChartPatternFormula(formulaInfos, chartContent, chart);
if (isChangeConfigAttrValid(chartCollection.getChangeConfigAttr())) { if (isChangeConfigAttrValid(chartCollection.getChangeConfigAttr())) {
//图表切换属性 //图表切换属性
dealChangeConfig(formulaInfos, chartContent, chartCollection.getChart(i)); dealChangeConfig(formulaInfos, chartContent, chart);
} }
//图表-交互属性-超级链接 //图表-交互属性-超级链接
dealChartHyperLink(formulaInfos, chartContent, chartCollection.getChart(i)); dealChartHyperLink(formulaInfos, chartContent, chart);
//数据-单元格数据-分类名&系列名&值 //数据-单元格数据-分类名&系列名&值
SearchChartDataFormulaManager searchChartDataFormulaManager = SearchChartDataFormulaManager.getInstance(); SearchChartDataFormulaManager searchChartDataFormulaManager = SearchChartDataFormulaManager.getInstance();
Map<String, SearchChartDataFormula> type = searchChartDataFormulaManager.getChartDataType(); Map<String, SearchChartDataFormula> type = searchChartDataFormulaManager.getChartDataType();
if (isDefinitionValid(chartCollection.getChart(i).getFilterDefinition())) { if (isDefinitionValid(chart.getFilterDefinition())) {
String name = chartCollection.getChart(i).getFilterDefinition().getClass().getSimpleName(); String name = chart.getFilterDefinition().getClass().getSimpleName();
SearchChartDataFormula searchChartDataFormula = type.get(name); SearchChartDataFormula searchChartDataFormula = type.get(name);
TopDefinitionProvider provider = chartCollection.getChart(i).getFilterDefinition(); TopDefinitionProvider provider = chart.getFilterDefinition();
ITContent dataContent = ITContent.copy(content); ITContent dataContent = ITContent.copy(content);
dataContent.addOtherPos(chartCollection.getChart(i).getChartName(), Toolkit.i18nText("Fine-Design_Basic_Data")); dataContent.addOtherPos(chart.getChartName(), Toolkit.i18nText("Fine-Design_Basic_Data"));
searchChartDataFormula.searchChartDataFormula(formulaInfos, dataContent, provider); searchChartDataFormula.searchChartDataFormula(formulaInfos, dataContent, provider);
} }
//数据-形态 //数据-形态
if (chartCollection.getChart(i).getFilterDefinition() != null) { if (chart.getFilterDefinition() != null) {
ITContent presentContent = ITContent.copy(content); ITContent presentContent = ITContent.copy(content);
presentContent.addOtherPos(chartCollection.getChart(i).getChartName(), Toolkit.i18nText("Fine-Design_Basic_Data")); presentContent.addOtherPos(chart.getChartName(), Toolkit.i18nText("Fine-Design_Basic_Data"));
searchFormulaFromChartPresent(formulaInfos, presentContent, chartCollection.getChart(i).getFilterDefinition()); searchFormulaFromChartPresent(formulaInfos, presentContent, chart.getFilterDefinition());
} }
} }
} }
@ -370,16 +374,14 @@ public class SearchChartCollectionFormulaAction {
} }
private void searchChartPatternFormulaFromTitle(List<FormulaInfo> formulaInfos, ITContent chartContent, Chart chart) { private void searchChartPatternFormulaFromTitle(List<FormulaInfo> formulaInfos, ITContent chartContent, Chart chart) {
if (chart != null) { //样式-标题
//样式-标题 ITContent titleContent = ITContent.copy(chartContent);
ITContent titleContent = ITContent.copy(chartContent); titleContent.addOtherPos(
titleContent.addOtherPos( chart.getChartName(),
chart.getChartName(), Toolkit.i18nText("Fine-Design_Chart_Pattern")
Toolkit.i18nText("Fine-Design_Chart_Pattern")
); );
dealTitle(formulaInfos, titleContent, chart.getTitle()); dealTitle(formulaInfos, titleContent, chart.getTitle());
}
} }
private void dealTitle(List<FormulaInfo> formulaInfos, ITContent chartContent, Title title) { private void dealTitle(List<FormulaInfo> formulaInfos, ITContent chartContent, Title title) {

Loading…
Cancel
Save