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 e429fe75
authored
Apr 13, 2022
by
李君
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
分钟客流
1 parent
74dad607
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
299 additions
and
3 deletions
public/config.js
src/router/index.js
src/views/Main/Main.vue
src/views/MinutePassenger/MinutePassenger.js
src/views/MinutePassenger/MinutePassenger.vue
public/config.js
View file @
e429fe7
window
.
_serverHost
=
[
'localhost'
,
'192.168.1.168'
].
includes
(
window
.
location
.
hostname
)
?
'
store.keliuyun.com/
'
:
window
.
location
.
host
window
.
_baseUrl
=
[
'localhost'
,
'192.168.1.168'
].
includes
(
window
.
location
.
hostname
)
?
'http
s://store.keliuyun.com/tool/'
:
`https://
${
window
.
_serverHost
}
/
tool/`
window
.
_baseImgUrl
=
[
'localhost'
,
'192.168.1.168'
].
includes
(
window
.
location
.
hostname
)
?
'http
s://store.keliuyun.com
/images/'
:
`
${
window
.
location
.
origin
}
/images/`
window
.
_serverHost
=
[
'localhost'
,
'192.168.1.168'
].
includes
(
window
.
location
.
hostname
)
?
'
36.112.68.214:9999
'
:
window
.
location
.
host
window
.
_baseUrl
=
[
'localhost'
,
'192.168.1.168'
].
includes
(
window
.
location
.
hostname
)
?
'http
://36.112.68.214:9999/btool/'
:
`https://
${
window
.
_serverHost
}
/b
tool/`
window
.
_baseImgUrl
=
[
'localhost'
,
'192.168.1.168'
].
includes
(
window
.
location
.
hostname
)
?
'http
://36.112.68.214:9999
/images/'
:
`
${
window
.
location
.
origin
}
/images/`
window
.
_socketUrl
=
[
'localhost'
,
'192.168.1.168'
].
includes
(
window
.
location
.
hostname
)
?
`wss://
${
window
.
_serverHost
}
/`
:
`wss://
${
window
.
_serverHost
}
/`
const
log
=
console
.
log
.
bind
(
console
)
src/router/index.js
View file @
e429fe7
...
...
@@ -41,6 +41,10 @@ const menuRoute = [
path
:
'ComparisonCapturedPictures'
,
component
:
()
=>
import
(
"@/views/ComparisonCapturedPictures/ComparisonCapturedPictures.vue"
),
},
{
path
:
'MinutePassenger'
,
component
:
()
=>
import
(
"@/views/MinutePassenger/MinutePassenger.vue"
),
},
]
},
]
...
...
src/views/Main/Main.vue
View file @
e429fe7
...
...
@@ -73,6 +73,12 @@
<span
style=
"padding: 0 5px"
>
抓拍图片对比
</span>
</div>
</a-menu-item>
<a-menu-item
:key=
"'/Main/MinutePassenger'"
>
<div
class=
"flex-vertical-center"
>
<img
:src=
"require('./Icons/7.svg')"
style=
"height: auto;width:20px"
/>
<span
style=
"padding: 0 5px"
>
分钟客流数据
</span>
</div>
</a-menu-item>
</a-menu>
</el-aside>
<el-main>
...
...
src/views/MinutePassenger/MinutePassenger.js
0 → 100644
View file @
e429fe7
import
axiosInstance
from
"@/Request/PublicAxiosInstance"
import
{
filterEmptyValueInObject
}
from
"@/PublicUtil/PublicUtil"
class
MinutePassenger
{
getMinuteList
(
data
)
{
return
axiosInstance
.
request
(
{
method
:
'GET'
,
url
:
`/faceRecognitions/minute`
,
params
:
filterEmptyValueInObject
(
data
)
}
)
}
}
const
MinutePassengerApi
=
new
MinutePassenger
()
export
default
MinutePassengerApi
src/views/MinutePassenger/MinutePassenger.vue
0 → 100644
View file @
e429fe7
<
template
>
<a-form
:model=
"queryForm"
layout=
"inline"
:label-col=
"
{ style: { width: '80px' } }">
<a-form-item
label=
"集团:"
style=
"padding: 5px 0"
>
<a-select
v-model:value=
"queryForm.account_id"
style=
"width: 280px"
@
change=
"onAccountChange"
:options=
"accountList"
optionFilterProp=
"label"
show-search
>
</a-select>
</a-form-item>
<a-form-item
label=
"门店:"
style=
"padding: 5px 0"
>
<a-select
v-model:value=
"queryForm.plaza_id"
style=
"width: 280px"
@
change=
"onPlazaChange"
:options=
"plazaList"
optionFilterProp=
"label"
show-search
>
</a-select>
</a-form-item>
<a-form-item
label=
"监控点名称:"
style=
"padding: 5px 0"
>
<a-select
v-model:value=
"queryForm.gate_id"
style=
"width: 280px"
mode=
"multiple"
:maxTagCount=
"1"
:options=
"gateList"
optionFilterProp=
"label"
show-search
>
</a-select>
</a-form-item>
<a-form-item
label=
"人员类型:"
style=
"padding: 5px 0"
>
<a-select
v-model:value=
"queryForm.personType"
mode=
"multiple"
:maxTagCount=
"1"
style=
"width: 280px"
>
<a-select-option
:value=
"1"
>
店员
</a-select-option>
<a-select-option
:value=
"0"
>
顾客
</a-select-option>
</a-select>
</a-form-item>
<a-form-item
label=
"选择日期:"
style=
"padding: 5px 0"
>
<a-date-picker
v-model:value=
"queryForm.date"
:format=
"'YYYY-MM-DD'"
style=
"width: 280px"
/>
</a-form-item>
<a-form-item
label=
"选择时间:"
style=
"padding: 5px 0"
>
<a-time-picker
v-model:value=
"queryForm.startTime"
style=
"width: 140px"
/>
<a-time-picker
v-model:value=
"queryForm.endTime"
style=
"width: 140px"
/>
</a-form-item>
<a-form-item
style=
"padding: 5px 0"
>
<a-button
type=
"primary"
@
click=
"confirmSearch"
:loading=
"isLoading"
>
查询
</a-button>
</a-form-item>
</a-form>
<a-table
:dataSource=
"dataList"
v-loading=
"isLoading"
:columns=
"columns"
:pagination=
"false"
>
</a-table>
</
template
>
<
script
>
import
{
reactive
,
ref
,
toRaw
}
from
'vue'
import
moment
from
'moment'
import
snapshotRecordApi
from
'@/views/SnapshotCluster/SnapshotRecord/SnapshotRecordApi'
import
minuteApi
from
'@/views/MinutePassenger/MinutePassenger.js'
import
{
isArray
}
from
'@/PublicUtil/Judgment'
import
{
filterEmptyValueInObject
,
formatDate
,
formatTime
}
from
'@/PublicUtil/PublicUtil'
import
dataRepairApi
from
'@/views/DataRepair/DataRepairApi'
import
{
PlusOutlined
}
from
'@ant-design/icons-vue'
const
columns
=
[
{
title
:
'序号'
,
dataIndex
:
'index'
,
align
:
'center'
,
width
:
100
},
{
title
:
'统计时间'
,
dataIndex
:
'dateTime'
,
align
:
'center'
,
},
{
title
:
'进客流'
,
dataIndex
:
'in'
,
align
:
'center'
,
},
{
title
:
'出客流'
,
dataIndex
:
'out'
,
align
:
'center'
,
},
// {
// title: '横穿',
// dataIndex: 'pass',
// align: 'center',
// }
]
export
default
{
components
:
{
PlusOutlined
,
VNodes
:
(
_
,
{
attrs
})
=>
{
return
attrs
.
vnodes
},
},
setup
()
{
// scalar
const
isLoading
=
ref
(
false
)
const
isSuspended
=
ref
(
false
)
// sequence
const
accountList
=
ref
([])
const
plazaList
=
ref
([])
const
zoneList
=
ref
([])
const
gateList
=
ref
([])
const
dataList
=
ref
([])
const
queryForm
=
reactive
(
{
account_id
:
[],
plaza_id
:
[],
gate_id
:
[],
personType
:
[
1
,
0
],
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
onAccountChange
=
function
()
{
getPlazaList
()
queryForm
.
gate_id
=
[]
gateList
.
value
=
[]
}
const
onPlazaChange
=
function
()
{
getGateList
()
}
const
getPlazaList
=
function
()
{
queryForm
.
plaza_id
=
[]
plazaList
.
value
=
[]
snapshotRecordApi
.
getPlazaList
(
{
account_id
:
queryForm
.
account_id
.
toString
()
}
).
then
(
(
r
)
=>
{
if
(
isArray
(
r
))
{
for
(
const
item
of
r
)
{
plazaList
.
value
.
push
(
{
value
:
item
.
id
,
label
:
item
.
name
,
}
)
}
}
}
)
}
const
getAccountList
=
function
()
{
queryForm
.
account_id
=
[]
accountList
.
value
=
[]
snapshotRecordApi
.
getAccountList
().
then
(
(
r
)
=>
{
if
(
isArray
(
r
))
{
for
(
const
item
of
r
)
{
accountList
.
value
.
push
(
{
value
:
item
.
id
,
label
:
item
.
name
,
}
)
}
}
}
)
}
const
getGateList
=
async
function
()
{
queryForm
.
gate_id
=
[]
gateList
.
value
=
[]
snapshotRecordApi
.
getGateList
(
{
account_id
:
queryForm
.
account_id
.
toString
(),
plaza_id
:
queryForm
.
plaza_id
.
toString
(),
type
:
0
,
}
).
then
(
(
r
)
=>
{
if
(
isArray
(
r
.
data
))
{
for
(
const
item
of
r
.
data
)
{
gateList
.
value
.
push
(
{
value
:
item
.
id
,
label
:
item
.
name
,
}
)
}
}
}
)
}
const
confirmSearch
=
function
(){
isLoading
.
value
=
true
const
rawData
=
toRaw
(
queryForm
)
const
data
=
filterEmptyValueInObject
(
{
account_id
:
rawData
.
account_id
.
toString
(),
plaza_id
:
rawData
.
plaza_id
.
toString
(),
gate_id
:
rawData
.
gate_id
.
toString
(),
personType
:
rawData
.
personType
.
toString
(),
startTime
:
formatDate
(
rawData
.
date
)
+
' '
+
formatTime
(
rawData
.
startTime
),
endTime
:
formatDate
(
rawData
.
date
)
+
' '
+
formatTime
(
rawData
.
endTime
),
}
)
minuteApi
.
getMinuteList
(
data
).
then
(
(
r
)
=>
{
isLoading
.
value
=
false
r
.
forEach
((
item
,
index
)
=>
{
item
.
index
=
index
+
1
})
dataList
.
value
=
r
}
)
}
const
__main
=
function
()
{
getAccountList
()
}
__main
()
return
{
// scalar
isLoading
,
// sequence
accountList
,
plazaList
,
zoneList
,
gateList
,
dataList
,
queryForm
,
columns
,
// function
onAccountChange
,
onPlazaChange
,
confirmSearch
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.success
{
color
:
#26ff29
;
}
.failed
{
color
:
red
;
}
</
style
>
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