Browse Source

Pull request #10530: REPORT-80690 添加适配适配埋点

Merge in DESIGN/design from ~LEO.QIN/design:release/11.0 to release/11.0

* commit 'b86ab2dbaf2f08b9393bb65f9a4b2a7159799e18':
  REPORT-80690 增加注释
  REPORT-80690 修改传入格式数据
  REPORT-80690 修改传入格式数据
  REPORT-80690 添加适配适配埋点
release/11.0
Leo.Qin-覃宇攀 2 years ago
parent
commit
64ac9432c0
  1. 4
      designer-realize/src/main/java/com/fr/design/actions/cell/AbstractCellElementAction.java
  2. 5
      designer-realize/src/main/java/com/fr/design/actions/columnrow/ColumnWidthAction.java
  3. 4
      designer-realize/src/main/java/com/fr/design/actions/columnrow/RowHeightAction.java
  4. 51
      designer-realize/src/main/java/com/fr/quickeditor/CellQuickEditor.java
  5. 4
      designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellDSColumnEditor.java

4
designer-realize/src/main/java/com/fr/design/actions/cell/AbstractCellElementAction.java

@ -9,6 +9,7 @@ import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.mainframe.theme.utils.DefaultThemedTemplateCellElementCase;
import com.fr.grid.GridUtils;
import com.fr.grid.selection.CellSelection;
import com.fr.quickeditor.CellQuickEditor;
import com.fr.report.cell.TemplateCellElement;
import com.fr.report.core.SheetUtils;
import com.fr.report.elementcase.TemplateElementCase;
@ -76,6 +77,9 @@ public abstract class AbstractCellElementAction extends CellSelectionAction {
}
}
}
if (!ePane.isSelectedOneCell()) {
CellQuickEditor.record(CellQuickEditor.multipleOperationType.FILTER);
}
ePane.fireTargetModified();
}

5
designer-realize/src/main/java/com/fr/design/actions/columnrow/ColumnWidthAction.java

@ -4,8 +4,8 @@
package com.fr.design.actions.columnrow;
import com.fr.design.mainframe.ElementCasePane;
import com.fr.grid.selection.CellSelection;
import com.fr.quickeditor.CellQuickEditor;
import com.fr.report.elementcase.ElementCase;
import com.fr.stable.unit.UNIT;
@ -32,6 +32,9 @@ public class ColumnWidthAction extends ColumnRowSizingAction {
for (int i = 0; i < columns.length; i++) {
report.setColumnWidth(columns[i], len);
}
if (columns.length > 1) {
CellQuickEditor.record(CellQuickEditor.multipleOperationType.HEIHT_AND_COLUMN);
}
}
protected UNIT getIndexLen(int index, ElementCase report){

4
designer-realize/src/main/java/com/fr/design/actions/columnrow/RowHeightAction.java

@ -6,6 +6,7 @@ package com.fr.design.actions.columnrow;
import com.fr.design.mainframe.ElementCasePane;
import com.fr.grid.selection.CellSelection;
import com.fr.quickeditor.CellQuickEditor;
import com.fr.report.elementcase.ElementCase;
import com.fr.stable.unit.UNIT;
@ -32,6 +33,9 @@ public class RowHeightAction extends ColumnRowSizingAction {
for (int i = 0; i < rows.length; i++) {
report.setRowHeight(rows[i], len);
}
if (rows.length > 1) {
CellQuickEditor.record(CellQuickEditor.multipleOperationType.HEIHT_AND_COLUMN);
}
}
@Override

51
designer-realize/src/main/java/com/fr/quickeditor/CellQuickEditor.java

@ -455,6 +455,9 @@ public abstract class CellQuickEditor extends QuickEditor<ElementCasePane> {
if (updateStyle) {
// 防止频繁触发保存
if (!tc.isSelectedOneCell()) {
record(multipleOperationType.FORMAT);
}
fireTargetModified();
}
@ -469,4 +472,52 @@ public abstract class CellQuickEditor extends QuickEditor<ElementCasePane> {
return formatPane;
}
/**
* 用于适配记录批量操作的埋点数据
* 真正的埋点提交方案在云端运维插件中
*
* @param type 批量操作修改类型
* @return 批量修改类型名称用于云端运维埋点记录
*/
public static String record(multipleOperationType type) {
return type.getType();
}
/**
* 批量操作的类型
*/
public enum multipleOperationType {
/**
* 批量修改格式
*/
FORMAT("format"),
/**
* 批量修改数据列的数据设置
*/
TYPE_OF_DATA("type-of-data"),
/**
* 批量修改过滤条件
*/
FILTER("filter"),
/**
* 批量修改行高列宽
*/
HEIHT_AND_COLUMN("row-height-and-column-width");
private final String type;
multipleOperationType(String type) {
this.type = type;
}
public String getType() {
return type;
}
}
}

4
designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellDSColumnEditor.java

@ -319,10 +319,12 @@ public class CellDSColumnEditor extends CellQuickEditor {
public void itemStateChanged(ItemEvent e) {
CellSelection selection = (CellSelection) tc.getSelection();
Set<TemplateCellElement> allCellElements = selection.getCellElements();
groupPane.update(allCellElements);
if (e == null || e.getStateChange() == ItemEvent.DESELECTED) {
//分组-高级-自定义点确定的时候传进来null的e,但是这时候应该触发保存
groupPane.update(allCellElements);
if (!tc.isSelectedOneCell()) {
CellQuickEditor.record(multipleOperationType.TYPE_OF_DATA);
}
fireTargetModified();
}
}

Loading…
Cancel
Save