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 5519d217
authored
Apr 10, 2024
by
Tianqing Liu
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat: 聚类结果,弹窗中表单,数据回显
1 parent
548e6939
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
14 deletions
src/views/SnapshotCluster/ClusterResult/ClusterResult.vue
src/views/SnapshotCluster/ClusterResult/ClusterResultApi.js
src/views/SnapshotCluster/ClusterResult/PersonGroupEditor.vue
src/views/SnapshotCluster/ClusterResult/ClusterResult.vue
View file @
5519d21
...
...
@@ -190,7 +190,7 @@
<DetailDialogComparison
ref=
"DetailDialogComparisonRef"
/>
<singleImgComparisonDialog
ref=
"singleImgComparisonRef"
></singleImgComparisonDialog>
<PersonGroupEditor
ref=
'personGroupEditorRef'
/>
<PersonGroupEditor
ref=
'personGroupEditorRef'
@
refresh=
"clickSearch"
/>
</template>
<
script
>
...
...
src/views/SnapshotCluster/ClusterResult/ClusterResultApi.js
View file @
5519d21
...
...
@@ -80,6 +80,17 @@ class ClusterResultApi {
}
)
}
// 人员类型修正
updatePerson
(
data
)
{
return
axiosInstance
.
request
(
{
method
:
'POST'
,
url
:
`/faceRecognitions/updatePerson`
,
data
:
data
}
)
}
}
const
clusterResultApi
=
new
ClusterResultApi
()
...
...
src/views/SnapshotCluster/ClusterResult/PersonGroupEditor.vue
View file @
5519d21
...
...
@@ -18,8 +18,8 @@
</a-form-item>
<a-form-item
label=
"性别"
>
<a-select
v-model:value=
"formData.gender"
>
<a-select-option
:value=
"0"
>
男
</a-select-option>
<a-select-option
:value=
"1"
>
女
</a-select-option>
<a-select-option
:value=
"0"
>
女
</a-select-option>
<a-select-option
:value=
"1"
>
男
</a-select-option>
</a-select>
</a-form-item>
<a-form-item
label=
"类型"
>
...
...
@@ -31,7 +31,7 @@
</a-form>
<template
#
footer
>
<a-button
type=
"primary"
@
click=
"on
Cancel
"
>
保存
</a-button>
<a-button
type=
"primary"
@
click=
"on
Save
"
>
保存
</a-button>
<a-button
@
click=
"onCancel"
>
返回
</a-button>
</
template
>
</a-modal>
...
...
@@ -39,33 +39,57 @@
<
script
>
import
{
ref
}
from
"vue"
;
import
clusterResultApi
from
'@/views/SnapshotCluster/ClusterResult/ClusterResultApi'
import
{
ElMessage
}
from
"element-plus"
;
export
default
{
name
:
'PersonGroupEditor'
,
setup
()
{
setup
(
props
,
{
emit
}
)
{
const
isVisible
=
ref
(
false
);
// 表单
function
getInitialFormData
()
{
return
{
personUnid
:
''
,
age
:
1
,
gender
:
0
,
type
:
0
,
}
}
const
formData
=
ref
(
getInitialFormData
())
const
initDialog
=
(
data
)
=>
{
console
.
log
(
'initDialog'
,
data
)
formData
.
value
=
getInitialFormData
()
formData
.
value
.
personUnid
=
data
.
person_unid
formData
.
value
.
age
=
data
.
perrsonList
.
length
>
0
?
data
.
perrsonList
[
0
].
age
:
1
formData
.
value
.
gender
=
data
.
perrsonList
.
length
>
0
?
data
.
perrsonList
[
0
].
gender
:
0
formData
.
value
.
type
=
data
.
perrsonList
.
length
>
0
?
data
.
perrsonList
[
0
].
person_type
:
0
isVisible
.
value
=
true
;
};
// 表单
const
formData
=
ref
({
personUnid
:
''
,
age
:
undefined
,
gender
:
0
,
type
:
0
,
})
const
onCancel
=
()
=>
{
isVisible
.
value
=
false
;
};
const
onSave
=
()
=>
{
clusterResultApi
.
updatePerson
(
formData
.
value
).
then
(
(
r
)
=>
{
if
(
r
.
msg_code
==
200
){
ElMessage
({
message
:
`保存成功`
,
type
:
'success'
})
// 刷新列表
emit
(
'refresh'
)
onCancel
()
}
}
)
};
return
{
isVisible
,
formData
,
onSave
,
onCancel
,
initDialog
,
};
...
...
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