From 47f2acbb17207192062f3a6c544c8bbdf34cd2af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Wed, 19 Feb 2020 20:49:34 +0800 Subject: [PATCH] CHART-12746 --- .../mainframe/chart/info/ChartInfoCollector.java | 16 +++++++++++++++- .../mainframe/template/info/TemplateInfo.java | 4 ++-- .../fr/design/mainframe/chart/ChartEditPane.java | 7 +++---- .../designer/type/AbstractVanChartTypePane.java | 5 ++--- .../design/mainframe/FormCreatorDropTarget.java | 10 +++------- .../fr/poly/hanlder/PolyDesignerDropTarget.java | 7 ++----- 6 files changed, 27 insertions(+), 22 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/chart/info/ChartInfoCollector.java b/designer-base/src/main/java/com/fr/design/mainframe/chart/info/ChartInfoCollector.java index 4dbfdaaed..712f234ba 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/chart/info/ChartInfoCollector.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/chart/info/ChartInfoCollector.java @@ -96,6 +96,13 @@ public class ChartInfoCollector implements XMLReadable, XMLWriter { chartInfoCacheMap.put(chartId, chartInfo); } + public void updateChartPropertyTime(ChartProvider chartProvider) { + if (chartProvider instanceof VanChart) { + VanChart vanChart = (VanChart) chartProvider; + updateChartPropertyTime(vanChart.getUuid(), vanChart.getID()); + } + } + /** * 图表编辑,更新编辑时间 */ @@ -112,6 +119,13 @@ public class ChartInfoCollector implements XMLReadable, XMLWriter { chartInfo.resetIdleDayCount(); } + public void updateChartTypeTime(ChartProvider chartProvider) { + if (chartProvider instanceof VanChart) { + VanChart vanChart = (VanChart) chartProvider; + updateChartTypeTime(vanChart.getUuid(), vanChart.getID()); + } + } + /** * 图表类型变化,更新类型和类型确认时间 */ @@ -186,7 +200,7 @@ public class ChartInfoCollector implements XMLReadable, XMLWriter { int blockCount = processInfo.getBlockCount(); int widgetCount = processInfo.getWidgetCount(); - return TemplateInfo.judgeTestTemplate(reportType, cellCount, floatCount, blockCount, widgetCount); + return TemplateInfo.isTestTemplate(reportType, cellCount, floatCount, blockCount, widgetCount); } /** diff --git a/designer-base/src/main/java/com/fr/design/mainframe/template/info/TemplateInfo.java b/designer-base/src/main/java/com/fr/design/mainframe/template/info/TemplateInfo.java index 334aaf509..c55572ff7 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/template/info/TemplateInfo.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/template/info/TemplateInfo.java @@ -195,10 +195,10 @@ public class TemplateInfo implements XMLReadable, XMLWriter { int floatCount = (int) processMap.get(ATTR_FLOAT_COUNT); int blockCount = (int) processMap.get(ATTR_BLOCK_COUNT); int widgetCount = (int) processMap.get(ATTR_WIDGET_COUNT); - return judgeTestTemplate(reportType, cellCount, floatCount, blockCount, widgetCount); + return isTestTemplate(reportType, cellCount, floatCount, blockCount, widgetCount); } - public static boolean judgeTestTemplate(int reportType, int cellCount, int floatCount, int blockCount, int widgetCount){ + public static boolean isTestTemplate(int reportType, int cellCount, int floatCount, int blockCount, int widgetCount){ boolean isTestTemplate; if (reportType == 0) { // 普通报表 isTestTemplate = cellCount <= VALID_CELL_COUNT && floatCount <= 1 && widgetCount <= VALID_WIDGET_COUNT; diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java index db5524f26..af6540893 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java @@ -109,14 +109,13 @@ public class ChartEditPane extends BasicPane implements AttributeChange, Prepare } AbstractChartAttrPane selectedPane = paneList.get(tabsHeaderIconPane.getSelectedIndex()); //图表配置变化,埋点记录 - VanChart vanChart = collection.getSelectedChartProvider(VanChart.class); - if (vanChart != null) { - ChartInfoCollector.getInstance().updateChartPropertyTime(vanChart.getUuid(), vanChart.getID()); - } + ChartInfoCollector.getInstance().updateChartPropertyTime(collection.getSelectedChartProvider(ChartProvider.class)); + selectedPane.update(collection); if (!ComparatorUtils.equals(collection, lastCollection)) { + VanChart vanChart = collection.getSelectedChartProvider(VanChart.class); if (vanChart != null) { //此处画图 vanChart.demoImgEvent(true); diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java index 2ae28cc2c..1a0953266 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java @@ -106,9 +106,8 @@ public abstract class AbstractVanChartTypePane extends AbstractChartTypePane