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
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
364 additions
and
64 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
)
src/Request/PublicAxiosInstance.js
View file @
a911ba0
...
...
@@ -13,9 +13,9 @@ const axiosInstance = axios.create(
// 请求拦截器
axiosInstance
.
interceptors
.
request
.
use
(
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
{
...
...
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
This diff is collapsed.
Click to expand it.
src/views/DataRerun/DataRerunApi.js
View file @
a911ba0
import
axiosInstance
from
"@/Request/PublicAxiosInstance"
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
{
get
AccountList
(
data
)
{
get
Result
(
data
,
type
)
{
return
axiosInstance
.
request
(
{
method
:
'GET'
,
url
:
`/accounts`
,
method
:
'POST'
,
url
:
`
${
map
[
type
]}
`
,
data
:
data
}
)
}
...
...
src/views/FeatureLibraryRebuild/FeatureLibraryRebuild.vue
View file @
a911ba0
...
...
@@ -38,13 +38,11 @@
<a-date-picker
v-model:value=
"querySnapshotRecordForm.date"
/>
</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>
<div
class=
"result-header"
>
结果展示
</div>
<el-progress
v-for=
"item in resultList"
:text-inside=
"true"
:stroke-width=
"26"
:percentage=
"item?.progress"
/>
<ResultDisplay
:data=
"resultList"
:key=
"resultList"
></ResultDisplay>
</
template
>
<
script
>
...
...
@@ -54,8 +52,12 @@ import moment from 'moment'
import
snapshotRecordApi
from
'@/views/SnapshotCluster/SnapshotRecord/SnapshotRecordApi'
import
{
isArray
}
from
'@/PublicUtil/Judgment'
import
{
formatDate
,
formatTime
}
from
'@/PublicUtil/PublicUtil'
import
ResultDisplay
from
'@/component/ResultDisplay/ResultDisplay'
export
default
{
components
:
{
ResultDisplay
,
},
setup
()
{
let
webSocket
=
undefined
const
resultList
=
ref
([])
...
...
@@ -181,7 +183,6 @@ export default {
webSocket
.
onmessage
=
function
(
event
)
{
let
message
=
JSON
.
parse
(
event
.
data
)
log
(
'[onmessage]:'
,
message
)
dealMessage
(
message
)
if
(
message
.
stepCount
===
1
)
{
...
...
src/views/FeatureReExtract/FeatureReExtract.vue
View file @
a911ba0
...
...
@@ -40,13 +40,11 @@
<a-date-picker
v-model:value=
"querySnapshotRecordForm.date"
/>
</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>
<div
class=
"result-header"
>
结果展示
</div>
<el-progress
v-for=
"item in resultList"
:text-inside=
"true"
:stroke-width=
"26"
:percentage=
"item?.progress"
/>
<ResultDisplay
:data=
"resultList"
:key=
"resultList"
></ResultDisplay>
</
template
>
<
script
>
...
...
@@ -57,8 +55,12 @@ import snapshotRecordApi from '@/views/SnapshotCluster/SnapshotRecord/SnapshotRe
import
{
isArray
}
from
'@/PublicUtil/Judgment'
import
{
formatDate
,
formatTime
}
from
'@/PublicUtil/PublicUtil'
import
featureReExtractApi
from
'@/views/FeatureReExtract/FeatureReExtractApi'
import
ResultDisplay
from
'@/component/ResultDisplay/ResultDisplay'
export
default
{
components
:
{
ResultDisplay
,
},
setup
()
{
let
webSocket
=
undefined
const
resultList
=
ref
([])
...
...
src/views/PeopleReContrast/PeopleReContrast.vue
View file @
a911ba0
...
...
@@ -28,23 +28,21 @@
</a-select-option>
</a-select>
</a-form-item>
<a-form-item
label=
"
特征重提
类型:"
>
<a-form-item
label=
"
比对
类型:"
>
<a-select
v-model:value=
"querySnapshotRecordForm.featureRevisitType"
style=
"width: 200px"
>
<a-select-option
:value=
"1"
>
店员
库重建
</a-select-option>
<a-select-option
:value=
"2"
>
顾客
库重建
</a-select-option>
<a-select-option
:value=
"1"
>
店员
对比
</a-select-option>
<a-select-option
:value=
"2"
>
顾客
对比
</a-select-option>
</a-select>
</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-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>
<div
class=
"result-header"
>
结果展示
</div>
<el-progress
v-for=
"item in resultList"
:text-inside=
"true"
:stroke-width=
"26"
:percentage=
"item?.progress"
/>
<ResultDisplay
:data=
"resultList"
:key=
"resultList"
></ResultDisplay>
</
template
>
<
script
>
...
...
@@ -54,8 +52,13 @@ import moment from 'moment'
import
snapshotRecordApi
from
'@/views/SnapshotCluster/SnapshotRecord/SnapshotRecordApi'
import
{
isArray
}
from
'@/PublicUtil/Judgment'
import
{
formatDate
,
formatTime
}
from
'@/PublicUtil/PublicUtil'
import
peopleReContrastApi
from
'@/views/PeopleReContrast/PeopleReContrastApi'
import
ResultDisplay
from
'@/component/ResultDisplay/ResultDisplay'
export
default
{
components
:
{
ResultDisplay
,
},
setup
()
{
let
webSocket
=
undefined
const
resultList
=
ref
([])
...
...
@@ -174,13 +177,12 @@ export default {
}
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
.
onmessage
=
function
(
event
)
{
let
message
=
JSON
.
parse
(
event
.
data
)
log
(
'[onmessage]:'
,
message
)
dealMessage
(
message
)
if
(
message
.
stepCount
===
1
)
{
...
...
@@ -197,20 +199,22 @@ export default {
{
const
data
=
{
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
}
case
2
:
{
const
data
=
{
mallIds
:
rawData
.
plaza_id
,
scheduleType
:
`re
buildFeatureLib
${
rawData
.
featureRevisitType
}
`
,
scheduleType
:
`re
matchPerson
${
rawData
.
featureRevisitType
}
`
,
startDate
:
formatDate
(
rawData
.
date
)
+
' '
+
'00:00:00'
,
endDate
:
formatDate
(
rawData
.
date
)
+
' '
+
'23:59:59'
,
}
featureLibraryRebuild
Api
.
getCustomResult
(
data
)
peopleReContrast
Api
.
getCustomResult
(
data
)
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
>
<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-select
v-model:value=
"queryClusterResultForm.account_id"
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