diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java index 947c63684..3c4cbf70c 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java @@ -384,7 +384,7 @@ public class VanChartTooltipContentPane extends BasicBeanPane richEditorPane = VanChartRichEditorPane.createRichEditorPane(richText); VanChartRichTextPane richTextPane = this.createRichTextPane(richEditorPane); @@ -456,15 +456,19 @@ public class VanChartTooltipContentPane extends BasicBeanPane params) { List tableFieldNames = VanChartRichEditorPane.getFieldNames(); - if (tableFieldNames != null) { + if (tableFieldNames != null && params != null) { for (String fieldName : tableFieldNames) { params.put(fieldName, "${" + fieldName + "_" + fieldName.hashCode() + "}"); } } - - richText.setParams(params); } private JPanel createHtmlPane() { diff --git a/designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html b/designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html index c1d533e8d..08e2437ad 100644 --- a/designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html +++ b/designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html @@ -47,8 +47,7 @@ var getInitContent = function (params, initParams, align) { var editorService = BI.Services.getService("bi.service.design.chart.common.editor"); var paramGroup = params.split("|"); - - content = ""; + var content = ""; for (var i = 0, len = paramGroup.length; i < len; i++) { var [key, value] = paramGroup[i].split(":"); @@ -58,6 +57,10 @@ } } + if (BI.endWith(content, '

')) { + content = content.slice(0, -8) + '

'; + } + return content; } @@ -83,7 +86,10 @@ toolbar: { buttons: [ {type: "bi.rich_editor_font_chooser"}, - {type: "bi.rich_editor_size_chooser"}, + { + type: "bi.rich_editor_size_chooser", + width: 70 + }, {type: "bi.rich_editor_bold_button"}, {type: "bi.rich_editor_italic_button"}, {type: "bi.rich_editor_underline_button"}, diff --git a/designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java b/designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java index d306bb179..12c610534 100644 --- a/designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java +++ b/designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java @@ -310,9 +310,9 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane { // 单元格组要记录下之前的选中情况 private CellSelection oriCellSelection = null; - private List newAdd = new ArrayList(); + private List newAdd = new ArrayList<>(); - private List oldAdd = new ArrayList(); + private List oldAdd = new ArrayList<>(); public SmartJTablePane4DB(KeyColumnTableModel model, ElementCasePane actionReportPane) { this(model, actionReportPane, false); @@ -433,7 +433,8 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane { if (!allColumnRow.contains(columnRow.toString())) { add.addColumnRow(columnRow); } - + // 重新更换区域框选单元格后 清理历史框选 + oldAdd.clear(); } if (add.getSize() > 0) { @@ -462,7 +463,7 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane { if (!newAdd.contains(value) && !allColumnRow.contains(value)) { add.addColumnRow(ColumnRow.valueOf(value)); } - newAdd.add(value); + newAdd.add(ColumnRow.valueOf(value)); } if (cellElement == null) { @@ -470,16 +471,14 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane { if (!allColumnRow.contains(columnRow.toString())) { add.addColumnRow(columnRow); } - newAdd.add(columnRow.toString()); + newAdd.add(columnRow); } } } - int oldSize = oldAdd.size(); - int newSize = newAdd.size(); - if (oldSize > newSize && oldAdd.containsAll(newAdd)) { - int diff = oldSize - newSize; - newValue.splice(newValue.getSize() - diff, diff); - } + // 计算出前后两次选中的差值 + oldAdd.removeAll(newAdd); + // 移除差值部分 + newValue.removeAll(oldAdd); oldAdd.clear(); oldAdd.addAll(newAdd); }