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
3f7f827b
authored
2025-08-27 15:35:00 +0800
by
lihua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix
1 parent
f4d92393
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
87 additions
and
48 deletions
src/api/modules/dataAnonymization.ts
src/assets/images/csv.png
src/components/Form/index.vue
src/views/data_anonymization/resultProcess.vue
src/views/data_anonymization/sensitiveIdentify.vue
src/views/data_anonymization/sensitiveIdentifyConfig.vue
src/views/data_asset/components/deliverUploadDialog.vue
src/views/data_product/productListingDetail.vue
src/api/modules/dataAnonymization.ts
View file @
3f7f827
...
...
@@ -197,4 +197,20 @@ export const getSensitiveDataTaskExecLog = (params) => request({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_ANONYMIZATION_BASEURL
}
/sensitive-data-task/get-exec-sensitive-exec-log`
,
method
:
'post'
,
data
:
params
})
/** ---------- 匿名化处理 ------------------ */
/** 获取匿名化任务列表 */
export
const
getAnonTaskList
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_ANONYMIZATION_BASEURL
}
/anon-task/page-list`
,
method
:
'post'
,
data
:
params
})
/** 删除匿名化任务 */
export
const
deleteAnonTask
=
(
data
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_ANONYMIZATION_BASEURL
}
/anon-task/delete`
,
method
:
'delete'
,
data
})
\ No newline at end of file
...
...
src/assets/images/csv.png
0 → 100644
View file @
3f7f827
2.46 KB
src/components/Form/index.vue
View file @
3f7f827
...
...
@@ -1415,6 +1415,10 @@ const panelChange = (scope, row) => {
<img
class=
"file-img"
src=
"../../assets/images/excel.png"
/>
</
template
>
<
template
v-if=
"file?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() === 'csv'"
>
<img
class=
"file-img"
src=
"../../assets/images/csv.png"
/>
</
template
>
<
template
v-else-if=
"file?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() === 'doc' || file?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() === 'docx'"
>
<img
class=
"file-img"
src=
"../../assets/images/word.png"
/>
</
template
>
...
...
src/views/data_anonymization/resultProcess.vue
View file @
3f7f827
...
...
@@ -7,7 +7,9 @@ import TableTools from "@/components/Tools/table_tools.vue";
import
{
commonPageConfig
}
from
'@/components/PageNav/index'
;
import
{
TableColumnWidth
}
from
"@/utils/enum"
;
import
{
dataSourceTypeList
dataSourceTypeList
,
getAnonTaskList
,
deleteAnonTask
,
}
from
'@/api/modules/dataAnonymization'
;
import
{
useValidator
}
from
'@/hooks/useValidator'
;
...
...
@@ -46,7 +48,7 @@ const tableInfo = ref({
{
label
:
"序号"
,
type
:
"index"
,
width
:
TableColumnWidth
.
INDEX
,
align
:
"center"
},
{
label
:
"任务名称"
,
field
:
"taskName"
,
width
:
160
},
{
label
:
"数据来源"
,
field
:
"dataSource"
,
width
:
1
2
0
,
getName
:
(
scope
)
=>
{
label
:
"数据来源"
,
field
:
"dataSource"
,
width
:
1
0
0
,
getName
:
(
scope
)
=>
{
return
scope
.
row
.
dataSource
&&
dataSourceTypeList
.
find
(
f
=>
f
.
value
==
scope
.
row
.
dataSource
)?.
label
||
'--'
;
}
},
...
...
@@ -65,29 +67,29 @@ const tableInfo = ref({
actionInfo
:
{
label
:
"操作"
,
type
:
"btn"
,
width
:
304
,
width
:
180
,
fixed
:
'right'
,
btns
:
(
scope
)
=>
{
return
[{
label
:
'敏感数据查看'
,
value
:
'view'
,
disabled
:
scope
.
row
.
status
!=
'Y'
,
click
:
(
scope
)
=>
{
router
.
push
({
name
:
'sensitiveIdentifyConfig'
,
query
:
{
guid
:
scope
.
row
.
guid
,
execGuid
:
scope
.
row
.
execGuid
,
taskName
:
scope
.
row
.
taskName
}
});
}
},
{
return
[
{
label
:
"编辑"
,
value
:
"edit"
,
disabled
:
scope
.
row
.
status
==
'R'
,
click
:
(
scope
)
=>
{
}
},
{
label
:
'查看数据'
,
value
:
'view'
,
disabled
:
scope
.
row
.
status
!=
'Y'
,
click
:
(
scope
)
=>
{
// router.push({
// name: 'sensitiveIdentifyConfig',
// query: {
// guid: scope.row.guid,
// execGuid: scope.row.execGuid,
// taskName: scope.row.taskName
// }
// });
}
},
{
label
:
"删除"
,
value
:
"delete"
,
disabled
:
scope
.
row
.
status
==
'R'
,
click
:
(
scope
)
=>
{
proxy
.
$openMessageBox
(
"此操作将永久删除, 是否继续?"
,
()
=>
{
let
guids
=
[
scope
.
row
.
guid
];
delete
SensitiveData
Task
(
guids
).
then
((
res
:
any
)
=>
{
delete
Anon
Task
(
guids
).
then
((
res
:
any
)
=>
{
if
(
res
?.
code
==
proxy
.
$passCode
)
{
getTableData
();
proxy
.
$ElMessage
({
...
...
@@ -122,7 +124,7 @@ const toSearch = (val: any, clear: boolean = false) => {
const
getTableData
=
()
=>
{
tableInfo
.
value
.
loading
=
true
get
SensitiveData
TaskList
({
get
Anon
TaskList
({
pageIndex
:
page
.
value
.
curr
,
pageSize
:
page
.
value
.
limit
,
taskName
:
page
.
value
.
taskName
,
...
...
src/views/data_anonymization/sensitiveIdentify.vue
View file @
3f7f827
...
...
@@ -52,17 +52,17 @@ const tableInfo = ref({
id
:
'data-file-table'
,
fields
:
[
{
label
:
"序号"
,
type
:
"index"
,
width
:
TableColumnWidth
.
INDEX
,
align
:
"center"
},
{
label
:
"任务名称"
,
field
:
"taskName"
,
width
:
1
6
0
},
{
label
:
"任务名称"
,
field
:
"taskName"
,
width
:
1
7
0
},
{
label
:
"数据来源"
,
field
:
"dataSource"
,
width
:
1
2
0
,
getName
:
(
scope
)
=>
{
label
:
"数据来源"
,
field
:
"dataSource"
,
width
:
1
0
0
,
getName
:
(
scope
)
=>
{
return
scope
.
row
.
dataSource
&&
dataSourceTypeList
.
find
(
f
=>
f
.
value
==
scope
.
row
.
dataSource
)?.
label
||
'--'
;
}
},
{
label
:
"任务状态"
,
field
:
"sensitiveIdentifyTaskStatus"
,
width
:
TableColumnWidth
.
STATE
,
align
:
'center'
,
type
:
"tag"
},
{
label
:
"执行人"
,
field
:
"execUserName"
,
width
:
TableColumnWidth
.
USERNAME
},
{
label
:
"执行时间"
,
field
:
"execTime"
,
width
:
TableColumnWidth
.
DATETIME
},
{
label
:
"修改人"
,
field
:
"updateUserName"
,
width
:
TableColumnWidth
.
USERNAME
},
{
label
:
"修改时间"
,
field
:
"updateTime"
,
width
:
TableColumnWidth
.
DATETIME
},
{
label
:
"执行人"
,
field
:
"execUserName"
,
width
:
100
},
{
label
:
"执行时间"
,
field
:
"execTime"
,
width
:
170
},
{
label
:
"修改人"
,
field
:
"updateUserName"
,
width
:
100
},
{
label
:
"修改时间"
,
field
:
"updateTime"
,
width
:
170
},
],
data
:
[],
page
:
{
...
...
src/views/data_anonymization/sensitiveIdentifyConfig.vue
View file @
3f7f827
...
...
@@ -66,6 +66,7 @@ const nodeClick = (data, node) => {
pageInfo
.
value
.
databaseName
=
data
.
databaseName
;
pageInfo
.
value
.
tableName
=
''
;
}
pageInfo
.
value
.
curr
=
1
;
getSensitiveTableFieldData
();
getCntSumInfo
();
getSensitiveFieldLabelData
();
...
...
@@ -151,7 +152,7 @@ const getExecSensitiveTableData = () => {
d
.
value
=
`
${
d
.
databaseName
}
-ds`
;
//解决文件名称和文件的sheet名称一样的树形选中问题
d
.
label
=
d
.
databaseChName
;
d
.
tableList
=
d
.
tableList
?.
map
(
t
=>
{
t
.
value
=
t
.
tableName
;
t
.
value
=
`
${
d
.
databaseName
}
-
${
t
.
tableName
}
`
;
t
.
label
=
t
.
tableChName
;
t
.
parent
=
d
.
databaseName
;
return
t
;
...
...
@@ -546,16 +547,16 @@ const cntLabelMap = ref({
</div>
<div
class=
"main_wrap"
:style=
"
{ height: isLook ? '100%' : 'calc(100% - 40px)' }">
<div
class=
"table_tool_wrap"
>
<div
class=
"cnt-desc"
>
{{
'表总数:'
+
changeNum
(
cntSumInfo
.
tableNum
||
0
,
0
)
+
'张 字段总数:'
+
changeNum
(
cntSumInfo
.
fieldNum
||
0
,
0
)
+
'个 敏感表总数:'
+
changeNum
(
cntSumInfo
.
sensitiveTableNum
||
0
,
0
)
+
'张 敏感字段总数:'
+
changeNum
(
cntSumInfo
.
sensitiveFieldNum
||
0
,
0
)
+
'个,其中'
+
labelTypeList
?.
map
(
l
=>
`${l.label
}
${changeNum(cntSumInfo[cntLabelMap[l.value]] || 0,
0)
}
个`
).
join
(
','
)
+
',非敏感'
+
changeNum
(
cntSumInfo
[
'nonSensitiveNum'
]
||
0
,
0
)
+
'个'
}}
<
/div
>
<
div
class
=
"tools_btns"
>
<
el
-
button
v
-
if
=
"!isLook"
type
=
"primary"
@
click
=
"batchConfirm"
>
批量确认
<
/el-button
>
<div
v-show=
"!sensitiveTableDataLoading"
class=
"cnt-desc"
>
{{
'表总数:'
+
changeNum
(
cntSumInfo
.
tableNum
||
0
,
0
)
+
'张 字段总数:'
+
changeNum
(
cntSumInfo
.
fieldNum
||
0
,
0
)
+
'个 敏感表总数:'
+
changeNum
(
cntSumInfo
.
sensitiveTableNum
||
0
,
0
)
+
'张 敏感字段总数:'
+
changeNum
(
cntSumInfo
.
sensitiveFieldNum
||
0
,
0
)
+
'个,其中'
+
labelTypeList
?.
map
(
l
=>
`${l.label
}
${changeNum(cntSumInfo[cntLabelMap[l.value]] || 0,
0)
}
个`
).
join
(
','
)
+
',非敏感'
+
changeNum
(
cntSumInfo
[
'nonSensitiveNum'
]
||
0
,
0
)
+
'个'
}}
<
/div
>
<
/div
>
<
/div
>
<
div
class
=
"table_panel_wrap"
>
...
...
@@ -570,6 +571,13 @@ const cntLabelMap = ref({
<el-table-column type="
selection
" v-if="
!
isLook
" :selectable="
sensitiveTableSelectable
" :width="
32
"
align="
center
" />
<el-table-column label="
序号
" type="
index
" width="
56
px
" align="
center
" show-overflow-tooltip>
<template #default="
scope
"
>
<
span
>
{{
pageInfo
.
curr
!==
undefined
?
(
pageInfo
.
curr
-
1
)
*
pageInfo
.
limit
+
scope
.
$index
+
1
:
scope
.
$index
+
1
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"字段中文名"
prop
=
"fieldChName"
width
=
"160"
align
=
"left"
show
-
overflow
-
tooltip
>
<
template
#
default
=
"scope"
>
...
...
@@ -589,12 +597,12 @@ const cntLabelMap = ref({
@
popverBtnClick
=
"handleLabelPopoverClick"
/>
<
/template
>
<
template
#
default
=
"scope"
>
<
el
-
select
-
v2
v
-
if
=
"scope.row['isEdit']"
v
-
model
=
"scope.row['labelGuid']"
filterable
popper
-
class
=
"el-select-v2-popper"
:
options
=
"allDataLabelList"
placeholder
=
"请选择"
clearable
:
props
=
"
{
value
:
'guid'
,
label
:
'labelName'
}
"
@change="
(
val
)
=>
handleSelectChange
(
val
,
scope
)
">
<
el
-
select
-
v2
v
-
if
=
"scope.row['isEdit']"
v
-
model
=
"scope.row['labelGuid']"
filterable
popper
-
class
=
"el-select-v2-popper"
:
options
=
"allDataLabelList"
placeholder
=
"请选择"
clearable
:
props
=
"
{
value
:
'guid'
,
label
:
'labelName'
}
"
@change="
(
val
)
=>
handleSelectChange
(
val
,
scope
)
">
<template #default="
{
item
}
">
<ellipsis-tooltip :content="
item
.
labelName
??
''
" class-name="
w100f
"
:refName="
'tooltipOver'
+
item
.
guid
"
><
/ellipsis-tooltip
>
<ellipsis-tooltip :content="
item
.
labelName
??
''
" class-name="
w100f
"
:refName="
'tooltipOver'
+
item
.
guid
"
><
/ellipsis-tooltip
>
<
/template
>
<
/el-select-v2
>
<
span
v
-
else
>
{{
scope
.
row
[
"labelName"
]
||
'--'
}}
<
/span
>
...
...
@@ -656,15 +664,21 @@ const cntLabelMap = ref({
.
table_tool_wrap
{
display
:
flex
;
flex
-
direction
:
column
;
.
cnt
-
desc
{
line
-
height
:
2
1
px
;
line
-
height
:
2
4
px
;
white
-
space
:
break
-
spaces
;
margin
-
top
:
4
px
;
}
}
.
tools_btns
{
padding
-
top
:
0
px
;
}
.
table_panel_wrap
{
height
:
calc
(
100
%
-
70
px
);
height
:
calc
(
100
%
-
91
px
);
}
.
bottom_tool_wrap
{
...
...
@@ -700,15 +714,6 @@ const cntLabelMap = ref({
}
}
.
tools_btns
{
display
:
flex
;
align
-
items
:
center
;
.
el
-
button
{
margin
-
right
:
8
px
;
}
}
:
deep
(.
filter
-
cell
)
{
.
cell
{
position
:
relative
;
...
...
src/views/data_asset/components/deliverUploadDialog.vue
View file @
3f7f827
...
...
@@ -46,6 +46,10 @@
v-if=
"file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'xls' || file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'xlsx'"
>
<img
class=
"file-img"
src=
"../../../assets/images/excel.png"
/>
</
template
>
<
template
v-if=
"file?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() === 'csv'"
>
<img
class=
"file-img"
src=
"../../assets/images/csv.png"
/>
</
template
>
<
template
v-else-if=
"file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'doc' || file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'docx'"
>
<img
class=
"file-img"
src=
"../../../assets/images/word.png"
/>
...
...
src/views/data_product/productListingDetail.vue
View file @
3f7f827
...
...
@@ -1989,6 +1989,10 @@ const rejectDialogBtnClick = (btn, info) => {
v-if=
"flowDetail.productPic.name.substring(flowDetail.productPic.name.lastIndexOf('.') + 1).toLowerCase() == 'xls' || flowDetail.productPic.name.substring(flowDetail.productPic.name.lastIndexOf('.') + 1).toLowerCase() == 'xlsx' || flowDetail.productPic.name.substring(flowDetail.productPic.name.lastIndexOf('.') + 1).toLowerCase() == 'csv'"
>
<img
class=
"file-img"
src=
"../../assets/images/excel.png"
/>
</
template
>
<
template
v-if=
"flowDetail.productPic.name.substring(flowDetail.productPic.name.lastIndexOf('.') + 1).toLowerCase() === 'csv'"
>
<img
class=
"file-img"
src=
"../../assets/images/csv.png"
/>
</
template
>
<
template
v-else-if=
"flowDetail.productPic.name.substring(flowDetail.productPic.name.lastIndexOf('.') + 1).toLowerCase() == 'doc' || flowDetail.productPic.name.substring(flowDetail.productPic.name.lastIndexOf('.') + 1).toLowerCase() == 'docx'"
>
<img
class=
"file-img"
src=
"../../assets/images/word.png"
/>
...
...
@@ -2038,6 +2042,10 @@ const rejectDialogBtnClick = (btn, info) => {
v-if=
"flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() == 'xls' || flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() == 'xlsx' || flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() == 'csv'"
>
<img
class=
"file-img"
src=
"../../assets/images/excel.png"
/>
</
template
>
<
template
v-if=
"flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() === 'csv'"
>
<img
class=
"file-img"
src=
"../../assets/images/csv.png"
/>
</
template
>
<
template
v-else-if=
"flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() == 'doc' || flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() == 'docx'"
>
<img
class=
"file-img"
src=
"../../assets/images/word.png"
/>
...
...
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