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 @@
...
@@ -132,6 +132,14 @@
<span
class=
"expandWord"
@
click=
'expandChange(person)'
>
{{
person
.
expand
?
'收起'
:
'展开'
}}
</span>
<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>
<span
class=
"expandWord"
@
click=
'updatePersonInfoByGroup(person)'
>
类型修正
</span>
<el-checkbox
class=
"checkBox"
v-model=
"person.checked"
@
change=
'checkChange(person)'
></el-checkbox>
<el-checkbox
class=
"checkBox"
v-model=
"person.checked"
@
change=
'checkChange(person)'
></el-checkbox>
...
@@ -142,8 +150,8 @@
...
@@ -142,8 +150,8 @@
<el-col
:span=
"3"
v-for=
"item in row"
>
<el-col
:span=
"3"
v-for=
"item in row"
>
<div
<div
style=
"margin: 0 5px"
style=
"margin: 0 5px"
:class=
"
currentItemId==item.id
?'actived':''"
:class=
"
(currentItemId==item.id || isSelectedPerson(item.id))
?'actived':''"
@
click=
"handleClick(item)"
@
click=
"handleClick(item
, $event
)"
>
>
<div
style=
""
>
<div
style=
""
>
<span
@
click=
"downloadTrajectoryFile(item.track_url)"
<span
@
click=
"downloadTrajectoryFile(item.track_url)"
...
@@ -565,6 +573,27 @@ export default {
...
@@ -565,6 +573,27 @@ export default {
// isShowGroupEditor.value = true
// isShowGroupEditor.value = true
personGroupEditorRef
.
value
.
initDialog
(
data
);
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
)
{
const
downloadFile
=
function
(
url
)
{
window
.
open
(
url
)
window
.
open
(
url
)
...
@@ -572,14 +601,13 @@ export default {
...
@@ -572,14 +601,13 @@ export default {
const
downloadTrajectoryFile
=
function
(
url
){
const
downloadTrajectoryFile
=
function
(
url
){
window
.
open
(
url
)
window
.
open
(
url
)
}
}
const
handleClick
=
function
(
data
){
const
handleClick
=
function
(
data
,
event
){
currentItemId
.
value
=
data
.
id
console
.
log
(
'handleClick'
,
event
)
currobj
.
value
=
data
;
currentItemId
.
value
=
data
.
id
// clusterResultApi.getBodyPoint({'feature_url':feature}).then(
currobj
.
value
=
data
;
// (r) => {
if
(
event
.
metaKey
)
{
// imgModelRef.value.initDialog(url,r.data);
selectedPersonList
.
value
.
push
(
data
)
// }
}
// )
}
}
const
checkChange
=
function
(
data
){
const
checkChange
=
function
(
data
){
console
.
log
(
data
)
console
.
log
(
data
)
...
@@ -742,6 +770,9 @@ export default {
...
@@ -742,6 +770,9 @@ export default {
checkChange
,
checkChange
,
expandChange
,
expandChange
,
updatePersonInfoByGroup
,
updatePersonInfoByGroup
,
deletePersonRecord
,
isSelectedPerson
,
selectedPersonList
,
clerkComparativeFun
,
clerkComparativeFun
,
singleComparativeFun
,
singleComparativeFun
,
formatGender
,
formatGender
,
...
...
src/views/SnapshotCluster/ClusterResult/ClusterResultApi.js
View file @
f41139e
...
@@ -91,6 +91,15 @@ class ClusterResultApi {
...
@@ -91,6 +91,15 @@ class ClusterResultApi {
}
}
)
)
}
}
// 多选删除
deletePerson
(
data
)
{
return
axiosInstance
.
request
(
{
method
:
'DELETE'
,
url
:
`/faceRecognitions/
${
data
.
id
}
`
,
}
)
}
}
}
const
clusterResultApi
=
new
ClusterResultApi
()
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