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 a911ba00
authored
Jan 21, 2022
by
李金轩
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
ljx
1 parent
326e96bc
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
510 additions
and
242 deletions
package-lock.json
public/config.js
src/Request/PublicAxiosInstance.js
src/component/InformationDisplay/InformationDisplay.less
src/component/InformationDisplay/InformationDisplay.vue
src/component/ResultDisplay/ResultDisplay.less
src/component/ResultDisplay/ResultDisplay.vue
src/views/DataRepair/DataRepair.vue
src/views/DataRerun/DataRerun.vue
src/views/DataRerun/DataRerunApi.js
src/views/FeatureLibraryRebuild/FeatureLibraryRebuild.vue
src/views/FeatureReExtract/FeatureReExtract.vue
src/views/PeopleReContrast/PeopleReContrast.vue
src/views/PeopleReContrast/PeopleReContrastApi.js
src/views/SnapshotCluster/ClusterResult/ClusterResult.vue
package-lock.json
View file @
a911ba0
This diff could not be displayed because it is too large.
public/config.js
View file @
a911ba0
window
.
_baseUrl
=
window
.
location
.
hostname
===
'localhost'
?
'http://store.keliuyun.com:9998'
:
''
window
.
_baseUrl
=
[
'localhost'
,
'192.168.1.104'
].
includes
(
window
.
location
.
hostname
)
?
'http://store.keliuyun.com:9998'
:
''
const
log
=
console
.
log
.
bind
(
console
)
const
log
=
console
.
log
.
bind
(
console
)
src/Request/PublicAxiosInstance.js
View file @
a911ba0
...
@@ -13,9 +13,9 @@ const axiosInstance = axios.create(
...
@@ -13,9 +13,9 @@ const axiosInstance = axios.create(
// 请求拦截器
// 请求拦截器
axiosInstance
.
interceptors
.
request
.
use
(
axiosInstance
.
interceptors
.
request
.
use
(
config
=>
{
config
=>
{
if
(
window
.
location
.
hostname
===
'localhost'
)
if
(
[
'localhost'
,
'192.168.1.104'
].
includes
(
window
.
location
.
hostname
)
)
{
{
config
.
headers
.
Authorization
=
'
967c22ec-4257-40c8-9385-5c0f068afaa7
'
config
.
headers
.
Authorization
=
'
34cdfc09-4ff1-44ac-9e9b-0b0da9b3047a
'
}
}
else
else
{
{
...
...
src/component/InformationDisplay/InformationDisplay.less
0 → 100644
View file @
a911ba0
.pagination-page {
float: right;
padding-right: 10px;
}
.result-wrapper {
/* padding: 0 20px; */
width: 50%;
min-width: 600px;
box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.37);
border-radius: 4px;
margin: 20px auto 0;
position: relative;
overflow: auto;
}
.result-header {
text-align: center;
font-size: 16px;
padding: 10px 0;
box-shadow: 0px 0px 3px 0 rgba(0, 0, 0, .2);
/* margin: 10px 0 0; */
}
.result-page {
margin: 8px 0;
}
.result-progress-wrapper::after,
.result-progress-wrapper::before {
content: '';
display: table;
}
.result-progress-wrapper::after {
clear: both;
}
.result-item {
padding: 10px;
}
.scrollbar-wrapper {
height: 100%;
height: 376px;
max-height: 376px;
overflow-x: hidden !important;
}
.result-intro {
float: left;
}
.result-clear-btn {
float: right;
border-radius: 20px;
}
.result-footer {
padding: 12px 20px;
font-size: 16px;
box-shadow: 0px 0px 3px 0 rgba(0, 0, 0, .2);
}
.result-footer::after,
.result-footer::before {
content: '';
display: table;
}
.result-footer::after {
clear: both;
}
src/component/InformationDisplay/InformationDisplay.vue
0 → 100644
View file @
a911ba0
<
template
>
<div
class=
"result-wrapper"
>
<div
class=
"result-header"
>
结果展示
</div>
<div
id=
"showDiv"
class=
"scrollbar-wrapper"
>
<div
v-for=
"item in informationList"
>
{{
item
}}
</div>
</div>
</div>
</
template
>
<
script
>
import
$
from
'jquery'
import
{
onMounted
,
onUpdated
}
from
'vue'
export
default
{
props
:
[
'data'
],
setup
(
props
,
{
emit
})
{
const
informationList
=
props
.
data
// function
const
renderResultToHtml
=
function
(
data
,
hasSccessDetail
)
{
let
text
=
"本次共执行job "
+
data
.
total
+
" 个,成功 "
+
data
.
success
+
" 个,失败 "
+
data
.
failed
+
" 个.</br>"
if
(
data
.
failedJob
&&
data
.
failedJob
.
length
>
0
)
{
text
+=
"-----失败job详情-----</br>"
text
+=
data
.
failedJob
.
join
(
"</br>"
)
if
(
data
.
data
)
{
text
+=
"</br>"
+
data
.
data
}
}
if
(
data
.
successJob
&&
data
.
successJob
.
length
>
0
)
{
text
+=
"-----成功job详情-----</br>"
text
+=
data
.
successJob
.
join
(
"</br>"
)
if
(
hasSccessDetail
)
{
if
(
data
.
data
)
{
console
.
log
(
data
.
data
)
data
.
data
.
forEach
(
item
=>
{
text
+=
"</br>"
+
" 设备序列号: "
+
item
.
deviceSerialnum
+
" 时间: "
+
item
.
counttime
+
" 进客流: "
+
item
.
innum
+
" 出客流: "
+
item
.
outnum
})
}
}
}
text
+=
"</br>-----------------------------------------------"
text
+=
"</br>"
text
+=
"</br>"
text
+=
"</br>"
$
(
"#showDiv"
).
append
(
text
)
}
onUpdated
(
()
=>
{
log
(
informationList
)
}
)
return
{
informationList
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
@import
"./InformationDisplay.less"
;
</
style
>
src/component/ResultDisplay/ResultDisplay.less
0 → 100644
View file @
a911ba0
.pagination-page {
float: right;
padding-right: 10px;
}
.result-wrapper {
/* padding: 0 20px; */
width: 50%;
min-width: 600px;
box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.37);
border-radius: 4px;
margin: 20px auto 0;
position: relative;
overflow: auto;
}
.result-header {
text-align: center;
font-size: 16px;
padding: 10px 0;
box-shadow: 0px 0px 3px 0 rgba(0, 0, 0, .2);
/* margin: 10px 0 0; */
}
.result-page {
margin: 8px 0;
}
.result-progress-wrapper::after,
.result-progress-wrapper::before {
content: '';
display: table;
}
.result-progress-wrapper::after {
clear: both;
}
.result-item {
padding: 10px;
}
.scrollbar-wrapper {
height: 100%;
height: 376px;
max-height: 376px;
overflow-x: hidden !important;
}
.result-intro {
float: left;
}
.result-clear-btn {
float: right;
border-radius: 20px;
}
.result-footer {
padding: 12px 20px;
font-size: 16px;
box-shadow: 0px 0px 3px 0 rgba(0, 0, 0, .2);
}
.result-footer::after,
.result-footer::before {
content: '';
display: table;
}
.result-footer::after {
clear: both;
}
src/component/ResultDisplay/ResultDisplay.vue
0 → 100644
View file @
a911ba0
<
template
>
<div
class=
"result-wrapper"
>
<div
class=
"result-header"
>
结果展示
</div>
<div
class=
"scrollbar-wrapper"
>
<div
v-for=
"item in resultList"
class=
"result-item"
>
<div
class=
"result-page"
>
<span>
总处理条数 :
{{
item
.
totalNum
}}
条
</span>
</div>
<el-row>
<el-col
:span=
"2"
>
执行进度 :
</el-col>
<el-col
:span=
"22"
>
<el-progress
:text-inside=
"true"
:stroke-width=
"26"
:percentage=
"item?.progress"
/>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"2"
>
</el-col>
<el-col
:span=
"22"
>
<span>
第
{{
item
.
current
}}
条/共
{{
item
.
curPageSize
}}
条
</span>
<span
class=
"pagination-page"
>
第
{{
item
.
currentPage
}}
页/共
{{
item
.
totalPage
}}
页
</span>
</el-col>
</el-row>
</div>
</div>
<!--
<div
class=
"result-footer"
>
-->
<!--
<span
class=
"result-intro"
v-if=
"startTiming && endTiming"
>
{{
footerText
||
'数据重跑'
}}
完毕! 共计
{{
totalTime
|
formatTime
}}
</span>
-->
<!--
<el-button
class=
"result-clear-btn"
@
click=
"onClearClick"
>
清空结果
</el-button>
-->
<!--
</div>
-->
</div>
</
template
>
<
script
>
export
default
{
props
:
{
data
:
{
type
:
Array
,
default
:
[]
},
},
setup
(
props
,
{
emit
})
{
const
resultList
=
props
.
data
return
{
resultList
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
@import
"./ResultDisplay.less"
;
</
style
>
src/views/DataRepair/DataRepair.vue
View file @
a911ba0
<
template
>
<h2>
{{
options
.
length
}}
Items
</h2>
<a-select
v-model:value=
"value"
mode=
"multiple"
style=
"width: 100%"
placeholder=
"Please select"
:options=
"options"
/>
</
template
>
<
script
>
import
{
defineComponent
,
reactive
}
from
'vue'
const
options
=
[]
for
(
let
i
=
0
;
i
<
100000
;
i
++
)
{
const
value
=
`
${
i
.
toString
(
36
)}${
i
}
`
options
.
push
({
value
,
disabled
:
i
===
10
,
})
}
export
default
defineComponent
({
setup
()
{
const
state
=
reactive
({
options
,
value
:
[
'a10'
,
'c12'
],
})
return
state
},
})
</
script
>
src/views/DataRerun/DataRerun.vue
View file @
a911ba0
...
@@ -20,7 +20,6 @@
...
@@ -20,7 +20,6 @@
style=
"width: 200px"
style=
"width: 200px"
mode=
"multiple"
mode=
"multiple"
:maxTagCount=
"1"
:maxTagCount=
"1"
@
change=
"onPlazaChange"
>
>
<a-select-option
<a-select-option
v-for=
"item in plazaList"
v-for=
"item in plazaList"
...
@@ -29,121 +28,90 @@
...
@@ -29,121 +28,90 @@
</a-select-option>
</a-select-option>
</a-select>
</a-select>
</a-form-item>
</a-form-item>
<a-form-item
label=
"选择日期:"
>
<a-form-item
label=
"数据:"
>
<a-range-picker
v-model:value=
"querySnapshotRecordForm.date"
:format=
"'YYYY-MM-DD'"
/>
<a-select
v-model:value=
"querySnapshotRecordForm.scheduleTypeList"
style=
"width: 200px"
mode=
"multiple"
:maxTagCount=
"1"
>
<a-select-option
v-for=
"(name, value) in progressMap"
:value=
"value"
>
{{
name
}}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item
label=
"开始日期:"
>
<a-date-picker
v-model:value=
"querySnapshotRecordForm.startDate"
/>
</a-form-item>
<a-form-item
label=
"结束日期:"
>
<a-date-picker
v-model:value=
"querySnapshotRecordForm.endDate"
/>
</a-form-item>
</a-form-item>
<a-form-item>
<a-form-item>
<a-button
type=
"primary"
@
click=
"confirmSearch"
:loading=
"isLoading"
>
查询
</a-button>
<a-button
type=
"primary"
@
click=
"confirmSearch"
>
开始
</a-button>
</a-form-item>
</a-form-item>
</a-form>
</a-form>
<div
v-loading=
"isLoading"
>
<InformationDisplay
:data=
"informationList"
:key=
"resultList"
></InformationDisplay>
<el-row
v-for=
"row in pagedTableDataList"
>
<el-col
:span=
"3"
v-for=
"item in row"
>
<div
style=
"margin: 0 5px"
>
<div
style=
"display:flex; justify-content: flex-end "
>
<span
@
click=
"downloadFile(item.features_url)"
style=
"color: #409EFF;font-size: 15px;cursor: pointer;"
>
下载特征值文件
</span>
</div>
<el-image
:src=
"item.picture_url"
:fit=
"'fill'"
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
{
computed
,
reactive
,
ref
,
toRaw
}
from
'vue'
import
{
reactive
,
ref
,
toRaw
}
from
'vue'
import
moment
from
'moment'
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
{
formatDate
,
formatTime
}
from
'@/PublicUtil/PublicUtil'
import
{
filterEmptyValueInObject
,
formatDate
,
formatTime
,
getPagedList
}
from
'@/PublicUtil/PublicUtil'
import
InformationDisplay
from
'@/component/InformationDisplay/InformationDisplay'
import
dataRerunApi
from
'@/views/DataRerun/DataRerunApi'
export
default
{
export
default
{
components
:
{
InformationDisplay
,
},
setup
()
{
setup
()
{
// scalar
const
resultList
=
ref
([])
const
pageNum
=
ref
(
1
)
const
informationList
=
ref
([])
const
pageSize
=
ref
(
24
)
const
total
=
ref
()
const
isLoading
=
ref
(
false
)
// sequence
// 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
([])
let
webSocketMap
=
{
mallcountData
:
undefined
,
floorcountData
:
undefined
,
zonecountData
:
undefined
,
gatecountData
:
undefined
,
mallfaceSta
:
undefined
,
floorfaceSta
:
undefined
,
zonefaceSta
:
undefined
,
gatefaceSta
:
undefined
,
}
const
pagedTableDataList
=
computed
(
// mapping
()
=>
{
const
progressMap
=
{
return
getPagedList
(
dataList
.
value
,
8
)
mallcountData
:
"商场客流"
,
floorcountData
:
"楼层客流"
,
zonecountData
:
"店铺客流"
,
gatecountData
:
"监控点客流"
,
mallfaceSta
:
"商场人脸"
,
floorfaceSta
:
"楼层人脸"
,
zonefaceSta
:
"店铺人脸"
,
gatefaceSta
:
"监控点人脸"
}
}
)
const
querySnapshotRecordForm
=
reactive
(
const
querySnapshotRecordForm
=
reactive
(
{
{
account_id
:
[],
account_id
:
[],
plaza_id
:
[],
plaza_id
:
[],
zone_id
:
[],
scheduleTypeList
:
[],
gate_id
:
[],
startDate
:
moment
(
moment
().
format
(
'YYYY-MM-DD'
),
'YYYY-MM-DD'
),
type
:
0
,
endDate
:
moment
(
moment
().
format
(
'YYYY-MM-DD'
),
'YYYY-MM-DD'
),
direction
:
[
1
,
-
1
,
0
],
picType
:
2
,
personType
:
[
1
,
2
],
date
:
[
moment
(
moment
().
format
(
'YYYY-MM-DD'
),
'YYYY-MM-DD'
),
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'
),
}
}
)
)
// function
const
onPageNumChange
=
function
(
num
)
{
pageNum
.
value
=
num
confirmSearch
()
}
const
onPageSizeChange
=
function
(
current
,
size
)
{
pageNum
.
value
=
1
pageSize
.
value
=
size
confirmSearch
()
}
const
onSubmit
=
function
()
{
}
const
onAccountChange
=
function
()
{
const
onAccountChange
=
function
()
{
getPlazaList
()
getPlazaList
()
getZoneList
()
getGateList
()
}
const
onPlazaChange
=
function
()
{
getZoneList
()
getGateList
()
}
const
onZoneChange
=
function
()
{
getGateList
()
}
}
const
getPlazaList
=
function
()
{
const
getPlazaList
=
function
()
{
...
@@ -163,111 +131,122 @@ export default {
...
@@ -163,111 +131,122 @@ export default {
)
)
}
}
const
getZoneList
=
function
()
{
const
getAccountList
=
function
()
{
querySnapshotRecordForm
.
zone_id
=
[]
querySnapshotRecordForm
.
account_id
=
[]
zoneList
.
value
=
[]
accountList
.
value
=
[]
snapshotRecordApi
.
getZoneList
(
snapshotRecordApi
.
getAccountList
().
then
(
{
account_id
:
querySnapshotRecordForm
.
account_id
.
toString
(),
plaza_id
:
querySnapshotRecordForm
.
plaza_id
.
toString
(),
}
).
then
(
(
r
)
=>
{
(
r
)
=>
{
if
(
isArray
(
r
))
if
(
isArray
(
r
))
{
{
zone
List
.
value
=
r
account
List
.
value
=
r
}
}
}
}
)
)
}
}
const
getGateList
=
function
()
{
const
floatToPercent
=
function
(
floatNum
)
{
querySnapshotRecordForm
.
gate_id
=
[]
if
(
!
floatNum
)
gateList
.
value
=
[]
snapshotRecordApi
.
getGateList
(
{
{
account_id
:
querySnapshotRecordForm
.
account_id
.
toString
(),
return
0
plaza_id
:
querySnapshotRecordForm
.
plaza_id
.
toString
(),
zone_id
:
querySnapshotRecordForm
.
zone_id
.
toString
(),
type
:
querySnapshotRecordForm
.
type
,
}
}
).
then
(
let
formatNum
=
Math
.
floor
(
floatNum
*
100
)
(
r
)
=>
{
return
formatNum
>=
100
?
100
:
formatNum
if
(
isArray
(
r
.
data
))
{
gateList
.
value
=
r
.
data
}
}
)
}
}
const
getAccountList
=
function
()
{
const
dealMessage
=
function
(
message
)
{
querySnapshotRecordForm
.
account_id
=
[]
// scheduleType
accountList
.
value
=
[]
const
{
dates
,
mallIds
,
mallNames
,
status
,
stepCount
,
scheduleType
,
counter
}
=
message
snapshotRecordApi
.
getAccountList
().
then
(
let
resObj
=
{}
(
r
)
=>
{
resObj
.
dates
=
dates
if
(
isArray
(
r
))
resObj
.
mallIds
=
mallIds
resObj
.
mallNames
=
mallNames
resObj
.
status
=
status
resObj
.
progress
=
floatToPercent
(
stepCount
)
resObj
.
totalNum
=
0
resObj
.
totalPage
=
0
resObj
.
current
=
0
resObj
.
curPageSize
=
0
resObj
.
currentPage
=
0
resObj
.
scheduleType
=
scheduleType
if
(
counter
)
{
{
accountList
.
value
=
r
// dataNum dateMallNum step totalData totalDate totalMall totalMallDateProduct allDataCount
resObj
.
totalNum
=
counter
.
allDataCount
resObj
.
totalPage
=
counter
.
totalMallDateProduct
resObj
.
current
=
counter
.
dataNum
resObj
.
curPageSize
=
counter
.
totalData
resObj
.
currentPage
=
counter
.
dateMallNum
}
if
(
resultList
.
value
.
length
)
{
const
isSameScheduleType
=
resultList
.
value
.
some
(
item
=>
item
.
scheduleType
===
scheduleType
)
isSameScheduleType
?
resultList
.
value
.
forEach
(
item
=>
{
//
item
.
progress
=
floatToPercent
(
stepCount
)
if
(
counter
)
{
item
.
totalNum
=
counter
.
allDataCount
item
.
totalPage
=
counter
.
totalMallDateProduct
item
.
current
=
counter
.
dataNum
item
.
curPageSize
=
counter
.
totalData
item
.
currentPage
=
counter
.
dateMallNum
}
}
})
:
resultList
.
value
.
push
(
resObj
)
resObj
=
{}
}
else
{
resultList
.
value
.
push
(
resObj
)
resObj
=
{}
}
}
)
}
}
const
confirmSearch
=
function
()
{
const
initializeWebSocket
=
function
(
scheduleType
)
{
isLoading
.
value
=
true
if
(
webSocketMap
[
scheduleType
]
!==
undefined
)
const
rawData
=
toRaw
(
querySnapshotRecordForm
)
const
data
=
filterEmptyValueInObject
(
{
{
account_id
:
rawData
.
account_id
.
toString
(),
webSocketMap
[
scheduleType
].
close
()
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
(
webSocketMap
[
scheduleType
]
=
new
WebSocket
(
`ws://store.keliuyun.com:9998/recal/schedule/
${
scheduleType
}
`
)
(
r
)
=>
{
isLoading
.
value
=
false
webSocketMap
[
scheduleType
].
onopen
=
()
=>
{
dataList
.
value
=
r
.
data
.
persons
queryData
(
scheduleType
)
total
.
value
=
r
.
data
.
pageNum
}
)
}
}
const
formatDirection
=
function
(
number
)
{
webSocketMap
[
scheduleType
].
onmessage
=
function
(
event
)
{
switch
(
number
)
let
message
=
JSON
.
parse
(
event
.
data
)
dealMessage
(
message
)
if
(
message
.
stepCount
===
1
)
{
{
case
1
:
webSocketMap
[
scheduleType
].
close
()
{
return
'进'
}
}
case
0
:
{
return
'出'
}
}
case
2
:
{
return
'横穿'
}
}
default
:
{
break
const
queryData
=
function
(
scheduleType
)
{
const
rawData
=
toRaw
(
querySnapshotRecordForm
)
const
data
=
{
mallIds
:
rawData
.
plaza_id
,
scheduleType
:
scheduleType
,
startDate
:
formatDate
(
rawData
.
startDate
)
+
' '
+
'00:00:00'
,
endDate
:
formatDate
(
rawData
.
endDate
)
+
' '
+
'00:00:00'
,
}
}
dataRerunApi
.
getResult
(
data
,
scheduleType
).
then
(
(
r
)
=>
{
informationList
.
value
.
push
(
r
)
}
}
)
}
const
confirmSearch
=
function
()
{
resultList
.
value
=
[]
informationList
.
value
=
[]
for
(
const
scheduleType
of
querySnapshotRecordForm
.
scheduleTypeList
)
{
initializeWebSocket
(
scheduleType
)
}
}
const
downloadFile
=
function
(
url
)
{
window
.
open
(
url
)
}
}
const
__main
=
function
()
{
const
__main
=
function
()
{
...
@@ -277,35 +256,24 @@ export default {
...
@@ -277,35 +256,24 @@ export default {
__main
()
__main
()
return
{
return
{
// scalar
isLoading
,
pageNum
,
pageSize
,
total
,
// sequence
// sequence
accountList
,
accountList
,
plazaList
,
plazaList
,
zoneList
,
zoneList
,
gateList
,
gateList
,
pagedTableDataList
,
resultList
,
informationList
,
// mapping
// mapping
progressMap
,
querySnapshotRecordForm
,
querySnapshotRecordForm
,
// function
onPageNumChange
,
onPageSizeChange
,
onSubmit
,
onAccountChange
,
onAccountChange
,
onPlazaChange
,
initializeWebSocket
,
onZoneChange
,
confirmSearch
,
confirmSearch
,
formatDirection
,
downloadFile
,
}
}
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
scoped
>
@import
"./DataRerun.less"
;
</
style
>
</
style
>
src/views/DataRerun/DataRerunApi.js
View file @
a911ba0
import
axiosInstance
from
"@/Request/PublicAxiosInstance"
import
axiosInstance
from
"@/Request/PublicAxiosInstance"
import
{
filterEmptyValueInObject
}
from
"@/PublicUtil/PublicUtil"
import
{
filterEmptyValueInObject
}
from
"@/PublicUtil/PublicUtil"
const
map
=
{
mallcountData
:
"/mall/countData"
,
floorcountData
:
"/floor/countData"
,
zonecountData
:
"/zone/countData"
,
gatecountData
:
"/gate/countData"
,
mallfaceSta
:
"/mall/faceSta"
,
floorfaceSta
:
"/floor/faceSta"
,
zonefaceSta
:
"/zone/faceSta"
,
gatefaceSta
:
"/gate/faceSta"
,
}
class
DataRerunApi
{
class
DataRerunApi
{
get
AccountList
(
data
)
{
get
Result
(
data
,
type
)
{
return
axiosInstance
.
request
(
return
axiosInstance
.
request
(
{
{
method
:
'GET'
,
method
:
'POST'
,
url
:
`/accounts`
,
url
:
`
${
map
[
type
]}
`
,
data
:
data
}
}
)
)
}
}
...
...
src/views/FeatureLibraryRebuild/FeatureLibraryRebuild.vue
View file @
a911ba0
...
@@ -38,13 +38,11 @@
...
@@ -38,13 +38,11 @@
<a-date-picker
v-model:value=
"querySnapshotRecordForm.date"
/>
<a-date-picker
v-model:value=
"querySnapshotRecordForm.date"
/>
</a-form-item>
</a-form-item>
<a-form-item>
<a-form-item>
<a-button
type=
"primary"
@
click=
"initializeWebSocket"
>
查询
</a-button>
<a-button
type=
"primary"
@
click=
"initializeWebSocket"
>
开始
</a-button>
</a-form-item>
</a-form-item>
</a-form>
</a-form>
<div
class=
"result-header"
>
结果展示
</div>
<ResultDisplay
:data=
"resultList"
:key=
"resultList"
></ResultDisplay>
<el-progress
v-for=
"item in resultList"
:text-inside=
"true"
:stroke-width=
"26"
:percentage=
"item?.progress"
/>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -54,8 +52,12 @@ import moment from 'moment'
...
@@ -54,8 +52,12 @@ import moment from 'moment'
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
{
formatDate
,
formatTime
}
from
'@/PublicUtil/PublicUtil'
import
{
formatDate
,
formatTime
}
from
'@/PublicUtil/PublicUtil'
import
ResultDisplay
from
'@/component/ResultDisplay/ResultDisplay'
export
default
{
export
default
{
components
:
{
ResultDisplay
,
},
setup
()
{
setup
()
{
let
webSocket
=
undefined
let
webSocket
=
undefined
const
resultList
=
ref
([])
const
resultList
=
ref
([])
...
@@ -181,7 +183,6 @@ export default {
...
@@ -181,7 +183,6 @@ export default {
webSocket
.
onmessage
=
function
(
event
)
{
webSocket
.
onmessage
=
function
(
event
)
{
let
message
=
JSON
.
parse
(
event
.
data
)
let
message
=
JSON
.
parse
(
event
.
data
)
log
(
'[onmessage]:'
,
message
)
dealMessage
(
message
)
dealMessage
(
message
)
if
(
message
.
stepCount
===
1
)
if
(
message
.
stepCount
===
1
)
{
{
...
...
src/views/FeatureReExtract/FeatureReExtract.vue
View file @
a911ba0
...
@@ -40,13 +40,11 @@
...
@@ -40,13 +40,11 @@
<a-date-picker
v-model:value=
"querySnapshotRecordForm.date"
/>
<a-date-picker
v-model:value=
"querySnapshotRecordForm.date"
/>
</a-form-item>
</a-form-item>
<a-form-item>
<a-form-item>
<a-button
type=
"primary"
@
click=
"initializeWebSocket"
>
查询
</a-button>
<a-button
type=
"primary"
@
click=
"initializeWebSocket"
>
开始
</a-button>
</a-form-item>
</a-form-item>
</a-form>
</a-form>
<div
class=
"result-header"
>
结果展示
</div>
<ResultDisplay
:data=
"resultList"
:key=
"resultList"
></ResultDisplay>
<el-progress
v-for=
"item in resultList"
:text-inside=
"true"
:stroke-width=
"26"
:percentage=
"item?.progress"
/>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -57,8 +55,12 @@ import snapshotRecordApi from '@/views/SnapshotCluster/SnapshotRecord/SnapshotRe
...
@@ -57,8 +55,12 @@ import snapshotRecordApi from '@/views/SnapshotCluster/SnapshotRecord/SnapshotRe
import
{
isArray
}
from
'@/PublicUtil/Judgment'
import
{
isArray
}
from
'@/PublicUtil/Judgment'
import
{
formatDate
,
formatTime
}
from
'@/PublicUtil/PublicUtil'
import
{
formatDate
,
formatTime
}
from
'@/PublicUtil/PublicUtil'
import
featureReExtractApi
from
'@/views/FeatureReExtract/FeatureReExtractApi'
import
featureReExtractApi
from
'@/views/FeatureReExtract/FeatureReExtractApi'
import
ResultDisplay
from
'@/component/ResultDisplay/ResultDisplay'
export
default
{
export
default
{
components
:
{
ResultDisplay
,
},
setup
()
{
setup
()
{
let
webSocket
=
undefined
let
webSocket
=
undefined
const
resultList
=
ref
([])
const
resultList
=
ref
([])
...
...
src/views/PeopleReContrast/PeopleReContrast.vue
View file @
a911ba0
...
@@ -28,23 +28,21 @@
...
@@ -28,23 +28,21 @@
</a-select-option>
</a-select-option>
</a-select>
</a-select>
</a-form-item>
</a-form-item>
<a-form-item
label=
"
特征重提
类型:"
>
<a-form-item
label=
"
比对
类型:"
>
<a-select
v-model:value=
"querySnapshotRecordForm.featureRevisitType"
style=
"width: 200px"
>
<a-select
v-model:value=
"querySnapshotRecordForm.featureRevisitType"
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=
"选择日期:"
v-if=
"querySnapshotRecordForm.featureRevisitType === 2"
>
<a-form-item
label=
"选择日期:"
>
<a-date-picker
v-model:value=
"querySnapshotRecordForm.date"
/>
<a-date-picker
v-model:value=
"querySnapshotRecordForm.date"
/>
</a-form-item>
</a-form-item>
<a-form-item>
<a-form-item>
<a-button
type=
"primary"
@
click=
"initializeWebSocket"
>
查询
</a-button>
<a-button
type=
"primary"
@
click=
"initializeWebSocket"
>
开始
</a-button>
</a-form-item>
</a-form-item>
</a-form>
</a-form>
<div
class=
"result-header"
>
结果展示
</div>
<ResultDisplay
:data=
"resultList"
:key=
"resultList"
></ResultDisplay>
<el-progress
v-for=
"item in resultList"
:text-inside=
"true"
:stroke-width=
"26"
:percentage=
"item?.progress"
/>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -54,8 +52,13 @@ import moment from 'moment'
...
@@ -54,8 +52,13 @@ import moment from 'moment'
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
{
formatDate
,
formatTime
}
from
'@/PublicUtil/PublicUtil'
import
{
formatDate
,
formatTime
}
from
'@/PublicUtil/PublicUtil'
import
peopleReContrastApi
from
'@/views/PeopleReContrast/PeopleReContrastApi'
import
ResultDisplay
from
'@/component/ResultDisplay/ResultDisplay'
export
default
{
export
default
{
components
:
{
ResultDisplay
,
},
setup
()
{
setup
()
{
let
webSocket
=
undefined
let
webSocket
=
undefined
const
resultList
=
ref
([])
const
resultList
=
ref
([])
...
@@ -174,13 +177,12 @@ export default {
...
@@ -174,13 +177,12 @@ export default {
}
}
resultList
.
value
=
[]
resultList
.
value
=
[]
webSocket
=
new
WebSocket
(
`ws://store.keliuyun.com:9998/recal/schedule/re
buildFeatureLib
${
querySnapshotRecordForm
.
featureRevisitType
}
`
)
webSocket
=
new
WebSocket
(
`ws://store.keliuyun.com:9998/recal/schedule/re
matchPerson
${
querySnapshotRecordForm
.
featureRevisitType
}
`
)
webSocket
.
onopen
=
queryData
webSocket
.
onopen
=
queryData
webSocket
.
onmessage
=
function
(
event
)
{
webSocket
.
onmessage
=
function
(
event
)
{
let
message
=
JSON
.
parse
(
event
.
data
)
let
message
=
JSON
.
parse
(
event
.
data
)
log
(
'[onmessage]:'
,
message
)
dealMessage
(
message
)
dealMessage
(
message
)
if
(
message
.
stepCount
===
1
)
if
(
message
.
stepCount
===
1
)
{
{
...
@@ -197,20 +199,22 @@ export default {
...
@@ -197,20 +199,22 @@ export default {
{
{
const
data
=
{
const
data
=
{
mallIds
:
rawData
.
plaza_id
,
mallIds
:
rawData
.
plaza_id
,
scheduleType
:
`rebuildFeatureLib
${
rawData
.
featureRevisitType
}
`
,
scheduleType
:
`rematchPerson
${
rawData
.
featureRevisitType
}
`
,
startDate
:
formatDate
(
rawData
.
date
)
+
' '
+
'00:00:00'
,
endDate
:
formatDate
(
rawData
.
date
)
+
' '
+
'23:59:59'
,
}
}
featureLibraryRebuild
Api
.
getStaffResult
(
data
)
peopleReContrast
Api
.
getStaffResult
(
data
)
break
break
}
}
case
2
:
case
2
:
{
{
const
data
=
{
const
data
=
{
mallIds
:
rawData
.
plaza_id
,
mallIds
:
rawData
.
plaza_id
,
scheduleType
:
`re
buildFeatureLib
${
rawData
.
featureRevisitType
}
`
,
scheduleType
:
`re
matchPerson
${
rawData
.
featureRevisitType
}
`
,
startDate
:
formatDate
(
rawData
.
date
)
+
' '
+
'00:00:00'
,
startDate
:
formatDate
(
rawData
.
date
)
+
' '
+
'00:00:00'
,
endDate
:
formatDate
(
rawData
.
date
)
+
' '
+
'23:59:59'
,
endDate
:
formatDate
(
rawData
.
date
)
+
' '
+
'23:59:59'
,
}
}
featureLibraryRebuild
Api
.
getCustomResult
(
data
)
peopleReContrast
Api
.
getCustomResult
(
data
)
break
break
}
}
}
}
...
...
src/views/PeopleReContrast/PeopleReContrastApi.js
0 → 100644
View file @
a911ba0
import
axiosInstance
from
"@/Request/PublicAxiosInstance"
import
{
filterEmptyValueInObject
}
from
"@/PublicUtil/PublicUtil"
class
PeopleReContrastApi
{
getStaffResult
(
data
)
{
return
axiosInstance
.
request
(
{
method
:
'POST'
,
url
:
`/mall/staff`
,
data
:
data
}
)
}
getCustomResult
(
data
)
{
return
axiosInstance
.
request
(
{
method
:
'POST'
,
url
:
`/mall/custom`
,
data
:
data
}
)
}
}
const
peopleReContrastApi
=
new
PeopleReContrastApi
()
export
default
peopleReContrastApi
src/views/SnapshotCluster/ClusterResult/ClusterResult.vue
View file @
a911ba0
<
template
>
<
template
>
<a-form
:model=
"queryClusterResultForm"
layout=
"inline"
>
<a-form
:model=
"queryClusterResultForm"
layout=
"inline"
:label-col=
"
{span: 4}" :wrapper-col="{span: 14}"
>
<a-form-item
label=
"集团:"
>
<a-form-item
label=
"集团:"
>
<a-select
v-model:value=
"queryClusterResultForm.account_id"
<a-select
v-model:value=
"queryClusterResultForm.account_id"
style=
"width: 200px"
style=
"width: 200px"
...
...
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