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 402c2847
authored
Dec 23, 2021
by
李金轩
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
ljx
1 parent
f6b11234
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
471 additions
and
341 deletions
.gitignore
push.bat
static/index.html
static/js/api.js
static/js/common.js
static/js/home.js
static/js/request.js
.gitignore
View file @
402c284
.vscode
.vscode
.idea
\ No newline at end of file
\ No newline at end of file
push.bat
0 → 100644
View file @
402c284
git status
git add *
git commit -m %1%
git pull
git push
git status
\ No newline at end of file
\ No newline at end of file
static/index.html
View file @
402c284
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<html>
<head>
<head>
<meta
charset=
"UTF-8"
/>
<meta
charset=
"UTF-8"
/>
<!-- import CSS -->
<!-- import CSS -->
<link
rel=
"stylesheet"
href=
"./css/index.css"
/>
<link
rel=
"stylesheet"
href=
"./css/index.css"
/>
<link
rel=
"stylesheet"
href=
"./css/common.css"
>
<link
rel=
"stylesheet"
href=
"./css/common.css"
>
<link
rel=
"stylesheet"
href=
"./css/page.css"
>
<link
rel=
"stylesheet"
href=
"./css/page.css"
>
<script
src=
"./js/browser.min.js"
></script>
<script
src=
"./js/browser.min.js"
></script>
...
@@ -18,7 +18,8 @@
...
@@ -18,7 +18,8 @@
v-for=
"item in dateLevelList"
v-for=
"item in dateLevelList"
:key=
"item.label"
:key=
"item.label"
:label=
"item.label"
:label=
"item.label"
>
{{ item.name }}
</el-radio-button>
>
{{ item.name }}
</el-radio-button>
<el-radio-button
label=
"compare"
v-if=
"locationHref"
>
数据比对
</el-radio-button>
<el-radio-button
label=
"compare"
v-if=
"locationHref"
>
数据比对
</el-radio-button>
</el-radio-group>
</el-radio-group>
</div>
</div>
...
@@ -143,7 +144,8 @@
...
@@ -143,7 +144,8 @@
:indeterminate=
"isIndeterminateTraffic"
:indeterminate=
"isIndeterminateTraffic"
v-model=
"checkAllTraffic"
v-model=
"checkAllTraffic"
@
change=
"handleCheckAllChangeTraffic"
@
change=
"handleCheckAllChangeTraffic"
>
全选
</el-checkbox
>
全选
</el-checkbox
>
>
<el-checkbox-group
<el-checkbox-group
v-model=
"checkedTraffic"
v-model=
"checkedTraffic"
...
@@ -153,7 +155,8 @@
...
@@ -153,7 +155,8 @@
v-for=
"item in checkTraffic"
v-for=
"item in checkTraffic"
:label=
"item.value"
:label=
"item.value"
:key=
"item.value"
:key=
"item.value"
>
{{item.name}}
</el-checkbox
>
{{item.name}}
</el-checkbox
>
>
</el-checkbox-group>
</el-checkbox-group>
</div>
</div>
...
@@ -167,7 +170,8 @@
...
@@ -167,7 +170,8 @@
:indeterminate=
"isIndeterminateFace"
:indeterminate=
"isIndeterminateFace"
v-model=
"checkAllFace"
v-model=
"checkAllFace"
@
change=
"handleCheckAllChangeFace"
@
change=
"handleCheckAllChangeFace"
>
全选
</el-checkbox
>
全选
</el-checkbox
>
>
<el-checkbox-group
<el-checkbox-group
style=
"padding-top:3px"
style=
"padding-top:3px"
...
@@ -178,7 +182,8 @@
...
@@ -178,7 +182,8 @@
v-for=
"item in checkFace"
v-for=
"item in checkFace"
:label=
"item.value"
:label=
"item.value"
:key=
"item.value"
:key=
"item.value"
>
{{item.name}}
</el-checkbox
>
{{item.name}}
</el-checkbox
>
>
</el-checkbox-group>
</el-checkbox-group>
</div>
</div>
...
@@ -188,7 +193,8 @@
...
@@ -188,7 +193,8 @@
round
round
@
click=
"startData()"
@
click=
"startData()"
class=
"button-class"
class=
"button-class"
>
开始
</el-button
>
开始
</el-button
>
>
</div>
</div>
<div></div>
<div></div>
...
@@ -220,10 +226,12 @@
...
@@ -220,10 +226,12 @@
<div
class=
"level"
>
<div
class=
"level"
>
<el-radio-group
v-model=
"UrlType"
size=
"small"
>
<el-radio-group
v-model=
"UrlType"
size=
"small"
>
<el-radio-button
label=
"trafficRecognition"
<el-radio-button
label=
"trafficRecognition"
>
客流数据
</el-radio-button
>
客流数据
</el-radio-button
>
>
<el-radio-button
label=
"faceRecognitions"
<el-radio-button
label=
"faceRecognitions"
>
人脸数据
</el-radio-button
>
人脸数据
</el-radio-button
>
>
</el-radio-group>
</el-radio-group>
</div>
</div>
...
@@ -385,7 +393,8 @@
...
@@ -385,7 +393,8 @@
type=
"primary"
type=
"primary"
:loading=
"butShow"
:loading=
"butShow"
@
click=
"getDateCount"
@
click=
"getDateCount"
>
源数据条数查询
</el-button
>
源数据条数查询
</el-button
>
>
<span>
数量:
</span>
<span>
数量:
</span>
<el-input
<el-input
...
@@ -405,7 +414,8 @@
...
@@ -405,7 +414,8 @@
type=
"primary"
type=
"primary"
:loading=
"startShow"
:loading=
"startShow"
@
click=
"repairParams('face')"
@
click=
"repairParams('face')"
>
开始修补
</el-button
>
开始修补
</el-button
>
>
</div>
</div>
<div
style=
"width: 100%;padding-top: 20px;"
>
<div
style=
"width: 100%;padding-top: 20px;"
>
...
@@ -580,13 +590,15 @@
...
@@ -580,13 +590,15 @@
</div>
</div>
<div
class=
"data-select"
style=
"margin-top: 0.8%;"
>
<div
class=
"data-select"
style=
"margin-top: 0.8%;"
>
<el-button
type=
"primary"
@
click=
"repairPreview"
<el-button
type=
"primary"
@
click=
"repairPreview"
>
效果预览
</el-button
>
效果预览
</el-button
>
>
<el-button
<el-button
type=
"primary"
type=
"primary"
:loading=
"tafficShow"
:loading=
"tafficShow"
@
click=
"repairParams"
@
click=
"repairParams"
>
开始修补
</el-button
>
开始修补
</el-button
>
>
</div>
</div>
<div
style=
"width: 100%;padding-top: 20px;"
>
<div
style=
"width: 100%;padding-top: 20px;"
>
...
@@ -725,7 +737,8 @@
...
@@ -725,7 +737,8 @@
</div>
</div>
</div>
</div>
<el-button
type=
"primary"
@
click=
"compareParams"
<el-button
type=
"primary"
@
click=
"compareParams"
>
开始比对
</el-button
>
开始比对
</el-button
>
>
</div>
</div>
</div>
</div>
...
@@ -819,7 +832,7 @@
...
@@ -819,7 +832,7 @@
</el-select>
</el-select>
</div>
</div>
<div
class=
"query-item"
>
<div
class=
"query-item"
>
<span
v-show=
"isSendDateParam"
class=
"query-item__title"
>
日期 :
</span>
<span
v-show=
"isSendDateParam"
class=
"query-item__title"
>
日期 :
</span>
<el-date-picker
<el-date-picker
v-show=
"isSendDateParam"
v-show=
"isSendDateParam"
v-model=
"query.dateVal"
v-model=
"query.dateVal"
...
@@ -832,7 +845,8 @@
...
@@ -832,7 +845,8 @@
type=
"primary"
type=
"primary"
:class=
"isSendDateParam ? '' : 'query-button'"
:class=
"isSendDateParam ? '' : 'query-button'"
@
click=
"onSearchClick"
@
click=
"onSearchClick"
>
开 始
</el-button>
>
开 始
</el-button>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -1040,10 +1054,13 @@
...
@@ -1040,10 +1054,13 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
v-show=
"dateFormat === 'snapGatherClass'"
>
12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321 12123321
</div>
<!-- <div class="clear-select">
<!-- <div class="clear-select">
<el-button size="small" round @click="clearDiv()">清空Div</el-button>
<el-button size="small" round @click="clearDiv()">清空Div</el-button>
</div> -->
</div> -->
<div
class=
"result-wrapper"
>
<div
v-show=
"dateFormat !== 'snapGatherClass'"
class=
"result-wrapper"
>
<div
class=
"result-header"
>
结果展示
</div>
<div
class=
"result-header"
>
结果展示
</div>
<el-scrollbar
ref=
"scrollbarRef"
wrap-class=
"scrollbar-wrapper"
>
<el-scrollbar
ref=
"scrollbarRef"
wrap-class=
"scrollbar-wrapper"
>
<div
id=
"showDiv"
class=
"result-content"
v-show=
"showDiv"
>
<div
id=
"showDiv"
class=
"result-content"
v-show=
"showDiv"
>
...
...
static/js/api.js
View file @
402c284
static/js/common.js
View file @
402c284
window
.
_serverHost
=
window
.
location
.
hostname
===
'localhost'
?
'store.keliuyun.com:9998'
:
window
.
location
.
host
window
.
_baseUrl
=
`http://
${
window
.
_serverHost
}
`
window
.
_CONF_
=
{
window
.
_CONF_
=
{
reportApiUrl
:
''
,
reportApiUrl
:
''
,
apiUrl
:
''
,
apiUrl
:
window
.
_baseUrl
,
webSockUrl
:
''
webSockUrl
:
''
}
}
const
log
=
console
.
log
.
bind
(
console
)
static/js/home.js
View file @
402c284
...
@@ -3,13 +3,13 @@ const trafficOptions = [
...
@@ -3,13 +3,13 @@ const trafficOptions = [
"floor/countData"
,
"floor/countData"
,
"zone/countData"
,
"zone/countData"
,
"gate/countData"
"gate/countData"
]
;
]
const
faceOptions
=
[
const
faceOptions
=
[
"mall/faceSta"
,
"mall/faceSta"
,
"floor/faceSta"
,
"floor/faceSta"
,
"zone/faceSta"
,
"zone/faceSta"
,
"gate/faceSta"
"gate/faceSta"
]
;
]
// const TAB_API = {
// const TAB_API = {
// featureRevisit: '',
// featureRevisit: '',
// featureLibRebuild: [],
// featureLibRebuild: [],
...
@@ -20,17 +20,18 @@ new Vue({
...
@@ -20,17 +20,18 @@ new Vue({
return
{
return
{
pickerOpts
:
{
pickerOpts
:
{
disabledDate
(
time
)
{
disabledDate
(
time
)
{
return
Date
.
parse
(
time
)
>
Date
.
parse
(
new
Date
());
return
Date
.
parse
(
time
)
>
Date
.
parse
(
new
Date
())
}
}
},
},
radio
:
"mall"
,
radio
:
"mall"
,
dateFormat
:
"rerun"
,
dateFormat
:
"rerun"
,
dateLevelList
:
[
dateLevelList
:
[
{
label
:
'rerun'
,
name
:
'数据重跑'
},
{
label
:
'rerun'
,
name
:
'数据重跑'
},
{
label
:
'repair'
,
name
:
'数据修补'
},
{
label
:
'repair'
,
name
:
'数据修补'
},
{
label
:
'revisitFeature'
,
name
:
'特征重提'
},
{
label
:
'revisitFeature'
,
name
:
'特征重提'
},
{
label
:
'rebuildFeatureLib'
,
name
:
'特征库重建'
},
{
label
:
'rebuildFeatureLib'
,
name
:
'特征库重建'
},
{
label
:
'rematchPerson'
,
name
:
'人员重新比对'
}
{
label
:
'rematchPerson'
,
name
:
'人员重新比对'
},
{
label
:
'snapGatherClass'
,
name
:
'抓拍聚类'
},
],
],
UrlType
:
"trafficRecognition"
,
UrlType
:
"trafficRecognition"
,
compareType
:
"custom"
,
compareType
:
"custom"
,
...
@@ -149,42 +150,50 @@ new Vue({
...
@@ -149,42 +150,50 @@ new Vue({
featureLibRebuildType
:
1
,
featureLibRebuildType
:
1
,
rematchPersonType
:
1
,
rematchPersonType
:
1
,
featureRevisitList
:
[
featureRevisitList
:
[
{
label
:
'人脸+全身照特征'
,
value
:
0
},
{
label
:
'人脸+全身照特征'
,
value
:
0
},
{
label
:
'人脸特征'
,
value
:
1
},
{
label
:
'人脸特征'
,
value
:
1
},
{
label
:
'全身照特征'
,
value
:
2
},
{
label
:
'全身照特征'
,
value
:
2
},
{
label
:
'店员特征'
,
value
:
3
}
{
label
:
'店员特征'
,
value
:
3
}
],
],
featureLibRebuildList
:
[
featureLibRebuildList
:
[
{
label
:
'店员库重建'
,
value
:
1
},
{
label
:
'店员库重建'
,
value
:
1
},
{
label
:
'顾客库重建'
,
value
:
2
}
{
label
:
'顾客库重建'
,
value
:
2
}
],
],
rematchPersonList
:
[
rematchPersonList
:
[
{
label
:
'店员对比'
,
value
:
1
},
{
label
:
'店员对比'
,
value
:
1
},
{
label
:
'顾客对比'
,
value
:
2
}
{
label
:
'顾客对比'
,
value
:
2
}
],
],
socket
:
null
,
socket
:
null
,
results
:
[],
results
:
[],
startTiming
:
0
,
startTiming
:
0
,
endTiming
:
0
,
endTiming
:
0
,
footerText
:
''
footerText
:
''
};
}
},
},
filters
:
{
filters
:
{
formatTime
(
val
)
{
formatTime
(
val
)
{
function
autoPrefixZero
(
num
)
{
function
autoPrefixZero
(
num
)
{
return
num
>
10
?
num
:
'0'
+
num
return
num
>
10
?
num
:
'0'
+
num
}
}
const
day
=
parseInt
(
val
/
(
24
*
60
*
60
*
1000
))
+
1
const
day
=
parseInt
(
val
/
(
24
*
60
*
60
*
1000
))
+
1
const
hour
=
parseInt
(
val
%
(
24
*
60
*
60
*
1000
)
/
(
60
*
60
*
1000
))
const
hour
=
parseInt
(
val
%
(
24
*
60
*
60
*
1000
)
/
(
60
*
60
*
1000
))
const
minutes
=
parseInt
(
val
%
(
60
*
60
*
1000
)
/
(
60
*
1000
))
const
minutes
=
parseInt
(
val
%
(
60
*
60
*
1000
)
/
(
60
*
1000
))
const
seconds
=
parseInt
(
val
%
(
60
*
1000
)
/
1000
)
const
seconds
=
parseInt
(
val
%
(
60
*
1000
)
/
1000
)
if
(
val
<
1000
||
val
<
60
*
1000
)
{
if
(
val
<
1000
||
val
<
60
*
1000
)
{
return
`
${
val
%
(
60
*
1000
)
/
1000
}
秒`
return
`
${
val
%
(
60
*
1000
)
/
1000
}
秒`
}
else
if
(
val
<
60
*
60
*
1000
)
{
}
else
if
(
val
<
60
*
60
*
1000
)
{
return
`
${
autoPrefixZero
(
minutes
)}
分钟
${
autoPrefixZero
(
seconds
)}
秒`
return
`
${
autoPrefixZero
(
minutes
)}
分钟
${
autoPrefixZero
(
seconds
)}
秒`
}
else
if
(
val
<
24
*
60
*
60
*
1000
)
{
}
else
if
(
val
<
24
*
60
*
60
*
1000
)
{
return
`
${
autoPrefixZero
(
hour
)}
小时
${
autoPrefixZero
(
minutes
)}
分钟
${
autoPrefixZero
(
seconds
)}
秒`
return
`
${
autoPrefixZero
(
hour
)}
小时
${
autoPrefixZero
(
minutes
)}
分钟
${
autoPrefixZero
(
seconds
)}
秒`
}
else
{
}
else
{
return
`
${
autoPrefixZero
(
day
)}
天
${
autoPrefixZero
(
hour
)}
小时
${
autoPrefixZero
(
minutes
)}
分钟
${
autoPrefixZero
(
seconds
)}
秒`
return
`
${
autoPrefixZero
(
day
)}
天
${
autoPrefixZero
(
hour
)}
小时
${
autoPrefixZero
(
minutes
)}
分钟
${
autoPrefixZero
(
seconds
)}
秒`
}
}
}
}
...
@@ -202,29 +211,32 @@ new Vue({
...
@@ -202,29 +211,32 @@ new Vue({
)
||
(
)
||
(
this
.
dateFormat
===
'revisitFeature'
this
.
dateFormat
===
'revisitFeature'
&&
this
.
featureRevisitType
===
3
)
&&
this
.
featureRevisitType
===
3
)
)
{
)
{
return
false
return
false
}
}
return
true
return
true
},
},
totalTime
()
{
totalTime
()
{
const
{
startTiming
,
endTiming
}
=
this
const
{
startTiming
,
endTiming
}
=
this
return
endTiming
-
startTiming
return
endTiming
-
startTiming
// return this.formatDateToStamp(endTiming) - this.formatDateToStamp(startTiming)
// return this.formatDateToStamp(endTiming) - this.formatDateToStamp(startTiming)
}
}
},
},
watch
:
{
watch
:
{
accountVal
:
{
accountVal
:
{
handler
:
function
(
val
)
{
handler
:
function
(
val
)
{
if
(
val
&&
val
.
length
)
{
if
(
val
&&
val
.
length
)
{
this
.
query
.
accountVal
=
val
this
.
query
.
accountVal
=
val
}
}
},
},
deep
:
true
deep
:
true
},
},
mallVal
:
{
mallVal
:
{
handler
:
function
(
val
)
{
handler
:
function
(
val
)
{
if
(
val
&&
val
.
length
)
{
if
(
val
&&
val
.
length
)
{
this
.
query
.
mallVal
=
val
this
.
query
.
mallVal
=
val
}
}
},
},
...
@@ -256,89 +268,97 @@ new Vue({
...
@@ -256,89 +268,97 @@ new Vue({
},
},
created
:
function
()
{
created
:
function
()
{
this
.
locationHref
=
this
.
locationHref
=
location
.
href
.
indexOf
(
"?super"
)
!=
-
1
?
true
:
false
;
location
.
href
.
indexOf
(
"?super"
)
!=
-
1
?
true
:
false
this
.
getAccount
();
this
.
getAccount
()
},
},
mounted
:
function
()
{
mounted
:
function
()
{
this
.
query
.
dateVal
=
this
.
createDate
()
this
.
query
.
dateVal
=
this
.
createDate
()
this
.
startTime
=
this
.
createDate
();
this
.
startTime
=
this
.
createDate
()
this
.
endTime
=
this
.
createDate
();
this
.
endTime
=
this
.
createDate
()
},
},
methods
:
{
methods
:
{
createDate
()
{
createDate
()
{
var
nowDate
=
new
Date
();
var
nowDate
=
new
Date
()
var
day
=
nowDate
.
getDate
();
var
day
=
nowDate
.
getDate
()
var
month
=
nowDate
.
getMonth
()
+
1
;
var
month
=
nowDate
.
getMonth
()
+
1
var
year
=
nowDate
.
getFullYear
();
var
year
=
nowDate
.
getFullYear
()
if
(
month
>=
1
&&
month
<=
9
)
{
if
(
month
>=
1
&&
month
<=
9
)
month
=
"0"
+
month
;
{
month
=
"0"
+
month
}
}
if
(
day
>=
0
&&
day
<=
9
)
{
if
(
day
>=
0
&&
day
<=
9
)
day
=
"0"
+
day
;
{
day
=
"0"
+
day
}
}
return
year
+
"-"
+
month
+
"-"
+
day
;
return
year
+
"-"
+
month
+
"-"
+
day
},
},
getProgressName
(
val
)
{
getProgressName
(
val
)
{
return
this
.
progressName
[
val
];
return
this
.
progressName
[
val
]
},
},
getProgressStyle
(
stepCount
,
status
,
oldStepCount
)
{
getProgressStyle
(
stepCount
,
status
,
oldStepCount
)
{
if
(
stepCount
==
"stepType"
)
{
if
(
stepCount
==
"stepType"
)
if
(
status
==
"gatecountData"
||
status
==
"gatefaceSta"
)
{
{
return
{
"margin-left"
:
"448px"
,
"font-size"
:
"18px"
};
if
(
status
==
"gatecountData"
||
status
==
"gatefaceSta"
)
}
else
{
{
return
{
"margin-left"
:
"465px"
,
"font-size"
:
"18px"
};
return
{
"margin-left"
:
"448px"
,
"font-size"
:
"18px"
}
}
else
{
return
{
"margin-left"
:
"465px"
,
"font-size"
:
"18px"
}
}
}
}
else
{
}
else
{
return
{
return
{
width
:
(
stepCount
-
oldStepCount
)
*
405
+
"px"
,
width
:
(
stepCount
-
oldStepCount
)
*
405
+
"px"
,
"background-color"
:
status
?
"#409EFF"
:
"#f56c6c"
,
"background-color"
:
status
?
"#409EFF"
:
"#f56c6c"
,
"margin-left"
:
oldStepCount
*
405
+
50
+
"px"
"margin-left"
:
oldStepCount
*
405
+
50
+
"px"
};
}
}
}
},
},
lineOver
(
tag
,
dates
,
mallIds
,
mallNames
)
{
lineOver
(
tag
,
dates
,
mallIds
,
mallNames
)
{
let
evt
=
tag
||
window
.
event
,
let
evt
=
tag
||
window
.
event
,
_top
,
_top
,
_left
;
_left
_top
=
window
.
innerHeight
-
evt
.
y
;
_top
=
window
.
innerHeight
-
evt
.
y
_left
=
window
.
innerWidth
-
evt
.
x
;
_left
=
window
.
innerWidth
-
evt
.
x
this
.
tipStyle
=
{
this
.
tipStyle
=
{
top
:
evt
.
y
-
50
+
"px"
,
top
:
evt
.
y
-
50
+
"px"
,
left
:
evt
.
x
+
"px"
left
:
evt
.
x
+
"px"
};
}
this
.
lineDate
=
dates
;
this
.
lineDate
=
dates
this
.
lineMallId
=
mallIds
.
join
(
","
);
this
.
lineMallId
=
mallIds
.
join
(
","
)
this
.
lineMallName
=
mallNames
;
this
.
lineMallName
=
mallNames
this
.
tipShow
=
true
;
this
.
tipShow
=
true
},
},
lineOut
()
{
lineOut
()
{
this
.
tipShow
=
false
;
this
.
tipShow
=
false
},
},
handleCheckAllChangeTraffic
(
val
)
{
handleCheckAllChangeTraffic
(
val
)
{
// console.log('val',val)
// console.log('val',val)
this
.
checkedTraffic
=
val
?
trafficOptions
:
[];
this
.
checkedTraffic
=
val
?
trafficOptions
:
[]
// console.log(this.checkedTraffic)
// console.log(this.checkedTraffic)
this
.
isIndeterminateTraffic
=
false
;
this
.
isIndeterminateTraffic
=
false
},
},
handleCheckAllChangeFace
(
val
)
{
handleCheckAllChangeFace
(
val
)
{
// console.log('val',val)
// console.log('val',val)
this
.
checkedFace
=
val
?
faceOptions
:
[];
this
.
checkedFace
=
val
?
faceOptions
:
[]
// console.log(this.checkedFace)
// console.log(this.checkedFace)
this
.
isIndeterminateFace
=
false
;
this
.
isIndeterminateFace
=
false
},
},
handleCheckedCitiesChangeTraffic
(
value
)
{
handleCheckedCitiesChangeTraffic
(
value
)
{
// console.log(this.checkedTraffic)
// console.log(this.checkedTraffic)
let
checkedCount
=
value
.
length
;
let
checkedCount
=
value
.
length
this
.
checkAllTraffic
=
checkedCount
===
this
.
checkTraffic
.
length
;
this
.
checkAllTraffic
=
checkedCount
===
this
.
checkTraffic
.
length
this
.
isIndeterminateTraffic
=
this
.
isIndeterminateTraffic
=
checkedCount
>
0
&&
checkedCount
<
this
.
checkTraffic
.
length
;
checkedCount
>
0
&&
checkedCount
<
this
.
checkTraffic
.
length
},
},
handleCheckedCitiesChangeFace
(
value
)
{
handleCheckedCitiesChangeFace
(
value
)
{
// console.log(this.checkedFace)
// console.log(this.checkedFace)
let
checkedCount
=
value
.
length
;
let
checkedCount
=
value
.
length
this
.
checkAllFace
=
checkedCount
===
this
.
checkFace
.
length
;
this
.
checkAllFace
=
checkedCount
===
this
.
checkFace
.
length
this
.
isIndeterminateFace
=
this
.
isIndeterminateFace
=
checkedCount
>
0
&&
checkedCount
<
this
.
checkFace
.
length
;
checkedCount
>
0
&&
checkedCount
<
this
.
checkFace
.
length
},
},
accountchange
(
linkGate
)
{
accountchange
(
linkGate
)
{
this
.
isAccoutSelAll
=
this
.
isAccoutSelAll
this
.
isAccoutSelAll
=
this
.
isAccoutSelAll
...
@@ -347,9 +367,10 @@ new Vue({
...
@@ -347,9 +367,10 @@ new Vue({
:
true
:
true
:
this
.
accountVal
.
length
<
this
.
accoutOpts
.
length
:
this
.
accountVal
.
length
<
this
.
accoutOpts
.
length
?
false
?
false
:
true
;
:
true
if
(
this
.
accountVal
.
length
>
0
)
{
if
(
this
.
accountVal
.
length
>
0
)
this
.
getMall
(
linkGate
);
{
this
.
getMall
(
linkGate
)
}
}
},
},
mallchange
(
linkGate
)
{
mallchange
(
linkGate
)
{
...
@@ -359,259 +380,295 @@ new Vue({
...
@@ -359,259 +380,295 @@ new Vue({
:
true
:
true
:
this
.
mallVal
.
length
<
this
.
mallOpts
.
length
:
this
.
mallVal
.
length
<
this
.
mallOpts
.
length
?
false
?
false
:
true
;
:
true
if
(
linkGate
)
{
if
(
linkGate
)
{
this
.
getGate
()
this
.
getGate
()
}
}
},
},
selAllHandle
(
level
)
{
selAllHandle
(
level
)
{
if
(
level
==
"accout"
)
{
if
(
level
==
"accout"
)
if
(
this
.
isAccoutSelAll
)
{
{
this
.
accountVal
=
[];
if
(
this
.
isAccoutSelAll
)
this
.
isAccoutSelAll
=
false
;
{
this
.
getMall
();
this
.
accountVal
=
[]
}
else
{
this
.
isAccoutSelAll
=
false
this
.
accountVal
=
[];
this
.
getMall
()
}
else
{
this
.
accountVal
=
[]
this
.
accoutOpts
.
forEach
(
item
=>
{
this
.
accoutOpts
.
forEach
(
item
=>
{
this
.
accountVal
.
push
(
item
.
id
);
this
.
accountVal
.
push
(
item
.
id
)
});
})
this
.
isAccoutSelAll
=
true
;
this
.
isAccoutSelAll
=
true
this
.
getMall
();
this
.
getMall
()
}
}
}
else
{
}
if
(
this
.
isMallSelAll
)
{
else
this
.
mallVal
=
[];
{
this
.
isMallSelAll
=
false
;
if
(
this
.
isMallSelAll
)
}
else
{
{
this
.
mallVal
=
[];
this
.
mallVal
=
[]
this
.
isMallSelAll
=
false
}
else
{
this
.
mallVal
=
[]
this
.
mallOpts
.
forEach
(
item
=>
{
this
.
mallOpts
.
forEach
(
item
=>
{
this
.
mallVal
.
push
(
item
.
id
);
this
.
mallVal
.
push
(
item
.
id
)
});
})
this
.
isMallSelAll
=
true
;
this
.
isMallSelAll
=
true
}
}
}
}
},
},
getAccount
:
function
()
{
getAccount
:
function
()
{
var
_this
=
this
;
var
_this
=
this
_this
.
accoutOpts
=
[];
_this
.
accoutOpts
=
[]
log
(
454
,
window
.
_CONF_
.
apiUrl
+
API
.
Accounts
)
get
(
window
.
_CONF_
.
apiUrl
+
API
.
Accounts
).
then
(
function
(
data
)
{
get
(
window
.
_CONF_
.
apiUrl
+
API
.
Accounts
).
then
(
function
(
data
)
{
_this
.
accoutOpts
=
data
;
_this
.
accoutOpts
=
data
if
(
_this
.
accoutOpts
.
length
>
0
)
{
if
(
_this
.
accoutOpts
.
length
>
0
)
_this
.
accountVal
=
[
_this
.
accoutOpts
[
0
].
id
];
{
_this
.
accountVal
=
[
_this
.
accoutOpts
[
0
].
id
]
}
}
_this
.
getMall
();
_this
.
getMall
()
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
console
.
log
(
'err'
,
err
)
console
.
log
(
'err'
,
err
)
})
})
},
},
getMall
:
function
()
{
getMall
:
function
()
{
var
_this
=
this
;
var
_this
=
this
_this
.
mallOpts
=
[];
_this
.
mallOpts
=
[]
get
(
window
.
_CONF_
.
apiUrl
+
API
.
Malls
,
{
get
(
window
.
_CONF_
.
apiUrl
+
API
.
Malls
,
{
accountIds
:
_this
.
accountVal
.
join
(
","
)
accountIds
:
_this
.
accountVal
.
join
(
","
)
}).
then
(
function
(
data
)
{
}).
then
(
function
(
data
)
{
_this
.
mallOpts
=
data
;
_this
.
mallOpts
=
data
if
(
_this
.
mallOpts
.
length
>
0
)
{
if
(
_this
.
mallOpts
.
length
>
0
)
_this
.
mallVal
=
[
_this
.
mallOpts
[
0
].
id
];
{
_this
.
mallVal
=
[
_this
.
mallOpts
[
0
].
id
]
}
}
_this
.
isMallSelAll
=
_this
.
isMallSelAll
=
_this
.
mallVal
.
length
==
_this
.
mallOpts
.
length
?
true
:
false
;
_this
.
mallVal
.
length
==
_this
.
mallOpts
.
length
?
true
:
false
})
})
},
},
getGate
:
function
()
{
getGate
:
function
()
{
var
_this
=
this
;
var
_this
=
this
get
(
window
.
_CONF_
.
apiUrl
+
API
.
Gates
,
{
get
(
window
.
_CONF_
.
apiUrl
+
API
.
Gates
,
{
accountIds
:
_this
.
accountVal
.
join
(
","
),
accountIds
:
_this
.
accountVal
.
join
(
","
),
mallIds
:
_this
.
mallVal
.
join
(
','
)
mallIds
:
_this
.
mallVal
.
join
(
','
)
}).
then
(
function
(
data
)
{
}).
then
(
function
(
data
)
{
_this
.
gateOpt
=
data
;
_this
.
gateOpt
=
data
_this
.
gateVal
=
_this
.
gateOpt
[
0
].
id
;
_this
.
gateVal
=
_this
.
gateOpt
[
0
].
id
// _this.getDevice()
// _this.getDevice()
_this
.
getChannel
();
_this
.
getChannel
()
})
})
},
},
getDevice
:
function
()
{
getDevice
:
function
()
{
var
_this
=
this
;
var
_this
=
this
get
(
window
.
_CONF_
.
apiUrl
+
API
.
Devices
,
{
get
(
window
.
_CONF_
.
apiUrl
+
API
.
Devices
,
{
// accountIds: _this.accountVal.join(","),
// accountIds: _this.accountVal.join(","),
// mallIds: _this.mallVal.join(','),
// mallIds: _this.mallVal.join(','),
gateId
:
this
.
gateVal
gateId
:
this
.
gateVal
}).
then
(
function
(
data
)
{
}).
then
(
function
(
data
)
{
_this
.
deviceOpt
=
[];
_this
.
deviceOpt
=
[]
_this
.
deviceVal
=
""
;
_this
.
deviceVal
=
""
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
var
temp
=
{};
{
temp
.
name
=
data
[
i
];
var
temp
=
{}
temp
.
value
=
data
[
i
];
temp
.
name
=
data
[
i
]
temp
.
id
=
i
;
temp
.
value
=
data
[
i
]
_this
.
deviceOpt
.
push
(
temp
);
temp
.
id
=
i
}
_this
.
deviceOpt
.
push
(
temp
)
_this
.
deviceVal
=
_this
.
deviceOpt
[
0
].
value
;
}
_this
.
deviceVal
=
_this
.
deviceOpt
[
0
].
value
})
})
},
},
dateLevel
:
function
()
{
dateLevel
:
function
()
{
if
(
this
.
dateFormat
==
"repair"
)
{
if
(
this
.
dateFormat
==
"repair"
)
this
.
getGate
();
{
}
else
{
this
.
getGate
()
}
else
{
// this.getMall();
// this.getMall();
}
}
},
},
getLevel
:
function
()
{},
getLevel
:
function
()
{
},
getNumber
()
{
getNumber
()
{
this
.
repairProgList
=
[];
this
.
repairProgList
=
[]
if
(
this
.
UrlType
==
"trafficRecognition"
)
{
if
(
this
.
UrlType
==
"trafficRecognition"
)
{
// this.getChannel()
// this.getChannel()
}
else
{
}
else
{
// this.getChannel()
// this.getChannel()
// this.getDevice()
// this.getDevice()
}
}
},
},
getChannel
()
{
getChannel
()
{
var
_this
=
this
;
var
_this
=
this
get
(
window
.
_CONF_
.
apiUrl
+
API
.
Channels
,
{
get
(
window
.
_CONF_
.
apiUrl
+
API
.
Channels
,
{
// accountIds: _this.accountVal.join(","),
// accountIds: _this.accountVal.join(","),
// mallIds: _this.mallVal.join(','),
// mallIds: _this.mallVal.join(','),
gateId
:
this
.
gateVal
gateId
:
this
.
gateVal
}).
then
(
function
(
data
)
{
}).
then
(
function
(
data
)
{
_this
.
channelOpt
=
[];
_this
.
channelOpt
=
[]
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
var
temp
=
{};
{
temp
.
name
=
data
[
i
];
var
temp
=
{}
temp
.
value
=
data
[
i
];
temp
.
name
=
data
[
i
]
temp
.
id
=
i
;
temp
.
value
=
data
[
i
]
_this
.
channelOpt
.
push
(
temp
);
temp
.
id
=
i
_this
.
channelOpt
.
push
(
temp
)
}
}
_this
.
channelVal
=
_this
.
channelVal
=
_this
.
channelOpt
.
length
>
0
?
_this
.
channelOpt
[
0
].
value
:
""
;
_this
.
channelOpt
.
length
>
0
?
_this
.
channelOpt
[
0
].
value
:
""
})
})
},
},
clearDiv
()
{
clearDiv
()
{
$
(
"#showDiv"
).
empty
();
$
(
"#showDiv"
).
empty
()
},
},
startData
:
function
()
{
startData
:
function
()
{
this
.
progressList
=
[];
this
.
progressList
=
[]
if
(
this
.
webSocketObj
)
{
if
(
this
.
webSocketObj
)
for
(
var
key
in
this
.
webSocketObj
)
{
{
this
.
webSocketObj
[
key
].
close
();
for
(
var
key
in
this
.
webSocketObj
)
{
this
.
webSocketObj
[
key
].
close
()
}
}
}
}
let
params
=
{},
let
params
=
{},
startDate
=
""
,
startDate
=
""
,
endDate
=
""
;
endDate
=
""
params
=
{
params
=
{
startDate
:
this
.
startTime
+
" 00:00:00"
,
startDate
:
this
.
startTime
+
" 00:00:00"
,
endDate
:
this
.
endTime
+
" 00:00:00"
,
endDate
:
this
.
endTime
+
" 00:00:00"
,
mallIds
:
this
.
mallVal
,
mallIds
:
this
.
mallVal
,
scheduleType
:
""
,
scheduleType
:
""
,
mark
:
Date
.
parse
(
new
Date
())
mark
:
Date
.
parse
(
new
Date
())
};
}
this
.
checkedTraffic
.
forEach
((
item
,
index
)
=>
{
this
.
checkedTraffic
.
forEach
((
item
,
index
)
=>
{
let
_scheduleType
=
""
;
let
_scheduleType
=
""
let
websocket
=
item
.
split
(
"/"
);
let
websocket
=
item
.
split
(
"/"
)
websocket
.
forEach
(
item1
=>
{
websocket
.
forEach
(
item1
=>
{
_scheduleType
+=
item1
;
_scheduleType
+=
item1
});
})
params
.
scheduleType
=
_scheduleType
;
params
.
scheduleType
=
_scheduleType
this
.
openWebSock
(
_scheduleType
,
item
,
params
);
this
.
openWebSock
(
_scheduleType
,
item
,
params
)
});
})
this
.
checkedFace
.
forEach
((
item
,
index
)
=>
{
this
.
checkedFace
.
forEach
((
item
,
index
)
=>
{
let
_scheduleType
=
""
;
let
_scheduleType
=
""
let
websocket
=
item
.
split
(
"/"
);
let
websocket
=
item
.
split
(
"/"
)
websocket
.
forEach
(
item1
=>
{
websocket
.
forEach
(
item1
=>
{
_scheduleType
+=
item1
;
_scheduleType
+=
item1
});
})
params
.
scheduleType
=
_scheduleType
;
params
.
scheduleType
=
_scheduleType
this
.
openWebSock
(
_scheduleType
,
item
,
params
);
this
.
openWebSock
(
_scheduleType
,
item
,
params
)
});
})
},
},
openWebSock
(
wsUrl
,
url
,
params
,
processKey
=
'progressList'
)
{
openWebSock
(
wsUrl
,
url
,
params
,
processKey
=
'progressList'
)
{
// browser 兼容
// browser 兼容
// var wsHost = window.location.host;
// var wsHost = window.location.host;
var
socketUrl
=
""
;
var
socketUrl
=
""
var
webSock_Url
=
window
.
_CONF_
.
webSockUrl
||
window
.
location
.
host
;
var
webSock_Url
=
window
.
_CONF_
.
webSockUrl
||
window
.
location
.
host
var
obj
=
{
var
obj
=
{
stepList
:
[]
stepList
:
[]
};
}
obj
.
stepType
=
wsUrl
;
obj
.
stepType
=
wsUrl
obj
.
mark
=
params
.
mark
;
obj
.
mark
=
params
.
mark
if
(
!
webSockUrl
)
{
if
(
!
webSockUrl
)
webSock
=
window
.
location
.
host
;
{
}
webSock
=
window
.
location
.
host
socketUrl
=
"ws://"
+
webSock_Url
+
WSAPI
.
WSAPI
+
wsUrl
;
}
this
[
processKey
].
push
(
obj
);
socketUrl
=
"ws://"
+
webSock_Url
+
WSAPI
.
WSAPI
+
wsUrl
var
_this
=
this
;
this
[
processKey
].
push
(
obj
)
if
(
"WebSocket"
in
window
)
{
var
_this
=
this
_this
.
webSocketObj
[
wsUrl
]
=
new
WebSocket
(
socketUrl
);
if
(
"WebSocket"
in
window
)
}
else
if
(
"MozWebSocket"
in
window
)
{
{
_this
.
webSocketObj
[
wsUrl
]
=
new
MozWebSocket
(
socketUrl
);
_this
.
webSocketObj
[
wsUrl
]
=
new
WebSocket
(
socketUrl
)
}
else
{
}
_this
.
webSocketObj
[
wsUrl
]
=
new
SockJS
(
socketUrl
);
else
if
(
"MozWebSocket"
in
window
)
}
{
var
param
=
JSON
.
parse
(
JSON
.
stringify
(
params
));
_this
.
webSocketObj
[
wsUrl
]
=
new
MozWebSocket
(
socketUrl
)
try
{
}
else
{
_this
.
webSocketObj
[
wsUrl
]
=
new
SockJS
(
socketUrl
)
}
var
param
=
JSON
.
parse
(
JSON
.
stringify
(
params
))
try
{
_this
.
webSocketObj
[
wsUrl
].
onopen
=
function
(
event
)
{
_this
.
webSocketObj
[
wsUrl
].
onopen
=
function
(
event
)
{
console
.
log
(
"WebSocket:已连接"
);
console
.
log
(
"WebSocket:已连接"
)
_this
.
returnData
(
url
,
param
);
_this
.
returnData
(
url
,
param
)
};
}
_this
.
webSocketObj
[
wsUrl
].
onclosed
=
function
()
{
_this
.
webSocketObj
[
wsUrl
].
onclosed
=
function
()
{
console
.
log
(
"WebSocket关闭"
);
console
.
log
(
"WebSocket关闭"
)
};
}
_this
.
webSocketObj
[
wsUrl
].
onmessage
=
function
(
evt
)
{
_this
.
webSocketObj
[
wsUrl
].
onmessage
=
function
(
evt
)
{
var
msg
=
JSON
.
parse
(
evt
.
data
);
var
msg
=
JSON
.
parse
(
evt
.
data
)
_this
[
processKey
].
forEach
((
item
,
index
)
=>
{
_this
[
processKey
].
forEach
((
item
,
index
)
=>
{
if
(
if
(
item
.
stepType
==
msg
.
scheduleType
&&
item
.
stepType
==
msg
.
scheduleType
&&
item
.
mark
==
msg
.
mark
item
.
mark
==
msg
.
mark
)
{
)
var
stepObj
=
{};
{
stepObj
.
dates
=
msg
.
dates
;
var
stepObj
=
{}
stepObj
.
mallIds
=
msg
.
mallIds
;
stepObj
.
dates
=
msg
.
dates
stepObj
.
mallNames
=
msg
.
mallNames
;
stepObj
.
mallIds
=
msg
.
mallIds
stepObj
.
status
=
msg
.
status
;
stepObj
.
mallNames
=
msg
.
mallNames
stepObj
.
stepCount
=
msg
.
stepCount
;
stepObj
.
status
=
msg
.
status
item
.
stepList
.
push
(
stepObj
);
stepObj
.
stepCount
=
msg
.
stepCount
item
.
stepList
.
push
(
stepObj
)
item
.
precentsucess
=
msg
.
stepCount
item
.
precentsucess
=
msg
.
stepCount
?
Math
.
floor
(
msg
.
stepCount
*
100
)
?
Math
.
floor
(
msg
.
stepCount
*
100
)
:
0
;
:
0
}
}
});
})
// console.log('list',_this[processKey])
// console.log('list',_this[processKey])
};
}
_this
.
webSocketObj
[
wsUrl
].
onerror
=
function
(
event
)
{
_this
.
webSocketObj
[
wsUrl
].
onerror
=
function
(
event
)
{
console
.
log
(
"设备WebSocket:发生错误 "
);
console
.
log
(
"设备WebSocket:发生错误 "
)
console
.
log
(
event
);
console
.
log
(
event
)
};
}
}
catch
(
error
)
{}
}
catch
(
error
)
{
}
},
},
returnData
:
function
(
urls
,
params
)
{
returnData
:
function
(
urls
,
params
)
{
// console.log(urls,params)
// console.log(urls,params)
var
_this
=
this
;
var
_this
=
this
post
(
window
.
_CONF_
.
apiUrl
+
urls
,
JSON
.
stringify
(
params
)).
then
(
function
(
data
)
{
post
(
window
.
_CONF_
.
apiUrl
+
urls
,
JSON
.
stringify
(
params
)).
then
(
function
(
data
)
{
if
(
data
)
{
if
(
data
)
_this
.
loading
=
""
;
{
_this
.
showDiv
=
true
;
_this
.
loading
=
""
_this
.
showDiv
=
true
_this
.
renderResultToHtml
(
data
)
_this
.
renderResultToHtml
(
data
)
}
}
}).
catch
(
function
(
err
)
{
}).
catch
(
function
(
err
)
{
_this
.
loading
=
""
;
_this
.
loading
=
""
alert
(
"Sorry, The requested property could not be found."
);
alert
(
"Sorry, The requested property could not be found."
)
})
})
},
},
getDateCount
:
function
()
{
getDateCount
:
function
()
{
var
_this
=
this
;
var
_this
=
this
this
.
butShow
=
true
;
this
.
butShow
=
true
var
params
=
{
var
params
=
{
startTime
:
this
.
sourceDate
+
" "
+
this
.
sourceStartTime
,
startTime
:
this
.
sourceDate
+
" "
+
this
.
sourceStartTime
,
endTime
:
this
.
sourceDate
+
" "
+
this
.
sourceEndTime
,
endTime
:
this
.
sourceDate
+
" "
+
this
.
sourceEndTime
,
channelSerialnum
:
this
.
channelVal
channelSerialnum
:
this
.
channelVal
};
}
get
(
window
.
_CONF_
.
apiUrl
+
API
.
FaceRecognitionsCount
,
params
).
then
(
function
(
data
)
{
get
(
window
.
_CONF_
.
apiUrl
+
API
.
FaceRecognitionsCount
,
params
).
then
(
function
(
data
)
{
_this
.
butShow
=
false
;
_this
.
butShow
=
false
_this
.
dateCount
=
data
;
_this
.
dateCount
=
data
}).
catch
(
function
(
err
)
{
}).
catch
(
function
(
err
)
{
_this
.
butShow
=
false
;
_this
.
butShow
=
false
console
.
log
(
err
);
console
.
log
(
err
)
})
})
// $.ajax({
// $.ajax({
// type: "get",
// type: "get",
...
@@ -633,18 +690,20 @@ new Vue({
...
@@ -633,18 +690,20 @@ new Vue({
// });
// });
},
},
repairParams
:
function
(
type
)
{
repairParams
:
function
(
type
)
{
this
.
repairProgList
=
[];
this
.
repairProgList
=
[]
if
(
this
.
repairWebSocket
)
{
if
(
this
.
repairWebSocket
)
this
.
repairWebSocket
.
close
();
{
this
.
repairWebSocket
.
close
()
}
}
var
url
=
""
,
var
url
=
""
,
params
=
{};
params
=
{}
if
(
type
==
"face"
)
{
if
(
type
==
"face"
)
this
.
startShow
=
true
;
{
this
.
startShow
=
true
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
startShow
=
false
;
this
.
startShow
=
false
},
3000
);
},
3000
)
var
url
=
API
.
SimulationFaceRecognition
;
var
url
=
API
.
SimulationFaceRecognition
var
params
=
{
var
params
=
{
sourceStartDate
:
this
.
sourceDate
+
" "
+
this
.
sourceStartTime
,
sourceStartDate
:
this
.
sourceDate
+
" "
+
this
.
sourceStartTime
,
sourceEndDate
:
this
.
sourceDate
+
" "
+
this
.
sourceEndTime
,
sourceEndDate
:
this
.
sourceDate
+
" "
+
this
.
sourceEndTime
,
...
@@ -654,13 +713,15 @@ new Vue({
...
@@ -654,13 +713,15 @@ new Vue({
count
:
Number
(
this
.
count
),
count
:
Number
(
this
.
count
),
scheduleType
:
"simulationfaceRecognition"
,
scheduleType
:
"simulationfaceRecognition"
,
mark
:
Date
.
parse
(
new
Date
())
mark
:
Date
.
parse
(
new
Date
())
};
}
}
else
{
}
this
.
tafficShow
=
true
;
else
{
this
.
tafficShow
=
true
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
tafficShow
=
false
;
this
.
tafficShow
=
false
},
3000
);
},
3000
)
url
=
API
.
SimulationCountData
;
url
=
API
.
SimulationCountData
params
=
{
params
=
{
sourceStartDate
:
this
.
referenceDate
+
" "
+
this
.
traffStartTime
,
sourceStartDate
:
this
.
referenceDate
+
" "
+
this
.
traffStartTime
,
sourceEndDate
:
this
.
referenceDate
+
" "
+
this
.
traffEndTime
,
sourceEndDate
:
this
.
referenceDate
+
" "
+
this
.
traffEndTime
,
...
@@ -671,9 +732,9 @@ new Vue({
...
@@ -671,9 +732,9 @@ new Vue({
maxFactor
:
this
.
endRange
,
maxFactor
:
this
.
endRange
,
scheduleType
:
"simulationcountData"
,
scheduleType
:
"simulationcountData"
,
mark
:
Date
.
parse
(
new
Date
())
mark
:
Date
.
parse
(
new
Date
())
};
}
}
this
.
openFaceTraffWebSock
(
url
,
params
);
}
this
.
openFaceTraffWebSock
(
url
,
params
)
},
},
compareParams
:
function
(
type
)
{
compareParams
:
function
(
type
)
{
params
=
{
params
=
{
...
@@ -682,70 +743,81 @@ new Vue({
...
@@ -682,70 +743,81 @@ new Vue({
mallIds
:
this
.
mallVal
,
mallIds
:
this
.
mallVal
,
scheduleType
:
""
,
scheduleType
:
""
,
mark
:
Date
.
parse
(
new
Date
())
mark
:
Date
.
parse
(
new
Date
())
};
}
var
url
=
API
.
Mall
+
this
.
compareType
;
var
url
=
API
.
Mall
+
this
.
compareType
this
.
returnData
(
url
,
params
);
this
.
returnData
(
url
,
params
)
},
},
openFaceTraffWebSock
(
url
,
params
)
{
openFaceTraffWebSock
(
url
,
params
)
{
// browser 兼容
// browser 兼容
// var wsHost = window.location.host;
// var wsHost = window.location.host;
var
socketUrl
=
""
;
var
socketUrl
=
""
var
webSock_Url
=
window
.
_CONF_
.
webSockUrl
||
window
.
location
.
host
;
var
webSock_Url
=
window
.
_CONF_
.
webSockUrl
||
window
.
location
.
host
var
obj
=
{
var
obj
=
{
stepList
:
[]
stepList
:
[]
};
}
obj
.
stepType
=
params
.
scheduleType
;
obj
.
stepType
=
params
.
scheduleType
obj
.
mark
=
params
.
mark
;
obj
.
mark
=
params
.
mark
socketUrl
=
socketUrl
=
"ws://"
+
webSock_Url
+
WSAPI
.
RecalSchedule
+
params
.
scheduleType
;
"ws://"
+
webSock_Url
+
WSAPI
.
RecalSchedule
+
params
.
scheduleType
this
.
repairProgList
.
push
(
obj
);
this
.
repairProgList
.
push
(
obj
)
var
_this
=
this
;
var
_this
=
this
if
(
"WebSocket"
in
window
)
{
if
(
"WebSocket"
in
window
)
_this
.
repairWebSocket
=
new
WebSocket
(
socketUrl
);
{
}
else
if
(
"MozWebSocket"
in
window
)
{
_this
.
repairWebSocket
=
new
WebSocket
(
socketUrl
)
_this
.
repairWebSocket
=
new
MozWebSocket
(
socketUrl
);
}
}
else
{
else
if
(
"MozWebSocket"
in
window
)
_this
.
repairWebSocket
=
new
SockJS
(
socketUrl
);
{
}
_this
.
repairWebSocket
=
new
MozWebSocket
(
socketUrl
)
var
param
=
JSON
.
parse
(
JSON
.
stringify
(
params
));
}
try
{
else
{
_this
.
repairWebSocket
=
new
SockJS
(
socketUrl
)
}
var
param
=
JSON
.
parse
(
JSON
.
stringify
(
params
))
try
{
_this
.
repairWebSocket
.
onopen
=
function
(
event
)
{
_this
.
repairWebSocket
.
onopen
=
function
(
event
)
{
console
.
log
(
"WebSocket:已连接"
);
console
.
log
(
"WebSocket:已连接"
)
_this
.
repairData
(
url
,
params
);
_this
.
repairData
(
url
,
params
)
};
}
_this
.
repairWebSocket
.
onclosed
=
function
()
{
_this
.
repairWebSocket
.
onclosed
=
function
()
{
console
.
log
(
"WebSocket关闭"
);
console
.
log
(
"WebSocket关闭"
)
};
}
_this
.
repairWebSocket
.
onmessage
=
function
(
evt
)
{
_this
.
repairWebSocket
.
onmessage
=
function
(
evt
)
{
var
msg
=
JSON
.
parse
(
evt
.
data
);
var
msg
=
JSON
.
parse
(
evt
.
data
)
_this
.
repairProgList
.
forEach
((
item
,
index
)
=>
{
_this
.
repairProgList
.
forEach
((
item
,
index
)
=>
{
if
(
if
(
item
.
stepType
==
msg
.
scheduleType
&&
item
.
stepType
==
msg
.
scheduleType
&&
item
.
mark
==
msg
.
mark
item
.
mark
==
msg
.
mark
)
{
)
var
stepObj
=
{};
{
stepObj
.
counttime
=
msg
.
counttime
;
var
stepObj
=
{}
stepObj
.
serialnum
=
msg
.
serialnum
;
stepObj
.
counttime
=
msg
.
counttime
stepObj
.
status
=
msg
.
status
;
stepObj
.
serialnum
=
msg
.
serialnum
stepObj
.
stepCount
=
msg
.
stepCount
;
stepObj
.
status
=
msg
.
status
item
.
stepList
.
push
(
stepObj
);
stepObj
.
stepCount
=
msg
.
stepCount
item
.
stepList
.
push
(
stepObj
)
item
.
precentsucess
=
msg
.
stepCount
item
.
precentsucess
=
msg
.
stepCount
?
Math
.
floor
(
msg
.
stepCount
*
100
)
?
Math
.
floor
(
msg
.
stepCount
*
100
)
:
0
;
:
0
}
})
}
}
});
};
_this
.
webSocketObj
[
wsUrl
].
onerror
=
function
(
event
)
{
_this
.
webSocketObj
[
wsUrl
].
onerror
=
function
(
event
)
{
console
.
log
(
"设备WebSocket:发生错误 "
);
console
.
log
(
"设备WebSocket:发生错误 "
)
console
.
log
(
event
);
console
.
log
(
event
)
};
}
}
catch
(
error
)
{}
}
catch
(
error
)
{
}
},
},
repairData
(
url
,
params
)
{
repairData
(
url
,
params
)
{
let
that
=
this
let
that
=
this
post
(
window
.
_CONF_
.
apiUrl
+
url
,
JSON
.
stringify
(
params
)).
then
(
function
(
data
)
{
post
(
window
.
_CONF_
.
apiUrl
+
url
,
JSON
.
stringify
(
params
)).
then
(
function
(
data
)
{
if
(
data
)
{
if
(
data
)
{
that
.
renderResultToHtml
(
data
)
that
.
renderResultToHtml
(
data
)
}
}
})
})
...
@@ -761,10 +833,11 @@ new Vue({
...
@@ -761,10 +833,11 @@ new Vue({
maxFactor
:
this
.
endRange
,
maxFactor
:
this
.
endRange
,
scheduleType
:
"simulationcountData"
,
scheduleType
:
"simulationcountData"
,
mark
:
Date
.
parse
(
new
Date
())
mark
:
Date
.
parse
(
new
Date
())
};
}
let
that
=
this
let
that
=
this
post
(
window
.
_CONF_
.
apiUrl
+
API
.
PreviewCountData
,
JSON
.
stringify
(
params
)).
then
(
function
(
data
)
{
post
(
window
.
_CONF_
.
apiUrl
+
API
.
PreviewCountData
,
JSON
.
stringify
(
params
)).
then
(
function
(
data
)
{
if
(
data
)
{
if
(
data
)
{
that
.
renderResultToHtml
(
data
,
true
)
that
.
renderResultToHtml
(
data
,
true
)
}
}
})
})
...
@@ -776,20 +849,25 @@ new Vue({
...
@@ -776,20 +849,25 @@ new Vue({
data
.
success
+
data
.
success
+
" 个,失败 "
+
" 个,失败 "
+
data
.
failed
+
data
.
failed
+
" 个.</br>"
;
" 个.</br>"
if
(
data
.
failedJob
&&
data
.
failedJob
.
length
>
0
)
{
if
(
data
.
failedJob
&&
data
.
failedJob
.
length
>
0
)
text
+=
"-----失败job详情-----</br>"
;
{
text
+=
data
.
failedJob
.
join
(
"</br>"
);
text
+=
"-----失败job详情-----</br>"
if
(
data
.
data
)
{
text
+=
data
.
failedJob
.
join
(
"</br>"
)
text
+=
"</br>"
+
data
.
data
;
if
(
data
.
data
)
}
{
}
text
+=
"</br>"
+
data
.
data
if
(
data
.
successJob
&&
data
.
successJob
.
length
>
0
)
{
}
text
+=
"-----成功job详情-----</br>"
;
}
text
+=
data
.
successJob
.
join
(
"</br>"
);
if
(
data
.
successJob
&&
data
.
successJob
.
length
>
0
)
if
(
hasSccessDetail
)
{
{
if
(
data
.
data
)
{
text
+=
"-----成功job详情-----</br>"
console
.
log
(
data
.
data
);
text
+=
data
.
successJob
.
join
(
"</br>"
)
if
(
hasSccessDetail
)
{
if
(
data
.
data
)
{
console
.
log
(
data
.
data
)
data
.
data
.
forEach
(
item
=>
{
data
.
data
.
forEach
(
item
=>
{
text
+=
text
+=
"</br>"
+
"</br>"
+
...
@@ -800,16 +878,16 @@ new Vue({
...
@@ -800,16 +878,16 @@ new Vue({
" 进客流: "
+
" 进客流: "
+
item
.
innum
+
item
.
innum
+
" 出客流: "
+
" 出客流: "
+
item
.
outnum
;
item
.
outnum
});
})
}
}
}
}
}
}
text
+=
"</br>-----------------------------------------------"
;
text
+=
"</br>-----------------------------------------------"
text
+=
"</br>"
;
text
+=
"</br>"
text
+=
"</br>"
;
text
+=
"</br>"
text
+=
"</br>"
;
text
+=
"</br>"
$
(
"#showDiv"
).
append
(
text
);
$
(
"#showDiv"
).
append
(
text
)
},
},
onSearchClick
:
function
()
{
onSearchClick
:
function
()
{
/////////////////////////////特征重提////////////////////////////////////////////////
/////////////////////////////特征重提////////////////////////////////////////////////
...
@@ -826,7 +904,8 @@ new Vue({
...
@@ -826,7 +904,8 @@ new Vue({
// 参数 mallIds,startDate,endDate,scheduleType
// 参数 mallIds,startDate,endDate,scheduleType
// 店员重新比对 /mall/staff
// 店员重新比对 /mall/staff
// 参数 mallIds,startDate,endDate,scheduleType
// 参数 mallIds,startDate,endDate,scheduleType
if
(
this
.
socket
)
{
if
(
this
.
socket
)
{
this
.
socket
.
close
()
this
.
socket
.
close
()
this
.
socket
=
null
this
.
socket
=
null
}
}
...
@@ -844,7 +923,7 @@ new Vue({
...
@@ -844,7 +923,7 @@ new Vue({
return
val
===
1
?
API
.
MallStaff
:
API
.
MallCustom
return
val
===
1
?
API
.
MallStaff
:
API
.
MallCustom
}
}
}
}
const
{
dateFormat
,
query
,
isSendDateParam
}
=
this
const
{
dateFormat
,
query
,
isSendDateParam
}
=
this
const
{
const
{
dateVal
,
mallVal
,
type
dateVal
,
mallVal
,
type
}
=
query
}
=
query
...
@@ -857,11 +936,13 @@ new Vue({
...
@@ -857,11 +936,13 @@ new Vue({
scheduleType
:
scheduleType
,
scheduleType
:
scheduleType
,
// featureType: dateFormat === 'revisitFeature' ? type : null
// featureType: dateFormat === 'revisitFeature' ? type : null
}
}
if
(
isSendDateParam
)
{
if
(
isSendDateParam
)
{
parameter
.
startDate
=
dateVal
+
' 00:00:00'
parameter
.
startDate
=
dateVal
+
' 00:00:00'
parameter
.
endDate
=
dateVal
+
' 23:59:59'
parameter
.
endDate
=
dateVal
+
' 23:59:59'
}
}
if
(
dateFormat
===
'revisitFeature'
)
{
if
(
dateFormat
===
'revisitFeature'
)
{
parameter
.
featureType
=
type
parameter
.
featureType
=
type
}
}
var
socketParameter
=
{
var
socketParameter
=
{
...
@@ -879,40 +960,49 @@ new Vue({
...
@@ -879,40 +960,49 @@ new Vue({
* @param {string} callbackUrlPath
* @param {string} callbackUrlPath
* @param {object} callbackParam
* @param {object} callbackParam
*/
*/
onSocketConnect
({
scheduleType
,
callbackUrlPath
,
callbackParam
})
{
onSocketConnect
({
scheduleType
,
callbackUrlPath
,
callbackParam
})
{
var
self
=
this
,
var
self
=
this
,
wsUrl
=
window
.
_CONF_
.
webSockUrl
||
window
.
location
.
host
,
wsUrl
=
window
.
_CONF_
.
webSockUrl
||
window
.
location
.
host
,
socketUrl
=
"ws://"
+
wsUrl
+
WSAPI
.
RecalSchedule
+
scheduleType
socketUrl
=
"ws://"
+
wsUrl
+
WSAPI
.
RecalSchedule
+
scheduleType
if
(
"WebSocket"
in
window
)
{
if
(
"WebSocket"
in
window
)
self
.
socket
=
new
WebSocket
(
socketUrl
);
{
}
else
if
(
"MozWebSocket"
in
window
)
{
self
.
socket
=
new
WebSocket
(
socketUrl
)
self
.
socket
=
new
MozWebSocket
(
socketUrl
);
}
}
else
{
else
if
(
"MozWebSocket"
in
window
)
self
.
socket
=
new
SockJS
(
socketUrl
);
{
}
self
.
socket
=
new
MozWebSocket
(
socketUrl
)
try
{
}
else
{
self
.
socket
=
new
SockJS
(
socketUrl
)
}
try
{
self
.
socket
.
onopen
=
function
(
ev
)
{
self
.
socket
.
onopen
=
function
(
ev
)
{
self
.
startTiming
=
+
new
Date
()
self
.
startTiming
=
+
new
Date
()
self
.
fetchApi
(
callbackUrlPath
,
callbackParam
)
self
.
fetchApi
(
callbackUrlPath
,
callbackParam
)
};
}
self
.
socket
.
onclosed
=
function
()
{
self
.
socket
.
onclosed
=
function
()
{
console
.
log
(
'socket:onclose'
)
console
.
log
(
'socket:onclose'
)
};
}
self
.
socket
.
onmessage
=
function
(
ev
)
{
self
.
socket
.
onmessage
=
function
(
ev
)
{
var
msg
=
JSON
.
parse
(
ev
.
data
)
var
msg
=
JSON
.
parse
(
ev
.
data
)
console
.
log
(
'[onmessage]:'
,
msg
)
console
.
log
(
'[onmessage]:'
,
msg
)
self
.
dealMessage
(
msg
)
self
.
dealMessage
(
msg
)
if
(
msg
.
stepCount
===
1
)
{
if
(
msg
.
stepCount
===
1
)
{
self
.
endTiming
=
+
new
Date
()
self
.
endTiming
=
+
new
Date
()
self
.
socket
.
close
()
self
.
socket
.
close
()
}
}
};
}
self
.
socket
.
onerror
=
function
(
ev
)
{
self
.
socket
.
onerror
=
function
(
ev
)
{
console
.
log
(
"设备WebSocket:发生错误 "
);
console
.
log
(
"设备WebSocket:发生错误 "
)
console
.
log
(
ev
);
console
.
log
(
ev
)
}
}
}
}
catch
(
error
)
{
catch
(
error
)
{
console
.
log
(
'onSocketConnect:'
,
error
)
console
.
log
(
'onSocketConnect:'
,
error
)
}
}
},
},
...
@@ -927,7 +1017,7 @@ new Vue({
...
@@ -927,7 +1017,7 @@ new Vue({
},
},
dealMessage
(
msg
)
{
dealMessage
(
msg
)
{
// scheduleType
// scheduleType
const
{
dates
,
mallIds
,
mallNames
,
status
,
stepCount
,
scheduleType
,
counter
}
=
msg
const
{
dates
,
mallIds
,
mallNames
,
status
,
stepCount
,
scheduleType
,
counter
}
=
msg
var
self
=
this
var
self
=
this
var
resObj
=
{}
var
resObj
=
{}
resObj
.
dates
=
dates
resObj
.
dates
=
dates
...
@@ -941,7 +1031,8 @@ new Vue({
...
@@ -941,7 +1031,8 @@ new Vue({
resObj
.
curPageSize
=
0
resObj
.
curPageSize
=
0
resObj
.
currentPage
=
0
resObj
.
currentPage
=
0
resObj
.
scheduleType
=
scheduleType
resObj
.
scheduleType
=
scheduleType
if
(
counter
)
{
if
(
counter
)
{
// dataNum dateMallNum step totalData totalDate totalMall totalMallDateProduct allDataCount
// dataNum dateMallNum step totalData totalDate totalMall totalMallDateProduct allDataCount
resObj
.
totalNum
=
counter
.
allDataCount
resObj
.
totalNum
=
counter
.
allDataCount
resObj
.
totalPage
=
counter
.
totalMallDateProduct
resObj
.
totalPage
=
counter
.
totalMallDateProduct
...
@@ -949,13 +1040,15 @@ new Vue({
...
@@ -949,13 +1040,15 @@ new Vue({
resObj
.
curPageSize
=
counter
.
totalData
resObj
.
curPageSize
=
counter
.
totalData
resObj
.
currentPage
=
counter
.
dateMallNum
resObj
.
currentPage
=
counter
.
dateMallNum
}
}
if
(
self
.
results
.
length
)
{
if
(
self
.
results
.
length
)
{
const
isSameScheduleType
=
self
.
results
.
some
(
item
=>
item
.
scheduleType
===
scheduleType
)
const
isSameScheduleType
=
self
.
results
.
some
(
item
=>
item
.
scheduleType
===
scheduleType
)
isSameScheduleType
isSameScheduleType
?
self
.
results
.
forEach
(
item
=>
{
?
self
.
results
.
forEach
(
item
=>
{
//
//
item
.
progress
=
self
.
floatToPercent
(
stepCount
)
item
.
progress
=
self
.
floatToPercent
(
stepCount
)
if
(
counter
)
{
if
(
counter
)
{
item
.
totalNum
=
counter
.
allDataCount
item
.
totalNum
=
counter
.
allDataCount
item
.
totalPage
=
counter
.
totalMallDateProduct
item
.
totalPage
=
counter
.
totalMallDateProduct
item
.
current
=
counter
.
dataNum
item
.
current
=
counter
.
dataNum
...
@@ -965,7 +1058,9 @@ new Vue({
...
@@ -965,7 +1058,9 @@ new Vue({
})
})
:
self
.
results
.
push
(
resObj
)
:
self
.
results
.
push
(
resObj
)
resObj
=
{}
resObj
=
{}
}
else
{
}
else
{
self
.
results
.
push
(
resObj
)
self
.
results
.
push
(
resObj
)
resObj
=
{}
resObj
=
{}
}
}
...
@@ -975,19 +1070,26 @@ new Vue({
...
@@ -975,19 +1070,26 @@ new Vue({
// })
// })
},
},
formatDateToStamp
(
date
)
{
formatDateToStamp
(
date
)
{
if
(
!
date
)
return
false
if
(
!
date
)
{
return
false
}
typeof
date
===
'string'
&&
(
date
=
new
Date
(
date
.
replace
(
/-/g
,
'/'
)))
typeof
date
===
'string'
&&
(
date
=
new
Date
(
date
.
replace
(
/-/g
,
'/'
)))
return
date
.
getTime
()
return
date
.
getTime
()
},
},
floatToPercent
(
floatNum
)
{
floatToPercent
(
floatNum
)
{
if
(
!
floatNum
)
return
0
if
(
!
floatNum
)
{
return
0
}
var
formatNum
=
Math
.
floor
(
floatNum
*
100
)
var
formatNum
=
Math
.
floor
(
floatNum
*
100
)
return
formatNum
>=
100
?
100
:
formatNum
return
formatNum
>=
100
?
100
:
formatNum
},
},
onClearClick
()
{
onClearClick
()
{
if
(
this
.
dateFormat
===
'revisitFeature'
||
if
(
this
.
dateFormat
===
'revisitFeature'
||
this
.
dateFormat
===
'rebuildFeatureLib'
||
this
.
dateFormat
===
'rebuildFeatureLib'
||
this
.
dateFormat
===
'rematchPerson'
)
{
this
.
dateFormat
===
'rematchPerson'
)
{
this
.
startTiming
=
0
this
.
startTiming
=
0
this
.
endTiming
=
0
this
.
endTiming
=
0
this
.
results
=
[]
this
.
results
=
[]
...
@@ -997,4 +1099,4 @@ new Vue({
...
@@ -997,4 +1099,4 @@ new Vue({
// }
// }
}
}
}
}
})
;
})
static/js/request.js
View file @
402c284
...
@@ -41,7 +41,7 @@ Axios.interceptors.response.use(
...
@@ -41,7 +41,7 @@ Axios.interceptors.response.use(
function
get
(
url
,
params
=
{},
config
=
{})
{
function
get
(
url
,
params
=
{},
config
=
{})
{
params
[
's'
]
=
+
new
Date
()
params
[
's'
]
=
+
new
Date
()
return
Axios
.
get
(
url
,
{
...
config
,
params
})
return
Axios
.
get
(
url
,
{...
config
,
params
})
}
}
function
post
(
url
,
params
,
config
=
{})
{
function
post
(
url
,
params
,
config
=
{})
{
...
...
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