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 1f6327c1
authored
Jan 18, 2022
by
李金轩
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
ljx
1 parent
a2828121
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
243 additions
and
47 deletions
src/PublicUtil/PublicUtil.js
src/Request/PublicAxiosInstance.js
src/views/SnapshotCluster/ClusterResult/ClusterResult.less
src/views/SnapshotCluster/ClusterResult/ClusterResult.vue
src/views/SnapshotCluster/ClusterResult/ClusterResultApi.js
src/views/SnapshotCluster/SnapshotCluster.vue
src/views/SnapshotCluster/SnapshotRecord/SnapshotRecord.less
src/views/SnapshotCluster/SnapshotRecord/SnapshotRecord.vue
src/views/SnapshotCluster/SnapshotRecord/SnapshotRecordApi.js
src/PublicUtil/PublicUtil.js
View file @
1f6327c
...
@@ -343,8 +343,9 @@ export const addSerialNumber = function(sourceData) {
...
@@ -343,8 +343,9 @@ export const addSerialNumber = function(sourceData) {
// 把 date 对象转换为 0000-00-00 这种日期形式
// 把 date 对象转换为 0000-00-00 这种日期形式
export
const
formatDate
=
function
(
date
)
{
export
const
formatDate
=
function
(
date
)
{
if
(
isDate
(
date
))
return
moment
(
date
).
format
(
"YYYY-MM-DD"
)
{
}
return
moment
(
date
).
format
(
"YYYY-MM-DD"
)
}
export
const
formatTime
=
function
(
date
)
{
return
moment
(
date
).
format
(
"HH:mm:ss"
)
}
}
src/Request/PublicAxiosInstance.js
View file @
1f6327c
...
@@ -15,7 +15,7 @@ axiosInstance.interceptors.request.use(
...
@@ -15,7 +15,7 @@ axiosInstance.interceptors.request.use(
config
=>
{
config
=>
{
if
(
window
.
location
.
hostname
===
'localhost'
)
if
(
window
.
location
.
hostname
===
'localhost'
)
{
{
config
.
headers
.
Authorization
=
'
68e02bdc-5815-44e1-94c2-8a01d3270c4c
'
config
.
headers
.
Authorization
=
'
c3b85226-4301-45fb-a087-4caf3194fc90
'
}
}
else
else
{
{
...
...
src/views/SnapshotCluster/ClusterResult/ClusterResult.less
0 → 100644
View file @
1f6327c
.single-image {
height: 300px;
width: 100%;
}
src/views/SnapshotCluster/ClusterResult/ClusterResult.vue
View file @
1f6327c
This diff is collapsed.
Click to expand it.
src/views/SnapshotCluster/ClusterResult/ClusterResultApi.js
0 → 100644
View file @
1f6327c
import
axiosInstance
from
"@/Request/PublicAxiosInstance"
import
{
filterEmptyValueInObject
}
from
"@/PublicUtil/PublicUtil"
class
ClusterResultApi
{
getClusterResultList
(
data
)
{
return
axiosInstance
.
request
(
{
method
:
'GET'
,
url
:
`/faceRecognitions/faceRecord`
,
params
:
filterEmptyValueInObject
(
data
)
}
)
}
getAccountList
()
{
return
axiosInstance
.
request
(
{
method
:
'GET'
,
url
:
`/accounts`
,
}
)
}
getPlazaList
(
data
)
{
return
axiosInstance
.
request
(
{
method
:
'GET'
,
url
:
`/malls`
,
params
:
filterEmptyValueInObject
(
{
accountIds
:
data
.
account_id
},
)
}
)
}
getZoneList
(
data
)
{
return
axiosInstance
.
request
(
{
method
:
'GET'
,
url
:
`/zones/zoneList`
,
params
:
filterEmptyValueInObject
(
{
account_id
:
data
.
account_id
,
plaza_id
:
data
.
plaza_id
,
},
)
}
)
}
getGateList
(
data
)
{
return
axiosInstance
.
request
(
{
method
:
'GET'
,
url
:
`/gates/gateByInfo`
,
params
:
filterEmptyValueInObject
(
{
account_id
:
data
.
account_id
,
plaza_id
:
data
.
plaza_id
,
zone_id
:
data
.
zone_id
,
type
:
data
.
type
,
},
)
}
)
}
}
const
clusterResultApi
=
new
ClusterResultApi
()
export
default
clusterResultApi
src/views/SnapshotCluster/SnapshotCluster.vue
View file @
1f6327c
...
@@ -7,10 +7,10 @@
...
@@ -7,10 +7,10 @@
聚类结果
聚类结果
</a-menu-item>
</a-menu-item>
</a-menu>
</a-menu>
<div
v-
if
=
"currentMenu[0] === '抓拍记录'"
>
<div
v-
show
=
"currentMenu[0] === '抓拍记录'"
>
<SnapshotRecord></SnapshotRecord>
<SnapshotRecord></SnapshotRecord>
</div>
</div>
<div
v-
if
=
"currentMenu[0] === '聚类结果'"
>
<div
v-
show
=
"currentMenu[0] === '聚类结果'"
>
<ClusterResult></ClusterResult>
<ClusterResult></ClusterResult>
</div>
</div>
</
template
>
</
template
>
...
...
src/views/SnapshotCluster/SnapshotRecord/SnapshotRecord.less
0 → 100644
View file @
1f6327c
.single-image {
height: 300px;
width: 100%;
}
src/views/SnapshotCluster/SnapshotRecord/SnapshotRecord.vue
View file @
1f6327c
...
@@ -66,10 +66,13 @@
...
@@ -66,10 +66,13 @@
</a-select>
</a-select>
</a-form-item>
</a-form-item>
<a-form-item
label=
"方向:"
>
<a-form-item
label=
"方向:"
>
<a-select
v-model:value=
"queryAlarmEventForm.direction"
style=
"width: 200px"
>
<a-select
v-model:value=
"queryAlarmEventForm.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-option
:value=
"
0
"
>
出
</a-select-option>
<a-select-option
:value=
"
-1
"
>
出
</a-select-option>
<a-select-option
:value=
"
2
"
>
横穿
</a-select-option>
<a-select-option
:value=
"
0
"
>
横穿
</a-select-option>
</a-select>
</a-select>
</a-form-item>
</a-form-item>
<a-form-item
label=
"抓怕类型:"
>
<a-form-item
label=
"抓怕类型:"
>
...
@@ -79,50 +82,89 @@
...
@@ -79,50 +82,89 @@
</a-select>
</a-select>
</a-form-item>
</a-form-item>
<a-form-item
label=
"人员类型:"
>
<a-form-item
label=
"人员类型:"
>
<a-select
v-model:value=
"queryAlarmEventForm.personType"
style=
"width: 200px"
>
<a-select
v-model:value=
"queryAlarmEventForm.personType"
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-option
:value=
"2"
>
顾客
</a-select-option>
<a-select-option
:value=
"2"
>
顾客
</a-select-option>
</a-select>
</a-select>
</a-form-item>
</a-form-item>
<a-form-item
label=
"选择日期:"
>
<a-form-item
label=
"选择日期:"
>
<a-
range-picker
<a-
date-picker
v-model:value=
"queryAlarmEventForm.date"
:format=
"'YYYY-MM-DD'"
/>
v-model:value=
"queryAlarmEventForm.time"
</a-form-item>
:show-time=
"
{ format: 'HH:mm' }"
<a-form-item
label=
"选择时间:"
>
format="YYYY-MM-DD HH:mm"
<a-time-picker
v-model:value=
"queryAlarmEventForm.startTime"
/>
/>
<a-time-picker
v-model:value=
"queryAlarmEventForm.endTime"
/>
</a-form-item>
</a-form-item>
<a-form-item>
<a-form-item>
<a-button
type=
"primary"
@
click=
"
onSubmit
"
>
查询
</a-button>
<a-button
type=
"primary"
@
click=
"
confirmSearch
"
>
查询
</a-button>
</a-form-item>
</a-form-item>
</a-form>
</a-form>
<el-pagination
@
current-change=
"onPageNumChange"
<div
v-loading=
"isLoading"
>
@
size-change=
"onPageSizeChange"
<el-row
v-for=
"row in pagedTableDataList"
>
:current-page=
"pageNum"
<el-col
:span=
"3"
v-for=
"item in row"
>
:page-size=
"pageSize"
<div
style=
"margin: 0 5px"
>
:total=
"total"
<div
style=
"display:flex; justify-content: flex-end "
>
:page-sizes=
"[12, 24, 36, 48]"
<span
@
click=
"downloadFile(item.features_url)"
layout=
"total, sizes, prev, pager, next, jumper"
style=
"color: #409EFF;font-size: 15px;cursor: pointer;"
>
style=
"text-align:center"
下载特征值文件
>
</span>
</el-pagination>
</div>
<el-image
:src=
"item.picture_url"
:fit=
"'contain'"
class=
"single-image"
>
</el-image>
<div>
时间:
{{
item
.
counttime
}}
</div>
<div>
方向:
{{
formatDirection
(
item
.
direction
)
}}
</div>
<div>
地点:
{{
item
.
gate_name
}}
</div>
</div>
</el-col>
</el-row>
<a-pagination
v-model:current=
"pageNum"
v-model:pageSize=
"pageSize"
:total=
"total"
:show-total=
"total => `共 $
{total} 条`"
:pageSizeOptions="['24', '48', '96', '192']"
@change="onPageNumChange"
@showSizeChange="onPageSizeChange"
show-size-changer
show-quick-jumper
style="text-align:center"
/>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
reactive
,
ref
}
from
'vue'
import
{
computed
,
reactive
,
ref
,
toRaw
}
from
'vue'
import
snapshotRecordApi
from
'@/views/SnapshotCluster/SnapshotRecord/SnapshotRecordApi'
import
snapshotRecordApi
from
'@/views/SnapshotCluster/SnapshotRecord/SnapshotRecordApi'
import
{
isArray
}
from
'@/PublicUtil/Judgment'
import
{
isArray
}
from
'@/PublicUtil/Judgment'
import
moment
from
'moment'
import
{
filterEmptyValueInObject
,
formatDate
,
formatTime
,
getPagedList
}
from
'@/PublicUtil/PublicUtil'
export
default
{
export
default
{
setup
()
{
setup
()
{
// scalar
// scalar
const
pageNum
=
ref
(
1
)
const
pageNum
=
ref
(
1
)
const
pageSize
=
ref
(
12
)
const
pageSize
=
ref
(
24
)
const
total
=
ref
()
const
total
=
ref
()
const
isLoading
=
ref
(
false
)
// sequence
const
dataList
=
ref
([])
const
accountList
=
ref
([])
const
accountList
=
ref
([])
const
plazaList
=
ref
([])
const
plazaList
=
ref
([])
const
zoneList
=
ref
([])
const
zoneList
=
ref
([])
const
gateList
=
ref
([])
const
gateList
=
ref
([])
const
pagedTableDataList
=
computed
(
()
=>
{
return
getPagedList
(
dataList
.
value
,
8
)
}
)
const
queryAlarmEventForm
=
reactive
(
const
queryAlarmEventForm
=
reactive
(
{
{
account_id
:
[],
account_id
:
[],
...
@@ -130,29 +172,24 @@ export default {
...
@@ -130,29 +172,24 @@ export default {
zone_id
:
[],
zone_id
:
[],
gate_id
:
[],
gate_id
:
[],
type
:
0
,
type
:
0
,
direction
:
''
,
direction
:
[
1
,
-
1
,
0
],
picType
:
''
,
picType
:
2
,
personType
:
''
,
personType
:
[
1
,
2
],
startTime
:
''
,
date
:
moment
(
moment
().
format
(
'YYYY-MM-DD'
),
'YYYY-MM-DD'
),
endTime
:
''
,
startTime
:
moment
(
'00:00:00'
,
'HH:mm:ss'
),
endTime
:
moment
(
'23:59:59'
,
'HH:mm:ss'
),
time
:
''
,
}
}
)
)
// function
// function
const
onPageNumChange
=
function
(
num
)
{
const
onPageNumChange
=
function
(
num
)
{
pageNum
.
value
=
num
pageNum
.
value
=
num
getPeopleImageFolderList
()
confirmSearch
()
}
}
const
onPageSizeChange
=
function
(
size
)
{
const
onPageSizeChange
=
function
(
current
,
size
)
{
pageNum
.
value
=
1
pageNum
.
value
=
1
pageSize
.
value
=
size
pageSize
.
value
=
size
getPeopleImageFolderList
()
confirmSearch
()
}
const
getPeopleImageFolderList
=
function
()
{
}
}
const
onSubmit
=
function
()
{
const
onSubmit
=
function
()
{
...
@@ -242,6 +279,62 @@ export default {
...
@@ -242,6 +279,62 @@ export default {
)
)
}
}
const
confirmSearch
=
function
()
{
isLoading
.
value
=
true
const
rawData
=
toRaw
(
queryAlarmEventForm
)
const
data
=
filterEmptyValueInObject
(
{
account_id
:
rawData
.
account_id
.
toString
(),
type
:
rawData
.
type
,
plaza_id
:
rawData
.
plaza_id
.
toString
(),
zone_id
:
rawData
.
zone_id
.
toString
(),
gate_id
:
rawData
.
gate_id
.
toString
(),
direction
:
rawData
.
direction
.
toString
(),
picType
:
rawData
.
picType
,
personType
:
rawData
.
personType
.
toString
(),
startTime
:
formatDate
(
rawData
.
date
)
+
' '
+
formatTime
(
rawData
.
startTime
),
endTime
:
formatDate
(
rawData
.
date
)
+
' '
+
formatTime
(
rawData
.
endTime
),
page
:
pageNum
.
value
-
1
,
pageSize
:
pageSize
.
value
,
}
)
snapshotRecordApi
.
getSnapshotRecordList
(
data
).
then
(
(
r
)
=>
{
isLoading
.
value
=
false
dataList
.
value
=
r
.
data
.
persons
total
.
value
=
r
.
data
.
pageNum
}
)
}
const
formatDirection
=
function
(
number
)
{
switch
(
number
)
{
case
1
:
{
return
'进'
}
case
0
:
{
return
'出'
}
case
2
:
{
return
'横穿'
}
default
:
{
break
}
}
}
const
downloadFile
=
function
(
url
)
{
window
.
open
(
url
)
}
const
initialize
=
function
()
{
const
initialize
=
function
()
{
getAccountList
()
getAccountList
()
}
}
...
@@ -250,15 +343,17 @@ export default {
...
@@ -250,15 +343,17 @@ export default {
return
{
return
{
// scalar
// scalar
isLoading
,
pageNum
,
pageNum
,
pageSize
,
pageSize
,
total
,
total
,
// sequence
// sequence
// mapping
accountList
,
accountList
,
plazaList
,
plazaList
,
zoneList
,
zoneList
,
gateList
,
gateList
,
pagedTableDataList
,
// mapping
queryAlarmEventForm
,
queryAlarmEventForm
,
// function
// function
onPageNumChange
,
onPageNumChange
,
...
@@ -267,11 +362,15 @@ export default {
...
@@ -267,11 +362,15 @@ export default {
onAccountChange
,
onAccountChange
,
onPlazaChange
,
onPlazaChange
,
onZoneChange
,
onZoneChange
,
confirmSearch
,
formatDirection
,
downloadFile
,
}
}
}
}
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
lang=
"less"
scoped
>
@import
"./SnapshotRecord"
;
</
style
>
</
style
>
src/views/SnapshotCluster/SnapshotRecord/SnapshotRecordApi.js
View file @
1f6327c
...
@@ -2,6 +2,18 @@ import axiosInstance from "@/Request/PublicAxiosInstance"
...
@@ -2,6 +2,18 @@ import axiosInstance from "@/Request/PublicAxiosInstance"
import
{
filterEmptyValueInObject
}
from
"@/PublicUtil/PublicUtil"
import
{
filterEmptyValueInObject
}
from
"@/PublicUtil/PublicUtil"
class
SnapshotRecordApi
{
class
SnapshotRecordApi
{
getSnapshotRecordList
(
data
)
{
return
axiosInstance
.
request
(
{
method
:
'GET'
,
url
:
`/faceRecognitions/faceRecord`
,
params
:
filterEmptyValueInObject
(
data
)
}
)
}
getAccountList
()
{
getAccountList
()
{
return
axiosInstance
.
request
(
return
axiosInstance
.
request
(
{
{
...
...
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