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 f41139ec
authored
Apr 10, 2024
by
Tianqing Liu
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat: 聚类结果,批量删除
1 parent
5519d217
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
10 deletions
src/views/SnapshotCluster/ClusterResult/ClusterResult.vue
src/views/SnapshotCluster/ClusterResult/ClusterResultApi.js
src/views/SnapshotCluster/ClusterResult/ClusterResult.vue
View file @
f41139e
...
...
@@ -132,6 +132,14 @@
<span
class=
"expandWord"
@
click=
'expandChange(person)'
>
{{
person
.
expand
?
'收起'
:
'展开'
}}
</span>
<!--修正组类型数据-->
<a-popconfirm
title=
"您确认要删除此记录吗?"
ok-text=
"是"
cancel-text=
"否"
@
confirm=
"deletePersonRecord(person)"
>
<span
class=
"expandWord"
>
删除
</span>
</a-popconfirm>
<span
class=
"expandWord"
@
click=
'updatePersonInfoByGroup(person)'
>
类型修正
</span>
<el-checkbox
class=
"checkBox"
v-model=
"person.checked"
@
change=
'checkChange(person)'
></el-checkbox>
...
...
@@ -142,8 +150,8 @@
<el-col
:span=
"3"
v-for=
"item in row"
>
<div
style=
"margin: 0 5px"
:class=
"
currentItemId==item.id
?'actived':''"
@
click=
"handleClick(item)"
:class=
"
(currentItemId==item.id || isSelectedPerson(item.id))
?'actived':''"
@
click=
"handleClick(item
, $event
)"
>
<div
style=
""
>
<span
@
click=
"downloadTrajectoryFile(item.track_url)"
...
...
@@ -565,6 +573,27 @@ export default {
// isShowGroupEditor.value = true
personGroupEditorRef
.
value
.
initDialog
(
data
);
}
// 删除人员
const
selectedPersonList
=
ref
([])
const
deletePersonRecord
=
(
data
)
=>
{
console
.
log
(
'deletePersonRecord'
,
data
)
clusterResultApi
.
deletePerson
(
data
).
then
(
(
r
)
=>
{
if
(
r
.
msg_code
==
200
){
ElMessage
({
message
:
`删除成功`
,
type
:
'success'
})
selectedPersonList
.
value
=
[]
// 刷新列表
clickSearch
()
}
}
)
}
const
isSelectedPerson
=
(
id
)
=>
{
return
selectedPersonList
.
value
.
some
(
item
=>
item
.
id
===
id
)
}
const
downloadFile
=
function
(
url
)
{
window
.
open
(
url
)
...
...
@@ -572,14 +601,13 @@ export default {
const
downloadTrajectoryFile
=
function
(
url
){
window
.
open
(
url
)
}
const
handleClick
=
function
(
data
){
currentItemId
.
value
=
data
.
id
currobj
.
value
=
data
;
// clusterResultApi.getBodyPoint({'feature_url':feature}).then(
// (r) => {
// imgModelRef.value.initDialog(url,r.data);
// }
// )
const
handleClick
=
function
(
data
,
event
){
console
.
log
(
'handleClick'
,
event
)
currentItemId
.
value
=
data
.
id
currobj
.
value
=
data
;
if
(
event
.
metaKey
)
{
selectedPersonList
.
value
.
push
(
data
)
}
}
const
checkChange
=
function
(
data
){
console
.
log
(
data
)
...
...
@@ -742,6 +770,9 @@ export default {
checkChange
,
expandChange
,
updatePersonInfoByGroup
,
deletePersonRecord
,
isSelectedPerson
,
selectedPersonList
,
clerkComparativeFun
,
singleComparativeFun
,
formatGender
,
...
...
src/views/SnapshotCluster/ClusterResult/ClusterResultApi.js
View file @
f41139e
...
...
@@ -91,6 +91,15 @@ class ClusterResultApi {
}
)
}
// 多选删除
deletePerson
(
data
)
{
return
axiosInstance
.
request
(
{
method
:
'DELETE'
,
url
:
`/faceRecognitions/
${
data
.
id
}
`
,
}
)
}
}
const
clusterResultApi
=
new
ClusterResultApi
()
...
...
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