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 f50e4225
authored
Jan 11, 2022
by
李金轩
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
ljx
1 parent
29779967
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
146 additions
and
27 deletions
static/index.html
static/js/common.js
static/js/home.js
static/js/request.js
static/index.html
View file @
f50e422
This diff is collapsed.
Click to expand it.
static/js/common.js
View file @
f50e422
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
:
window
.
_baseUrl
,
apiUrl
:
window
.
location
.
hostname
===
'localhost'
?
'http://store.keliuyun.com:9998'
:
''
,
apiUrl2
:
window
.
location
.
hostname
===
'localhost'
?
'http://36.112.68.214:9999'
:
''
,
webSockUrl
:
''
webSockUrl
:
''
}
}
...
...
static/js/home.js
View file @
f50e422
...
@@ -34,8 +34,8 @@ new Vue({
...
@@ -34,8 +34,8 @@ new Vue({
total2
:
0
,
total2
:
0
,
dataList1
:
[],
dataList1
:
[],
dataList2
:
[],
dataList2
:
[],
zoneList
:
[],
zone
_id
List
:
[],
zone
Value
:
[],
zone
_id
:
[],
pickerOpts
:
{
pickerOpts
:
{
disabledDate
(
time
)
{
disabledDate
(
time
)
{
return
Date
.
parse
(
time
)
>
Date
.
parse
(
new
Date
())
return
Date
.
parse
(
time
)
>
Date
.
parse
(
new
Date
())
...
@@ -69,12 +69,19 @@ new Vue({
...
@@ -69,12 +69,19 @@ new Vue({
referenceDate
:
""
,
referenceDate
:
""
,
repairDate
:
""
,
repairDate
:
""
,
accountVal
:
[],
accountVal
:
[],
account_id
:
[],
plaza_id
:
[],
mallVal
:
[],
mallVal
:
[],
mallOpts
:
[],
mallOpts
:
[],
accountId
:
[],
accountId
:
[],
accoutOpts
:
[],
accoutOpts
:
[],
account_id_list
:
[],
plaza_id_list
:
[],
gate_idList
:
[],
deviceVal
:
""
,
deviceVal
:
""
,
gateVal
:
""
,
gateVal
:
""
,
gateVal2
:
""
,
gate_id
:
''
,
channelVal
:
""
,
channelVal
:
""
,
showDiv
:
true
,
showDiv
:
true
,
loading
:
""
,
loading
:
""
,
...
@@ -323,15 +330,12 @@ new Vue({
...
@@ -323,15 +330,12 @@ new Vue({
}
}
else
if
(
this
.
dateFormat
==
"snapGatherClass"
)
else
if
(
this
.
dateFormat
==
"snapGatherClass"
)
{
{
this
.
getGate
()
// initialize
get
(
get
(
'http://36.112.68.214:9999'
+
'/malls'
,
window
.
_CONF_
.
apiUrl2
+
'/accounts'
,
{
accountIds
:
2
}
).
then
(
).
then
(
(
r
)
=>
{
(
r
)
=>
{
log
(
r
)
this
.
account_id_list
=
r
}
}
)
)
}
}
...
@@ -340,8 +344,70 @@ new Vue({
...
@@ -340,8 +344,70 @@ new Vue({
// this.getMall();
// this.getMall();
}
}
},
},
onAccount_idChange
:
function
()
{
this
.
getMallList
()
this
.
getZoneList
()
this
.
getGateList
()
},
getMallList
:
function
()
{
this
.
plaza_id_list
=
[]
get
(
window
.
_CONF_
.
apiUrl2
+
'/malls'
,
{
accountIds
:
this
.
account_id
.
toString
(),
}
).
then
(
(
r
)
=>
{
this
.
plaza_id_list
=
r
}
)
},
onPlaza_idChange
:
function
()
{
this
.
getZoneList
()
this
.
getGateList
()
},
getZoneList
:
function
()
{
this
.
zone_idList
=
[]
get
(
window
.
_CONF_
.
apiUrl2
+
'/zones/zoneList'
,
{
account_id
:
this
.
account_id
.
toString
(),
plaza_id
:
this
.
plaza_id
.
toString
(),
}
).
then
(
(
r
)
=>
{
this
.
zone_idList
=
r
}
)
},
onGate_idChange
:
function
()
{
this
.
getGateList
()
},
getGateList
:
function
()
{
this
.
gate_idList
=
[]
get
(
window
.
_CONF_
.
apiUrl2
+
'/gates/gateByInfo'
,
{
account_id
:
this
.
account_id
.
toString
(),
plaza_id
:
this
.
plaza_id
.
toString
(),
zone_id
:
this
.
zone_id
.
toString
(),
type
:
this
.
type6
,
}
).
then
(
(
r
)
=>
{
this
.
gate_idList
=
r
.
data
}
)
},
onTypeChange
:
function
()
{
this
.
getGateList
()
},
onMenuSelect
:
function
(
value
)
{
onMenuSelect
:
function
(
value
)
{
this
.
currentIndex6
=
value
this
.
currentIndex6
=
value
// this.pageNum1 = 1
// this.pageNum2 = 1
// this.total1 = 0
// this.total2 = 0
},
},
formatDirection
:
function
(
number
)
{
formatDirection
:
function
(
number
)
{
switch
(
number
)
switch
(
number
)
...
@@ -368,20 +434,21 @@ new Vue({
...
@@ -368,20 +434,21 @@ new Vue({
confirmSearch
:
function
()
{
confirmSearch
:
function
()
{
const
data
=
filterEmptyValueInObject
(
const
data
=
filterEmptyValueInObject
(
{
{
account_id
:
this
.
account
Val
.
toString
(),
account_id
:
this
.
account
_id
.
toString
(),
// account_id: 16,
// account_id: 16,
type
:
this
.
type6
,
type
:
this
.
type6
,
// type: 3,
// type: 3,
zone_id
:
this
.
mallVal
.
toString
(),
// plaza_id: 40,
plaza_id
:
this
.
plaza_id
.
toString
(),
zone_id
:
this
.
zone_id
.
toString
(),
// zone_id: 48,
// zone_id: 48,
gate_id
:
this
.
gate
Val
,
gate_id
:
this
.
gate
_id
,
// gate_id: 268,
// gate_id: 268,
direction
:
this
.
direction6
,
direction
:
this
.
direction6
,
picType
:
this
.
picType6
,
picType
:
this
.
picType6
,
personType
:
this
.
personType6
,
personType
:
this
.
personType6
,
// personType: 0,
// personType: 0,
// plaza_id: 40,
plaza_id
:
this
.
zoneValue
.
toString
(),
startTime
:
formatDate
(
this
.
time6
[
0
]),
startTime
:
formatDate
(
this
.
time6
[
0
]),
endTime
:
formatDate
(
this
.
time6
[
1
]),
endTime
:
formatDate
(
this
.
time6
[
1
]),
page
:
this
.
pageNum1
-
1
,
page
:
this
.
pageNum1
-
1
,
...
@@ -389,7 +456,7 @@ new Vue({
...
@@ -389,7 +456,7 @@ new Vue({
}
}
)
)
get
(
get
(
'http://36.112.68.214:9999'
+
'/faceRecognitions/faceRecord'
,
window
.
_CONF_
.
apiUrl2
+
'/faceRecognitions/faceRecord'
,
data
data
).
then
(
).
then
(
(
r
)
=>
{
(
r
)
=>
{
...
@@ -402,31 +469,31 @@ new Vue({
...
@@ -402,31 +469,31 @@ new Vue({
confirmSearch2
:
function
()
{
confirmSearch2
:
function
()
{
const
data
=
filterEmptyValueInObject
(
const
data
=
filterEmptyValueInObject
(
{
{
account_id
:
this
.
account
Val
.
toString
(),
account_id
:
this
.
account
_id
.
toString
(),
// account_id: 16,
// account_id: 16,
type
:
this
.
type6
,
type
:
this
.
type6
,
// type: 3,
// type: 3,
zone_id
:
this
.
mallVal
.
toString
(),
// plaza_id: 40,
plaza_id
:
this
.
plaza_id
.
toString
(),
zone_id
:
this
.
zone_id
.
toString
(),
// zone_id: 48,
// zone_id: 48,
gate_id
:
this
.
gate
Val
,
gate_id
:
this
.
gate
_id
,
// gate_id: 268,
// gate_id: 268,
direction
:
this
.
direction6
,
direction
:
this
.
direction6
,
picType
:
this
.
picType6
,
picType
:
this
.
picType6
,
personType
:
this
.
personType6
,
personType
:
this
.
personType6
,
// personType: 0,
// personType: 0,
// plaza_id: 40,
plaza_id
:
this
.
zoneValue
.
toString
(),
startTime
:
formatDate
(
this
.
time6
[
0
]),
startTime
:
formatDate
(
this
.
time6
[
0
]),
endTime
:
formatDate
(
this
.
time6
[
1
]),
endTime
:
formatDate
(
this
.
time6
[
1
]),
minPic
:
this
.
minPic
,
maxPic
:
this
.
maxPic
,
page
:
this
.
pageNum2
-
1
,
page
:
this
.
pageNum2
-
1
,
pageSize
:
this
.
pageSize2
,
pageSize
:
this
.
pageSize2
,
minPic
:
this
.
minPic
,
maxPic
:
this
.
maxPic
,
}
}
)
)
get
(
get
(
'http://36.112.68.214:9999'
+
'/faceRecognitions/faceRecordGroup'
,
window
.
_CONF_
.
apiUrl2
+
'/faceRecognitions/faceRecordGroup'
,
data
data
).
then
(
).
then
(
(
r
)
=>
{
(
r
)
=>
{
...
@@ -555,7 +622,7 @@ new Vue({
...
@@ -555,7 +622,7 @@ new Vue({
getZone
()
{
getZone
()
{
let
_this
=
this
let
_this
=
this
_this
.
mallOpts
=
[]
_this
.
mallOpts
=
[]
get
(
'http://36.112.68.214:9999'
+
'/zones/zoneList'
,
{
get
(
window
.
_CONF_
.
apiUrl2
+
'/zones/zoneList'
,
{
account_id
:
_this
.
accountVal
.
join
(
","
),
account_id
:
_this
.
accountVal
.
join
(
","
),
plaza_id
:
_this
.
mallVal
.
join
(
","
)
plaza_id
:
_this
.
mallVal
.
join
(
","
)
// account_id: 16,
// account_id: 16,
...
@@ -659,6 +726,17 @@ new Vue({
...
@@ -659,6 +726,17 @@ new Vue({
_this
.
getChannel
()
_this
.
getChannel
()
})
})
},
},
getGate2
:
function
()
{
var
_this
=
this
get
(
window
.
_CONF_
.
apiUrl2
+
'/gates/gateByInfo'
,
{
account_id
:
_this
.
accountVal
.
toString
(),
plaza_id
:
_this
.
mallVal
.
toString
(),
zone_id
:
_this
.
zoneValue
.
toString
(),
type
:
_this
.
type6
,
}).
then
(
function
(
data
)
{
log
(
data
)
})
},
getDevice
:
function
()
{
getDevice
:
function
()
{
var
_this
=
this
var
_this
=
this
get
(
window
.
_CONF_
.
apiUrl
+
API
.
Devices
,
{
get
(
window
.
_CONF_
.
apiUrl
+
API
.
Devices
,
{
...
@@ -714,6 +792,26 @@ new Vue({
...
@@ -714,6 +792,26 @@ new Vue({
_this
.
channelOpt
.
length
>
0
?
_this
.
channelOpt
[
0
].
value
:
""
_this
.
channelOpt
.
length
>
0
?
_this
.
channelOpt
[
0
].
value
:
""
})
})
},
},
getChannel2
()
{
var
_this
=
this
get
(
window
.
_CONF_
.
apiUrl
+
API
.
Channels
,
{
// accountIds: _this.accountVal.join(","),
// mallIds: _this.mallVal.join(','),
gateId
:
this
.
gateVal
}).
then
(
function
(
data
)
{
_this
.
channelOpt
=
[]
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
var
temp
=
{}
temp
.
name
=
data
[
i
]
temp
.
value
=
data
[
i
]
temp
.
id
=
i
_this
.
channelOpt
.
push
(
temp
)
}
_this
.
channelVal
=
_this
.
channelOpt
.
length
>
0
?
_this
.
channelOpt
[
0
].
value
:
""
})
},
clearDiv
()
{
clearDiv
()
{
$
(
"#showDiv"
).
empty
()
$
(
"#showDiv"
).
empty
()
},
},
...
...
static/js/request.js
View file @
f50e422
...
@@ -7,12 +7,34 @@ const Axios = axios.create({
...
@@ -7,12 +7,34 @@ const Axios = axios.create({
}
}
})
})
const
getUrlQueryByName
=
function
(
name
)
{
name
=
name
.
replace
(
/
[\[\]]
/g
,
'\\$&'
)
let
regex
=
new
RegExp
(
'[?&]'
+
name
+
'(=([^&#]*)|&|#|$)'
)
let
results
=
regex
.
exec
(
window
.
location
.
href
)
if
(
!
results
)
{
return
null
}
if
(
!
results
[
2
])
{
return
''
}
return
decodeURIComponent
(
results
[
2
].
replace
(
/
\+
/g
,
' '
))
}
Axios
.
interceptors
.
request
.
use
(
Axios
.
interceptors
.
request
.
use
(
config
=>
{
config
=>
{
const
atoken
=
Cookies
.
get
(
'atoken'
)
//
const atoken = Cookies.get('atoken')
// console.log('atoken', atoken)
// console.log('atoken', atoken)
// atoken && (config.headers.Authorization = atoken)
// atoken && (config.headers.Authorization = atoken)
if
(
window
.
location
.
hostname
===
'localhost'
)
{
config
.
headers
.
Authorization
=
'a054367f-717d-47fb-b870-7c599e030e16'
config
.
headers
.
Authorization
=
'a054367f-717d-47fb-b870-7c599e030e16'
}
else
{
config
.
headers
.
Authorization
=
getUrlQueryByName
(
'authorization'
)
}
return
config
return
config
},
},
error
=>
{
error
=>
{
...
...
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