Browse Source

REPORT-71925 & REPORT-71908 部分数据情况下结果不符合预期&组合图配置条件属性汇总字段值,设置后条件属性内容被清空了

feature/x
pengda 2 years ago
parent
commit
8049e9b981
  1. 11
      designer-base/src/main/java/com/fr/design/data/datapane/SummaryMethodComboBox.java
  2. 5
      designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/ChartConditionPane.java
  3. 6
      designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/ColSelectedWithSummaryMethodEditor.java

11
designer-base/src/main/java/com/fr/design/data/datapane/SummaryMethodComboBox.java

@ -40,10 +40,13 @@ public class SummaryMethodComboBox extends UIComboBox {
* 更新公式选择.
*/
public void populateBean(AbstractDataFunction function) {
for (int i = 0; i < CLASS_ARRAY.length; i++) {
if (function != null && ComparatorUtils.equals(function.getClass(), CLASS_ARRAY[i])) {
setSelectedIndex(i);
break;
if (function != null) {
for (int i = 0; i < CLASS_ARRAY.length; i++) {
if (this.getModel() != null && this.getModel().getSize() > i
&& ComparatorUtils.equals(function.getClass(), CLASS_ARRAY[i])) {
setSelectedIndex(i);
break;
}
}
}
}

5
designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/ChartConditionPane.java

@ -81,7 +81,10 @@ public class ChartConditionPane extends LiteConditionPane<CommonCondition> {
return this;
}
});
conditionValuePane = ValueEditorPaneFactory.createAllValueEditorPane();
Editor<?>[] editors = ValueEditorPaneFactory.allEditors();
ColSelectedWithSummaryMethodEditor colSelectedWithSummaryMethodEditor = new ColSelectedWithSummaryMethodEditor();
Editor<?>[] allEditors = ArrayUtils.add(editors,colSelectedWithSummaryMethodEditor);
conditionValuePane = ValueEditorPaneFactory.createValueEditorPane(allEditors,StringUtils.EMPTY,StringUtils.EMPTY);
conditionKeyComboBox.setPreferredSize(new Dimension(175, conditionKeyComboBox.getPreferredSize().height));
conditionOPComboBox.setPreferredSize(new Dimension(80, 20));
Component[][] components = {

6
designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/ColSelectedWithSummaryMethodEditor.java

@ -38,11 +38,13 @@ public class ColSelectedWithSummaryMethodEditor extends Editor<DSColumnWithSumma
}
public static void refreshCommonChartFieldNames(Chart chart) {
//do nothing
String[] columnNames = ChartDataHelper.getCommonChartFieldNames(chart);
refreshComboBoxModel(columnNames);
}
public static void refreshCustomChartTableFieldNames(Chart chart, CustomPlotType plotType) {
// do nothing
String[] columnNames = ChartDataHelper.getCustomChartTableFieldNames(chart, plotType);
refreshComboBoxModel(columnNames);
}
private static void refreshComboBoxModel(String[] columnNames) {

Loading…
Cancel
Save