Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
csbr-daop
/
fe-data-trusted-space
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
df370175
authored
2025-09-22 14:22:16 +0800
by
lihua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
去掉患者占总人口比的必填标识;L多样性字段支持选择所有字段
1 parent
b38321bc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
42 deletions
src/views/data_anonymization/anonTaskCreate.vue
src/views/data_anonymization/anonTaskStepTwo.vue
src/views/data_anonymization/anonTaskCreate.vue
View file @
df37017
...
...
@@ -112,7 +112,7 @@ const dataSelectInfoItems = ref([{
inputType
:
'scoreNumber'
,
decimalCnt
:
9
,
default
:
''
,
required
:
tru
e
,
required
:
fals
e
,
filterable
:
true
,
clearable
:
true
,
visible
:
true
,
...
...
@@ -177,7 +177,7 @@ const dataSelectInfoItems = ref([{
const
dataSelectInfoFormRules
=
ref
({
taskName
:
[
required
(
'请输入任务名称'
)],
dataSharingTypeCode
:
[
required
(
'请选择数据共享类型'
)],
patientPopulationRate
:
[
required
(
'请输入患者占总人口比'
)],
//
patientPopulationRate: [required('请输入患者占总人口比')],
dataSourceGuid
:
[
required
(
'请选择数据源'
)],
tableName
:
[
required
(
'请选择数据表'
)],
file
:
[{
...
...
src/views/data_anonymization/anonTaskStepTwo.vue
View file @
df37017
...
...
@@ -153,7 +153,7 @@ const ruleModelTableInfo = ref({
proxy
.
$openMessageBox
(
"此操作将永久删除, 是否继续?"
,
()
=>
{
let
fieldName
=
scope
.
row
.
fieldName
;
ruleModelTableInfo
.
value
.
data
.
splice
(
scope
.
$index
,
1
);
updatePrivacyFormFieldsOptions
(
fieldName
);
//
updatePrivacyFormFieldsOptions(fieldName);
// 同步去掉隐私模型设置中的字段。
proxy
.
$ElMessage
.
success
(
'删除成功'
);
},
()
=>
{
...
...
@@ -512,20 +512,14 @@ const drawerBtnClick = async (btn, info) => {
}
}
drawerInfo
.
value
.
visible
=
false
;
updatePrivacyFormFieldsOptions
(
changeFields
);
//
updatePrivacyFormFieldsOptions(changeFields);
}
}
/** 更新下拉选择字段的下拉列表,若是字段被删除,需要同步去掉下拉选择值。 */
const
updatePrivacyFormFieldsOptions
=
(
changeFields
)
=>
{
let
optionsList
=
ruleModelTableInfo
.
value
.
data
?.
map
(
v
=>
{
return
{
fieldName
:
v
.
fieldName
,
fieldChName
:
v
.
fieldChName
}
})
||
[];
privacyFormItems
.
value
[
2
].
children
[
0
].
options
=
optionsList
;
privacyFormItems
.
value
[
3
].
children
[
0
].
options
=
optionsList
;
privacyFormItems
.
value
[
2
].
children
[
0
].
options
=
props
.
fieldNameList
;
privacyFormItems
.
value
[
3
].
children
[
0
].
options
=
props
.
fieldNameList
;
let
formInline
=
privacyFormRef
.
value
?.
formInline
;
privacyFormItems
.
value
.
forEach
((
item
,
index
)
=>
{
item
.
default
=
formInline
[
item
.
field
];
...
...
@@ -814,10 +808,11 @@ const privacyFormItems: any = ref([{
type
:
'select'
,
placeholder
:
'请选择字段'
,
field
:
'ldFieldName'
,
options
:
[],
options
:
props
.
fieldNameList
||
[],
props
:
{
label
:
'fieldChName'
,
value
:
'fieldName'
label
:
'chName'
,
value
:
'enName'
,
disabled
:
false
},
default
:
''
,
filterable
:
true
,
...
...
@@ -861,10 +856,11 @@ const privacyFormItems: any = ref([{
placeholder
:
'请选择字段'
,
field
:
'tcFieldName'
,
default
:
''
,
options
:
[],
options
:
props
.
fieldNameList
||
[],
props
:
{
label
:
'fieldChName'
,
value
:
'fieldName'
label
:
'chName'
,
value
:
'enName'
,
disabled
:
false
},
filterable
:
true
,
clearable
:
true
,
...
...
@@ -1071,36 +1067,26 @@ const getStepTwoConfigInfo = async () => {
/** 字段改变,可能是切换了表,需要清空规则配置。判断 第一步到第二步时,如果字段列表中与字段脱敏规则中的字段不匹配,应清空,并同时清空T接近字段。 */
const
updateNextStepRules
=
()
=>
{
let
deleteFieldNames
:
string
[]
=
[];
ruleModelTableInfo
.
value
.
data
=
ruleModelTableInfo
.
value
.
data
.
filter
(
rule
=>
{
if
(
!
props
.
fieldNameList
?.
some
(
v
=>
v
.
enName
==
rule
.
fieldName
))
{
deleteFieldNames
.
push
(
rule
.
fieldName
);
return
false
;
}
return
true
;
});
if
(
deleteFieldNames
?.
length
)
{
let
optionsList
=
ruleModelTableInfo
.
value
.
data
?.
map
(
v
=>
{
return
{
fieldName
:
v
.
fieldName
,
fieldChName
:
v
.
fieldChName
}
})
||
[];
privacyFormItems
.
value
[
2
].
children
[
0
].
options
=
optionsList
;
privacyFormItems
.
value
[
3
].
children
[
0
].
options
=
optionsList
;
let
formInline
=
privacyFormRef
.
value
?.
formInline
;
privacyFormItems
.
value
.
forEach
((
item
,
index
)
=>
{
item
.
default
=
formInline
[
item
.
field
];
if
(
item
.
default
==
'Y'
)
{
item
.
children
?.
forEach
(
child
=>
{
child
.
default
=
formInline
[
child
.
field
];
if
((
child
.
field
==
'tcFieldName'
||
child
.
field
==
'ldFieldName'
)
&&
deleteFieldNames
.
includes
(
child
.
default
))
{
child
.
default
=
''
}
});
}
})
}
privacyFormItems
.
value
[
2
].
children
[
0
].
options
=
props
.
fieldNameList
;
privacyFormItems
.
value
[
3
].
children
[
0
].
options
=
props
.
fieldNameList
;
let
formInline
=
privacyFormRef
.
value
?.
formInline
;
privacyFormItems
.
value
.
forEach
((
item
,
index
)
=>
{
item
.
default
=
formInline
[
item
.
field
];
if
(
item
.
default
==
'Y'
)
{
item
.
children
?.
forEach
(
child
=>
{
child
.
default
=
formInline
[
child
.
field
];
if
((
child
.
field
==
'tcFieldName'
||
child
.
field
==
'ldFieldName'
)
&&
!
props
.
fieldNameList
.
some
(
f
=>
f
.
enName
==
child
.
default
))
{
child
.
default
=
''
}
});
}
})
}
defineExpose
({
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment