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 ff23185a
authored
May 25, 2023
by
李君
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
优化
1 parent
b4bfa343
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
188 additions
and
422 deletions
src/Request/PublicAxiosInstance.js
src/views/FeatureMatchingAccuracy/FeatureMatchingAccuracy.vue
src/views/FeatureMatchingAccuracy/FeatureMatchingAccuracyApi.js
src/views/FeatureMatchingAccuracy/addPerson.vue
src/views/FeatureMatchingAccuracy/editPerson.vue
src/views/SnapshotCluster/ClusterResult/ClusterResult.vue
src/views/SnapshotCluster/SnapshotRecord/SnapshotRecord.vue
src/Request/PublicAxiosInstance.js
View file @
ff23185
...
@@ -14,7 +14,7 @@ const axiosInstance = axios.create(
...
@@ -14,7 +14,7 @@ const axiosInstance = axios.create(
// 请求拦截器
// 请求拦截器
axiosInstance
.
interceptors
.
request
.
use
(
axiosInstance
.
interceptors
.
request
.
use
(
config
=>
{
config
=>
{
// Cookies.set('atoken','
57ac28e0-c2d9-4287-8d20-bc0332372dad
')
// Cookies.set('atoken','
33b0df7a-e5c6-49c3-b549-959179cd5904
')
if
(
!
Cookies
.
get
(
'atoken'
)){
if
(
!
Cookies
.
get
(
'atoken'
)){
ElMessage
({
ElMessage
({
message
:
`登录过期,请重新登录`
,
message
:
`登录过期,请重新登录`
,
...
...
src/views/FeatureMatchingAccuracy/FeatureMatchingAccuracy.vue
View file @
ff23185
...
@@ -18,18 +18,18 @@
...
@@ -18,18 +18,18 @@
<!--
<a-button
type=
"primary"
@
click=
"confirmSearch"
class=
"btn"
>
预览报告
</a-button>
-->
<!--
<a-button
type=
"primary"
@
click=
"confirmSearch"
class=
"btn"
>
预览报告
</a-button>
-->
</div>
</div>
<el-table
:data=
"resultList"
@
row-click=
'clickRow'
:highlight-current-row=
'true'
:rowKey=
"id"
:height=
"contentHeight"
style=
"width: 100%"
>
<el-table
:data=
"resultList"
@
row-click=
'clickRow'
:highlight-current-row=
'true'
:rowKey=
"id"
:height=
"contentHeight"
style=
"width: 100%"
>
<el-table-column
type=
"index"
align=
"center"
label=
"序号"
width=
"80"
>
<
!--
<
el-table-column
type=
"index"
align=
"center"
label=
"序号"
width=
"80"
>
<template
#
default=
"scope"
>
<template
#
default=
"scope"
>
<span
v-text=
"getIndex(scope.$index)"
>
</span>
<span
v-text=
"getIndex(scope.$index)"
>
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
-->
<el-table-column
prop=
"name"
align=
"center"
label=
"姓名"
>
<el-table-column
prop=
"name"
align=
"center"
label=
"姓名"
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"regCount"
align=
"center"
label=
"注册图片数量"
>
<el-table-column
prop=
"regCount"
align=
"center"
label=
"注册图片数量"
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"hitCount"
align=
"center"
label=
"命中目标数量"
>
<el-table-column
prop=
"hitCount"
align=
"center"
label=
"命中目标数量"
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"content"
align=
"center"
label=
"操作"
width=
"
15
0"
>
<el-table-column
prop=
"content"
align=
"center"
label=
"操作"
width=
"
22
0"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<el-button
<el-button
@
click
.
stop
@
click
.
stop
...
@@ -47,6 +47,13 @@
...
@@ -47,6 +47,13 @@
>
删除
</el-button>
>
删除
</el-button>
<el-button
<el-button
@
click
.
stop
@
click
.
stop
@
click=
"addSamplePic(scope.row)"
type=
"text"
size=
"small"
class=
"tab-btn"
>
添加样本图
</el-button>
<el-button
@
click
.
stop
@
click=
"hitDetail(scope.row)"
@
click=
"hitDetail(scope.row)"
type=
"text"
type=
"text"
size=
"small"
size=
"small"
...
@@ -134,7 +141,7 @@
...
@@ -134,7 +141,7 @@
</a-form-item>
</a-form-item>
<a-form-item
class=
"secondCondition"
>
<a-form-item
class=
"secondCondition"
>
<a-button
type=
"primary"
style=
"margin-right: 5px;"
@
click=
"searchPicture"
>
查询
</a-button>
<a-button
type=
"primary"
style=
"margin-right: 5px;"
@
click=
"searchPicture"
>
查询
</a-button>
<
a-button
type=
"primary"
@
click=
"checkPicture"
>
选中
</a-button
>
<
!-- <a-button type="primary" @click="checkPicture">选中</a-button> --
>
</a-form-item>
</a-form-item>
</a-form>
</a-form>
<div
class=
"identifyResult"
>
<div
class=
"identifyResult"
>
...
@@ -146,11 +153,16 @@
...
@@ -146,11 +153,16 @@
:fit=
"'fill'"
:fit=
"'fill'"
class=
"single-image"
>
class=
"single-image"
>
</el-image>
</el-image>
<el-checkbox
class=
"checkBox"
v-model=
"item.checked"
></el-checkbox>
<span
class=
"score"
>
{{item.featureNum}}
</span>
<span
class=
"score"
>
{{item.featureNum}}
</span>
<span
class=
"text"
@
click=
"clickPicture(item)"
>
<div
class=
"btnPic"
>
<el-button
type=
"primary"
class=
"checkBox "
@
click=
"checkPicture(item)"
>
选中
</el-button>
<el-button
type=
"primary"
class=
"checkBox text"
@
click=
"clickPicture(item)"
>
以图搜图
</el-button>
</div>
<!-- <el-checkbox class="checkBox" v-model="item.checked"></el-checkbox> -->
<!-- <span class="text" @click="clickPicture(item)">
<span class="el-icon-picture-outline iconPic"></span>
<span class="el-icon-picture-outline iconPic"></span>
</span>
</span>
-->
</div>
</div>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -170,7 +182,7 @@
...
@@ -170,7 +182,7 @@
</el-col>
</el-col>
</el-row>
</el-row>
<addPersonConfig
ref=
"addPersonConfigRef"
@
refreshParentTable =
'confirmSearch'
></addPersonConfig>
<addPersonConfig
ref=
"addPersonConfigRef"
@
refreshParentTable =
'confirmSearch'
></addPersonConfig>
<editPersonConfig
ref=
"
editPerson
ConfigRef"
@
refreshParentTable =
'confirmSearch'
></editPersonConfig>
<editPersonConfig
ref=
"
addSamplePic
ConfigRef"
@
refreshParentTable =
'confirmSearch'
></editPersonConfig>
<hitDetailDialog
ref=
"hitDetailDialogRef"
@
refreshParentTable =
'confirmSearch'
></hitDetailDialog>
<hitDetailDialog
ref=
"hitDetailDialogRef"
@
refreshParentTable =
'confirmSearch'
></hitDetailDialog>
</div>
</div>
...
@@ -224,6 +236,7 @@
...
@@ -224,6 +236,7 @@
const
onAccountChange
=
function
()
{
const
onAccountChange
=
function
()
{
getPlazaList
()
getPlazaList
()
}
}
// 获取商场门店
const
getPlazaList
=
function
()
{
const
getPlazaList
=
function
()
{
queryForm
.
plaza_id
=
''
queryForm
.
plaza_id
=
''
plazaList
.
value
=
[]
plazaList
.
value
=
[]
...
@@ -245,7 +258,7 @@
...
@@ -245,7 +258,7 @@
}
}
)
)
}
}
// 获取集团
const
getAccountList
=
function
()
{
const
getAccountList
=
function
()
{
queryForm
.
account_id
=
''
queryForm
.
account_id
=
''
accountList
.
value
=
[]
accountList
.
value
=
[]
...
@@ -268,6 +281,7 @@
...
@@ -268,6 +281,7 @@
getGateList
()
getGateList
()
}
}
const
gateList
=
ref
([])
const
gateList
=
ref
([])
// 获取监控点
const
getGateList
=
function
()
{
const
getGateList
=
function
()
{
hitSearchObj
.
gate_id
=
[]
hitSearchObj
.
gate_id
=
[]
gateList
.
value
=
[]
gateList
.
value
=
[]
...
@@ -299,6 +313,7 @@
...
@@ -299,6 +313,7 @@
pageNum
.
value
=
1
;
pageNum
.
value
=
1
;
getTableData
()
getTableData
()
}
}
// 获取注册人员列表
const
getTableData
=
function
(){
const
getTableData
=
function
(){
resultList
.
value
=
[]
resultList
.
value
=
[]
const
data
=
filterEmptyValueInObject
(
const
data
=
filterEmptyValueInObject
(
...
@@ -335,28 +350,27 @@
...
@@ -335,28 +350,27 @@
const
total
=
ref
()
const
total
=
ref
()
const
contentHeight
=
ref
(
0
)
const
contentHeight
=
ref
(
0
)
const
addPersonConfigRef
=
ref
();
const
addPersonConfigRef
=
ref
();
// 新增注册人员弹窗
const
addPersonFun
=
function
(){
const
addPersonFun
=
function
(){
addPersonConfigRef
.
value
.
initDialog
({
addPersonConfigRef
.
value
.
initDialog
({
account_id
:
queryForm
.
account_id
,
account_id
:
queryForm
.
account_id
,
plaza_id
:
queryForm
.
plaza_id
,
plaza_id
:
queryForm
.
plaza_id
,
type
:
'add'
});
});
}
}
const
editPersonConfigRef
=
ref
();
// 编辑人员弹窗
const
editRow
=
function
(
row
){
const
editRow
=
function
(
row
){
FeatureMatchingAccuracyApi
.
getMatchOne
(
row
).
then
(
addPersonConfigRef
.
value
.
initDialog
({
(
r
)
=>
{
account_id
:
row
.
accountId
,
if
(
r
.
msg_code
==
200
){
plaza_id
:
row
.
mallId
,
editPersonConfigRef
.
value
.
initDialog
(
r
.
data
);
type
:
'edit'
,
}
else
{
name
:
row
.
name
,
ElMessage
({
description
:
row
.
description
,
message
:
r
.
msg_info
,
id
:
row
.
id
,
type
:
'error'
});
})
return
false
;
}
}
)
}
}
// 删除人员
const
deleteRow
=
function
(
row
){
const
deleteRow
=
function
(
row
){
ElMessageBox
.
confirm
(
'此操作将永久删除该文件, 是否继续?'
,
'提示'
,
{
ElMessageBox
.
confirm
(
'此操作将永久删除该文件, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
...
@@ -384,6 +398,7 @@
...
@@ -384,6 +398,7 @@
)
)
})
})
}
}
// 命中详情
const
hitDetailDialogRef
=
ref
()
const
hitDetailDialogRef
=
ref
()
const
hitDetail
=
function
(
row
){
const
hitDetail
=
function
(
row
){
const
data
=
filterEmptyValueInObject
(
const
data
=
filterEmptyValueInObject
(
...
@@ -415,11 +430,29 @@
...
@@ -415,11 +430,29 @@
}
}
)
)
}
}
// 添加注册样本图
const
addSamplePicConfigRef
=
ref
();
const
addSamplePic
=
function
(
row
){
FeatureMatchingAccuracyApi
.
getMatchOne
(
row
).
then
(
(
r
)
=>
{
if
(
r
.
msg_code
==
200
){
addSamplePicConfigRef
.
value
.
initDialog
(
r
.
data
);
}
else
{
ElMessage
({
message
:
r
.
msg_info
,
type
:
'error'
})
return
false
;
}
}
)
}
// 注册样本图
// 注册样本图
const
regPictureList
=
ref
([])
const
regPictureList
=
ref
([])
const
hitPictureList
=
ref
([])
const
hitPictureList
=
ref
([])
const
regPersonId
=
ref
()
const
regPersonId
=
ref
()
const
redPersonObj
=
ref
({})
const
redPersonObj
=
ref
({})
// 点击行获取注册样本图和命中目标
const
clickRow
=
function
(
row
){
const
clickRow
=
function
(
row
){
isLoading
.
value
=
true
;
isLoading
.
value
=
true
;
redPersonObj
.
value
=
row
;
redPersonObj
.
value
=
row
;
...
@@ -430,15 +463,20 @@
...
@@ -430,15 +463,20 @@
(
r
)
=>
{
(
r
)
=>
{
isLoading
.
value
=
false
;
isLoading
.
value
=
false
;
if
(
r
.
msg_code
==
200
){
if
(
r
.
msg_code
==
200
){
if
(
r
.
data
.
faceList
&&
r
.
data
.
faceList
.
length
>
0
){
r
.
data
.
faceList
.
forEach
(
item
=>
{
r
.
data
.
faceList
.
forEach
(
item
=>
{
item
.
picture_url
=
window
.
_baseImgUrl
+
'
picture/'
+
item
.
bodyPath
+
item
.
bodyPic
item
.
picture_url
=
window
.
_baseImgUrl
+
'tool/
picture/'
+
item
.
bodyPath
+
item
.
bodyPic
})
})
regPictureList
.
value
=
r
.
data
.
faceList
regPictureList
.
value
=
r
.
data
.
faceList
}
if
(
r
.
data
.
hitList
&&
r
.
data
.
hitList
.
length
>
0
){
r
.
data
.
hitList
.
forEach
(
item
=>
{
r
.
data
.
hitList
.
forEach
(
item
=>
{
item
.
picture_url
=
window
.
_baseImgUrl
+
'
picture/'
+
item
.
bodyPath
+
item
.
bodyPic
item
.
picture_url
=
window
.
_baseImgUrl
+
'tool/
picture/'
+
item
.
bodyPath
+
item
.
bodyPic
})
})
hitPictureList
.
value
=
r
.
data
.
hitList
hitPictureList
.
value
=
r
.
data
.
hitList
}
}
}
}
}
)
)
}
}
...
@@ -458,6 +496,7 @@
...
@@ -458,6 +496,7 @@
clickPicture
()
clickPicture
()
}
}
const
currentId
=
ref
()
const
currentId
=
ref
()
// 点击图片以图搜图
const
clickPicture
=
function
(
row
){
const
clickPicture
=
function
(
row
){
const
rawData
=
toRaw
(
hitSearchObj
)
const
rawData
=
toRaw
(
hitSearchObj
)
// if(rawData.gate_id.length<1){
// if(rawData.gate_id.length<1){
...
@@ -509,31 +548,31 @@
...
@@ -509,31 +548,31 @@
clickPicture
({
id
:
currentId
.
value
})
clickPicture
({
id
:
currentId
.
value
})
}
}
// 选中命中目标
// 选中命中目标
const
checkPicture
=
function
(){
const
checkPicture
=
function
(
resData
){
let
checkList
=
[]
//
let checkList = []
identifyResultList
.
value
.
forEach
(
item
=>
{
//
identifyResultList.value.forEach(item=>{
if
(
item
.
checked
==
true
){
//
if(item.checked==true){
checkList
.
push
(
item
.
id
)
//
checkList.push(item.id)
}
//
}
})
//
})
if
(
checkList
.
length
<
1
){
//
if(checkList.length<1){
ElMessage
({
//
ElMessage({
message
:
'请选择识别结果图片'
,
//
message: '请选择识别结果图片',
type
:
'warning'
//
type: 'warning'
})
//
})
return
false
;
//
return false;
}
//
}
if
(
!
regPersonId
.
value
){
//
if(!regPersonId.value){
ElMessage
({
//
ElMessage({
message
:
'请选择注册人员'
,
//
message: '请选择注册人员',
type
:
'warning'
//
type: 'warning'
})
//
})
return
false
;
//
return false;
}
//
}
isLoading
.
value
=
true
;
isLoading
.
value
=
true
;
FeatureMatchingAccuracyApi
.
addMatchHit
({
FeatureMatchingAccuracyApi
.
addMatchHit
({
id
:
regPersonId
.
value
,
id
:
regPersonId
.
value
,
faceIds
:
checkList
faceIds
:
[
resData
.
id
]
}).
then
(
}).
then
(
(
r
)
=>
{
(
r
)
=>
{
isLoading
.
value
=
false
;
isLoading
.
value
=
false
;
...
@@ -607,7 +646,7 @@
...
@@ -607,7 +646,7 @@
plazaList
,
plazaList
,
resultList
,
resultList
,
addPersonConfigRef
,
addPersonConfigRef
,
editPerson
ConfigRef
,
addSamplePic
ConfigRef
,
hitSearchObj
,
hitSearchObj
,
gateList
,
gateList
,
activeKey
:
ref
(
'1'
),
activeKey
:
ref
(
'1'
),
...
@@ -638,7 +677,8 @@
...
@@ -638,7 +677,8 @@
checkPicture
,
checkPicture
,
delHitPic
,
delHitPic
,
hitDetail
,
hitDetail
,
delSamplePic
delSamplePic
,
addSamplePic
}
}
}
}
}
}
...
@@ -673,17 +713,37 @@
...
@@ -673,17 +713,37 @@
position
:
relative
;
position
:
relative
;
cursor
:
pointer
;
cursor
:
pointer
;
}
}
.checkBox
{
.btnPic
{
display
:
none
;
position
:
absolute
;
position
:
absolute
;
left
:
1px
;
top
:
0
;
top
:
0
;
right
:
0
;
left
:
0
;
bottom
:
0
;
margin
:
auto
;
}
.pictureBox
:hover
.btnPic
{
display
:
block
;
width
:
100px
;
height
:
100px
;
}
.checkBox
{
width
:
100px
;
height
:
30px
;
margin-left
:
0
!important
;
margin-bottom
:
10px
;
//
position
:
absolute
;
//
left
:
1px
;
//
top
:
0
;
}
}
.score
{
.score
{
position
:
absolute
;
position
:
absolute
;
left
:
5
0px
;
right
:
1
0px
;
top
:
0
;
top
:
0
;
color
:
red
;
color
:
red
;
font-weight
:
900
;
font-weight
:
900
;
font-size
:
18px
;
}
}
.iconPic
{
.iconPic
{
position
:
absolute
;
position
:
absolute
;
...
...
src/views/FeatureMatchingAccuracy/FeatureMatchingAccuracyApi.js
View file @
ff23185
...
@@ -96,6 +96,16 @@ class FeatureMatchingAccuracy {
...
@@ -96,6 +96,16 @@ class FeatureMatchingAccuracy {
}
}
)
)
}
}
addMatchReg
(
data
){
return
axiosInstance
.
request
(
{
method
:
'POST'
,
url
:
`/feature/match/reg`
,
data
:
data
}
)
}
}
}
const
FeatureMatchingAccuracyApi
=
new
FeatureMatchingAccuracy
()
const
FeatureMatchingAccuracyApi
=
new
FeatureMatchingAccuracy
()
...
...
src/views/FeatureMatchingAccuracy/addPerson.vue
View file @
ff23185
<
template
>
<
template
>
<a-modal
<a-modal
title=
"新增注册人员
"
:title=
"type=='add'?'新增注册人员':'编辑注册人员'
"
v-if=
"isVisible"
v-if=
"isVisible"
v-model:visible=
"isVisible"
v-model:visible=
"isVisible"
width=
"1500px"
width=
"800px"
:dialog-style=
"
{ top: '20px',height:'90%' }"
class=
"detail-modal"
class=
"detail-modal"
>
>
<div
style=
"height: 700px;"
>
<div>
<a-form
:model=
"formObj"
layout=
"inline"
:label-col=
"
{ style: { width: '100px' } }">
<a-form
:model=
"formObj"
:label-col=
"
{ style: { width: '100px' } }">
<a-form-item
label=
"姓名:"
>
<a-form-item
label=
"姓名:"
>
<a-input
v-model:value=
"formObj.name"
style=
"width: 500px"
>
<a-input
v-model:value=
"formObj.name"
style=
"width: 500px"
>
</a-input>
</a-input>
...
@@ -17,102 +16,6 @@
...
@@ -17,102 +16,6 @@
<a-input
v-model:value=
"formObj.dec"
style=
"width: 500px"
>
<a-input
v-model:value=
"formObj.dec"
style=
"width: 500px"
>
</a-input>
</a-input>
</a-form-item>
</a-form-item>
<a-form-item
label=
"选择样本图:"
class=
"pictures"
>
<a-tabs
type=
"card"
v-model:activeKey=
"activeKey"
>
<a-tab-pane
key=
"1"
tab=
"本地上传"
>
<a-upload
:file-list=
"fileList"
:remove=
"handleRemove"
:before-upload=
"beforeUpload"
:multiple=
"false"
>
<a-button>
<upload-outlined></upload-outlined>
上传文件
</a-button>
</a-upload>
<a-button
type=
"primary"
:disabled=
"fileList.length === 0"
:loading=
"loading"
style=
"margin-top: 16px"
@
click=
"handleUpload"
>
{{
loading
?
'上传中'
:
'开始上传'
}}
</a-button>
</a-tab-pane>
<a-tab-pane
key=
"2"
tab=
"抓拍记录图"
class=
"resultPic"
>
<a-form-item
label=
"监控点:"
style=
"padding: 5px 0"
class=
"secondCondition"
>
<a-select
v-model:value=
"formObj.gate_id"
style=
"width: 270px"
mode=
"multiple"
:maxTagCount=
"1"
:options=
"gateList"
optionFilterProp=
"label"
show-search
>
</a-select>
</a-form-item>
<a-form-item
label=
"方向:"
style=
"padding: 5px 0"
class=
"secondCondition"
>
<a-select
v-model:value=
"formObj.direction"
mode=
"multiple"
:maxTagCount=
"1"
style=
"width: 200px"
>
<a-select-option
:value=
"1"
>
进
</a-select-option>
<a-select-option
:value=
"-1"
>
出
</a-select-option>
</a-select>
</a-form-item>
<a-form-item
label=
"选择日期:"
style=
"padding: 5px 0"
class=
"secondCondition"
>
<a-date-picker
v-model:value=
"formObj.date"
:format=
"'YYYY-MM-DD'"
style=
"width: 150px"
/>
</a-form-item>
<a-form-item
label=
"选择时间:"
style=
"padding: 5px 0"
class=
"secondCondition"
>
<a-time-picker
v-model:value=
"formObj.startTime"
style=
"width: 100px"
/>
<a-time-picker
v-model:value=
"formObj.endTime"
style=
"width: 100px"
/>
</a-form-item>
<a-form-item
style=
"padding: 5px 0"
class=
"secondCondition"
>
<a-button
type=
"primary"
@
click=
"picSearch"
:loading=
"isLoading"
style=
"margin-right: 10px;"
>
查询
</a-button>
<!--
<a-button
type=
"primary"
@
click=
"clickCheck"
>
选中
</a-button>
-->
</a-form-item>
<div
class=
"resultContent"
:style=
"
{'height':contentHeight+'px'}">
<template
v-for=
"person in dataList"
>
<div
class=
"classBox"
:class=
"person.expand?'expand':''"
>
<div>
<div
class=
"boxInfo"
>
<span
class=
"iconExpand"
v-show=
"!person.expand"
>
▶
</span>
<span
class=
"iconExpand"
v-show=
"person.expand"
>
▼
</span>
<span
class=
"expandWord"
@
click=
'expandChange(person)'
>
{{
person
.
expand
?
'收起'
:
'展开'
}}
</span>
<span
style=
"padding-left: 10px;"
>
人id:
{{
' '
+
person
.
person_unid
}}
图片数量:
{{
person
.
perrsonList
.
length
}}
</span>
</div>
<el-row
v-for=
"row in getPagedList(person.perrsonList, 8)"
>
<el-col
:span=
"3"
v-for=
"item in row"
>
<div
style=
"margin: 0 5px"
class=
"picBox"
>
<el-checkbox
class=
"checkBox"
v-model=
"item.checked"
></el-checkbox>
<el-image
:src=
"item.picture_url"
:fit=
"'fill'"
class=
"single-image"
>
</el-image>
</div>
</el-col>
</el-row>
</div>
</div>
</
template
>
</div>
<a-pagination
v-model:current=
"pageNum"
v-model:pageSize=
"pageSize"
:total=
"total"
:show-total=
"total => `共 ${total} 条`"
:pageSizeOptions=
"['10', '20', '40', '80']"
@
change=
"onPageNumChange"
@
showSizeChange=
"onPageSizeChange"
show-size-changer
show-quick-jumper
style=
"text-align:center"
/>
</a-tab-pane>
</a-tabs>
</a-form-item>
</a-form>
</a-form>
</div>
</div>
<template
#
footer
>
<template
#
footer
>
...
@@ -123,107 +26,51 @@
...
@@ -123,107 +26,51 @@
</template>
</template>
<
script
>
<
script
>
import
moment
from
'moment'
import
{
reactive
,
ref
,
toRaw
}
from
"vue"
;
import
{
reactive
,
ref
,
toRaw
}
from
"vue"
;
import
{
PlusOutlined
,
LoadingOutlined
}
from
'@ant-design/icons-vue'
;
import
{
isArray
}
from
'@/PublicUtil/Judgment'
import
snapshotRecordApi
from
'@/views/SnapshotCluster/SnapshotRecord/SnapshotRecordApi'
import
clusterResultApi
from
'@/views/SnapshotCluster/ClusterResult/ClusterResultApi'
import
FeatureMatchingAccuracyApi
from
'@/views/FeatureMatchingAccuracy/FeatureMatchingAccuracyApi'
import
FeatureMatchingAccuracyApi
from
'@/views/FeatureMatchingAccuracy/FeatureMatchingAccuracyApi'
import
{
filterEmptyValueInObject
,
formatDate
,
formatTime
,
getPagedList
}
from
'@/PublicUtil/PublicUtil'
import
{
filterEmptyValueInObject
,
formatDate
,
formatTime
,
getPagedList
}
from
'@/PublicUtil/PublicUtil'
import
{
ElMessage
}
from
'element-plus'
import
{
ElMessage
}
from
'element-plus'
export
default
{
export
default
{
components
:
{
LoadingOutlined
,
PlusOutlined
,
},
setup
(
props
,
context
)
{
setup
(
props
,
context
)
{
const
isVisible
=
ref
(
false
);
const
isVisible
=
ref
(
false
);
const
pageNum
=
ref
(
1
)
const
pageNum
=
ref
(
1
)
const
pageSize
=
ref
(
10
)
const
pageSize
=
ref
(
10
)
const
total
=
ref
()
const
total
=
ref
()
const
dataList
=
ref
([])
// 暂时选中目标,但没提交
// 暂时选中目标,但没提交
const
checkList
=
ref
([])
const
checkList
=
ref
([])
const
formObj
=
reactive
({
const
formObj
=
reactive
({
name
:
''
,
name
:
''
,
dec
:
''
,
dec
:
''
,
gate_id
:
[],
direction
:
[
1
,
-
1
],
date
:
moment
(
moment
().
format
(
'YYYY-MM-DD'
),
'YYYY-MM-DD'
),
startTime
:
moment
(
'00:00:00'
,
'HH:mm:ss'
),
endTime
:
moment
(
'23:59:59'
,
'HH:mm:ss'
),
})
})
const
isLoading
=
ref
(
false
)
const
isLoading
=
ref
(
false
)
const
accountId
=
ref
(
''
);
const
accountId
=
ref
(
''
);
const
mallId
=
ref
(
''
);
const
mallId
=
ref
(
''
);
const
gateList
=
ref
([])
const
type
=
ref
(
''
)
const
getGateList
=
function
()
{
formObj
.
gate_id
=
[]
gateList
.
value
=
[]
snapshotRecordApi
.
getGateList
(
{
account_id
:
accountId
.
value
,
plaza_id
:
mallId
.
value
,
type
:
0
,
}
).
then
(
(
r
)
=>
{
if
(
isArray
(
r
.
data
))
{
for
(
const
item
of
r
.
data
)
{
gateList
.
value
.
push
(
{
value
:
item
.
id
,
label
:
item
.
name
,
}
)
}
picSearch
()
}
}
)
}
const
initDialog
=
function
(
parmas
)
{
const
initDialog
=
function
(
parmas
)
{
accountId
.
value
=
parmas
.
account_id
;
accountId
.
value
=
parmas
.
account_id
;
mallId
.
value
=
parmas
.
plaza_id
;
mallId
.
value
=
parmas
.
plaza_id
;
formObj
.
name
=
''
;
type
.
value
=
parmas
.
type
;
formObj
.
dec
=
''
;
formObj
.
name
=
parmas
.
name
||
''
;
getGateList
()
formObj
.
dec
=
parmas
.
description
||
''
;
if
(
parmas
.
type
==
'edit'
){
formObj
.
id
=
parmas
.
id
}
isVisible
.
value
=
true
;
isVisible
.
value
=
true
;
};
};
const
onCancel
=
()
=>
{
const
onCancel
=
()
=>
{
dataList
.
value
=
[]
total
.
value
=
0
isVisible
.
value
=
false
;
isVisible
.
value
=
false
;
};
};
const
refreshParentTable
=
function
(){
const
refreshParentTable
=
function
(){
context
.
emit
(
'refreshParentTable'
)
context
.
emit
(
'refreshParentTable'
)
}
}
const
onConfirm
=
function
(){
const
onConfirm
=
function
(){
let
faceIds
=
[]
if
(
type
.
value
==
'add'
){
dataList
.
value
.
forEach
((
itemPerson
)
=>
{
itemPerson
.
perrsonList
.
forEach
((
item
)
=>
{
if
(
item
.
checked
)
{
faceIds
.
push
(
item
.
id
)
}
})
})
if
(
faceIds
.
length
<
1
){
ElMessage
({
message
:
`请选择图片`
,
type
:
'warning'
})
return
false
;
}
const
data
=
filterEmptyValueInObject
(
const
data
=
filterEmptyValueInObject
(
{
{
accountId
:
accountId
.
value
,
accountId
:
accountId
.
value
,
mallId
:
mallId
.
value
,
mallId
:
mallId
.
value
,
name
:
formObj
.
name
,
name
:
formObj
.
name
,
description
:
formObj
.
dec
,
description
:
formObj
.
dec
,
faceIds
:
faceIds
}
}
)
)
FeatureMatchingAccuracyApi
.
addMatch
(
data
).
then
(
FeatureMatchingAccuracyApi
.
addMatch
(
data
).
then
(
...
@@ -244,100 +91,35 @@ export default {
...
@@ -244,100 +91,35 @@ export default {
}
}
}
}
)
)
}
}
else
{
const
loading
=
ref
(
false
);
const
imageUrl
=
ref
(
''
);
const
fileList
=
ref
([]);
const
beforeUpload
=
(
file
)
=>
{
fileList
.
value
=
[
file
];
return
false
;
};
const
handleRemove
=
(
file
)
=>
{
const
index
=
fileList
.
value
.
indexOf
(
file
);
const
newFileList
=
fileList
.
value
.
slice
();
newFileList
.
splice
(
index
,
1
);
fileList
.
value
=
newFileList
;
};
const
handleUpload
=
function
(){
const
formData
=
new
FormData
();
fileList
.
value
.
forEach
((
file
)
=>
{
formData
.
append
(
'files[]'
,
file
);
});
loading
.
value
=
true
;
}
const
sortDataList
=
function
(
list
)
{
list
.
sort
(
(
a
,
b
)
=>
{
return
(
b
.
perrsonList
.
length
-
a
.
perrsonList
.
length
)
}
)
}
const
picSearch
=
function
(){
pageNum
.
value
=
1
clickSearch
()
}
const
clickSearch
=
function
(){
const
rawData
=
toRaw
(
formObj
)
const
data
=
filterEmptyValueInObject
(
const
data
=
filterEmptyValueInObject
(
{
{
account_id
:
accountId
.
value
,
accountId
:
accountId
.
value
,
type
:
0
,
mallId
:
mallId
.
value
,
plaza_id
:
mallId
.
value
,
name
:
formObj
.
name
,
gate_id
:
rawData
.
gate_id
.
toString
(),
description
:
formObj
.
dec
,
direction
:
rawData
.
direction
.
toString
(),
id
:
formObj
.
id
,
picType
:
2
,
personType
:
'1, 0,'
,
startTime
:
formatDate
(
rawData
.
date
)
+
' '
+
formatTime
(
rawData
.
startTime
),
endTime
:
formatDate
(
rawData
.
date
)
+
' '
+
formatTime
(
rawData
.
endTime
),
page
:
pageNum
.
value
-
1
,
pageSize
:
pageSize
.
value
,
}
}
)
)
clusterResultApi
.
getClusterResultList
(
data
).
then
(
FeatureMatchingAccuracyApi
.
editMatch
(
data
).
then
(
(
r
)
=>
{
(
r
)
=>
{
isLoading
.
value
=
false
if
(
r
.
msg_code
==
200
){
sortDataList
(
r
.
data
.
persons
)
ElMessage
({
r
.
data
.
persons
.
forEach
((
itemPerson
)
=>
{
message
:
r
.
msg_info
,
itemPerson
.
expand
=
false
type
:
'success'
itemPerson
.
perrsonList
.
forEach
((
item
)
=>
{
item
.
checked
=
false
;
if
(
item
.
picture_url
)
{
item
.
picture_url
=
window
.
_baseImgUrl
+
item
.
picture_url
}
})
})
refreshParentTable
()
isVisible
.
value
=
false
}
else
{
ElMessage
({
message
:
r
.
msg_info
,
type
:
'error'
})
})
dataList
.
value
=
r
.
data
.
persons
return
false
;
total
.
value
=
r
.
data
.
pageNum
document
.
getElementsByClassName
(
'resultContent'
)[
0
].
scrollTop
=
0
}
)
}
const
onPageNumChange
=
function
(
num
)
{
pageNum
.
value
=
num
clickSearch
()
}
const
onPageSizeChange
=
function
(
current
,
size
)
{
pageNum
.
value
=
1
pageSize
.
value
=
size
clickSearch
()
}
const
expandChange
=
function
(
data
){
dataList
.
value
.
forEach
(
item
=>
{
if
(
data
.
person_unid
==
item
.
person_unid
)
{
item
.
expand
=
!
item
.
expand
}
}
})
}
}
)
const
clickCheck
=
function
(){
dataList
.
value
.
forEach
((
itemPerson
)
=>
{
itemPerson
.
perrsonList
.
forEach
((
item
)
=>
{
if
(
item
.
checked
){
checkList
}
}
})
})
}
}
return
{
return
{
isVisible
,
isVisible
,
...
@@ -345,86 +127,11 @@ export default {
...
@@ -345,86 +127,11 @@ export default {
onCancel
,
onCancel
,
onConfirm
,
onConfirm
,
initDialog
,
initDialog
,
activeKey
:
ref
(
'2'
),
beforeUpload
,
loading
,
imageUrl
,
fileList
,
handleUpload
,
handleRemove
,
gateList
,
isLoading
,
isLoading
,
clickSearch
,
type
onPageNumChange
,
onPageSizeChange
,
total
,
dataList
,
pageNum
,
pageSize
,
getPagedList
,
expandChange
,
clickCheck
,
refreshParentTable
,
picSearch
};
};
},
},
};
};
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
.resultPic
{
border
:
1px
solid
#ddd
;
padding
:
0px
10px
;
}
.pictures
{
width
:
100%
;
margin-top
:
10px
;
}
.secondCondition
{
//
max-width
:
300px
;
display
:
inline-block
;
}
.resultContent
{
overflow
:
auto
;
max-height
:
540px
;
min-height
:
300px
;
margin-bottom
:
10px
;
}
.boxInfo
{
line-height
:
28px
;
margin-bottom
:
5px
;
}
.classBox
{
margin
:
7px
0
;
border
:
solid
1px
black
;
height
:
260px
;
overflow-y
:
hidden
;
}
.expand
{
height
:
auto
;
overflow
:
auto
;
}
.expandWord
{
color
:
#1890ff
;
margin-right
:
5px
;
cursor
:
pointer
;
float
:
right
;
}
.iconExpand
{
cursor
:
pointer
;
float
:
right
;
color
:
#1890ff
;
margin-right
:
20px
;
}
.single-image
{
width
:
100%
;
height
:
220px
;
}
.picBox
{
position
:
relative
;
}
.checkBox
{
position
:
absolute
;
left
:
5px
;
top
:
0
;
}
</
style
>
</
style
>
src/views/FeatureMatchingAccuracy/editPerson.vue
View file @
ff23185
<
template
>
<
template
>
<a-modal
<a-modal
title=
"
编辑注册人员
"
title=
"
添加注册样本图
"
v-model:visible=
"isVisible"
v-model:visible=
"isVisible"
width=
"1500px"
width=
"1500px"
:dialog-style=
"
{ top: '20px',height:'90%' }"
:dialog-style=
"
{ top: '20px',height:'90%' }"
class="detail-modal"
class="detail-modal"
@cancel = 'onCancel()'
>
>
<div
style=
"height: 700px;"
>
<div
style=
"height: 700px;"
>
<a-form
:model=
"formObj"
layout=
"inline"
:label-col=
"
{ style: { width: '100px' } }">
<a-form
:model=
"formObj"
layout=
"inline"
:label-col=
"
{ style: { width: '100px' } }">
<a-form-item
label=
"姓名:"
>
<a-form-item
class=
"pictures"
>
<a-input
v-model:value=
"formObj.name"
style=
"width: 500px"
>
</a-input>
</a-form-item>
<a-form-item
label=
"描述:"
>
<a-input
v-model:value=
"formObj.dec"
style=
"width: 500px"
>
</a-input>
</a-form-item>
<a-form-item
label=
"选择样本图:"
class=
"pictures"
>
<a-tabs
type=
"card"
v-model:activeKey=
"activeKey"
>
<a-tabs
type=
"card"
v-model:activeKey=
"activeKey"
>
<a-tab-pane
key=
"1"
tab=
"本地上传"
>
<a-tab-pane
key=
"1"
tab=
"本地上传"
>
<a-upload
<a-upload
...
@@ -85,11 +78,12 @@
...
@@ -85,11 +78,12 @@
<el-row
v-for=
"row in getPagedList(person.perrsonList, 8)"
>
<el-row
v-for=
"row in getPagedList(person.perrsonList, 8)"
>
<el-col
:span=
"3"
v-for=
"item in row"
>
<el-col
:span=
"3"
v-for=
"item in row"
>
<div
style=
"margin: 0 5px"
class=
"picBox"
>
<div
style=
"margin: 0 5px"
class=
"picBox"
>
<
el-checkbox
class=
"checkBox"
v-model=
"item.checked"
></el-checkbox
>
<
!--
<el-checkbox
class=
"checkBox"
v-model=
"item.checked"
></el-checkbox>
--
>
<el-image
:src=
"item.picture_url"
<el-image
:src=
"item.picture_url"
:fit=
"'fill'"
:fit=
"'fill'"
class=
"single-image"
>
class=
"single-image"
>
</el-image>
</el-image>
<el-button
type=
"primary"
:disabled=
"item.checked?true:false"
class=
"checkBox"
@
click=
"onConfirm(item)"
>
选中
</el-button>
</div>
</div>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -116,7 +110,7 @@
...
@@ -116,7 +110,7 @@
</div>
</div>
<
template
#
footer
>
<
template
#
footer
>
<a-button
@
click=
"onCancel"
>
返回
</a-button>
<a-button
@
click=
"onCancel"
>
返回
</a-button>
<
a-button
@
click=
"onConfirm"
type=
"primary"
>
确定
</a-button
>
<
!--
<a-button
@
click=
"onConfirm"
type=
"primary"
>
确定
</a-button>
--
>
</
template
>
</
template
>
</a-modal>
</a-modal>
</template>
</template>
...
@@ -184,57 +178,42 @@ export default {
...
@@ -184,57 +178,42 @@ export default {
}
}
)
)
}
}
const
disabledPicList
=
ref
([])
const
initDialog
=
function
(
parmas
)
{
const
initDialog
=
function
(
parmas
)
{
accountId
.
value
=
parmas
.
accountId
;
accountId
.
value
=
parmas
.
accountId
;
mallId
.
value
=
parmas
.
mallId
;
mallId
.
value
=
parmas
.
mallId
;
formObj
.
name
=
parmas
.
name
;
formObj
.
dec
=
parmas
.
description
;
formObj
.
id
=
parmas
.
id
;
formObj
.
id
=
parmas
.
id
;
// checkGateList.value = parmas.faceIds
getGateList
()
getGateList
()
disabledPicList
.
value
=
parmas
.
faceIds
||
[]
isVisible
.
value
=
true
;
isVisible
.
value
=
true
;
};
};
const
onCancel
=
()
=>
{
const
onCancel
=
()
=>
{
if
(
isAdd
.
value
){
refreshParentTable
()
}
isVisible
.
value
=
false
;
isVisible
.
value
=
false
;
};
};
const
refreshParentTable
=
function
(){
const
refreshParentTable
=
function
(){
context
.
emit
(
'refreshParentTable'
)
context
.
emit
(
'refreshParentTable'
)
}
}
const
onConfirm
=
function
(){
const
isAdd
=
ref
(
false
)
let
faceIds
=
[]
const
onConfirm
=
function
(
resData
){
dataList
.
value
.
forEach
((
itemPerson
)
=>
{
itemPerson
.
perrsonList
.
forEach
((
item
)
=>
{
if
(
item
.
checked
)
{
faceIds
.
push
(
item
.
id
)
}
})
})
if
(
faceIds
.
length
<
1
&&
checkGateList
.
length
<
1
){
ElMessage
({
message
:
`请选择图片`
,
type
:
'warning'
})
return
false
;
}
const
data
=
filterEmptyValueInObject
(
const
data
=
filterEmptyValueInObject
(
{
{
// accountId: accountId.value,
faceIds
:[
resData
.
id
],
// mallId: mallId.value,
name
:
formObj
.
name
,
description
:
formObj
.
dec
,
faceIds
:
faceIds
.
length
<
1
?
checkGateList
.
value
:
faceIds
,
id
:
formObj
.
id
id
:
formObj
.
id
}
}
)
)
FeatureMatchingAccuracyApi
.
editMatch
(
data
).
then
(
FeatureMatchingAccuracyApi
.
addMatchReg
(
data
).
then
(
(
r
)
=>
{
(
r
)
=>
{
if
(
r
.
msg_code
==
200
){
if
(
r
.
msg_code
==
200
){
ElMessage
({
ElMessage
({
message
:
r
.
msg_info
,
message
:
r
.
msg_info
,
type
:
'success'
type
:
'success'
})
})
refreshParentTable
()
isAdd
.
value
=
true
;
isVisible
.
value
=
false
disabledPicList
.
value
.
push
(
resData
.
id
)
clickSearch
()
}
else
{
}
else
{
ElMessage
({
ElMessage
({
message
:
r
.
msg_info
,
message
:
r
.
msg_info
,
...
@@ -300,7 +279,7 @@ export default {
...
@@ -300,7 +279,7 @@ export default {
r
.
data
.
persons
.
forEach
((
itemPerson
)
=>
{
r
.
data
.
persons
.
forEach
((
itemPerson
)
=>
{
itemPerson
.
expand
=
false
itemPerson
.
expand
=
false
itemPerson
.
perrsonList
.
forEach
((
item
)
=>
{
itemPerson
.
perrsonList
.
forEach
((
item
)
=>
{
if
(
checkGate
List
.
value
.
includes
(
item
.
id
)){
if
(
disabledPic
List
.
value
.
includes
(
item
.
id
)){
item
.
checked
=
true
;
item
.
checked
=
true
;
}
else
{
}
else
{
item
.
checked
=
false
;
item
.
checked
=
false
;
...
@@ -362,7 +341,8 @@ export default {
...
@@ -362,7 +341,8 @@ export default {
expandChange
,
expandChange
,
clickCheck
,
clickCheck
,
refreshParentTable
,
refreshParentTable
,
picSearch
picSearch
,
disabledPicList
};
};
},
},
};
};
...
@@ -419,9 +399,18 @@ export default {
...
@@ -419,9 +399,18 @@ export default {
.picBox
{
.picBox
{
position
:
relative
;
position
:
relative
;
}
}
.picBox
:hover
.checkBox
{
display
:
block
;
}
.checkBox
{
.checkBox
{
display
:
none
;
width
:
80px
;
height
:
30px
;
position
:
absolute
;
position
:
absolute
;
left
:
5
px
;
left
:
0
px
;
top
:
0
;
top
:
0
;
right
:
0
;
bottom
:
0
;
margin
:
auto
;
}
}
</
style
>
</
style
>
src/views/SnapshotCluster/ClusterResult/ClusterResult.vue
View file @
ff23185
...
@@ -142,7 +142,7 @@
...
@@ -142,7 +142,7 @@
</el-image>
</el-image>
<div>
时间:
{{
item
.
counttime
}}
</div>
<div>
时间:
{{
item
.
counttime
}}
</div>
<div>
人员类型:
{{
item
.
person_type
==
1
?
'店员'
:(
item
.
person_type
==
0
?
'顾客'
:
'未知'
)
}}
</div>
<div>
人员类型:
{{
item
.
person_type
==
1
?
'店员'
:(
item
.
person_type
==
0
?
'顾客'
:
'未知'
)
}}
</div>
<div>
性别:
{{
formatGender
(
item
.
gender
)
}}
</div>
<div>
性别:
{{
formatGender
(
item
.
gender
)
}}
(
{{
item
.
age
}}
)
</div>
<div
class=
"direction"
:class=
"'direction'+item.direction"
>
方向:
{{
formatDirection
(
item
.
direction
)
}}
</div>
<div
class=
"direction"
:class=
"'direction'+item.direction"
>
方向:
{{
formatDirection
(
item
.
direction
)
}}
</div>
<div>
地点:
{{
item
.
gate_name
}}
</div>
<div>
地点:
{{
item
.
gate_name
}}
</div>
</div>
</div>
...
...
src/views/SnapshotCluster/SnapshotRecord/SnapshotRecord.vue
View file @
ff23185
...
@@ -118,7 +118,7 @@
...
@@ -118,7 +118,7 @@
</el-image>
</el-image>
<div>
时间:
{{
item
.
counttime
}}
</div>
<div>
时间:
{{
item
.
counttime
}}
</div>
<div>
人员类型:
{{
item
.
person_type
==
1
?
'店员'
:(
item
.
person_type
==
0
?
'顾客'
:
'未知'
)
}}
</div>
<div>
人员类型:
{{
item
.
person_type
==
1
?
'店员'
:(
item
.
person_type
==
0
?
'顾客'
:
'未知'
)
}}
</div>
<div>
性别:
{{
formatGender
(
item
.
gender
)
}}
</div>
<div>
性别:
{{
formatGender
(
item
.
gender
)
}}
(
{{
item
.
age
}}
)
</div>
<div
class=
"direction"
:class=
"'direction'+item.direction"
>
方向:
{{
formatDirection
(
item
.
direction
)
}}
</div>
<div
class=
"direction"
:class=
"'direction'+item.direction"
>
方向:
{{
formatDirection
(
item
.
direction
)
}}
</div>
<div>
地点:
{{
item
.
gate_name
}}
</div>
<div>
地点:
{{
item
.
gate_name
}}
</div>
</div>
</div>
...
...
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