Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
罗鑫霖
/
vion-tools
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a3964c09
authored
May 07, 2024
by
Tianqing Liu
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat: 批量删除功能完成
1 parent
5b362a60
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
17 deletions
src/views/SnapshotCluster/ClusterResult/ClusterResult.vue
src/views/SnapshotCluster/ClusterResult/ClusterResultApi.js
src/views/SnapshotCluster/ClusterResult/ClusterResult.vue
View file @
a3964c0
...
...
@@ -146,14 +146,14 @@
<i
class=
"el-icon-arrow-right el-icon--right"
></i>
</el-button>
<!--批量子操作-->
<el-button
type=
"text"
:disabled=
"mutipleOperationDisabled"
@
click=
"movePersonRecord(person)"
>
移动
</el-button>
<el-button
type=
"text"
:disabled=
"mutipleOperationDisabled
|| !isCurrentGroup(person)
"
@
click=
"movePersonRecord(person)"
>
移动
</el-button>
<a-popconfirm
title=
"将从本组中剔除,您确认吗?"
ok-text=
"是"
cancel-text=
"否"
@
confirm=
"deletePersonRecord(person)"
>
<el-button
type=
"text"
:disabled=
"mutipleOperationDisabled"
>
剔除
</el-button>
<el-button
type=
"text"
:disabled=
"mutipleOperationDisabled
|| !isCurrentGroup(person)
"
>
剔除
</el-button>
</a-popconfirm>
<a-popconfirm
title=
"将彻底删除,您确认吗?"
...
...
@@ -161,7 +161,7 @@
cancel-text=
"否"
@
confirm=
"deleteRealPersonRecord(person)"
>
<el-button
type=
"text"
:disabled=
"mutipleOperationDisabled"
>
删除
</el-button>
<el-button
type=
"text"
:disabled=
"mutipleOperationDisabled
|| !isCurrentGroup(person)
"
>
删除
</el-button>
</a-popconfirm>
</div>
</div>
...
...
@@ -468,6 +468,8 @@ export default {
confirmSearch
()
}
const
handleRefresh
=
function
()
{
isMultipleOperation
.
value
=
false
currentMultipleGroupId
.
value
=
''
selectedPersonList
.
value
=
[]
confirmSearch
()
}
...
...
@@ -639,10 +641,7 @@ export default {
return
currentMultipleGroupId
.
value
===
data
.
person_unid
}
const
mutipleOperationDisabled
=
computed
(()
=>
{
return
!
(
isMultipleOperation
.
value
&&
selectedPersonList
.
value
.
length
>
0
)
return
!
(
selectedPersonList
.
value
.
length
>
0
&&
isMultipleOperation
.
value
)
})
const
isSelectedPerson
=
(
id
)
=>
{
return
selectedPersonList
.
value
.
some
(
item
=>
item
.
id
===
id
)
...
...
@@ -674,7 +673,7 @@ export default {
})
selectedPersonList
.
value
=
[]
// 刷新列表
clickSearc
h
()
handleRefres
h
()
}
else
{
ElMessage
({
message
:
`剔除失败`
,
...
...
@@ -688,27 +687,24 @@ export default {
const
deleteRealPersonRecord
=
(
data
)
=>
{
console
.
log
(
'deletePersonRecord'
,
data
,
selectedPersonList
)
const
unidList
=
selectedPersonList
.
value
.
map
(
item
=>
item
.
unid
)
const
strIdList
=
selectedPersonList
.
value
.
map
(
item
=>
item
.
id
).
join
(
','
)
const
params
=
{
unid
:
unidList
.
join
(
','
),
personUnid
:
''
,
countdate
:
selectedPersonList
.
value
[
0
].
counttime
id
:
strIdList
,
}
// TODO: 需要增加方法
clusterResultApi
.
updateRecognition
(
params
).
then
(
clusterResultApi
.
deleteRecognition
(
params
).
then
(
(
r
)
=>
{
if
(
r
.
msg_code
==
200
){
ElMessage
({
message
:
`
剔
除成功`
,
message
:
`
删
除成功`
,
type
:
'success'
})
selectedPersonList
.
value
=
[]
// 刷新列表
clickSearc
h
()
handleRefres
h
()
}
else
{
ElMessage
({
message
:
`
剔
除失败`
,
message
:
`
删
除失败`
,
type
:
'error'
})
}
...
...
src/views/SnapshotCluster/ClusterResult/ClusterResultApi.js
View file @
a3964c0
...
...
@@ -110,6 +110,16 @@ class ClusterResultApi {
}
)
}
// 删除图片
deleteRecognition
(
data
)
{
return
axiosInstance
.
request
(
{
method
:
'POST'
,
url
:
`/faceRecognitions/batchDelete`
,
data
:
data
}
)
}
// 获取UUID,移动图片时需要
getClusterResultUidList
(
data
)
{
return
axiosInstance
.
request
(
...
...
Write
Preview
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