Browse Source

CHART-12746

feature/big-screen
白岳 5 years ago
parent
commit
305fcce817
  1. 11
      designer-base/src/main/java/com/fr/design/mainframe/chart/info/ChartInfoCollector.java
  2. 10
      designer-chart/src/main/java/com/fr/design/chart/ChartTypePane.java
  3. 5
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java
  4. 7
      designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java

11
designer-base/src/main/java/com/fr/design/mainframe/chart/info/ChartInfoCollector.java

@ -3,12 +3,14 @@ package com.fr.design.mainframe.chart.info;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.io.BaseBook; import com.fr.base.io.BaseBook;
import com.fr.base.io.XMLReadHelper; import com.fr.base.io.XMLReadHelper;
import com.fr.chartx.attr.ChartProvider;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.mainframe.template.info.SendHelper; import com.fr.design.mainframe.template.info.SendHelper;
import com.fr.design.mainframe.template.info.TemplateInfo; import com.fr.design.mainframe.template.info.TemplateInfo;
import com.fr.design.mainframe.template.info.TemplateProcessInfo; import com.fr.design.mainframe.template.info.TemplateProcessInfo;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.plugin.chart.vanchart.VanChart;
import com.fr.stable.ProductConstants; import com.fr.stable.ProductConstants;
import com.fr.stable.StableUtils; import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -75,6 +77,13 @@ public class ChartInfoCollector implements XMLReadable, XMLWriter {
return instance; return instance;
} }
public void collection(ChartProvider chartProvider, String createTime) {
if (chartProvider instanceof VanChart) {
VanChart vanChart = (VanChart) chartProvider;
collection(vanChart.getUuid(), vanChart.getID(), createTime);
}
}
/** /**
* 新建图表保存状态 * 新建图表保存状态
*/ */
@ -166,8 +175,6 @@ public class ChartInfoCollector implements XMLReadable, XMLWriter {
} }
} }
// 每次更新之后,都同步到暂存文件中 // 每次更新之后,都同步到暂存文件中
saveInfo(); saveInfo();
} }

10
designer-chart/src/main/java/com/fr/design/chart/ChartTypePane.java

@ -7,12 +7,11 @@ import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.charttypes.ChartTypeManager; import com.fr.chart.charttypes.ChartTypeManager;
import com.fr.chartx.attr.ChartProvider; import com.fr.chartx.attr.ChartProvider;
import com.fr.design.ChartTypeInterfaceManager; import com.fr.design.ChartTypeInterfaceManager;
import com.fr.design.mainframe.chart.info.ChartInfoCollector;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.chart.info.ChartInfoCollector;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.plugin.chart.vanchart.VanChart;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
@ -124,7 +123,7 @@ public class ChartTypePane extends ChartCommonWizardPane {
update(cc, null); update(cc, null);
} }
public void update(ChartCollection cc, String creatTime) { public void update(ChartCollection cc, String createTime) {
if (cc == null) { if (cc == null) {
return; return;
} }
@ -137,10 +136,7 @@ public class ChartTypePane extends ChartCommonWizardPane {
chart4Update = (ChartProvider) chart.clone(); chart4Update = (ChartProvider) chart.clone();
cc.addChart(chart4Update); cc.addChart(chart4Update);
//记录埋点 //记录埋点
if (chart4Update instanceof VanChart) { ChartInfoCollector.getInstance().collection(chart4Update, createTime);
VanChart vanChart = (VanChart) chart4Update;
ChartInfoCollector.getInstance().collection(vanChart.getUuid(), vanChart.getID(), creatTime);
}
} catch (CloneNotSupportedException ex) { } catch (CloneNotSupportedException ex) {
FineLoggerFactory.getLogger().error(ex.getMessage(), ex); FineLoggerFactory.getLogger().error(ex.getMessage(), ex);
} }

5
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java

@ -152,10 +152,7 @@ public class ChartTypeButtonPane extends BasicBeanPane<ChartCollection> implemen
try { try {
ChartProvider newChart = (ChartProvider) chart.clone(); ChartProvider newChart = (ChartProvider) chart.clone();
editingCollection.addNamedChart(name, newChart); editingCollection.addNamedChart(name, newChart);
if (newChart instanceof VanChart) { ChartInfoCollector.getInstance().collection(newChart, null);
VanChart vanchart = (VanChart) newChart;
ChartInfoCollector.getInstance().collection(vanchart.getUuid(), vanchart.getID(), null);
}
} catch (CloneNotSupportedException e1) { } catch (CloneNotSupportedException e1) {
FineLoggerFactory.getLogger().error("Error in Clone"); FineLoggerFactory.getLogger().error("Error in Clone");
} }

7
designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java

@ -106,10 +106,9 @@ public abstract class AbstractVanChartTypePane extends AbstractChartTypePane<Cha
resetChartAttr(chart, newPlot); resetChartAttr(chart, newPlot);
//切换图表时,数据配置不变,分类个数也不变 //切换图表时,数据配置不变,分类个数也不变
newPlot.setCategoryNum(oldPlot.getCategoryNum()); newPlot.setCategoryNum(oldPlot.getCategoryNum());
if(chart instanceof VanChart){ //走这边逻辑都是vanchart
VanChart vanChart = (VanChart) chart; VanChart vanChart = (VanChart) chart;
ChartInfoCollector.getInstance().updateChartTypeTime(vanChart.getUuid(), vanChart.getID()); ChartInfoCollector.getInstance().updateChartTypeTime(vanChart.getUuid(), vanChart.getID());
}
} }
} }

Loading…
Cancel
Save