Browse Source

CHART-12746

feature/big-screen
白岳 5 years ago
parent
commit
47f2acbb17
  1. 16
      designer-base/src/main/java/com/fr/design/mainframe/chart/info/ChartInfoCollector.java
  2. 4
      designer-base/src/main/java/com/fr/design/mainframe/template/info/TemplateInfo.java
  3. 7
      designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java
  4. 5
      designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java
  5. 10
      designer-form/src/main/java/com/fr/design/mainframe/FormCreatorDropTarget.java
  6. 7
      designer-realize/src/main/java/com/fr/poly/hanlder/PolyDesignerDropTarget.java

16
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); 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(); 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 blockCount = processInfo.getBlockCount();
int widgetCount = processInfo.getWidgetCount(); int widgetCount = processInfo.getWidgetCount();
return TemplateInfo.judgeTestTemplate(reportType, cellCount, floatCount, blockCount, widgetCount); return TemplateInfo.isTestTemplate(reportType, cellCount, floatCount, blockCount, widgetCount);
} }
/** /**

4
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 floatCount = (int) processMap.get(ATTR_FLOAT_COUNT);
int blockCount = (int) processMap.get(ATTR_BLOCK_COUNT); int blockCount = (int) processMap.get(ATTR_BLOCK_COUNT);
int widgetCount = (int) processMap.get(ATTR_WIDGET_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; boolean isTestTemplate;
if (reportType == 0) { // 普通报表 if (reportType == 0) { // 普通报表
isTestTemplate = cellCount <= VALID_CELL_COUNT && floatCount <= 1 && widgetCount <= VALID_WIDGET_COUNT; isTestTemplate = cellCount <= VALID_CELL_COUNT && floatCount <= 1 && widgetCount <= VALID_WIDGET_COUNT;

7
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()); AbstractChartAttrPane selectedPane = paneList.get(tabsHeaderIconPane.getSelectedIndex());
//图表配置变化,埋点记录 //图表配置变化,埋点记录
VanChart vanChart = collection.getSelectedChartProvider(VanChart.class); ChartInfoCollector.getInstance().updateChartPropertyTime(collection.getSelectedChartProvider(ChartProvider.class));
if (vanChart != null) {
ChartInfoCollector.getInstance().updateChartPropertyTime(vanChart.getUuid(), vanChart.getID());
}
selectedPane.update(collection); selectedPane.update(collection);
if (!ComparatorUtils.equals(collection, lastCollection)) { if (!ComparatorUtils.equals(collection, lastCollection)) {
VanChart vanChart = collection.getSelectedChartProvider(VanChart.class);
if (vanChart != null) { if (vanChart != null) {
//此处画图 //此处画图
vanChart.demoImgEvent(true); vanChart.demoImgEvent(true);

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

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

10
designer-form/src/main/java/com/fr/design/mainframe/FormCreatorDropTarget.java

@ -1,8 +1,8 @@
package com.fr.design.mainframe; package com.fr.design.mainframe;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.chart.BaseChartCollection;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.chartx.attr.ChartProvider;
import com.fr.design.DesignModelAdapter; import com.fr.design.DesignModelAdapter;
import com.fr.design.data.datapane.TableDataTreePane; import com.fr.design.data.datapane.TableDataTreePane;
import com.fr.design.designer.beans.AdapterBus; import com.fr.design.designer.beans.AdapterBus;
@ -26,7 +26,6 @@ import com.fr.form.share.ShareLoader;
import com.fr.form.ui.ChartEditor; import com.fr.form.ui.ChartEditor;
import com.fr.form.ui.SharableWidgetBindInfo; import com.fr.form.ui.SharableWidgetBindInfo;
import com.fr.form.ui.Widget; import com.fr.form.ui.Widget;
import com.fr.plugin.chart.vanchart.VanChart;
import com.fr.stable.Constants; import com.fr.stable.Constants;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
@ -285,11 +284,8 @@ public class FormCreatorDropTarget extends DropTarget {
private void dealChartBuryingPoint(Widget widget) { private void dealChartBuryingPoint(Widget widget) {
if (widget instanceof ChartEditor) { if (widget instanceof ChartEditor) {
BaseChartCollection chartCollection = ((ChartEditor) widget).getChartCollection(); ChartCollection chartCollection = (ChartCollection)((ChartEditor) widget).getChartCollection();
VanChart vanChart = ((ChartCollection) chartCollection).getSelectedChartProvider(VanChart.class); ChartInfoCollector.getInstance().collection(chartCollection.getSelectedChartProvider(ChartProvider.class), null);
if (vanChart != null) {
ChartInfoCollector.getInstance().collection(vanChart.getUuid(), vanChart.getID(), null);
}
} }
} }
} }

7
designer-realize/src/main/java/com/fr/poly/hanlder/PolyDesignerDropTarget.java

@ -7,11 +7,11 @@ import com.fr.base.ScreenResolution;
import com.fr.base.chart.BaseChartCollection; import com.fr.base.chart.BaseChartCollection;
import com.fr.base.vcs.DesignerMode; import com.fr.base.vcs.DesignerMode;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.chartx.attr.ChartProvider;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.chart.info.ChartInfoCollector; import com.fr.design.mainframe.chart.info.ChartInfoCollector;
import com.fr.grid.Grid; import com.fr.grid.Grid;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.plugin.chart.vanchart.VanChart;
import com.fr.poly.PolyDesigner; import com.fr.poly.PolyDesigner;
import com.fr.poly.PolyUtils; import com.fr.poly.PolyUtils;
import com.fr.poly.creator.BlockCreator; import com.fr.poly.creator.BlockCreator;
@ -240,10 +240,7 @@ public class PolyDesignerDropTarget extends DropTargetAdapter {
if (creator instanceof ChartBlockCreator) { if (creator instanceof ChartBlockCreator) {
PolyChartBlock value = ((ChartBlockCreator) creator).getValue(); PolyChartBlock value = ((ChartBlockCreator) creator).getValue();
ChartCollection chartCollection = (ChartCollection) value.getChartCollection(); ChartCollection chartCollection = (ChartCollection) value.getChartCollection();
VanChart vanChart = chartCollection.getSelectedChartProvider(VanChart.class); ChartInfoCollector.getInstance().collection(chartCollection.getSelectedChartProvider(ChartProvider.class), null);
if (vanChart != null) {
ChartInfoCollector.getInstance().collection(vanChart.getUuid(), vanChart.getID(), null);
}
} }
} }

Loading…
Cancel
Save