Browse Source

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

Merge in DESIGN/design from ~PENGDA/design:feature/x to feature/x

* commit 'b657e9c3538bc39713cfefd8e30937f70b525fed':
  REPORT-71925 & REPORT-71908 部分数据情况下结果不符合预期&组合图配置条件属性汇总字段值,设置后条件属性内容被清空了
  REPORT-71925 & REPORT-71908 部分数据情况下结果不符合预期&组合图配置条件属性汇总字段值,设置后条件属性内容被清空了
feature/x
pengda 3 years ago
parent
commit
ee504282ef
  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. 4
      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 = {

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

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

Loading…
Cancel
Save