Browse Source

REPORT-89353 && REPORT-89358 && REPORT-89237

【问题原因】
REPORT-89358:上移下移删除未触发模版保存事件
EPORT-89353:未将脱敏设置list写入到frm决策表
REPORT-89237:预览时单元格格式生效在写入html时,在SE中仅对原始值进行了脱敏;单元格形态计算在脱敏计算后
【解决思路】
EPORT-89358:操作增加触发模版保存事件
EPORT-89353:frm决策报表添加读取写入list信息
REPORT-89237:若单元格设置了格式属性,将在写入html时再进行脱敏;将脱敏计算修改到形态计算后执行
newui
Leo.Qin 2 years ago
parent
commit
0895e173b5
  1. 9
      designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/desensitization/model/CellDesensitizationTableModel.java
  2. 17
      designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/desensitization/model/DesensitizationCellPane.java

9
designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/desensitization/model/CellDesensitizationTableModel.java

@ -99,11 +99,10 @@ public class CellDesensitizationTableModel extends UITableModelAdapter<CellDesen
return true;
}
/**
* 手动触发模版变化用于更新单元格脱敏设置属性
*/
public void fireAttrChanged() {
@Override
public void fireTableDataChanged() {
super.fireTableDataChanged();
attrPane.attributeChanged();
}
}

17
designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/desensitization/model/DesensitizationCellPane.java

@ -2,6 +2,7 @@ package com.fr.design.mainframe.cell.settingpane.desensitization.model;
import com.fr.data.desensitize.rule.DesensitizationRuleManager;
import com.fr.data.desensitize.rule.base.DesensitizationRule;
import com.fr.data.desensitize.rule.base.DesensitizationRuleSource;
import com.fr.data.desensitize.rule.base.DesensitizationRuleStatus;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.data.datapane.preview.desensitization.TableDataPreviewDesensitizeManager;
@ -25,6 +26,7 @@ import com.fr.third.org.apache.commons.collections4.map.HashedMap;
import javax.swing.JComponent;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import javax.swing.SwingWorker;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
@ -56,6 +58,7 @@ public class DesensitizationCellPane extends BasicBeanPane {
private static final String APOSTROPHE = "...";
private Map<String, String> roleMap;
private DesensitizationRule rule;
private static Map<DesensitizationRuleSource, Map<String, DesensitizationRule>> latestRules;
private CellDesensitizationTableModel model;
@ -87,6 +90,7 @@ public class DesensitizationCellPane extends BasicBeanPane {
rolesComboBox = new RuleUIComboCheckBox();
rolesComboBox.setPlaceHolder(Toolkit.i18nText("Fine-Design_Report_Desensitization_Role_Place_Holder"));
rolesComboBox.setEnabled(true);
latestRules = new HashMap<>();
emptyTextField = new UITextField();
emptyTextField.setEnabled(false);
@ -127,7 +131,7 @@ public class DesensitizationCellPane extends BasicBeanPane {
Set<String> roleIds = generateRolesIdsBySelectedValues();
if (Objects.nonNull(selectBean) && !selectBean.getRoleIds().equals(roleIds)) {
selectBean.setRoleIds(generateRolesIdsBySelectedValues());
model.fireAttrChanged();
model.fireTableDataChanged();
}
}
};
@ -135,8 +139,10 @@ public class DesensitizationCellPane extends BasicBeanPane {
private final ActionListener chooseRuleListener = new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
CellDesensitizationBean selectBean = model.getSelectedValue();
DesensitizationRulePane rulePane = new DesensitizationRulePane(new HashMap<>());
latestRules = DesensitizationRuleManager.getInstance().getAllRules();
DesensitizationRulePane rulePane = new DesensitizationRulePane(latestRules);
BasicDialog ruleDialog = rulePane.showWindowWithCustomSize(SwingUtilities.getWindowAncestor(parent), new DialogActionAdapter() {
@Override
@ -149,7 +155,7 @@ public class DesensitizationCellPane extends BasicBeanPane {
// 非正常状态需要颜色修改为红色
refreshRuleState(selectBean);
model.fireAttrChanged();
model.fireTableDataChanged();
}
rule = null;
}
@ -211,6 +217,9 @@ public class DesensitizationCellPane extends BasicBeanPane {
label.setText(Toolkit.i18nText("Fine-Design_Report_Desensitization_Setting") + row);
}
/**
* 刷新用户组信息
*/
private void refreshRoles() {
Map<String, String> roles = TableDataPreviewDesensitizeManager.getInstance().getAllRoles();
if (!roleMap.equals(roles)) {
@ -220,7 +229,7 @@ public class DesensitizationCellPane extends BasicBeanPane {
}
private void refreshRuleState(CellDesensitizationBean value) {
DesensitizationRuleStatus ruleStatus = DesensitizationRuleManager.getInstance().getRuleStatus(value.getDesensitizationRule());
DesensitizationRuleStatus ruleStatus = DesensitizationRuleManager.getInstance().getRuleStatus(value.getDesensitizationRule(), latestRules);
if (value.equals(CellDesensitizationBean.createEmptyBean())) {
ruleTextField.setForeground(Color.GRAY);
} else if (ruleStatus != DesensitizationRuleStatus.NORMAL) {

Loading…
Cancel
Save