Browse Source

Merge remote-tracking branch 'origin/release/11.0' into release/11.0

newui
Destiny.Lin 2 years ago
parent
commit
bc3fc2aca9
  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.design.mainframe.theme.utils.DefaultThemedTemplateCellElementCase;
import com.fr.grid.GridUtils; import com.fr.grid.GridUtils;
import com.fr.grid.selection.CellSelection; import com.fr.grid.selection.CellSelection;
import com.fr.quickeditor.CellQuickEditor;
import com.fr.report.cell.TemplateCellElement; import com.fr.report.cell.TemplateCellElement;
import com.fr.report.core.SheetUtils; import com.fr.report.core.SheetUtils;
import com.fr.report.elementcase.TemplateElementCase; 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(); 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; package com.fr.design.actions.columnrow;
import com.fr.design.mainframe.ElementCasePane; import com.fr.design.mainframe.ElementCasePane;
import com.fr.grid.selection.CellSelection; import com.fr.grid.selection.CellSelection;
import com.fr.quickeditor.CellQuickEditor;
import com.fr.report.elementcase.ElementCase; import com.fr.report.elementcase.ElementCase;
import com.fr.stable.unit.UNIT; import com.fr.stable.unit.UNIT;
@ -32,6 +32,9 @@ public class ColumnWidthAction extends ColumnRowSizingAction {
for (int i = 0; i < columns.length; i++) { for (int i = 0; i < columns.length; i++) {
report.setColumnWidth(columns[i], len); report.setColumnWidth(columns[i], len);
} }
if (columns.length > 1) {
CellQuickEditor.record(CellQuickEditor.multipleOperationType.HEIHT_AND_COLUMN);
}
} }
protected UNIT getIndexLen(int index, ElementCase report){ 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.design.mainframe.ElementCasePane;
import com.fr.grid.selection.CellSelection; import com.fr.grid.selection.CellSelection;
import com.fr.quickeditor.CellQuickEditor;
import com.fr.report.elementcase.ElementCase; import com.fr.report.elementcase.ElementCase;
import com.fr.stable.unit.UNIT; import com.fr.stable.unit.UNIT;
@ -32,6 +33,9 @@ public class RowHeightAction extends ColumnRowSizingAction {
for (int i = 0; i < rows.length; i++) { for (int i = 0; i < rows.length; i++) {
report.setRowHeight(rows[i], len); report.setRowHeight(rows[i], len);
} }
if (rows.length > 1) {
CellQuickEditor.record(CellQuickEditor.multipleOperationType.HEIHT_AND_COLUMN);
}
} }
@Override @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 (updateStyle) {
// 防止频繁触发保存 // 防止频繁触发保存
if (!tc.isSelectedOneCell()) {
record(multipleOperationType.FORMAT);
}
fireTargetModified(); fireTargetModified();
} }
@ -469,4 +472,52 @@ public abstract class CellQuickEditor extends QuickEditor<ElementCasePane> {
return formatPane; 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) { public void itemStateChanged(ItemEvent e) {
CellSelection selection = (CellSelection) tc.getSelection(); CellSelection selection = (CellSelection) tc.getSelection();
Set<TemplateCellElement> allCellElements = selection.getCellElements(); Set<TemplateCellElement> allCellElements = selection.getCellElements();
groupPane.update(allCellElements);
if (e == null || e.getStateChange() == ItemEvent.DESELECTED) { if (e == null || e.getStateChange() == ItemEvent.DESELECTED) {
//分组-高级-自定义点确定的时候传进来null的e,但是这时候应该触发保存 //分组-高级-自定义点确定的时候传进来null的e,但是这时候应该触发保存
groupPane.update(allCellElements); groupPane.update(allCellElements);
if (!tc.isSelectedOneCell()) {
CellQuickEditor.record(multipleOperationType.TYPE_OF_DATA);
}
fireTargetModified(); fireTargetModified();
} }
} }

Loading…
Cancel
Save