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
46b742d3
Commit
46b742d3
authored
Nov 06, 2024
by
baiyinhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
审计日志 假数据删除和批量删除功能
parent
8d477263
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
9 deletions
+57
-9
index.vue
src/views/auditLog/index.vue
+57
-9
No files found.
src/views/auditLog/index.vue
View file @
46b742d3
...
@@ -17,6 +17,16 @@
...
@@ -17,6 +17,16 @@
// label: '编22222222222辑',
// label: '编22222222222辑',
onClick: handleEdit.bind(null, record),
onClick: handleEdit.bind(null, record),
},
},
{
icon: 'ant-design:delete-outlined',
// label: '删2222222222222222除',
color: 'error',
popConfirm: {
title: '是否确认删除',
placement: 'left',
confirm: handleDelete.bind(null, record),
},
},
]"
]"
/>
/>
</
template
>
</
template
>
...
@@ -91,10 +101,12 @@
...
@@ -91,10 +101,12 @@
const
filterStore
=
useFilterStore
();
const
filterStore
=
useFilterStore
();
const
route
=
useRoute
();
const
route
=
useRoute
();
const
{
createMessage
}
=
useMessage
();
const
{
createMessage
}
=
useMessage
();
const
tableData
=
ref
([]);
const
tableDatatab2
=
ref
([]);
const
[
registerDrawer
,
{
openDrawer
}]
=
useDrawer
();
const
[
registerDrawer
,
{
openDrawer
}]
=
useDrawer
();
const
[
registerModal
,
{
openModal
}]
=
useModal
();
const
[
registerModal
,
{
openModal
}]
=
useModal
();
const
[
registerModalEmail
,
{
openModal
:
openModalEmail
}]
=
useModal
();
const
[
registerModalEmail
,
{
openModal
:
openModalEmail
}]
=
useModal
();
const
[
registerTable
,
{
reload
,
getForm
}]
=
useTable
({
const
[
registerTable
,
{
reload
,
getForm
,
getRowSelection
}]
=
useTable
({
title
:
'审计日志'
,
title
:
'审计日志'
,
api
:
async
(
params
)
=>
{
api
:
async
(
params
)
=>
{
console
.
log
(
'params'
,
params
);
console
.
log
(
'params'
,
params
);
...
@@ -129,7 +141,10 @@
...
@@ -129,7 +141,10 @@
fixed
:
undefined
,
fixed
:
undefined
,
},
},
});
});
const
[
registerTable2
,
{
reload
:
reload2
,
getForm
:
getForm2
}]
=
useTable
({
const
[
registerTable2
,
{
reload
:
reload2
,
getForm
:
getForm2
,
getRowSelection
:
getRowSelection2
},
]
=
useTable
({
title
:
'通知规则名称'
,
title
:
'通知规则名称'
,
api
:
async
(
params
)
=>
{
api
:
async
(
params
)
=>
{
console
.
log
(
'params'
,
params
);
console
.
log
(
'params'
,
params
);
...
@@ -208,18 +223,50 @@
...
@@ -208,18 +223,50 @@
});
});
}
}
/**删除按钮*/
/** 删除按钮*/
async
function
handleDelete
(
record
:
Recordable
)
{
function
handleDelete
(
record
:
Recordable
)
{
await
deleteById
(
record
.
businessId
);
tableData
.
value
.
splice
(
tableData
.
value
.
findIndex
((
item
)
=>
item
.
businessId
===
record
.
businessId
),
1
,
);
createMessage
.
success
(
'删除成功!'
);
createMessage
.
success
(
'删除成功!'
);
await
reload
();
reload
();
}
}
/**tab2删除按钮*/
/**tab2删除按钮*/
async
function
handleDeletetab2
(
record
:
Recordable
)
{
await
deleteById
(
record
.
businessId
);
function
handleDeletetab2
(
record
:
Recordable
)
{
tableDatatab2
.
value
.
splice
(
tableDatatab2
.
value
.
findIndex
((
item
)
=>
item
.
businessId
===
record
.
businessId
),
1
,
);
createMessage
.
success
(
'删除成功!'
);
createMessage
.
success
(
'删除成功!'
);
await
reload2
();
reload2
();
}
/**批量删除*/
function
handleDeleteBatch
()
{
const
rowSelection
=
getRowSelection
().
selectedRowKeys
;
for
(
let
i
=
0
;
i
<
rowSelection
.
length
;
i
++
)
{
tableData
.
value
.
splice
(
tableData
.
value
.
findIndex
((
item
)
=>
item
.
businessId
===
rowSelection
[
i
]),
1
,
);
}
createMessage
.
success
(
'删除成功!'
);
reload
();
}
/**批量删除tab2*/
function
handleDeleteBatch2
()
{
const
rowSelection
=
getRowSelection2
().
selectedRowKeys
;
for
(
let
i
=
0
;
i
<
rowSelection
.
length
;
i
++
)
{
tableDatatab2
.
value
.
splice
(
tableDatatab2
.
value
.
findIndex
((
item
)
=>
item
.
businessId
===
rowSelection
[
i
]),
1
,
);
}
createMessage
.
success
(
'删除成功!'
);
reload2
();
}
}
function
handleSuccess
()
{
function
handleSuccess
()
{
...
@@ -231,6 +278,7 @@
...
@@ -231,6 +278,7 @@
/**进入页面的初始化方法 getForm2是给tab2用的*/
/**进入页面的初始化方法 getForm2是给tab2用的*/
onMounted
(()
=>
{
onMounted
(()
=>
{
tableData
.
value
=
tableListtab1
;
const
path
=
route
.
path
;
const
path
=
route
.
path
;
if
(
filterStore
.
getSearchParams
[
path
])
{
if
(
filterStore
.
getSearchParams
[
path
])
{
if
(
JSON
.
parse
(
filterStore
.
getSearchParams
[
path
]
!==
{}))
{
if
(
JSON
.
parse
(
filterStore
.
getSearchParams
[
path
]
!==
{}))
{
...
...
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