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
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
15 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 @@
...
@@ -190,7 +190,7 @@
<DetailDialogComparison
ref=
"DetailDialogComparisonRef"
/>
<DetailDialogComparison
ref=
"DetailDialogComparisonRef"
/>
<singleImgComparisonDialog
ref=
"singleImgComparisonRef"
></singleImgComparisonDialog>
<singleImgComparisonDialog
ref=
"singleImgComparisonRef"
></singleImgComparisonDialog>
<PersonGroupEditor
ref=
'personGroupEditorRef'
/>
<PersonGroupEditor
ref=
'personGroupEditorRef'
@
refresh=
"clickSearch"
/>
</template>
</template>
<
script
>
<
script
>
...
...
src/views/SnapshotCluster/ClusterResult/ClusterResultApi.js
View file @
5519d21
...
@@ -68,7 +68,7 @@ class ClusterResultApi {
...
@@ -68,7 +68,7 @@ class ClusterResultApi {
}
}
)
)
}
}
getBodyPoint
(
data
)
{
getBodyPoint
(
data
)
{
return
axiosInstance
.
request
(
return
axiosInstance
.
request
(
{
{
...
@@ -80,6 +80,17 @@ class ClusterResultApi {
...
@@ -80,6 +80,17 @@ class ClusterResultApi {
}
}
)
)
}
}
// 人员类型修正
updatePerson
(
data
)
{
return
axiosInstance
.
request
(
{
method
:
'POST'
,
url
:
`/faceRecognitions/updatePerson`
,
data
:
data
}
)
}
}
}
const
clusterResultApi
=
new
ClusterResultApi
()
const
clusterResultApi
=
new
ClusterResultApi
()
...
...
src/views/SnapshotCluster/ClusterResult/PersonGroupEditor.vue
View file @
5519d21
...
@@ -18,8 +18,8 @@
...
@@ -18,8 +18,8 @@
</a-form-item>
</a-form-item>
<a-form-item
label=
"性别"
>
<a-form-item
label=
"性别"
>
<a-select
v-model:value=
"formData.gender"
>
<a-select
v-model:value=
"formData.gender"
>
<a-select-option
:value=
"0"
>
男
</a-select-option>
<a-select-option
:value=
"0"
>
女
</a-select-option>
<a-select-option
:value=
"1"
>
女
</a-select-option>
<a-select-option
:value=
"1"
>
男
</a-select-option>
</a-select>
</a-select>
</a-form-item>
</a-form-item>
<a-form-item
label=
"类型"
>
<a-form-item
label=
"类型"
>
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
</a-form>
</a-form>
<template
#
footer
>
<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>
<a-button
@
click=
"onCancel"
>
返回
</a-button>
</
template
>
</
template
>
</a-modal>
</a-modal>
...
@@ -39,33 +39,57 @@
...
@@ -39,33 +39,57 @@
<
script
>
<
script
>
import
{
ref
}
from
"vue"
;
import
{
ref
}
from
"vue"
;
import
clusterResultApi
from
'@/views/SnapshotCluster/ClusterResult/ClusterResultApi'
import
{
ElMessage
}
from
"element-plus"
;
export
default
{
export
default
{
name
:
'PersonGroupEditor'
,
name
:
'PersonGroupEditor'
,
setup
()
{
setup
(
props
,
{
emit
}
)
{
const
isVisible
=
ref
(
false
);
const
isVisible
=
ref
(
false
);
// 表单
function
getInitialFormData
()
{
return
{
personUnid
:
''
,
age
:
1
,
gender
:
0
,
type
:
0
,
}
}
const
formData
=
ref
(
getInitialFormData
())
const
initDialog
=
(
data
)
=>
{
const
initDialog
=
(
data
)
=>
{
console
.
log
(
'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
;
isVisible
.
value
=
true
;
};
};
// 表单
const
formData
=
ref
({
personUnid
:
''
,
age
:
undefined
,
gender
:
0
,
type
:
0
,
})
const
onCancel
=
()
=>
{
const
onCancel
=
()
=>
{
isVisible
.
value
=
false
;
isVisible
.
value
=
false
;
};
};
const
onSave
=
()
=>
{
clusterResultApi
.
updatePerson
(
formData
.
value
).
then
(
(
r
)
=>
{
if
(
r
.
msg_code
==
200
){
ElMessage
({
message
:
`保存成功`
,
type
:
'success'
})
// 刷新列表
emit
(
'refresh'
)
onCancel
()
}
}
)
};
return
{
return
{
isVisible
,
isVisible
,
formData
,
formData
,
onSave
,
onCancel
,
onCancel
,
initDialog
,
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