forked from github/dataease
fix: 脱敏字段删除改为标记
This commit is contained in:
parent
df3a938548
commit
58f02b5eec
@ -193,12 +193,13 @@ public class DatasetTableFieldManage {
|
||||
List<DatasetTableFieldDTO> fields = selectByDatasetGroupId(id);
|
||||
Map<String, ColumnPermissionItem> desensitizationList = new HashMap<>();
|
||||
Long userId = AuthUtils.getUser() == null ? null : AuthUtils.getUser().getUserId();
|
||||
return permissionManage
|
||||
List<DatasetTableFieldDTO> tmp = permissionManage
|
||||
.filterColumnPermissions(fields, desensitizationList, id, userId)
|
||||
.stream()
|
||||
.filter(o -> !desensitizationList.containsKey(o.getDataeaseName()))
|
||||
.sorted(Comparator.comparing(DatasetTableFieldDTO::getGroupType))
|
||||
.toList();
|
||||
tmp.forEach(ele -> ele.setDesensitized(desensitizationList.containsKey(ele.getDataeaseName())));
|
||||
return tmp;
|
||||
}
|
||||
|
||||
|
||||
|
@ -15,6 +15,7 @@ export interface Field {
|
||||
extField: number
|
||||
checked: boolean
|
||||
fieldShortName: string
|
||||
desensitized: boolean
|
||||
}
|
||||
|
||||
export interface ComponentInfo {
|
||||
|
@ -836,8 +836,12 @@ defineExpose({
|
||||
:key="ele.id"
|
||||
:label="ele.name"
|
||||
:value="ele.id"
|
||||
:disabled="ele.desensitized"
|
||||
>
|
||||
<div
|
||||
class="flex-align-center icon"
|
||||
:title="ele.desensitized ? '脱敏字段,不能被设置为查询条件' : ''"
|
||||
>
|
||||
<div class="flex-align-center icon">
|
||||
<el-icon>
|
||||
<Icon
|
||||
:name="`field_${fieldType[ele.deType]}`"
|
||||
@ -986,8 +990,12 @@ defineExpose({
|
||||
:key="ele.id"
|
||||
:label="ele.name"
|
||||
:value="ele.id"
|
||||
:disabled="ele.desensitized"
|
||||
>
|
||||
<div
|
||||
class="flex-align-center icon"
|
||||
:title="ele.desensitized ? '脱敏字段,不能被设置为查询条件' : ''"
|
||||
>
|
||||
<div class="flex-align-center icon">
|
||||
<el-icon>
|
||||
<Icon
|
||||
:name="`field_${fieldType[ele.deType]}`"
|
||||
|
@ -121,4 +121,9 @@ public class DatasetTableFieldDTO implements Serializable {
|
||||
* 字段short name
|
||||
*/
|
||||
private String fieldShortName;
|
||||
|
||||
/**
|
||||
* 是否脱敏
|
||||
*/
|
||||
private Boolean desensitized;
|
||||
}
|
Loading…
Reference in New Issue
Block a user