Merge pull request #3898 from dataease/pr@dev@fix_dataset
fix(数据集): 自定义时间格式
This commit is contained in:
commit
7443493b3a
@ -1012,7 +1012,7 @@ public class ChartDataBuild {
|
||||
switch (columnPermissionItem.getDesensitizationRule().getCustomBuiltInRule()) {
|
||||
case RetainBeforeMAndAfterN:
|
||||
if (StringUtils.isEmpty(originStr) || originStr.length() < columnPermissionItem.getDesensitizationRule().getM() + columnPermissionItem.getDesensitizationRule().getN() + 1) {
|
||||
desensitizationStr = String.join("", Collections.nCopies(columnPermissionItem.getDesensitizationRule().getM(), "X")) + "***" + Collections.nCopies(columnPermissionItem.getDesensitizationRule().getN(), "X");
|
||||
desensitizationStr = String.join("", Collections.nCopies(columnPermissionItem.getDesensitizationRule().getM(), "X")) + "***" + String.join("", Collections.nCopies(columnPermissionItem.getDesensitizationRule().getN(), "X"));
|
||||
} else {
|
||||
desensitizationStr = StringUtils.substring(originStr, 0, columnPermissionItem.getDesensitizationRule().getM() - 1) + "***" + StringUtils.substring(originStr, originStr.length() - columnPermissionItem.getDesensitizationRule().getN(), originStr.length() - 1);
|
||||
}
|
||||
@ -1030,7 +1030,7 @@ public class ChartDataBuild {
|
||||
desensitizationStr = "***" + StringUtils.substring(originStr, columnPermissionItem.getDesensitizationRule().getM() - 1, columnPermissionItem.getDesensitizationRule().getN()) + "***";
|
||||
break;
|
||||
}
|
||||
if (originStr.length() >= columnPermissionItem.getDesensitizationRule().getN() && originStr.length() < columnPermissionItem.getDesensitizationRule().getN()) {
|
||||
if (originStr.length() >= columnPermissionItem.getDesensitizationRule().getM() && originStr.length() < columnPermissionItem.getDesensitizationRule().getN()) {
|
||||
desensitizationStr = "***" + StringUtils.substring(originStr, columnPermissionItem.getDesensitizationRule().getM() - 1, originStr.length());
|
||||
}
|
||||
break;
|
||||
|
||||
@ -833,8 +833,9 @@ export default {
|
||||
this.quotaChange()
|
||||
})
|
||||
dateformats(this.param.id).then((response) => {
|
||||
const children = (response?.data || []).map(ele => ({ label: ele.dateformat, value: ele.dateformat }))
|
||||
children.push({ label: '自定义', value: 'custom' })
|
||||
|
||||
const children = (response?.data || []).map(ele => ({ label: ele.dateformat + ( ele.desc !== null ? ('(' + ele.desc) + ')' : ""), value: ele.dateformat }))
|
||||
children.push({ label: this.$t('commons.custom'), value: 'custom' })
|
||||
this.dateformats = children
|
||||
})
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user