Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bigDataSystem
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张伯涛
bigDataSystem
Commits
8cf70f69
Commit
8cf70f69
authored
Nov 06, 2024
by
张伯涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
部分修改
parent
b8395aa0
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
241 additions
and
58 deletions
+241
-58
index.vue
src/views/dataSecurity/desensitizationAlgorithm/index.vue
+4
-2
mock.ts
src/views/dataSecurity/desensitizationAlgorithm/mock.ts
+8
-9
importModal.vue
src/views/dataSecurity/protectionRules/importModal.vue
+81
-0
index.vue
src/views/dataSecurity/protectionRules/index.vue
+12
-4
mock.ts
src/views/dataSecurity/protectionRules/mock.ts
+7
-14
index.vue
src/views/dataSecurity/sensitiveRules/index.vue
+5
-3
mock.ts
src/views/dataSecurity/sensitiveRules/mock.ts
+7
-18
importModal.vue
src/views/dataSecurity/sensitiveType/importModal.vue
+88
-0
index.vue
src/views/dataSecurity/sensitiveType/index.vue
+20
-8
mock.ts
src/views/dataSecurity/sensitiveType/mock.ts
+9
-0
No files found.
src/views/dataSecurity/desensitizationAlgorithm/index.vue
View file @
8cf70f69
...
...
@@ -2,6 +2,7 @@
<PageWrapper
dense
contentFullHeight
fixedHeight
contentClass=
"flex"
>
<BasicTable
@
register=
"registerTable"
:searchInfo=
"searchInfo"
>
<template
#
toolbar
>
<a-button
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
type=
"primary"
@
click=
"handleExport"
>
删除
</a-button>
<a-button
type=
"primary"
@
click=
"handleCreate"
>
新增
</a-button>
</
template
>
<
template
#
bodyCell=
"{ column, record }"
>
...
...
@@ -54,7 +55,7 @@ const [registerModal, { openModal }] = useModal();
const
[
registerResetPassword
,
{
openModal
:
openResetPasswordModal
}]
=
useModal
();
const
[
registerImport
,
{
openModal
:
openImportModal
}]
=
useModal
();
const
searchInfo
=
reactive
<
Recordable
>
({});
const
[
registerTable
,
{
reload
,
updateTableDataRecord
,
getSearchInfo
,
getForm
}]
=
useTable
({
const
[
registerTable
,
{
reload
,
updateTableDataRecord
,
getSearchInfo
,
getForm
,
getRowSelection
}]
=
useTable
({
title
:
'脱敏算法'
,
api
:
async
(
params
)
=>
{
console
.
log
(
params
)
...
...
@@ -70,7 +71,8 @@ const [registerTable, { reload, updateTableDataRecord, getSearchInfo, getForm }]
return
{
...
response
};
},
rowKey
:
'id'
,
rowKey
:
'businessId'
,
rowSelection
:
true
,
columns
,
formConfig
:
{
labelWidth
:
10
,
...
...
src/views/dataSecurity/desensitizationAlgorithm/mock.ts
View file @
8cf70f69
...
...
@@ -2,6 +2,7 @@
export
const
tableList
:
any
[]
=
[
{
businessId
:
1
,
"name"
:
"Blur"
,
"functionName"
:
"blur"
,
"algorithmDes"
:
"将整数或小数混淆..."
,
...
...
@@ -11,6 +12,7 @@ export const tableList: any[] = [
"updateDate"
:
"2024-10-24 10:04:04"
,
},
{
businessId
:
2
,
"name"
:
"random"
,
"functionName"
:
"random"
,
"algorithmDes"
:
"返回一个介于x和y..."
,
...
...
@@ -20,6 +22,7 @@ export const tableList: any[] = [
"updateDate"
:
"2024-10-24 10:04:04"
,
},
{
businessId
:
3
,
"name"
:
"Blur"
,
"functionName"
:
"blur"
,
"algorithmDes"
:
"将整数或小数混淆..."
,
...
...
@@ -29,6 +32,7 @@ export const tableList: any[] = [
"updateDate"
:
"2024-10-24 10:04:04"
,
},
{
businessId
:
4
,
"name"
:
"random"
,
"functionName"
:
"random"
,
"algorithmDes"
:
"返回一个介于x和y..."
,
...
...
@@ -38,6 +42,7 @@ export const tableList: any[] = [
"updateDate"
:
"2024-10-24 10:04:04"
,
},
{
businessId
:
5
,
"name"
:
"Blur"
,
"functionName"
:
"blur"
,
"algorithmDes"
:
"将整数或小数混淆..."
,
...
...
@@ -47,6 +52,7 @@ export const tableList: any[] = [
"updateDate"
:
"2024-10-24 10:04:04"
,
},
{
businessId
:
6
,
"name"
:
"random"
,
"functionName"
:
"random"
,
"algorithmDes"
:
"返回一个介于x和y..."
,
...
...
@@ -56,6 +62,7 @@ export const tableList: any[] = [
"updateDate"
:
"2024-10-24 10:04:04"
,
},
{
businessId
:
7
,
"name"
:
"Blur"
,
"functionName"
:
"blur"
,
"algorithmDes"
:
"将整数或小数混淆..."
,
...
...
@@ -64,13 +71,5 @@ export const tableList: any[] = [
"createDate"
:
"2024-10-24 10:04:04"
,
"updateDate"
:
"2024-10-24 10:04:04"
,
},
{
"name"
:
"random"
,
"functionName"
:
"random"
,
"algorithmDes"
:
"返回一个介于x和y..."
,
"source"
:
"自定义"
,
"owner"
:
"admin"
,
"createDate"
:
"2024-10-24 10:04:04"
,
"updateDate"
:
"2024-10-24 10:04:04"
,
},
]
src/views/dataSecurity/protectionRules/importModal.vue
0 → 100644
View file @
8cf70f69
<
template
>
<BasicModal
min-height=
"100"
width=
"30%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
<div
class=
"modalBody"
>
<div
class=
"title"
>
导入文件选择
</div>
<a-button
style=
"margin-right: 10px"
>
下载模板
</a-button>
<a-button
style=
"margin-right: 10px"
type=
"primary"
>
选择
</a-button>
<div
style=
"width: 200px"
>
只能导入单个Excel文件,且单次导入不超过100000条数据
</div>
</div>
</BasicModal>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
Radio
,
RadioGroup
}
from
'ant-design-vue'
import
{
ref
,
computed
,
unref
,
reactive
}
from
'vue'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
// import { formSchema } from './gradingResults.data';
import
Icon
from
'@/components/Icon/Icon.vue'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
defineOptions
({
name
:
'AccountModal'
});
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
createMessage
}
=
useMessage
();
const
isUpdate
=
ref
(
true
);
const
rowId
=
ref
(
''
);
const
value
=
ref
<
string
>
(
'1'
);
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
lg
:
24
,
md
:
24
},
// schemas: formSchema,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
resetFields
();
setModalProps
({
confirmLoading
:
false
});
isUpdate
.
value
=
!!
data
?.
isUpdate
;
if
(
unref
(
isUpdate
))
{
// 通过id获取行详情信息
// 塞值
setFieldsValue
({
...
data
.
record
,
});
}
});
const
getTitle
=
computed
(()
=>
(
'分类分级导入'
));
async
function
handleSubmit
()
{
try
{
const
values
=
await
validate
();
setModalProps
({
confirmLoading
:
true
});
// TODO custom api
closeModal
();
emit
(
'success'
,
{
isUpdate
:
unref
(
isUpdate
),
values
:
{
...
values
,
id
:
rowId
.
value
}
});
}
finally
{
setModalProps
({
confirmLoading
:
false
});
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.modalBody
{
display
:
flex
;
align-items
:
center
;
.title
{
padding-right
:
15px
;
}
}
</
style
>
src/views/dataSecurity/protectionRules/index.vue
View file @
8cf70f69
...
...
@@ -2,9 +2,10 @@
<PageWrapper
dense
contentFullHeight
fixedHeight
contentClass=
"flex"
>
<BasicTable
@
register=
"registerTable"
:searchInfo=
"searchInfo"
>
<template
#
toolbar
>
<a-button
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
type=
"primary"
@
click=
"handleExport"
>
删除
</a-button>
<a-button
type=
"primary"
@
click=
"handleCreate"
>
新增
</a-button>
<a-button
type=
"primary"
@
click=
"handleImport"
>
导入
</a-button>
<a-button
type=
"primary"
@
click=
"handleExport"
>
导出
</a-button>
<a-button
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
type=
"primary"
@
click=
"handleExport"
>
导出
</a-button>
</
template
>
<
template
#
bodyCell=
"{ column, record }"
>
<template
v-if=
"column.key === 'action'"
>
...
...
@@ -33,6 +34,7 @@
</template>
</BasicTable>
<protectionRulesModal
@
register=
"registerModal"
@
success=
"handleSuccess"
/>
<importModal
@
register=
"registerImport"
@
success=
"handleImportSuccess"
/>
</PageWrapper>
</template>
<
script
lang=
"ts"
setup
>
...
...
@@ -42,7 +44,7 @@ import { PageWrapper } from '@/components/Page';
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
protectionRulesModal
from
'./protectionRulesModal.vue'
;
import
importModal
from
'./importModal.vue'
;
import
{
columns
,
searchFormSchema
}
from
'./protectionRules.data'
;
import
{
tableList
}
from
"./mock"
;
...
...
@@ -56,7 +58,7 @@ const [registerModal, { openModal }] = useModal();
const
[
registerResetPassword
,
{
openModal
:
openResetPasswordModal
}]
=
useModal
();
const
[
registerImport
,
{
openModal
:
openImportModal
}]
=
useModal
();
const
searchInfo
=
reactive
<
Recordable
>
({});
const
[
registerTable
,
{
reload
,
updateTableDataRecord
,
getSearchInfo
,
getForm
}]
=
useTable
({
const
[
registerTable
,
{
reload
,
updateTableDataRecord
,
getSearchInfo
,
getForm
,
getRowSelection
}]
=
useTable
({
title
:
'保护规则'
,
api
:
async
(
params
)
=>
{
console
.
log
(
'tableList'
,
tableList
)
...
...
@@ -72,7 +74,8 @@ const [registerTable, { reload, updateTableDataRecord, getSearchInfo, getForm }]
return
{
...
response
};
},
rowKey
:
'id'
,
rowKey
:
'businessId'
,
rowSelection
:
true
,
columns
,
formConfig
:
{
labelWidth
:
10
,
...
...
@@ -100,6 +103,11 @@ function handleCreate() {
isUpdate
:
false
,
});
}
function
handleImport
()
{
openImportModal
(
true
,
{
});
}
/** 编辑按钮*/
function
handleEdit
(
record
:
Recordable
)
{
openModal
(
true
,
{
...
...
src/views/dataSecurity/protectionRules/mock.ts
View file @
8cf70f69
...
...
@@ -3,6 +3,7 @@ import {TreeItem} from "@/components/Tree";
export
const
tableList
:
any
[]
=
[
{
businessId
:
1
,
"object"
:
"全部"
,
"sensitiveType"
:
"员工号(对外员工)"
,
"safetyLevel"
:
"G5"
,
...
...
@@ -10,6 +11,7 @@ export const tableList: any[] = [
"protectiveAction"
:
"放行"
,
},
{
businessId
:
2
,
"object"
:
"全部"
,
"sensitiveType"
:
"钱包类型"
,
"safetyLevel"
:
"G1"
,
...
...
@@ -17,6 +19,7 @@ export const tableList: any[] = [
"protectiveAction"
:
"放行"
,
},
{
businessId
:
3
,
"object"
:
"全部"
,
"sensitiveType"
:
"办公电话(对外员工)"
,
"safetyLevel"
:
"G4"
,
...
...
@@ -24,6 +27,7 @@ export const tableList: any[] = [
"protectiveAction"
:
"脱敏"
,
},
{
businessId
:
4
,
"object"
:
"全部"
,
"sensitiveType"
:
"员工号(对外员工)"
,
"safetyLevel"
:
"G5"
,
...
...
@@ -31,6 +35,7 @@ export const tableList: any[] = [
"protectiveAction"
:
"放行"
,
},
{
businessId
:
5
,
"object"
:
"全部"
,
"sensitiveType"
:
"钱包类型"
,
"safetyLevel"
:
"G1"
,
...
...
@@ -38,6 +43,7 @@ export const tableList: any[] = [
"protectiveAction"
:
"放行"
,
},
{
businessId
:
6
,
"object"
:
"全部"
,
"sensitiveType"
:
"办公电话(对外员工)"
,
"safetyLevel"
:
"G4"
,
...
...
@@ -45,26 +51,13 @@ export const tableList: any[] = [
"protectiveAction"
:
"脱敏"
,
},
{
businessId
:
7
,
"object"
:
"全部"
,
"sensitiveType"
:
"员工号(对外员工)"
,
"safetyLevel"
:
"G5"
,
"priority"
:
"中"
,
"protectiveAction"
:
"放行"
,
},
{
"object"
:
"全部"
,
"sensitiveType"
:
"钱包类型"
,
"safetyLevel"
:
"G1"
,
"priority"
:
"低"
,
"protectiveAction"
:
"放行"
,
},
{
"object"
:
"全部"
,
"sensitiveType"
:
"办公电话(对外员工)"
,
"safetyLevel"
:
"G4"
,
"priority"
:
"低"
,
"protectiveAction"
:
"脱敏"
,
},
]
...
...
src/views/dataSecurity/sensitiveRules/index.vue
View file @
8cf70f69
...
...
@@ -2,8 +2,9 @@
<PageWrapper
dense
contentFullHeight
fixedHeight
contentClass=
"flex"
>
<BasicTable
@
register=
"registerTable"
:searchInfo=
"searchInfo"
>
<template
#
toolbar
>
<a-button
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
type=
"primary"
@
click=
"handleExport"
>
删除
</a-button>
<a-button
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
type=
"primary"
@
click=
"handleExport"
>
导出
</a-button>
<a-button
type=
"primary"
@
click=
"handleCreate"
>
新增
</a-button>
<a-button
type=
"primary"
@
click=
"handleExport"
>
导出
</a-button>
</
template
>
<
template
#
bodyCell=
"{ column, record }"
>
<template
v-if=
"column.key === 'action'"
>
...
...
@@ -55,7 +56,7 @@ const [registerModal, { openModal }] = useModal();
const
[
registerResetPassword
,
{
openModal
:
openResetPasswordModal
}]
=
useModal
();
const
[
registerImport
,
{
openModal
:
openImportModal
}]
=
useModal
();
const
searchInfo
=
reactive
<
Recordable
>
({});
const
[
registerTable
,
{
reload
,
updateTableDataRecord
,
getSearchInfo
,
getForm
}]
=
useTable
({
const
[
registerTable
,
{
reload
,
updateTableDataRecord
,
getSearchInfo
,
getForm
,
getRowSelection
}]
=
useTable
({
title
:
'敏感规则'
,
api
:
async
(
params
)
=>
{
console
.
log
(
params
)
...
...
@@ -71,7 +72,8 @@ const [registerTable, { reload, updateTableDataRecord, getSearchInfo, getForm }]
return
{
...
response
};
},
rowKey
:
'id'
,
rowKey
:
'businessId'
,
rowSelection
:
true
,
columns
,
formConfig
:
{
labelWidth
:
10
,
...
...
src/views/dataSecurity/sensitiveRules/mock.ts
View file @
8cf70f69
...
...
@@ -2,6 +2,7 @@
export
const
tableList
:
any
[]
=
[
{
businessId
:
1
,
"name"
:
"ip地址"
,
"describe"
:
"-------"
,
"type"
:
"ip地址"
,
...
...
@@ -11,6 +12,7 @@ export const tableList: any[] = [
"updateDate"
:
"2024-10-24 10:04:04"
,
},
{
businessId
:
2
,
"name"
:
"军官证"
,
"describe"
:
"-------"
,
"type"
:
"军官证"
,
...
...
@@ -20,6 +22,7 @@ export const tableList: any[] = [
"updateDate"
:
"2024-10-24 10:04:04"
,
},
{
businessId
:
3
,
"name"
:
"手机号码(美国)"
,
"describe"
:
"-------"
,
"type"
:
"固定电话"
,
...
...
@@ -29,6 +32,7 @@ export const tableList: any[] = [
"updateDate"
:
"2024-10-24 10:04:04"
,
},
{
businessId
:
4
,
"name"
:
"ip地址"
,
"describe"
:
"-------"
,
"type"
:
"ip地址"
,
...
...
@@ -38,6 +42,7 @@ export const tableList: any[] = [
"updateDate"
:
"2024-10-24 10:04:04"
,
},
{
businessId
:
5
,
"name"
:
"军官证"
,
"describe"
:
"-------"
,
"type"
:
"军官证"
,
...
...
@@ -47,6 +52,7 @@ export const tableList: any[] = [
"updateDate"
:
"2024-10-24 10:04:04"
,
},
{
businessId
:
6
,
"name"
:
"手机号码(美国)"
,
"describe"
:
"-------"
,
"type"
:
"固定电话"
,
...
...
@@ -56,6 +62,7 @@ export const tableList: any[] = [
"updateDate"
:
"2024-10-24 10:04:04"
,
},
{
businessId
:
7
,
"name"
:
"ip地址"
,
"describe"
:
"-------"
,
"type"
:
"ip地址"
,
...
...
@@ -64,22 +71,4 @@ export const tableList: any[] = [
"createDate"
:
"2024-10-24 10:04:04"
,
"updateDate"
:
"2024-10-24 10:04:04"
,
},
{
"name"
:
"军官证"
,
"describe"
:
"-------"
,
"type"
:
"军官证"
,
"safetyLevel"
:
"G2"
,
"owner"
:
"admin"
,
"createDate"
:
"2024-10-24 10:04:04"
,
"updateDate"
:
"2024-10-24 10:04:04"
,
},
{
"name"
:
"手机号码(美国)"
,
"describe"
:
"-------"
,
"type"
:
"固定电话"
,
"safetyLevel"
:
"G3"
,
"owner"
:
"admin"
,
"createDate"
:
"2024-10-24 10:04:04"
,
"updateDate"
:
"2024-10-24 10:04:04"
,
},
]
src/views/dataSecurity/sensitiveType/importModal.vue
0 → 100644
View file @
8cf70f69
<
template
>
<BasicModal
min-height=
"100"
width=
"30%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
<div
class=
"modalBody"
>
<div
class=
"title"
>
导入文件选择
</div>
<a-button
style=
"margin-right: 10px"
>
下载模板
</a-button>
<a-button
style=
"margin-right: 10px"
type=
"primary"
>
选择
</a-button>
<div
style=
"width: 200px"
>
只能导入单个Excel文件,且单次导入不超过100000条数据
</div>
</div>
<div>
<span
style=
"padding-right: 20px"
>
敏感类型重名
</span>
<RadioGroup
v-model:value=
"value"
name=
"radioGroup"
>
<Radio
value=
"1"
>
全部放弃
</Radio>
<Radio
value=
"2"
>
全部替换
</Radio>
<Radio
value=
"3"
>
自动重命名
</Radio>
</RadioGroup>
</div>
</BasicModal>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
Radio
,
RadioGroup
}
from
'ant-design-vue'
import
{
ref
,
computed
,
unref
,
reactive
}
from
'vue'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
// import { formSchema } from './gradingResults.data';
import
Icon
from
'@/components/Icon/Icon.vue'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
defineOptions
({
name
:
'AccountModal'
});
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
createMessage
}
=
useMessage
();
const
isUpdate
=
ref
(
true
);
const
rowId
=
ref
(
''
);
const
value
=
ref
<
string
>
(
'1'
);
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
lg
:
24
,
md
:
24
},
// schemas: formSchema,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
resetFields
();
setModalProps
({
confirmLoading
:
false
});
isUpdate
.
value
=
!!
data
?.
isUpdate
;
if
(
unref
(
isUpdate
))
{
// 通过id获取行详情信息
// 塞值
setFieldsValue
({
...
data
.
record
,
});
}
});
const
getTitle
=
computed
(()
=>
(
'分类分级导入'
));
async
function
handleSubmit
()
{
try
{
const
values
=
await
validate
();
setModalProps
({
confirmLoading
:
true
});
// TODO custom api
closeModal
();
emit
(
'success'
,
{
isUpdate
:
unref
(
isUpdate
),
values
:
{
...
values
,
id
:
rowId
.
value
}
});
}
finally
{
setModalProps
({
confirmLoading
:
false
});
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.modalBody
{
display
:
flex
;
align-items
:
center
;
.title
{
padding-right
:
15px
;
}
}
</
style
>
src/views/dataSecurity/sensitiveType/index.vue
View file @
8cf70f69
<
template
>
<PageWrapper
dense
contentFullHeight
fixedHeight
contentClass=
"flex"
>
<BasicTable
@
register=
"registerTable"
:searchInfo=
"searchInfo"
>
<BasicTable
@
register=
"registerTable"
:searchInfo=
"searchInfo"
:rowSelection=
"rowSelection"
>
<template
#
toolbar
>
<a-button
type=
"primary"
@
click=
"handleCreate"
>
新增
</a-button>
<a-button
type=
"primary"
@
click=
"handleExport"
>
导出
</a-button>
<a-button
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
type=
"primary"
@
click=
"handleExport"
>
删除
</a-button>
<a-button
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
type=
"primary"
@
click=
"handleExport"
>
导出
</a-button>
<a-button
type=
"primary"
@
click=
"handleImport"
>
导入
</a-button>
<a-button
type=
"primary"
@
click=
"handleCreate"
>
新增
</a-button>
</
template
>
<
template
#
bodyCell=
"{ column, record }"
>
<template
v-if=
"column.key === 'action'"
>
...
...
@@ -33,16 +34,17 @@
</template>
</BasicTable>
<sensitiveTypeModal
@
register=
"registerModal"
@
success=
"handleSuccess"
/>
<importModal
@
register=
"registerImport"
@
success=
"handleImportSuccess"
/>
</PageWrapper>
</template>
<
script
lang=
"ts"
setup
>
import
{
reactive
,
onMounted
}
from
'vue'
;
import
{
reactive
,
onMounted
,
ref
}
from
'vue'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
PageWrapper
}
from
'@/components/Page'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
sensitiveTypeModal
from
'./sensitiveTypeModal.vue'
;
import
importModal
from
'./importModal.vue'
;
import
{
columns
,
searchFormSchema
}
from
'./sensitiveType.data'
;
import
{
tableList
}
from
"@/views/dataSecurity/sensitiveType/mock"
;
...
...
@@ -56,7 +58,7 @@ const [registerModal, { openModal }] = useModal();
const
[
registerResetPassword
,
{
openModal
:
openResetPasswordModal
}]
=
useModal
();
const
[
registerImport
,
{
openModal
:
openImportModal
}]
=
useModal
();
const
searchInfo
=
reactive
<
Recordable
>
({});
const
[
registerTable
,
{
reload
,
updateTableDataRecord
,
getSearchInfo
,
getForm
}]
=
useTable
({
const
[
registerTable
,
{
reload
,
updateTableDataRecord
,
getSearchInfo
,
getForm
,
getRowSelection
}]
=
useTable
({
title
:
'敏感类型'
,
api
:
async
(
params
)
=>
{
console
.
log
(
params
)
...
...
@@ -72,7 +74,8 @@ const [registerTable, { reload, updateTableDataRecord, getSearchInfo, getForm }]
return
{
...
response
};
},
rowKey
:
'id'
,
rowKey
:
'businessId'
,
rowSelection
:
true
,
columns
,
formConfig
:
{
labelWidth
:
120
,
...
...
@@ -96,6 +99,14 @@ const [registerTable, { reload, updateTableDataRecord, getSearchInfo, getForm }]
// slots: { customRender: 'action' },
},
});
function
handleImport
()
{
openImportModal
(
true
,
{
});
}
/** 新增按钮*/
function
handleCreate
()
{
openModal
(
true
,
{
...
...
@@ -113,7 +124,8 @@ function handleEdit(record: Recordable) {
/** 重置密码弹窗确定按钮*/
/** 删除按钮*/
function
handleDelete
(
record
:
Recordable
)
{
console
.
log
(
record
);
const
rowSelection
=
getRowSelection
().
selectedRowKeys
;
console
.
log
(
'11111111111'
,
rowSelection
);
createMessage
.
success
(
'删除成功!'
);
reload
();
}
...
...
src/views/dataSecurity/sensitiveType/mock.ts
View file @
8cf70f69
...
...
@@ -3,6 +3,7 @@
export
const
tableList
:
any
[]
=
[
{
"name"
:
"zc_fo"
,
businessId
:
309
,
"describe"
:
"-------"
,
"sort"
:
"G5"
,
"protectAction"
:
"Delete"
,
...
...
@@ -12,6 +13,7 @@ export const tableList: any[] = [
},
{
"name"
:
"血缘关系"
,
businessId
:
310
,
"describe"
:
"-------"
,
"sort"
:
"G4"
,
"protectAction"
:
"Mask"
,
...
...
@@ -21,6 +23,7 @@ export const tableList: any[] = [
},
{
"name"
:
"钱包类型"
,
businessId
:
311
,
"describe"
:
"-------"
,
"sort"
:
"G1"
,
"protectAction"
:
"Base64"
,
...
...
@@ -30,6 +33,7 @@ export const tableList: any[] = [
},
{
"name"
:
"zc_fo"
,
businessId
:
312
,
"describe"
:
"-------"
,
"sort"
:
"G5"
,
"protectAction"
:
"Delete"
,
...
...
@@ -39,6 +43,7 @@ export const tableList: any[] = [
},
{
"name"
:
"血缘关系"
,
businessId
:
313
,
"describe"
:
"-------"
,
"sort"
:
"G4"
,
"protectAction"
:
"Mask"
,
...
...
@@ -48,6 +53,7 @@ export const tableList: any[] = [
},
{
"name"
:
"钱包类型"
,
businessId
:
314
,
"describe"
:
"-------"
,
"sort"
:
"G1"
,
"protectAction"
:
"Base64"
,
...
...
@@ -57,6 +63,7 @@ export const tableList: any[] = [
},
{
"name"
:
"zc_fo"
,
businessId
:
315
,
"describe"
:
"-------"
,
"sort"
:
"G5"
,
"protectAction"
:
"Delete"
,
...
...
@@ -66,6 +73,7 @@ export const tableList: any[] = [
},
{
"name"
:
"血缘关系"
,
businessId
:
316
,
"describe"
:
"-------"
,
"sort"
:
"G4"
,
"protectAction"
:
"Mask"
,
...
...
@@ -75,6 +83,7 @@ export const tableList: any[] = [
},
{
"name"
:
"钱包类型"
,
businessId
:
317
,
"describe"
:
"-------"
,
"sort"
:
"G1"
,
"protectAction"
:
"Base64"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment