Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
oEshield
This project
Loading...
Sign in
Toggle navigation
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 88012d4b
authored
Sep 13, 2021
by
吴娟华
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
'1.2.1'
1 parent
333bfea4
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
876 additions
and
300 deletions
config/webpack.config.js
src/api/services/business.js
src/api/services/monitor.js
src/assets/scss/monitor.scss
src/assets/spritesmith-generated/sprite.css
src/assets/spritesmith-generated/sprite.png
src/pages/FullWidthLayout.vue
src/pages/business/importDeviceModal.vue
src/pages/business/userCarAdmin.vue
src/pages/business/userCarModal.vue
src/pages/monitor/monitor.vue
src/pages/monitor/replay.vue
src/utils/exportExcel.js
src/utils/mapService.js
src/utils/monitor.js
src/utils/remoteLoad.js
config/webpack.config.js
View file @
88012d4
...
@@ -15,7 +15,7 @@ const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPl
...
@@ -15,7 +15,7 @@ const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPl
//localhost:10500
//localhost:10500
const
IS_DEV_MODE
=
process
.
env
.
NODE_ENV
!==
'production'
const
IS_DEV_MODE
=
process
.
env
.
NODE_ENV
!==
'production'
const
getPublicPath
=
IS_DEV_MODE
?
''
:
'./'
;
const
getPublicPath
=
IS_DEV_MODE
?
''
:
'./'
;
const
resourcesPath
=
IS_DEV_MODE
?
`//localhost:
${
port
}
`
:
'https://e-shield-old.glsx.com.cn'
;
const
resourcesPath
=
IS_DEV_MODE
?
`
http:
//localhost:
${
port
}
`
:
'https://e-shield-old.glsx.com.cn'
;
module
.
exports
=
{
module
.
exports
=
{
mode
:
IS_DEV_MODE
?
'development'
:
'production'
,
mode
:
IS_DEV_MODE
?
'development'
:
'production'
,
...
@@ -192,7 +192,7 @@ module.exports = {
...
@@ -192,7 +192,7 @@ module.exports = {
proxy
:
{
proxy
:
{
'/ots'
:
{
'/ots'
:
{
changeOrigin
:
true
,
changeOrigin
:
true
,
target
:
'http://e-shield.glsx.net'
//'http://e-shield.glsx.net'//'http://192.168.1.158:8088'//'http://e-shield.didihu.com.cn'//'http://192.168.1.53:8088'//'http://localhost:8088'//'http://tiger-sso.didihu.com.cn'// http://vjg7.branch.glsx.com.cn/
target
:
'http://
192.168.2.53:8889/'
//'http://
e-shield.glsx.net'//'http://e-shield.glsx.net'//'http://192.168.1.158:8088'//'http://e-shield.didihu.com.cn'//'http://192.168.1.53:8088'//'http://localhost:8088'//'http://tiger-sso.didihu.com.cn'// http://vjg7.branch.glsx.com.cn/
}
}
}
}
},
},
...
...
src/api/services/business.js
View file @
88012d4
import
api
from
'../config.js'
import
api
from
'../config.js'
import
request
from
'./request'
export
default
{
export
default
{
getVehicleList
(
request
=
{})
{
getVehicleList
(
params
=
{})
{
return
request
(
params
,
'/trialdrive/vehicle/vehicleinfo/search'
,
'get'
)
},
checkSnType
(
params
=
{})
{
return
request
(
params
,
'/trialdrive/vehicle/vehicleinfo/getclassifynamebysn'
,
'get'
)
},
addVehicle
(
params
=
{})
{
return
request
(
params
,
'/trialdrive/vehicle/vehicleinfo/save'
,
'post'
)
},
updateVehicle
(
params
=
{})
{
return
request
(
params
,
'/trialdrive/vehicle/vehicleinfo/update'
,
'post'
)
},
/* getVehicleList (request = {}) {
return api.get('vehicle/getVehicleList', request)
return api.get('vehicle/getVehicleList', request)
},
},
getVehicleListTotal (request = {}) {
getVehicleListTotal (request = {}) {
...
@@ -18,7 +31,7 @@ export default {
...
@@ -18,7 +31,7 @@ export default {
},
},
saveVehicleForm(request = {}) {
saveVehicleForm(request = {}) {
return api.post('vehicle/edit', request)
return api.post('vehicle/edit', request)
},
},
*/
/*工单管理*/
/*工单管理*/
getWorkOrderList
(
request
=
{})
{
getWorkOrderList
(
request
=
{})
{
...
...
src/api/services/monitor.js
View file @
88012d4
...
@@ -28,7 +28,26 @@ export default {
...
@@ -28,7 +28,26 @@ export default {
getSpecialShopList
(
params
=
{})
{
getSpecialShopList
(
params
=
{})
{
return
request
(
params
,
'/trialdrive/specialshop/shopusers'
,
'get'
)
return
request
(
params
,
'/trialdrive/specialshop/shopusers'
,
'get'
)
},
},
getVehicleTree
(
params
=
{})
{
return
request
(
params
,
'/trialdrive/monitor/vtree'
,
'get'
)
},
getVehicleTreeUserList
(
params
=
{})
{
return
request
(
params
,
'/trialdrive/monitor/uvlist'
,
'get'
)
},
getVehicleTreeUserIds
(
params
=
{})
{
return
request
(
params
,
'/trialdrive/monitor/ovlist'
,
'get'
)
},
getDevicesLocation
(
params
=
{})
{
return
request
(
params
,
'/trialdrive/monitor/vehiclelocation'
,
'get'
)
},
getTrackHistory
(
params
=
{})
{
return
request
(
params
,
'/devicemonitor/monitor/listtrackpoint'
,
'get'
)
},
getHistoryLocation
(
params
=
{})
{
return
request
(
params
,
'/devicemonitor/monitor/liststaypoint'
,
'get'
)
},
// 旧虎哥
// 旧虎哥
/*车辆监控*/
/*车辆监控*/
// getCriteriaTreeList (request = {}) {
// getCriteriaTreeList (request = {}) {
...
...
src/assets/scss/monitor.scss
View file @
88012d4
...
@@ -249,7 +249,7 @@
...
@@ -249,7 +249,7 @@
}
}
.stay-list
{
.stay-list
{
/* height: calc(100% - 70px); */
/* height: calc(100% - 70px); */
max-height
:
calc
(
100vh
-
12
0px
);
max-height
:
calc
(
100vh
-
20
0px
);
overflow-y
:
auto
;
overflow-y
:
auto
;
}
}
.stay-list-item
{
.stay-list-item
{
...
...
src/assets/spritesmith-generated/sprite.css
View file @
88012d4
.icon
{
display
:
inline-block
;
background-image
:
url(~sprite.png)
;
background-size
:
119px
97px
;
vertical-align
:
middle
;}
.icon
{
display
:
inline-block
;
background-image
:
url(~sprite.png)
;
background-size
:
119px
97px
;
vertical-align
:
middle
;}
.icon-battery_empty
{
width
:
42px
;
height
:
20px
;
background-position
:
0px
0px
;
}
.icon-battery_empty
{
width
:
42px
;
height
:
20px
;
background-position
:
0px
0px
;
}
.icon-battery_enough
{
width
:
42px
;
height
:
20px
;
background-position
:
0px
-20px
;
}
.icon-battery_enough
{
width
:
42px
;
height
:
20px
;
background-position
:
0px
-20px
;
}
.icon-fullsize.active
{
width
:
18px
;
height
:
18px
;
background-position
:
0
px
-79px
;
}
.icon-fullsize.active
{
width
:
18px
;
height
:
18px
;
background-position
:
-18
px
-79px
;
}
.icon-fullsize
:active
{
width
:
18px
;
height
:
18px
;
background-position
:
0
px
-79px
;
}
.icon-fullsize
:active
{
width
:
18px
;
height
:
18px
;
background-position
:
-18
px
-79px
;
}
.icon-fullsize
:hover
{
background-position
:
0
px
-79px
;
}
.icon-fullsize
:hover
{
background-position
:
-18
px
-79px
;
}
.icon-fullsize
{
width
:
18px
;
height
:
18px
;
background-position
:
-18
px
-79px
;
}
.icon-fullsize
{
width
:
18px
;
height
:
18px
;
background-position
:
0
px
-79px
;
}
.icon-icon_zoom_out.active
{
width
:
18px
;
height
:
18px
;
background-position
:
-
36
px
-79px
;
}
.icon-icon_zoom_out.active
{
width
:
18px
;
height
:
18px
;
background-position
:
-
72
px
-79px
;
}
.icon-icon_zoom_out
:active
{
width
:
18px
;
height
:
18px
;
background-position
:
-
36
px
-79px
;
}
.icon-icon_zoom_out
:active
{
width
:
18px
;
height
:
18px
;
background-position
:
-
72
px
-79px
;
}
.icon-icon_zoom_out
:hover
{
background-position
:
-
36
px
-79px
;
}
.icon-icon_zoom_out
:hover
{
background-position
:
-
72
px
-79px
;
}
.icon-icon_zoom_out
{
width
:
18px
;
height
:
18px
;
background-position
:
-54px
-79px
;
}
.icon-icon_zoom_out
{
width
:
18px
;
height
:
18px
;
background-position
:
-54px
-79px
;
}
.icon-info_copy.active
{
width
:
16px
;
height
:
16px
;
background-position
:
-101px
-36px
;
}
.icon-info_copy.active
{
width
:
16px
;
height
:
16px
;
background-position
:
-101px
-36px
;
}
.icon-info_copy
:active
{
width
:
16px
;
height
:
16px
;
background-position
:
-101px
-36px
;
}
.icon-info_copy
:active
{
width
:
16px
;
height
:
16px
;
background-position
:
-101px
-36px
;
}
.icon-info_copy
:hover
{
background-position
:
-101px
-36px
;
}
.icon-info_copy
:hover
{
background-position
:
-101px
-36px
;
}
.icon-info_copy
{
width
:
16px
;
height
:
16px
;
background-position
:
-101px
-52px
;
}
.icon-info_copy
{
width
:
16px
;
height
:
16px
;
background-position
:
-101px
-52px
;
}
.icon-info_device_alarm
{
width
:
20px
;
height
:
20px
;
background-position
:
-
42px
0px
;
}
.icon-info_device_alarm
{
width
:
20px
;
height
:
20px
;
background-position
:
-
62px
-2
0px
;
}
.icon-info_device_status
{
width
:
20px
;
height
:
20px
;
background-position
:
-
42px
-2
0px
;
}
.icon-info_device_status
{
width
:
20px
;
height
:
20px
;
background-position
:
-
62px
0px
;
}
.icon-info_device
{
width
:
20px
;
height
:
20px
;
background-position
:
0px
-40px
;
}
.icon-info_device
{
width
:
20px
;
height
:
20px
;
background-position
:
-4
0px
-40px
;
}
.icon-info_location
{
width
:
20px
;
height
:
20px
;
background-position
:
-20px
-40px
;
}
.icon-info_location
{
width
:
20px
;
height
:
20px
;
background-position
:
-20px
-40px
;
}
.icon-info_stop
{
width
:
20px
;
height
:
20px
;
background-position
:
-4
0px
-40px
;
}
.icon-info_stop
{
width
:
20px
;
height
:
20px
;
background-position
:
0px
-40px
;
}
.icon-info_time
{
width
:
20px
;
height
:
20px
;
background-position
:
-
62px
0px
;
}
.icon-info_time
{
width
:
20px
;
height
:
20px
;
background-position
:
-
42px
-2
0px
;
}
.icon-info_type
{
width
:
20px
;
height
:
20px
;
background-position
:
-
62px
-2
0px
;
}
.icon-info_type
{
width
:
20px
;
height
:
20px
;
background-position
:
-
42px
0px
;
}
.icon-locate.active
{
width
:
19px
;
height
:
19px
;
background-position
:
-62px
-4
0px
;
}
.icon-locate.active
{
width
:
19px
;
height
:
19px
;
background-position
:
0px
-6
0px
;
}
.icon-locate
:active
{
width
:
19px
;
height
:
19px
;
background-position
:
-62px
-4
0px
;
}
.icon-locate
:active
{
width
:
19px
;
height
:
19px
;
background-position
:
0px
-6
0px
;
}
.icon-locate
:hover
{
background-position
:
-62px
-4
0px
;
}
.icon-locate
:hover
{
background-position
:
0px
-6
0px
;
}
.icon-locate
{
width
:
19px
;
height
:
19px
;
background-position
:
0
px
-60px
;
}
.icon-locate
{
width
:
19px
;
height
:
19px
;
background-position
:
-19
px
-60px
;
}
.icon-minisize.active
{
width
:
18px
;
height
:
19px
;
background-position
:
-82px
-19px
;
}
.icon-minisize.active
{
width
:
18px
;
height
:
19px
;
background-position
:
-82px
-19px
;
}
.icon-minisize
:active
{
width
:
18px
;
height
:
19px
;
background-position
:
-82px
-19px
;
}
.icon-minisize
:active
{
width
:
18px
;
height
:
19px
;
background-position
:
-82px
-19px
;
}
.icon-minisize
:hover
{
background-position
:
-82px
-19px
;
}
.icon-minisize
:hover
{
background-position
:
-82px
-19px
;
}
.icon-minisize
{
width
:
18px
;
height
:
18px
;
background-position
:
-
72
px
-79px
;
}
.icon-minisize
{
width
:
18px
;
height
:
18px
;
background-position
:
-
36
px
-79px
;
}
.icon-refresh.active
{
width
:
18px
;
height
:
19px
;
background-position
:
-82px
-38px
;
}
.icon-refresh.active
{
width
:
18px
;
height
:
19px
;
background-position
:
-82px
-38px
;
}
.icon-refresh
:active
{
width
:
18px
;
height
:
19px
;
background-position
:
-82px
-38px
;
}
.icon-refresh
:active
{
width
:
18px
;
height
:
19px
;
background-position
:
-82px
-38px
;
}
.icon-refresh
:hover
{
background-position
:
-82px
-38px
;
}
.icon-refresh
:hover
{
background-position
:
-82px
-38px
;
}
.icon-refresh
{
width
:
18px
;
height
:
19px
;
background-position
:
-82px
-57px
;
}
.icon-refresh
{
width
:
18px
;
height
:
19px
;
background-position
:
-82px
-57px
;
}
.icon-ruler.active
{
width
:
19px
;
height
:
19px
;
background-position
:
-
19
px
-60px
;
}
.icon-ruler.active
{
width
:
19px
;
height
:
19px
;
background-position
:
-
57
px
-60px
;
}
.icon-ruler
:active
{
width
:
19px
;
height
:
19px
;
background-position
:
-
19
px
-60px
;
}
.icon-ruler
:active
{
width
:
19px
;
height
:
19px
;
background-position
:
-
57
px
-60px
;
}
.icon-ruler
:hover
{
background-position
:
-
19
px
-60px
;
}
.icon-ruler
:hover
{
background-position
:
-
57
px
-60px
;
}
.icon-ruler
{
width
:
19px
;
height
:
19px
;
background-position
:
-
38px
-6
0px
;
}
.icon-ruler
{
width
:
19px
;
height
:
19px
;
background-position
:
-
82px
0px
;
}
.icon-satellite.active
{
width
:
18px
;
height
:
18px
;
background-position
:
-101px
0px
;
}
.icon-satellite.active
{
width
:
18px
;
height
:
18px
;
background-position
:
-101px
0px
;
}
.icon-satellite
:active
{
width
:
18px
;
height
:
18px
;
background-position
:
-101px
0px
;
}
.icon-satellite
:active
{
width
:
18px
;
height
:
18px
;
background-position
:
-101px
0px
;
}
.icon-satellite
:hover
{
background-position
:
-101px
0px
;
}
.icon-satellite
:hover
{
background-position
:
-101px
0px
;
}
.icon-satellite
{
width
:
18px
;
height
:
18px
;
background-position
:
-101px
-18px
;
}
.icon-satellite
{
width
:
18px
;
height
:
18px
;
background-position
:
-101px
-18px
;
}
.icon-zoom_in.active
{
width
:
19px
;
height
:
19px
;
background-position
:
-57px
-60px
;
}
.icon-zoom_in
:active
{
width
:
19px
;
height
:
19px
;
background-position
:
-57px
-60px
;
}
.icon-zoom_in
:hover
{
background-position
:
-57px
-60px
;
}
.icon-zoom_in
{
width
:
19px
;
height
:
19px
;
background-position
:
-82px
0px
;
}
\ No newline at end of file
\ No newline at end of file
.icon-zoom_in.active
{
width
:
19px
;
height
:
19px
;
background-position
:
-38px
-60px
;
}
.icon-zoom_in
:active
{
width
:
19px
;
height
:
19px
;
background-position
:
-38px
-60px
;
}
.icon-zoom_in
:hover
{
background-position
:
-38px
-60px
;
}
.icon-zoom_in
{
width
:
19px
;
height
:
19px
;
background-position
:
-62px
-40px
;
}
\ No newline at end of file
\ No newline at end of file
src/assets/spritesmith-generated/sprite.png
View file @
88012d4
8.86 KB
|
W:
|
H:
8.81 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/pages/FullWidthLayout.vue
View file @
88012d4
...
@@ -23,11 +23,12 @@ export default{
...
@@ -23,11 +23,12 @@ export default{
}
}
.main-wrap.full-width
{
.main-wrap.full-width
{
position
:
fixed
;
position
:
fixed
;
width
:
100%
;
width
:
calc
(
100%
-
200px
)
;
height
:
100%
;
height
:
calc
(
100%
-
60px
)
;
top
:
0
;
top
:
60px
;
left
:
19
0px
;
left
:
20
0px
;
background
:
#fff
;
background
:
#fff
;
padding
:
0
;
}
}
.ibox
{
.ibox
{
background-color
:
#fff
;
background-color
:
#fff
;
...
...
src/pages/business/importDeviceModal.vue
View file @
88012d4
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
</el-form-item>
</el-form-item>
<el-form-item
label=
""
prop=
"filename"
>
<el-form-item
label=
""
prop=
"filename"
>
<el-upload
ref=
"upload"
class=
"upload-wrap"
<el-upload
ref=
"upload"
class=
"upload-wrap"
action=
"vehicle/importDeviceSn
"
:action=
"baseURL+'/trialdrive/vehicle/vehicleinfo/import'
"
:on-change=
"changeFile"
:on-change=
"changeFile"
:before-upload=
"beforeUpload"
:before-upload=
"beforeUpload"
:multiple=
"false"
:multiple=
"false"
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
:on-success=
"successUpload"
:on-success=
"successUpload"
:on-error=
"errorUpload"
:on-error=
"errorUpload"
:data=
"data"
:data=
"data"
:headers=
"myHeaders"
:auto-upload=
"false"
>
:auto-upload=
"false"
>
<el-input
v-model=
"filename"
placeholder=
"未选取任何文件"
class=
"input-with-select"
size=
"small"
>
<el-input
v-model=
"filename"
placeholder=
"未选取任何文件"
class=
"input-with-select"
size=
"small"
>
...
@@ -58,6 +59,7 @@
...
@@ -58,6 +59,7 @@
<
script
>
<
script
>
import
{
exportExcel
}
from
'utils'
import
{
exportExcel
}
from
'utils'
import
deviceSelect
from
'./DeviceSelect.vue'
import
deviceSelect
from
'./DeviceSelect.vue'
var
token
=
localStorage
.
getItem
(
'token'
)
||
''
export
default
{
export
default
{
props
:
[
'importModalVisible'
,
'sourceFrom'
],
props
:
[
'importModalVisible'
,
'sourceFrom'
],
...
@@ -88,14 +90,19 @@
...
@@ -88,14 +90,19 @@
device2AddressStatus
:
3
device2AddressStatus
:
3
},
},
rules
:
{
rules
:
{
deviceHardwareId
:
[{
validator
:
checkId
,
trigger
:
'blur'
}],
//
deviceHardwareId: [{validator: checkId, trigger: 'blur'}],
filename
:
[{
validator
:
checkFilename
,
trigger
:
'change'
}],
filename
:
[{
validator
:
checkFilename
,
trigger
:
'change'
}],
}
},
baseURL
:
this
.
$store
.
getters
.
baseURL
,
myHeaders
:
{
Authorization
:
token
},
errorFile
:
''
}
}
},
},
computed
:{
computed
:{
'disabled'
(){
'disabled'
(){
return
(
this
.
form
.
deviceHardwareId
===
''
||
this
.
filename
===
''
)
return
(
//this.form.deviceHardwareId === '' ||
this
.
filename
===
''
)
}
}
},
},
methods
:
{
methods
:
{
...
@@ -112,18 +119,19 @@
...
@@ -112,18 +119,19 @@
},
},
exportErrorResult
(){
exportErrorResult
(){
exportExcel
(
'vehicle/exportFailDeviceSn'
,
{
seqNo
:
this
.
seqNo
})
//exportExcel('vehicle/exportFailDeviceSn', {seqNo: this.seqNo})
window
.
open
(
this
.
errorFile
,
'_blank'
)
},
},
successUpload
(
res
){
successUpload
(
res
){
this
.
importing
=
false
;
this
.
importing
=
false
;
if
(
typeof
res
===
'object'
){
if
(
typeof
res
===
'object'
){
if
(
res
.
returnCode
==
0
){
if
(
res
.
code
==
20
0
){
const
data
=
res
.
data
;
const
data
=
res
.
data
;
this
.
successNum
=
data
.
succ
ess
;
this
.
successNum
=
data
.
succ
Num
;
this
.
errorNum
=
parseInt
(
data
.
fail
);
this
.
errorNum
=
parseInt
(
data
.
fail
Num
);
this
.
seqNo
=
data
.
seqNo
;
this
.
seqNo
=
data
.
seqNo
;
this
.
errorFile
=
data
.
failSeqNoFile
this
.
$refs
.
upload
.
clearFiles
();
this
.
$refs
.
upload
.
clearFiles
();
this
.
showResult
=
true
;
this
.
showResult
=
true
;
...
@@ -134,16 +142,16 @@
...
@@ -134,16 +142,16 @@
});
});
}
}
}
else
{
}
else
{
window
.
location
.
href
=
'../ots/login'
;
//
window.location.href = '../ots/login';
}
}
},
},
errorUpload
(
err
){
errorUpload
(
err
){
window
.
location
.
href
=
'../ots/login'
;
//
window.location.href = '../ots/login';
},
},
submitUpload
()
{
submitUpload
()
{
this
.
$refs
.
form
.
validate
((
valid
)
=>
{
this
.
$refs
.
form
.
validate
((
valid
)
=>
{
if
(
valid
){
if
(
valid
){
this
.
data
.
deviceHardwareId
=
this
.
form
.
deviceHardwareId
//
this.data.deviceHardwareId = this.form.deviceHardwareId
this
.
$refs
.
upload
.
submit
();
this
.
$refs
.
upload
.
submit
();
}
}
})
})
...
@@ -160,7 +168,7 @@
...
@@ -160,7 +168,7 @@
return
false
return
false
},
},
downloadTpl
(){
downloadTpl
(){
exportExcel
(
'
vehicle/downLoadDeviceSn
'
)
exportExcel
(
'
/trialdrive/vehicle/vehicleinfo/downloadtemplate
'
)
},
},
openDialog
(){
openDialog
(){
this
.
$emit
(
'onImportModalChange'
,
true
)
this
.
$emit
(
'onImportModalChange'
,
true
)
...
...
src/pages/business/userCarAdmin.vue
View file @
88012d4
...
@@ -21,14 +21,14 @@
...
@@ -21,14 +21,14 @@
</el-form-item>
</el-form-item>
<el-form-item
label=
"设备类型"
>
<el-form-item
label=
"设备类型"
>
<el-select
v-model=
"form.sourceType"
style=
"width:120px;"
placeholder=
"请选择"
size=
"small"
>
<el-select
v-model=
"form.sourceType"
style=
"width:120px;"
placeholder=
"请选择"
size=
"small"
>
<el-option
label=
"全部"
value=
"
0
"
></el-option>
<el-option
label=
"全部"
value=
""
></el-option>
<el-option
label=
"有线"
value=
"1"
></el-option>
<el-option
label=
"有线"
value=
"1"
></el-option>
<el-option
label=
"无线"
value=
"2"
></el-option>
<el-option
label=
"无线"
value=
"2"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"设备状态"
>
<el-form-item
label=
"设备状态"
>
<el-select
v-model=
"form.status"
style=
"width:120px;"
placeholder=
"请选择"
size=
"small"
>
<el-select
v-model=
"form.status"
style=
"width:120px;"
placeholder=
"请选择"
size=
"small"
>
<el-option
label=
"全部"
value=
"
4
"
></el-option>
<el-option
label=
"全部"
value=
""
></el-option>
<el-option
label=
"在线"
value=
"3"
></el-option>
<el-option
label=
"在线"
value=
"3"
></el-option>
<el-option
label=
"行驶中"
value=
"0"
></el-option>
<el-option
label=
"行驶中"
value=
"0"
></el-option>
<el-option
label=
"静止"
value=
"1"
></el-option>
<el-option
label=
"静止"
value=
"1"
></el-option>
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
end-placeholder=
"结束日期"
>
end-placeholder=
"结束日期"
>
</el-date-picker>
</el-date-picker>
</el-form-item>
</el-form-item>
<el-form-item
label=
"车辆标签"
v-if=
"carRemark"
>
<el-form-item
label=
"车辆标签"
>
<el-select
v-model=
"form.carRemarkType"
style=
"width:120px;"
placeholder=
"请选择"
size=
"small"
>
<el-select
v-model=
"form.carRemarkType"
style=
"width:120px;"
placeholder=
"请选择"
size=
"small"
>
<el-option
label=
"全部"
value=
""
></el-option>
<el-option
label=
"全部"
value=
""
></el-option>
<el-option
label=
"试驶车"
:value=
"1"
></el-option>
<el-option
label=
"试驶车"
:value=
"1"
></el-option>
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
<el-option
label=
"其他"
:value=
"6"
></el-option>
<el-option
label=
"其他"
:value=
"6"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"车辆用途"
v-if=
"carUsed"
>
<el-form-item
label=
"车辆用途"
>
<el-select
v-model=
"form.carUsedType"
style=
"width:120px;"
placeholder=
"请选择"
size=
"small"
>
<el-select
v-model=
"form.carUsedType"
style=
"width:120px;"
placeholder=
"请选择"
size=
"small"
>
<el-option
label=
"全部"
value=
""
></el-option>
<el-option
label=
"全部"
value=
""
></el-option>
<el-option
label=
"专属用途"
:value=
"1"
></el-option>
<el-option
label=
"专属用途"
:value=
"1"
></el-option>
...
@@ -101,28 +101,33 @@
...
@@ -101,28 +101,33 @@
<el-table-column
type=
"selection"
width=
"40"
align=
"center"
></el-table-column>
<el-table-column
type=
"selection"
width=
"40"
align=
"center"
></el-table-column>
<!--
<el-table-column
fixed
type=
"index"
label=
"序号"
:index=
"getIndex"
align=
"center"
width=
"70"
></el-table-column>
-->
<!--
<el-table-column
fixed
type=
"index"
label=
"序号"
:index=
"getIndex"
align=
"center"
width=
"70"
></el-table-column>
-->
<el-table-column
fixed
prop=
"work
OrderNo
"
label=
"工单号"
min-width=
"200"
align=
"center"
></el-table-column>
<el-table-column
fixed
prop=
"work
orderId
"
label=
"工单号"
min-width=
"200"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
n
ame"
label=
"姓名"
min-width=
"160"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
ownerN
ame"
label=
"姓名"
min-width=
"160"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
standNo
"
label=
"车架号"
min-width=
"200"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
vin
"
label=
"车架号"
min-width=
"200"
align=
"center"
></el-table-column>
<el-table-column
prop=
"sn"
label=
"设备号"
min-width=
"160"
align=
"center"
></el-table-column>
<el-table-column
prop=
"sn"
label=
"设备号"
min-width=
"160"
align=
"center"
></el-table-column>
<el-table-column
prop=
"sourceType"
label=
"设备类型"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
prop=
"deviceType"
label=
"设备类型"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
v-if=
"carRemark"
prop=
"carRemark"
label=
"车辆标签"
min-width=
"120"
align=
"center"
></el-table-column>
<el-table-column
prop=
"vehicleType"
label=
"车辆标签"
min-width=
"120"
align=
"center"
>
<el-table-column
v-if=
"carUsed"
prop=
"carUsedType"
label=
"车辆用途"
min-width=
"120"
align=
"center"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.vehicleType===1"
>
试乘试驶车
</span>
<span
v-if=
"scope.row.vehicleType===2"
>
深度体验车
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"vehicleUsage"
label=
"车辆用途"
min-width=
"120"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.
carUsedTyp
e===1"
>
专属用途
</span>
<span
v-if=
"scope.row.
vehicleUsag
e===1"
>
专属用途
</span>
<span
v-if=
"scope.row.
carUsedTyp
e===2"
>
非专属用途
</span>
<span
v-if=
"scope.row.
vehicleUsag
e===2"
>
非专属用途
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"activ
eDat
e"
label=
"激活时间"
min-width=
"200"
align=
"center"
></el-table-column>
<el-table-column
prop=
"activ
ateTim
e"
label=
"激活时间"
min-width=
"200"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
status
"
label=
"设备状态"
min-width=
"160"
align=
"center"
>
<el-table-column
prop=
"
deviceState
"
label=
"设备状态"
min-width=
"160"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.
status
=='0'"
class=
"ing"
>
行驶中
{{
scope
.
row
.
deadline
?
`(${scope.row.deadline
}
)`
:
''
}}
<
/span
>
<span
v-if=
"scope.row.
deviceState
=='0'"
class=
"ing"
>
行驶中
{{
scope
.
row
.
deadline
?
`(${scope.row.deadline
}
)`
:
''
}}
<
/span
>
<
span
v
-
if
=
"scope.row.
status
=='1'"
class
=
"stop"
>
静止
{{
scope
.
row
.
deadline
?
`(${scope.row.deadline
}
)`
:
''
}}
<
/span
>
<
span
v
-
if
=
"scope.row.
deviceState
=='1'"
class
=
"stop"
>
静止
{{
scope
.
row
.
deadline
?
`(${scope.row.deadline
}
)`
:
''
}}
<
/span
>
<
span
v
-
if
=
"scope.row.
status
=='2'"
class
=
"offline"
>
离线
{{
scope
.
row
.
deadline
?
`(${scope.row.deadline
}
)`
:
''
}}
<
/span
>
<
span
v
-
if
=
"scope.row.
deviceState
=='2'"
class
=
"offline"
>
离线
{{
scope
.
row
.
deadline
?
`(${scope.row.deadline
}
)`
:
''
}}
<
/span
>
<
span
v
-
if
=
"scope.row.
status
=='3'"
class
=
"online"
>
在线
<
/span
>
<
span
v
-
if
=
"scope.row.
deviceState
=='3'"
class
=
"online"
>
在线
<
/span
>
<
/template
>
<
/template
>
<
/el-table-column>
<
/el-table-column>
<
el
-
table
-
column
prop
=
"
freqStatusStr"
label
=
"调频
状态"
min
-
width
=
"160"
align
=
"center"
>
<
el
-
table
-
column
prop
=
"
specialState"
label
=
"特殊
状态"
min
-
width
=
"160"
align
=
"center"
>
<!--
<
template
slot
-
scope
=
"scope"
>
<!--
<
template
slot
-
scope
=
"scope"
>
<
span
v
-
if
=
"scope.row.freqStatus===1"
>
生效
<
/span
>
<
span
v
-
if
=
"scope.row.freqStatus===1"
>
生效
<
/span
>
<
span
v
-
if
=
"scope.row.freqStatus===2"
>
关闭
<
/span
>
<
span
v
-
if
=
"scope.row.freqStatus===2"
>
关闭
<
/span
>
...
@@ -153,7 +158,9 @@
...
@@ -153,7 +158,9 @@
<
i
class
=
"el-icon-arrow-down"
><
/i
>
<
i
class
=
"el-icon-arrow-down"
><
/i
>
<
/el-button
>
<
/el-button
>
<
el
-
dropdown
-
menu
slot
=
"dropdown"
>
<
el
-
dropdown
-
menu
slot
=
"dropdown"
>
<
el
-
dropdown
-
item
:
command
=
"getCommand('freq', scope.row.sn, scope.row.enableFre)"
>
一键调频
<
/el-dropdown-item
>
<
el
-
dropdown
-
item
v
-
if
=
"scope.row.adjFreq===1"
:
command
=
"getCommand('freq', scope.row.sn, scope.row.enableFre)"
>
一键调频
<
/el-dropdown-item
>
<
el
-
dropdown
-
item
v
-
if
=
"scope.row.adjFreq===2"
:
command
=
"getCommand('oilTurnoff', scope.row.sn)"
>
断开油电
<
/el-dropdown-item
>
<
el
-
dropdown
-
item
v
-
if
=
"scope.row.adjFreq===3"
:
command
=
"getCommand('oilTurnon', scope.row.sn)"
>
恢复油电
<
/el-dropdown-item
>
<
/el-dropdown-menu
>
<
/el-dropdown-menu
>
<
/el-dropdown
>
<
/el-dropdown
>
<
/el-col
>
<
/el-col
>
...
@@ -199,6 +206,17 @@
...
@@ -199,6 +206,17 @@
@
onRefreshList
=
"getData"
>
@
onRefreshList
=
"getData"
>
<
/import-modal
>
<
/import-modal
>
<!--
批量导入弹框
/-->
<!--
批量导入弹框
/-->
<
el
-
dialog
title
=
"请输入账号密码并确认"
:
visible
=
"oilVisible"
@
close
=
"closeOilDialog"
append
-
to
-
body
width
=
"420px"
:
close
-
on
-
click
-
modal
=
"false"
>
<
el
-
form
:
model
=
"oilForm"
ref
=
"oilForm"
:
rules
=
"oilRules"
:
show
-
message
=
"true"
:
inline
=
"true"
size
=
"mini"
label
-
width
=
"120px"
>
<
el
-
form
-
item
label
=
"密码"
prop
=
"password"
>
<
el
-
input
v
-
model
=
"oilForm.password"
placeholder
=
"密码"
:
validate
-
event
=
"false"
show
-
password
@
keyup
.
enter
.
native
=
"submitOilForm"
><
/el-input
>
<
/el-form-item
>
<
/el-form
>
<
div
slot
=
"footer"
class
=
"dialog-footer"
>
<
el
-
button
type
=
"primary"
@
click
=
"submitOilForm"
size
=
"small"
>
确认
<
/el-button
>
<
el
-
button
@
click
=
"closeOilDialog"
size
=
"small"
>
取消
<
/el-button
>
<
/div
>
<
/el-dialog
>
<
/template
>
<
/template
>
<
/v-layout
>
<
/v-layout
>
<
/template
>
<
/template
>
...
@@ -217,6 +235,22 @@ const BUSINESS_SERVICE = services.business;
...
@@ -217,6 +235,22 @@ const BUSINESS_SERVICE = services.business;
export
default
{
export
default
{
data
(){
data
(){
var
validatePass
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
)
{
BUSINESS_SERVICE
.
checkOilLogin
({
username
:
this
.
username
,
password
:
value
}
).
then
((
res
)
=>
{
if
(
res
.
returnCode
==
0
){
callback
()
}
else
{
callback
(
new
Error
(
'密码错误,请重新输入'
));
}
}
)
}
else
{
callback
(
new
Error
(
'请输入密码'
));
}
}
;
return
{
return
{
loading
:
true
,
loading
:
true
,
pageLoading
:
true
,
pageLoading
:
true
,
...
@@ -226,8 +260,8 @@ export default{
...
@@ -226,8 +260,8 @@ export default{
tableData
:
[],
tableData
:
[],
form
:
{
form
:
{
activeDate
:
[],
activeDate
:
[],
sourceType
:
'
0
'
,
sourceType
:
''
,
status
:
'
4
'
,
status
:
''
,
queryTerm
:
''
,
queryTerm
:
''
,
queryType
:
'1'
,
queryType
:
'1'
,
carRemarkType
:
''
,
carRemarkType
:
''
,
...
@@ -235,16 +269,16 @@ export default{
...
@@ -235,16 +269,16 @@ export default{
}
,
}
,
query
:
{
query
:
{
activeDate
:
[],
activeDate
:
[],
sourceType
:
'
0
'
,
sourceType
:
''
,
status
:
'
4
'
,
status
:
''
,
workOrderNo
:
''
,
workOrderNo
:
''
,
name
:
''
,
name
:
''
,
standNo
:
''
,
standNo
:
''
,
sn
:
''
,
sn
:
''
,
operator
:
''
operator
:
''
}
,
}
,
detailFormVisible
:
fals
e
,
detailFormVisible
:
tru
e
,
detailFormEdit
:
fals
e
,
detailFormEdit
:
tru
e
,
detailForm
:{
detailForm
:{
trackInfo
:
{
}
,
trackInfo
:
{
}
,
plateNumber
:
''
,
plateNumber
:
''
,
...
@@ -260,6 +294,18 @@ export default{
...
@@ -260,6 +294,18 @@ export default{
selectedSnItems
:
[],
selectedSnItems
:
[],
importModalVisible
:
false
,
importModalVisible
:
false
,
enableFreq
:
false
,
enableFreq
:
false
,
oilVisible
:
false
,
oilForm
:
{
password
:
''
}
,
oilRules
:
{
password
:
[
{
required
:
true
,
message
:
'请输入密码'
,
trigger
:
'blur'
}
,
{
validator
:
validatePass
}
]
}
,
sn
:
''
,
oilPowerType
:
''
,
}
}
}
,
}
,
created
(){
created
(){
...
@@ -269,7 +315,8 @@ export default{
...
@@ -269,7 +315,8 @@ export default{
...
mapGetters
([
...
mapGetters
([
'carRemark'
,
'carRemark'
,
'carUsed'
,
'carUsed'
,
'vehicleGenerate'
'vehicleGenerate'
,
'username'
])
])
}
,
}
,
watch
:
{
watch
:
{
...
@@ -278,26 +325,19 @@ export default{
...
@@ -278,26 +325,19 @@ export default{
methods
:
{
methods
:
{
getData
(
curr
=
this
.
currentPage
,
size
=
this
.
pageSize
,
initPagination
=
true
){
getData
(
curr
=
this
.
currentPage
,
size
=
this
.
pageSize
,
initPagination
=
true
){
this
.
loading
=
true
;
this
.
loading
=
true
;
this
.
pageLoading
=
true
let
params
=
this
.
getParams
();
let
params
=
this
.
getParams
();
params
.
currentPage
=
curr
;
params
.
pageNumber
=
curr
;
params
.
pageSize
=
size
;
params
.
pageSize
=
size
;
BUSINESS_SERVICE
.
getVehicleList
(
params
).
then
((
response
)
=>
{
BUSINESS_SERVICE
.
getVehicleList
(
params
).
then
((
response
)
=>
{
if
(
Array
.
isArray
(
response
.
data
)){
this
.
tableData
=
response
.
data
;
this
.
tableData
=
response
.
data
.
list
;
}
else
{
this
.
total
=
response
.
data
.
totalElements
;
this
.
tableData
=
[];
}
this
.
loading
=
false
;
this
.
loading
=
false
;
this
.
pageLoading
=
false
}
);
}
);
if
(
initPagination
){
this
.
pageLoading
=
true
;
BUSINESS_SERVICE
.
getVehicleListTotal
(
params
).
then
((
response
)
=>
{
this
.
total
=
response
.
recordsTotal
;
this
.
pageLoading
=
false
;
}
);
}
}
,
}
,
getParams
(){
getParams
(){
const
form
=
this
.
form
;
const
form
=
this
.
form
;
...
@@ -320,20 +360,20 @@ export default{
...
@@ -320,20 +360,20 @@ export default{
break
;
break
;
}
}
}
}
params
.
sour
ceType
=
form
.
sourceType
;
params
.
devi
ceType
=
form
.
sourceType
;
params
.
status
=
form
.
status
;
params
.
deviceState
=
form
.
status
;
if
(
form
.
activeDate
&&
form
.
activeDate
.
length
){
if
(
form
.
activeDate
&&
form
.
activeDate
.
length
){
params
.
sTime
=
moment
(
form
.
activeDate
[
0
]).
format
(
'YYYY-MM-DD HH:mm:ss'
);
params
.
activateTimeStart
=
moment
(
form
.
activeDate
[
0
]).
format
(
'YYYY-MM-DD HH:mm:ss'
);
params
.
eTime
=
moment
(
form
.
activeDate
[
1
]).
endOf
(
'day'
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
params
.
activateTimeEnd
=
moment
(
form
.
activeDate
[
1
]).
endOf
(
'day'
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
}
}
if
(
form
.
carRemarkType
!==
''
){
if
(
form
.
carRemarkType
!==
''
){
params
.
carRemark
Type
=
form
.
carRemarkType
params
.
vehicle
Type
=
form
.
carRemarkType
}
}
if
(
form
.
carUsedType
!==
''
){
if
(
form
.
carUsedType
!==
''
){
params
.
carUsedTyp
e
=
form
.
carUsedType
params
.
vehicleUsag
e
=
form
.
carUsedType
}
}
/* const query = this.query;
/* const query = this.query;
...
@@ -365,8 +405,8 @@ export default{
...
@@ -365,8 +405,8 @@ export default{
tableReset
(){
tableReset
(){
this
.
query
=
{
this
.
query
=
{
activeDate
:
[],
activeDate
:
[],
sourceType
:
'
0
'
,
sourceType
:
''
,
status
:
'
4
'
,
status
:
''
,
workOrderNo
:
''
,
workOrderNo
:
''
,
name
:
''
,
name
:
''
,
standNo
:
''
,
standNo
:
''
,
...
@@ -377,8 +417,8 @@ export default{
...
@@ -377,8 +417,8 @@ export default{
reset
(){
reset
(){
this
.
form
=
{
this
.
form
=
{
activeDate
:
[],
activeDate
:
[],
sourceType
:
'
0
'
,
sourceType
:
''
,
status
:
'
4
'
,
status
:
''
,
queryTerm
:
''
,
queryTerm
:
''
,
queryType
:
'1'
,
queryType
:
'1'
,
carRemarkType
:
''
,
carRemarkType
:
''
,
...
@@ -390,12 +430,46 @@ export default{
...
@@ -390,12 +430,46 @@ export default{
this
.
freqSn
=
command
.
split
(
'freq'
)[
1
];
this
.
freqSn
=
command
.
split
(
'freq'
)[
1
];
this
.
freqVisible
=
true
;
this
.
freqVisible
=
true
;
}
else
if
(
command
.
indexOf
(
'oilTurn'
)
>-
1
)
{
this
.
oilVisible
=
true
;
}
}
}
,
}
,
getCommand
(
type
,
val
,
enable
){
getCommand
(
type
,
val
,
enable
){
this
.
enableFreq
=
enable
===
'true'
?
true
:
false
if
(
type
===
'freq'
)
{
this
.
enableFreq
=
enable
===
'true'
?
true
:
false
}
else
{
this
.
oilPowerType
=
type
===
'oilTurnon'
?
2
:
(
type
===
'oilTurnoff'
?
1
:
''
)
this
.
sn
=
val
}
return
type
+
val
return
type
+
val
}
,
}
,
submitOilForm
()
{
this
.
$refs
.
oilForm
.
validate
((
valid
,
field
)
=>
{
if
(
valid
){
BUSINESS_SERVICE
.
setDeviceOilPower
({
oilPowerType
:
this
.
oilPowerType
,
sn
:
this
.
sn
}
).
then
((
res
)
=>
{
if
(
res
.
returnCode
==
0
){
const
message
=
'指令下发成功,请等待终端响应'
//this.oilPowerType===1?'断开油电成功':'恢复油电成功'
this
.
$message
({
type
:
'success'
,
message
}
);
this
.
closeOilDialog
()
this
.
getData
(
this
.
currentPage
,
this
.
pageSize
,
false
)
}
}
)
}
}
)
}
,
closeOilDialog
()
{
this
.
oilVisible
=
false
;
this
.
$refs
.
oilForm
.
resetFields
();
}
,
renderHeaderInput
:
function
(
h
,
{
column
,
$index
}
)
{
renderHeaderInput
:
function
(
h
,
{
column
,
$index
}
)
{
const
self
=
this
;
const
self
=
this
;
return
h
(
return
h
(
...
...
src/pages/business/userCarModal.vue
View file @
88012d4
...
@@ -9,65 +9,51 @@
...
@@ -9,65 +9,51 @@
<a
:class=
"scrollToRef=='carInfo'?'active':''"
@
click=
"scrollTo('carInfo')"
>
车辆信息
</a>
<a
:class=
"scrollToRef=='carInfo'?'active':''"
@
click=
"scrollTo('carInfo')"
>
车辆信息
</a>
<a
:class=
"scrollToRef=='clientInfo'?'active':''"
@
click=
"scrollTo('clientInfo')"
>
关联商户
</a>
<a
:class=
"scrollToRef=='clientInfo'?'active':''"
@
click=
"scrollTo('clientInfo')"
>
关联商户
</a>
<a
:class=
"scrollToRef=='log'?'active':''"
@
click=
"scrollTo('log')"
>
操作日志
</a>
<a
:class=
"scrollToRef=='log'?'active':''"
@
click=
"scrollTo('log')"
>
操作日志
</a>
<
a
:class=
"scrollToRef=='poi'?'active':''"
@
click=
"scrollTo('poi')"
>
POI信息
</a
>
<
!--
<a
:class=
"scrollToRef=='poi'?'active':''"
@
click=
"scrollTo('poi')"
>
POI信息
</a>
--
>
</nav>
</nav>
</div>
</div>
<div
v-show=
"showTab==='form'"
>
<div
v-show=
"showTab==='form'"
>
<el-form
ref=
"detailForm"
:model=
"detailForm"
:rules=
"rules"
:inline=
"false"
size=
"mini"
label-width=
"110px"
>
<el-form
ref=
"detailForm"
:model=
"detailForm"
:rules=
"rules"
:inline=
"false"
size=
"mini"
label-width=
"110px"
>
<h3>
设备信息
</h3>
<h3>
设备信息
</h3>
<el-row>
<el-row>
<el-col
:span=
"16"
>
<el-row
v-for=
"(item, index) in deviceArr"
:key=
"index"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"设备SN号"
prop=
"device"
>
<el-input
v-model=
"item.sn"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"设备型号"
>
<el-input
disabled
v-model=
"item.deviceType"
></el-input>
</el-form-item>
</el-col>
<!--
<el-col
:span=
"8"
>
<el-form-item
label=
"*设备SN号"
>
<el-input
disabled
v-model=
"detailForm.trackInfo.sn"
></el-input>
</el-form-item>
<el-form-item
label=
"*验证码"
>
<el-input
disabled
v-model=
"detailForm.trackInfo.checkCode"
></el-input>
</el-form-item>
<el-form-item
label=
"*设备型号"
>
<el-input
disabled
v-model=
"detailForm.trackInfo.deviceType"
></el-input>
</el-form-item>
<el-form-item
label=
" "
v-if=
"detailForm.trackInfo.isActive==1"
>
<p
class=
"tip el-alert--success"
>
验证通过
<br>
{{
detailForm
.
trackInfo
.
activeDate
}}
</p>
</el-form-item>
<el-form-item
label=
" "
v-else
>
<p
class=
"tip el-alert--error"
>
验证不通过
<br>
{{
detailForm
.
trackInfo
.
activeDate
}}
</p>
</el-form-item>
</el-col>
-->
</el-row>
</el-col>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form-item
label=
"*设备SN号"
>
<i
@
click=
"addDevice"
class=
"el-icon-circle-plus-outline"
style=
"font-size: 20px; margin-left:20px; line-height:30px;"
></i>
<el-input
disabled
v-model=
"detailForm.trackInfo.sn"
></el-input>
</el-form-item>
<el-form-item
label=
"*验证码"
>
<el-input
disabled
v-model=
"detailForm.trackInfo.checkCode"
></el-input>
</el-form-item>
<el-form-item
label=
"*设备型号"
>
<el-input
disabled
v-model=
"detailForm.trackInfo.deviceType"
></el-input>
</el-form-item>
<el-form-item
label=
" "
v-if=
"detailForm.trackInfo.isActive==1"
>
<p
class=
"tip el-alert--success"
>
验证通过
<br>
{{
detailForm
.
trackInfo
.
activeDate
}}
</p>
</el-form-item>
<el-form-item
label=
" "
v-else
>
<p
class=
"tip el-alert--error"
>
验证不通过
<br>
{{
detailForm
.
trackInfo
.
activeDate
}}
</p>
</el-form-item>
</el-col>
</el-col>
<!--
<el-col
:span=
"8"
>
<el-form-item
label=
"*设备SN号"
>
<el-input
disabled
v-model=
"detailForm.trackInfo.sn"
></el-input>
</el-form-item>
<el-form-item
label=
"*验证码"
>
<el-input
disabled
v-model=
"detailForm.trackInfo.checkCode"
></el-input>
</el-form-item>
<el-form-item
label=
"*设备型号"
>
<el-input
disabled
v-model=
"detailForm.trackInfo.deviceType"
></el-input>
</el-form-item>
<el-form-item
label=
" "
v-if=
"detailForm.trackInfo.isActive==1"
>
<p
class=
"tip el-alert--success"
>
验证通过
<br>
{{
detailForm
.
trackInfo
.
activeDate
}}
</p>
</el-form-item>
<el-form-item
label=
" "
v-else
>
<p
class=
"tip el-alert--error"
>
验证不通过
<br>
{{
detailForm
.
trackInfo
.
activeDate
}}
</p>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"*设备SN号"
>
<el-input
disabled
v-model=
"detailForm.trackInfo.sn"
></el-input>
</el-form-item>
<el-form-item
label=
"*验证码"
>
<el-input
disabled
v-model=
"detailForm.trackInfo.checkCode"
></el-input>
</el-form-item>
<el-form-item
label=
"*设备型号"
>
<el-input
disabled
v-model=
"detailForm.trackInfo.deviceType"
></el-input>
</el-form-item>
<el-form-item
label=
" "
v-if=
"detailForm.trackInfo.isActive==1"
>
<p
class=
"tip el-alert--success"
>
验证通过
<br>
{{
detailForm
.
trackInfo
.
activeDate
}}
</p>
</el-form-item>
<el-form-item
label=
" "
v-else
>
<p
class=
"tip el-alert--error"
>
验证不通过
<br>
{{
detailForm
.
trackInfo
.
activeDate
}}
</p>
</el-form-item>
</el-col>
-->
</el-row>
</el-row>
<p
style=
"text-align:center; margin: 0"
></p>
<h3
ref=
"userInfo"
>
用户信息
</h3>
<h3
ref=
"userInfo"
>
用户信息
</h3>
<el-row>
<el-row>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
...
@@ -314,10 +300,17 @@ export default{
...
@@ -314,10 +300,17 @@ export default{
displacement
:
[
displacement
:
[
{
pattern
:
/^
(((([
1-9
][
0-9
])
|
[
1-9
])(\.\d)?)
|
(
0
\.[
1-9
]))
$/
,
message
:
'请输入正确的格式(0.1-99.9)L'
,
trigger
:
'blur'
}
{
pattern
:
/^
(((([
1-9
][
0-9
])
|
[
1-9
])(\.\d)?)
|
(
0
\.[
1-9
]))
$/
,
message
:
'请输入正确的格式(0.1-99.9)L'
,
trigger
:
'blur'
}
],
],
device
:
[
{
required
:
true
,
message
:
'请输入姓名'
,
trigger
:
'blur'
},
],
},
},
trash
:
[],
trash
:
[],
mapSearch
:
''
,
mapSearch
:
''
,
freqTableData
:
[]
freqTableData
:
[],
deviceArr
:
[{
sn
:
''
,
deviceType
:
''
}]
}
}
},
},
async
created
()
{
async
created
()
{
...
@@ -781,6 +774,13 @@ export default{
...
@@ -781,6 +774,13 @@ export default{
})
})
}
}
})
})
},
addDevice
(){
this
.
deviceArr
.
push
({
sn
:
''
,
deviceType
:
''
})
this
.
rules
[
'device'
+
this
.
deviceArr
.
length
-
1
]
=
[{
required
:
true
,
message
:
'请输入姓名'
,
trigger
:
'blur'
}]
}
}
/*prev(){
/*prev(){
if(this.num==0){
if(this.num==0){
...
...
src/pages/monitor/monitor.vue
View file @
88012d4
<
template
>
<
template
>
<v-full-layout>
<v-full-layout>
<
!--
<
template
slot=
"breadcrumb"
>
<template
slot=
"breadcrumb"
>
<el-breadcrumb-item>
车辆监控
</el-breadcrumb-item>
<el-breadcrumb-item>
车辆监控
</el-breadcrumb-item>
</
template
>
-->
</
template
>
<
template
slot=
"main"
>
<
template
slot=
"main"
>
<div
class=
"map-wrap"
v-loading=
"mapLoading"
>
<div
class=
"map-wrap"
v-loading=
"mapLoading"
>
<div
id=
"map"
class=
"map-container"
></div>
<div
id=
"map"
class=
"map-container"
></div>
<map-controll
isShowFullsize=
"true"
></map-controll>
<map-controll
isShowFullsize=
"true"
></map-controll>
<div
class=
"controll-wrap"
>
<div
class=
"controll-wrap"
>
<div
class=
"menu-search"
>
<div
class=
"menu-search"
>
<!-- 旧虎哥搜索老版本 -->
<el-autocomplete
<!--
<el-input
placeholder=
"请输入对应条件值"
v-model
.
trim=
"searchText"
size=
"small"
class=
"input-with-select"
@
keyup
.
enter
.
native=
'searchSubmit'
>
ref=
"autocomplete"
size=
"small"
:popper-class=
"'search_auto'+(autocompleteHide?' search_auto_hide':'')"
v-model=
"searchText"
:fetch-suggestions=
"querySearch"
:trigger-on-focus=
"false"
placeholder=
"请输入内容"
@
select=
"handleSelect"
>
<!--
<el-input
placeholder=
"请输入对应条件值"
v-model
.
trim=
"searchText"
size=
"small"
class=
"input-with-select"
@
keyup
.
enter
.
native=
'searchSubmit'
>
-->
<el-select
v-model=
"searchType"
slot=
"prepend"
placeholder=
"请选择"
size=
"small"
>
<el-select
v-model=
"searchType"
slot=
"prepend"
placeholder=
"请选择"
size=
"small"
>
<el-option
label=
"设备号"
value=
"1"
></el-option>
<el-option
label=
"设备号"
value=
"1"
></el-option>
<el-option
label=
"车架号"
value=
"2"
></el-option>
<el-option
label=
"车架号"
value=
"2"
></el-option>
<el-option
label=
"姓名"
value=
"3"
></el-option>
<el-option
label=
"姓名"
value=
"3"
></el-option>
<
el-option
label=
"工单号"
value=
"4"
></el-option
>
<
!--
<el-option
label=
"工单号"
value=
"4"
></el-option>
--
>
</el-select>
</el-select>
<el-button
icon=
"el-icon-search"
size=
"mini"
slot=
"append"
:loading=
"isSearching"
@
click=
"searchSubmit"
>
<el-button
icon=
"el-icon-search"
size=
"mini"
slot=
"append"
:loading=
"isSearching"
@
click=
"searchSubmit"
>
</el-button>
</el-button>
</el-input>
-->
<template
slot-scope=
"
{ item }">
<!-- 新虎哥搜索 -->
<div
style=
"margin: 0 -20px; font-size: 12px; "
class=
"auto_item"
>
<el-input
placeholder=
"请输入对应条件值"
v-model
.
trim=
"searchText"
size=
"small"
class=
"input-with-select"
@
keyup
.
enter
.
native=
'searchSubmit'
>
<template
v-if=
"item.tip"
>
<el-select
v-model=
"searchType"
slot=
"prepend"
placeholder=
"请选择"
size=
"small"
>
{{
item
.
tip
}}
<el-option
label=
"设备号"
value=
"1"
></el-option>
</
template
>
<el-option
label=
"车架号"
value=
"2"
></el-option>
<
template
v-else
>
<el-option
label=
"姓名"
value=
"3"
></el-option>
<div
class=
"name"
style=
"line-height: 20px"
>
姓名:
{{
item
.
label1
?
item
.
label1
:
'--'
}}
</div>
<el-option
label=
"工单号"
value=
"4"
></el-option>
<div
class=
"sn"
style=
"line-height: 20px"
>
设备号:
{{
item
.
label
}}
</div>
</el-select>
</
template
>
<el-button
icon=
"el-icon-search"
size=
"mini"
slot=
"append"
:loading=
"isSearching"
@
click=
"searchSubmit"
>
</div>
</el-button>
</el-input>
</template>
</el-autocomplete>
<!-- </el-input> -->
</div>
</div>
<!-- 旧虎哥导入查询和监控列表 -->
<el-row
type=
"flex"
class=
"filter-entrance"
justify=
"space-between"
>
<!--
<el-row
type=
"flex"
class=
"filter-entrance"
justify=
"space-between"
>
<!-- <el-button type="text" @click="importDialogHidden=false;listDialogHidden=true;resultDialogHidden=true;">导入查询</el-button> -->
<el-button
type=
"text"
@
click=
"importDialogHidden=false;listDialogHidden=true;resultDialogHidden=true;"
>
导入查询
</el-button>
<el-button
type=
"text"
@
click=
"treeHidden=false;listDialogHidden=true;importDialogHidden=true;resultDialogHidden=true;"
>
组织
</el-button>
<el-button
type=
"text"
@
click=
"listDialogHidden=false;importDialogHidden=true;resultDialogHidden=true;"
>
监控列表(
{{
getMonitorListVisibleCount
}}
)
</el-button>
<el-button
type=
"text"
@
click=
"listDialogHidden=false;treeHidden=true;importDialogHidden=true;resultDialogHidden=true;"
>
监控列表({{getMonitorListVisibleCount}})
</el-button>
</el-row>
-->
</el-row>
<!-- 旧虎哥查询结果 -->
<div
class=
"filter-dialog-set"
>
<!--
<div
class=
"filter-dialog-set"
>
<div
class=
"filter-dialog animated "
:class=
"importDialogHidden?'fadeOut':'active fadeIn'"
>
<div
class=
"filter-dialog animated "
:class=
"importDialogHidden?'fadeOut':'active fadeIn'"
>
<div
class=
"filter-dialog-header"
>
<div
class=
"filter-dialog-header"
>
导入查询
导入查询
...
@@ -86,24 +95,24 @@
...
@@ -86,24 +95,24 @@
<el-option
label=
"有线"
value=
"1"
></el-option>
<el-option
label=
"有线"
value=
"1"
></el-option>
<el-option
label=
"无线"
value=
"0"
></el-option>
<el-option
label=
"无线"
value=
"0"
></el-option>
</el-select>
</el-select>
<
el-button
type=
"primary"
plain
size=
"small"
@
click=
"removeMonitorByGroup"
>
批量删除
</el-button
>
<
!-- <el-button type="primary" plain size="small" @click="removeMonitorByGroup(monitorList.itemArr)">批量删除</el-button> --
>
</el-row>
</el-row>
<ul
class=
"monitor-list"
>
<ul
class=
"monitor-list"
style=
"max-height:calc(100vh - 380px);"
>
<li
class=
"monitor-list-item"
<li
class=
"monitor-list-item"
v-for=
"(sn, key) in monitorList.itemArr"
v-for=
"(sn, key) in monitorList.itemArr"
:key=
"sn"
:key=
"sn"
@
click=
"openMapInfoWindow(sn, monitorList[sn].source)"
@
click=
"openMapInfoWindow(sn, monitorList[sn].source)"
v-show=
"key!=='count' && (monitorList[sn].source==monitorFilterType||monitorFilterType=='')"
>
v-show=
"key!=='count' && (monitorList[sn].source==monitorFilterType||monitorFilterType=='')"
>
<span
class=
"device-icon"
:class=
"monitorList[sn].
isOnLine?'':'offline'"
v-show=
"monitorList[sn].isOnL
ine !== undefined"
></span>
<span
class=
"device-icon"
:class=
"monitorList[sn].
online?'':'offline'"
v-show=
"monitorList[sn].onl
ine !== undefined"
></span>
<div
class=
"user-info"
>
<div
class=
"user-info"
>
<p>
<p>
<span
class=
"name"
>
{{
monitorList
[
sn
].
name
}}
</span>
<span
class=
"name"
>
{{monitorList[sn].name
||'--'
}}
</span>
<span>
{{sn}}({{monitorList[sn].sourceType}})
</span>
<span>
{{sn}}({{monitorList[sn].sourceType}})
</span>
</p>
</p>
<p>
车架号:{{monitorList[sn].standNo}}
</p>
<p>
车架号:{{monitorList[sn].standNo}}
</p>
</div>
</div>
<span
class=
"none_tip"
v-show=
"!monitorList[sn].isHasPosition"
>
无定位信息
</span>
<span
class=
"none_tip"
v-show=
"!monitorList[sn].isHasPosition"
>
无定位信息
</span>
<
el-button
type=
"text"
@
click
.
stop=
"removeMonitor(monitorList[sn])"
><i
class=
"fa fa-trash"
></i></el-button
>
<
!-- <el-button type="text" @click.stop="removeMonitor(monitorList[sn], true)"><i class="fa fa-trash"></i></el-button> --
>
</li>
</li>
</ul>
</ul>
</div>
</div>
...
@@ -140,17 +149,32 @@
...
@@ -140,17 +149,32 @@
</ul>
</ul>
</div>
</div>
</div>
</div>
</div>
-->
<div
class=
"filter-dialog"
:class=
"treeHidden?'fadeOut':'active fadeIn'"
>
<div
class=
"filter-dialog-header"
>
<!-- 新虎哥查询结果 监控列表 -->
组织
<div
class=
"filter-dialog-set"
>
<i
class=
"el-icon-close pull-right"
@
click
.
stop=
"treeHidden=true"
></i>
<el-tree
</div>
:props=
"props"
<div
class=
"filter-dialog-body"
>
:load=
"loadNode"
<div
class=
"monitor-list"
>
lazy
<el-tree
show-checkbox
ref=
"tree"
@
check-change=
"handleCheckChange"
>
:data=
"treeData"
</el-tree>
:props=
"treeProps"
lazy
:load=
"loadNode"
show-checkbox
node-key=
"id"
:render-content=
"renderTreeContent"
:default-expanded-keys=
"expandedKeys"
:default-checked-keys=
"checkedKeys"
@
check=
"handleCheck"
v-loading=
"treeLoading"
@
check-change=
"handleCheckChange"
>
</el-tree>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -187,12 +211,8 @@
...
@@ -187,12 +211,8 @@
isInitMap
:
false
,
isInitMap
:
false
,
flag
:
false
,
flag
:
false
,
searchText
:
''
,
//65MA08605HG349105
searchText
:
''
,
//65MA08605HG349105
searchType
:
'
关键字
'
,
searchType
:
'
1
'
,
isSearching
:
false
,
isSearching
:
false
,
props
:
{
label
:
'name'
,
children
:
'zones'
},
monitorFilterType
:
''
,
monitorFilterType
:
''
,
resultFilterType
:
''
,
resultFilterType
:
''
,
importDialogHidden
:
true
,
importDialogHidden
:
true
,
...
@@ -216,7 +236,21 @@
...
@@ -216,7 +236,21 @@
remainSearchSnStr
:
''
,
remainSearchSnStr
:
''
,
refreshCount
:
1
,
refreshCount
:
1
,
resetRefreshCount
:
false
,
resetRefreshCount
:
false
,
autoOpenLastInfoWindow
:
false
autoOpenLastInfoWindow
:
false
,
treeHidden
:
false
,
treeProps
:
{
label
:
'label'
,
children
:
'children'
,
isLeaf
:
'leaf'
,
[
'node-key'
]:
'id'
},
treeData
:
[],
expandedKeys
:
[
'156'
],
isTreeChecked
:
false
,
checkedKeys
:
[],
autocompleteHide
:
true
,
treeLoading
:
true
,
}
}
},
},
computed
:{
computed
:{
...
@@ -243,47 +277,163 @@
...
@@ -243,47 +277,163 @@
watch
:
{
watch
:
{
'monitorFilterType'
(
newVal
){
'monitorFilterType'
(
newVal
){
EventBus
.
$emit
(
'uiMap.monitor.changeSourceType'
,
newVal
);
EventBus
.
$emit
(
'uiMap.monitor.changeSourceType'
,
newVal
);
},
searchType
()
{
if
(
this
.
searchText
)
{
this
.
searchSubmit
()
}
}
}
},
},
methods
:
{
methods
:
{
initMap
(){
renderTreeContent
(
h
,
{
node
,
data
,
store
})
{
let
check
=
()
=>
{
if
(
data
.
leaf
)
{
this
.
checkLoadedTimeoutId
&&
window
.
clearTimeout
(
this
.
checkLoadedTimeoutId
);
return
h
(
'div'
,
{
class
:
'custom-tree-node'
},[
h
(
'div'
,
{
domProps
:
{
innerHTML
:
'设备号:'
+
node
.
data
.
label
}
}),
h
(
'div'
,
{
domProps
:
{
innerHTML
:
'车架号:'
+
node
.
data
.
label2
}
})
])
}
return
h
(
'span'
,
{
domProps
:
{
innerHTML
:
node
.
data
.
label
}
})
},
getTreeData
()
{
MONITOR_SERVICE
.
getVehicleTree
().
then
(({
data
})
=>
{
this
.
treeLoading
=
false
this
.
treeData
=
data
})
},
handleCheckChange
(
data
,
checked
,
indeterminate
)
{
//console.log(data, checked, indeterminate);
if
(
checked
)
{
//console.log(this.$refs.tree.getNode(data))
let
node
=
this
.
$refs
.
tree
.
getNode
(
data
)
console
.
log
(
1
)
//this.getAllChild(node)
//this.$refs.tree.store.defaultExpandAll = true
//this.$refs.tree.setCheckedKeys(['u8121'])
}
this
.
isTreeChecked
=
checked
this
.
expandedKeys
=
[
'4593'
]
},
handleCheck
(
data
,
node
)
{
if
(
data
.
leaf
)
{
const
item
=
{
sn
:
data
.
label
,
name
:
data
.
label1
,
standNo
:
data
.
label2
,
online
:
data
.
online
,
id
:
data
.
id
,
source
:
data
.
source
===
'有线'
?
'1'
:
'0'
,
sourceType
:
data
.
source
}
if
(
this
.
isTreeChecked
)
{
this
.
addMonitor
(
item
)
}
else
{
this
.
removeMonitor
(
item
)
}
}
else
{
let
action
=
MONITOR_SERVICE
.
getVehicleTreeUserIds
let
params
=
{
oId
:
data
.
id
}
return
setTimeout
(()
=>
{
if
(
data
.
origin
.
type
===
'u'
)
{
if
(
'AMap'
in
window
&&
typeof
AMap
.
Map
==
'function'
&&
!
this
.
mapObj
){
action
=
MONITOR_SERVICE
.
getVehicleTreeUserList
window
.
AMap
=
AMap
;
params
=
{
uId
:
data
.
id
}
this
.
mapObj
=
mapService
.
init
(
'map'
);
}
this
.
treeLoading
=
true
//this.bindEvent();
action
(
params
).
then
((
res
)
=>
{
this
.
isInitMap
=
true
;
this
.
treeLoading
=
false
if
(
this
.
$route
.
query
.
snArr
){
const
arr
=
res
.
data
let
routeQuery
=
JSON
.
parse
(
this
.
$route
.
query
.
snArr
);
const
items
=
arr
.
map
((
item
)
=>
{
if
(
routeQuery
.
length
>
0
){
return
{
/* this.addMonitor(routeQuery[0]);
sn
:
item
.
label
,
this.autoOpenLastInfoWindow = true; */
name
:
item
.
label1
,
routeQuery
.
forEach
((
item
)
=>
{
standNo
:
item
.
label2
,
this
.
addMonitor
(
item
);
online
:
item
.
online
,
id
:
item
.
id
,
})
source
:
item
.
source
===
'有线'
?
'1'
:
'0'
,
this
.
autoOpenLastInfoWindow
=
true
;
sourceType
:
item
.
source
this
.
listDialogHidden
=
false
}
}
}
})
//
console
.
log
(
items
)
if
(
this
.
isTreeChecked
)
{
this
.
addMonitorByGroup
(
items
)
}
else
{
}
else
{
this
.
checkLoadedTimeoutId
=
check
(
)
this
.
removeMonitorByGroup
(
items
)
}
}
},
100
)
})
}
}
this
.
checkLoadedTimeoutId
=
check
();
},
handleCheckChange
(
data
,
checked
,
indeterminate
)
{
console
.
log
(
data
,
checked
,
indeterminate
);
},
},
handleNodeClick
(
data
)
{
getAllChild
(
node
)
{
console
.
log
(
data
);
if
(
node
.
childNodes
.
length
===
0
&&
!
node
.
data
.
test
)
{
let
nodeData
=
node
.
data
let
origin
=
nodeData
.
origin
if
(
nodeData
.
children
)
{
if
(
nodeData
.
children
.
length
)
{
nodeData
.
children
.
forEach
((
item
)
=>
{
this
.
$refs
.
tree
.
append
(
item
,
node
)
let
childNode
=
this
.
$refs
.
tree
.
getNode
(
item
)
this
.
getAllChild
(
childNode
)
})
node
.
data
.
test
=
true
}
else
{
if
(
origin
.
type
===
'u'
)
{
console
.
log
(
'u'
)
MONITOR_SERVICE
.
getVehicleTreeUserList
({
uId
:
nodeData
.
id
}).
then
(({
data
})
=>
{
if
(
data
.
length
)
{
data
.
map
((
item
)
=>
{
item
.
leaf
=
true
this
.
$refs
.
tree
.
append
(
item
,
node
)
})
}
})
node
.
data
.
test
=
true
}
}
}
}
},
},
loadNode
(
node
,
resolve
)
{
loadNode
(
node
,
resolve
)
{
console
.
log
(
node
);
const
nodeData
=
node
.
data
const
origin
=
nodeData
.
origin
if
(
nodeData
.
children
){
if
(
nodeData
.
children
.
length
)
{
return
resolve
(
nodeData
.
children
)
}
else
{
if
(
origin
.
type
===
'u'
)
{
console
.
log
(
'u'
)
MONITOR_SERVICE
.
getVehicleTreeUserList
({
uId
:
nodeData
.
id
}).
then
(({
data
})
=>
{
if
(
data
.
length
)
{
data
.
map
((
item
)
=>
{
item
.
leaf
=
true
})
return
resolve
(
data
)
}
return
resolve
([])
})
return
;
}
}
}
return
resolve
([])
if
(
node
.
level
===
0
)
{
if
(
node
.
level
===
0
)
{
return
resolve
([{
name
:
'region1'
},
{
name
:
'region2'
}]);
return
resolve
([{
name
:
'region1'
},
{
name
:
'region2'
}]);
}
}
...
@@ -313,6 +463,37 @@
...
@@ -313,6 +463,37 @@
resolve
(
data
);
resolve
(
data
);
},
500
);
},
500
);
},
},
initMap
(){
let
check
=
()
=>
{
this
.
checkLoadedTimeoutId
&&
window
.
clearTimeout
(
this
.
checkLoadedTimeoutId
);
return
setTimeout
(()
=>
{
if
(
'AMap'
in
window
&&
typeof
AMap
.
Map
==
'function'
&&
!
this
.
mapObj
){
window
.
AMap
=
AMap
;
this
.
mapObj
=
mapService
.
init
(
'map'
);
//this.bindEvent();
this
.
isInitMap
=
true
;
if
(
this
.
$route
.
query
.
snArr
){
let
routeQuery
=
JSON
.
parse
(
this
.
$route
.
query
.
snArr
);
if
(
routeQuery
.
length
>
0
){
/* this.addMonitor(routeQuery[0]);
this.autoOpenLastInfoWindow = true; */
routeQuery
.
forEach
((
item
)
=>
{
this
.
addMonitor
(
item
);
})
this
.
autoOpenLastInfoWindow
=
true
;
this
.
listDialogHidden
=
false
}
}
}
else
{
this
.
checkLoadedTimeoutId
=
check
()
}
},
100
)
}
this
.
checkLoadedTimeoutId
=
check
();
},
keyupSubmit
(){
keyupSubmit
(){
document
.
onkeydown
=
e
=>
{
document
.
onkeydown
=
e
=>
{
let
_key
=
window
.
event
.
keyCode
;
let
_key
=
window
.
event
.
keyCode
;
...
@@ -322,6 +503,10 @@
...
@@ -322,6 +503,10 @@
}
}
},
},
searchSubmit
(){
searchSubmit
(){
/* this.addMonitor({
sn: '75108160001'
})
return */
//if(!this.searchText) return;
//if(!this.searchText) return;
switch
(
this
.
searchType
){
switch
(
this
.
searchType
){
case
'1'
:
case
'1'
:
...
@@ -351,7 +536,9 @@
...
@@ -351,7 +536,9 @@
break
;
break
;
}
}
this
.
isSearching
=
true
;
this
.
isSearching
=
true
;
MONITOR_SERVICE
.
getVehicleDeviceList
({
this
.
$refs
.
autocomplete
.
activated
=
true
this
.
$refs
.
autocomplete
.
getData
(
this
.
searchText
)
/* MONITOR_SERVICE.getVehicleDeviceList({
term: this.searchText,
term: this.searchText,
type: this.searchType
type: this.searchType
}).then((res)=>{
}).then((res)=>{
...
@@ -375,7 +562,68 @@
...
@@ -375,7 +562,68 @@
}
}
}
}
});
}); */
},
querySearch
(
queryString
,
cb
)
{
if
(
this
.
isSearching
)
{
MONITOR_SERVICE
.
getVehicleTree
({
termType
:
this
.
searchType
,
term
:
this
.
searchText
,
}).
then
((
res
)
=>
{
this
.
isSearching
=
false
;
cb
(
res
.
data
)
if
(
!
res
.
data
.
length
)
{
cb
([{
tip
:
'无数据'
}])
}
this
.
autocompleteHide
=
false
})
}
},
handleSelect
(
item
)
{
if
(
!
item
.
tip
)
{
MONITOR_SERVICE
.
getVehicleTree
({
termType
:
1
,
term
:
item
.
label
,
returnTrees
:
true
}).
then
((
res
)
=>
{
const
items
=
res
.
data
this
.
expandTreeItems
(
items
)
})
}
},
expandTreeItems
(
arr
,
isDevice
)
{
arr
.
forEach
((
item
)
=>
{
if
(
isDevice
)
{
this
.
$refs
.
tree
.
setCheckedKeys
(
this
.
$refs
.
tree
.
getCheckedKeys
().
concat
(
item
.
id
))
this
.
addMonitor
({
sn
:
item
.
label
,
name
:
item
.
label1
,
standNo
:
item
.
label2
,
online
:
item
.
online
,
id
:
item
.
id
,
source
:
item
.
source
===
'有线'
?
'1'
:
'0'
,
sourceType
:
item
.
source
})
}
else
{
this
.
expandedKeys
.
push
(
item
.
id
)
}
if
(
item
.
children
&&
item
.
children
.
length
)
{
this
.
expandTreeItems
(
item
.
children
,
item
.
origin
.
type
===
'u'
?
true
:
false
)
}
/* else{
if() {
this.checkedKeys.push(item.id)
}
} */
})
},
},
hasSameStandNo
(
arr
){
hasSameStandNo
(
arr
){
let
isSame
=
true
;
let
isSame
=
true
;
...
@@ -474,7 +722,7 @@
...
@@ -474,7 +722,7 @@
this
.
getPositionData
();
this
.
getPositionData
();
},
},
addMonitorByGroup
(){
addMonitorByGroup
(
items
){
if
(
this
.
resultList
.
length
>
100
-
this
.
monitorList
.
count
){
if
(
this
.
resultList
.
length
>
100
-
this
.
monitorList
.
count
){
this
.
$message
({
this
.
$message
({
type
:
'error'
,
type
:
'error'
,
...
@@ -496,7 +744,7 @@
...
@@ -496,7 +744,7 @@
});
});
this.getPositionData(this.resultList)
this.getPositionData(this.resultList)
} */
} */
let
filterList
=
this
.
resultList
.
filter
((
item
)
=>
{
let
filterList
=
items
.
filter
((
item
)
=>
{
return
!
this
.
monitorList
[
item
.
sn
]
return
!
this
.
monitorList
[
item
.
sn
]
});
});
filterList
.
forEach
((
item
)
=>
{
filterList
.
forEach
((
item
)
=>
{
...
@@ -509,16 +757,26 @@
...
@@ -509,16 +757,26 @@
}
}
},
},
removeMonitor
(
item
){
removeMonitor
(
item
,
ifUpdateTreeKeys
){
delete
this
.
monitorList
[
item
.
sn
];
delete
this
.
monitorList
[
item
.
sn
];
this
.
monitorList
.
itemArr
.
splice
(
this
.
monitorList
.
itemArr
.
indexOf
(
item
.
sn
),
1
)
this
.
monitorList
.
itemArr
.
splice
(
this
.
monitorList
.
itemArr
.
indexOf
(
item
.
sn
),
1
)
this
.
monitorList
=
Object
.
assign
({},
this
.
monitorList
);
this
.
monitorList
=
Object
.
assign
({},
this
.
monitorList
);
this
.
monitorList
.
count
--
;
this
.
monitorList
.
count
--
;
EventBus
.
$emit
(
'uiMap.monitor.destroy'
,
`
${
item
.
sn
}
:
${
item
.
source
}
`
);
EventBus
.
$emit
(
'uiMap.monitor.destroy'
,
`
${
item
.
sn
}
:
${
item
.
source
}
`
);
if
(
ifUpdateTreeKeys
)
{
console
.
log
(
item
)
let
checkedKeys
=
this
.
$refs
.
tree
.
getCheckedKeys
()
let
arr
=
checkedKeys
.
filter
((
id
)
=>
id
!==
item
.
id
)
console
.
log
(
arr
)
this
.
$refs
.
tree
.
setCheckedKeys
(
arr
)
}
},
},
removeMonitorByGroup
(){
removeMonitorByGroup
(
arr
){
this
.
monitorList
=
{
count
:
0
,
itemArr
:
[]};
arr
.
forEach
((
item
)
=>
{
EventBus
.
$emit
(
'uiMap.monitor.destroy'
);
if
(
this
.
monitorList
[
item
.
sn
])
{
this
.
removeMonitor
(
item
)
}
})
},
},
getPositionData
(
arr
){
getPositionData
(
arr
){
/* let _this = this;
/* let _this = this;
...
@@ -534,9 +792,10 @@
...
@@ -534,9 +792,10 @@
this
.
remainSearchSnStr
=
snStr
;
this
.
remainSearchSnStr
=
snStr
;
MONITOR_SERVICE
.
getDevicesLocation
({
MONITOR_SERVICE
.
getDevicesLocation
({
sns
:
snStr
,
sns
:
snStr
,
refreshCount
:
this
.
refreshCount
deviceCode
:
'gps'
,
//refreshCount: this.refreshCount
}).
then
((
res
)
=>
{
}).
then
((
res
)
=>
{
if
(
res
.
returnCode
==
0
){
if
(
res
.
code
==
20
0
){
//this.monitorList['1570222001'].isOnLine = true;
//this.monitorList['1570222001'].isOnLine = true;
const
data
=
res
.
data
;
const
data
=
res
.
data
;
if
(
data
.
length
){
if
(
data
.
length
){
...
@@ -551,7 +810,7 @@
...
@@ -551,7 +810,7 @@
item
.
eLocateType
=
relItem
.
eLocateType
item
.
eLocateType
=
relItem
.
eLocateType
item
=
this
.
filterGpsBase
(
item
)
item
=
this
.
filterGpsBase
(
item
)
item
.
isSource
=
relItem
.
source
});
});
this
.
monitorList
=
Object
.
assign
({},
this
.
monitorList
);
this
.
monitorList
=
Object
.
assign
({},
this
.
monitorList
);
let
drawData
=
data
.
filter
((
item
)
=>
(
this
.
monitorList
.
itemArr
.
indexOf
(
item
.
sn
)
>-
1
)
&&
item
.
eLocateType
)
let
drawData
=
data
.
filter
((
item
)
=>
(
this
.
monitorList
.
itemArr
.
indexOf
(
item
.
sn
)
>-
1
)
&&
item
.
eLocateType
)
...
@@ -593,7 +852,7 @@
...
@@ -593,7 +852,7 @@
}
}
if
(
!
item
.
eLocateSingle
){
if
(
!
item
.
eLocateSingle
){
if
(
moment
(
gpsLocation
.
time
).
isAfter
(
moment
(
bsLocation
.
t
ime
))){
if
(
moment
(
gpsLocation
.
dateTime
).
isAfter
(
moment
(
bsLocation
.
dateT
ime
))){
item
.
eLocateType
=
'gpsLocation'
item
.
eLocateType
=
'gpsLocation'
}
else
{
}
else
{
item
.
eLocateType
=
'bsLocation'
item
.
eLocateType
=
'bsLocation'
...
@@ -621,6 +880,9 @@
...
@@ -621,6 +880,9 @@
},
10
*
1000
)
},
10
*
1000
)
},
},
terminate
(){
this
.
_drawTimeoutId
&&
window
.
clearTimeout
(
this
.
_drawTimeoutId
);
},
openMapInfoWindow
(
sn
,
source
){
openMapInfoWindow
(
sn
,
source
){
EventBus
.
$emit
(
'uiMap.monitor.openInfoWindow'
,
`
${
sn
}
:
${
source
}
`
)
EventBus
.
$emit
(
'uiMap.monitor.openInfoWindow'
,
`
${
sn
}
:
${
source
}
`
)
},
},
...
@@ -633,12 +895,13 @@
...
@@ -633,12 +895,13 @@
}
}
},
},
created
()
{
created
()
{
if
(
window
.
AMap
){
if
(
window
.
AMap
){
this
.
initMap
();
this
.
initMap
();
}
else
{
}
else
{
remoteLoad
(
`
${
CONSTANT
.
AMAP_URL
}
`
).
then
(()
=>
{
remoteLoad
(
`
${
CONSTANT
.
AMAP_URL
}
`
).
then
(()
=>
{
remoteLoad
(
`https://webapi.amap.com/ui/1.0/main.js?v=1.0.11`
).
then
(()
=>
{
remoteLoad
(
`https://webapi.amap.com/ui/1.0/main.js?v=1.0.11`
).
then
(()
=>
{
this
.
initMap
();
this
.
initMap
();
})
})
})
})
...
@@ -646,7 +909,10 @@
...
@@ -646,7 +909,10 @@
this
.
keyupSubmit
();
this
.
keyupSubmit
();
EventBus
.
$on
(
'uiMap.monitor.drawDone'
,
this
.
drawDoneCb
);
EventBus
.
$on
(
'uiMap.monitor.drawDone'
,
this
.
drawDoneCb
);
EventBus
.
$on
(
'uiMap.monitor.changeELocate'
,
this
.
changeELocate
);
EventBus
.
$on
(
'uiMap.monitor.changeELocate'
,
this
.
changeELocate
);
EventBus
.
$on
(
'uiMap.monitor.terminate'
,
this
.
terminate
);
this
.
getTreeData
()
},
},
beforeDestroy
(){
beforeDestroy
(){
EventBus
.
$emit
(
'uiMap.monitor.destroy'
);
EventBus
.
$emit
(
'uiMap.monitor.destroy'
);
...
@@ -667,5 +933,42 @@
...
@@ -667,5 +933,42 @@
color
:
red
;
color
:
red
;
padding
:
0
5px
;
padding
:
0
5px
;
}
}
</
style
>
<
style
>
.el-tree-node__content
{
height
:
auto
;
padding
:
2px
;
}
.custom-tree-node
{
flex
:
1
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
space-between
;
font-size
:
14px
;
padding-right
:
8px
;
line-height
:
26px
;
}
.map-wrap
.el-tree-node
>
.el-tree-node__children
{
overflow
:
visible
;
}
.search_auto
{
font-size
:
12px
;
}
.search_auto_hide
{
display
:
none
;
}
.search_auto
.el-autocomplete-suggestion
li
{
padding
:
0
;
}
.search_auto
.el-autocomplete-suggestion
li
div
{
line-height
:
20px
;
}
.el-autocomplete-suggestion
li
{
border-bottom
:
1px
solid
#eee
;
padding-bottom
:
4px
;
}
.el-autocomplete-suggestion
li
:last-child
{
border-bottom
:
none
;
}
</
style
>
</
style
>
\ No newline at end of file
\ No newline at end of file
src/pages/monitor/replay.vue
View file @
88012d4
...
@@ -324,16 +324,16 @@
...
@@ -324,16 +324,16 @@
if
(
!
this
.
sn
)
return
;
if
(
!
this
.
sn
)
return
;
const
params
=
{};
const
params
=
{};
params
.
sn
=
this
.
sn
;
params
.
sn
=
this
.
sn
;
params
.
sTime
=
moment
(
this
.
form
.
dateRange
[
0
]).
format
(
'YYYY-MM-DD HH:mm:ss'
);
params
.
s
tart
Time
=
moment
(
this
.
form
.
dateRange
[
0
]).
format
(
'YYYY-MM-DD HH:mm:ss'
);
params
.
eTime
=
moment
(
this
.
form
.
dateRange
[
1
]).
format
(
'YYYY-MM-DD HH:mm:ss'
);
params
.
e
nd
Time
=
moment
(
this
.
form
.
dateRange
[
1
]).
format
(
'YYYY-MM-DD HH:mm:ss'
);
this
.
replayIniting
=
true
;
this
.
replayIniting
=
true
;
const
resource
=
this
.
form
.
replayType
==
'RtTrack'
?
MONITOR_SERVICE
.
getTrackHistory
:
MONITOR_SERVICE
.
getBaseStationHistory
;
//
const resource = this.form.replayType == 'RtTrack'?MONITOR_SERVICE.getTrackHistory:MONITOR_SERVICE.getBaseStationHistory;
params
.
locationType
=
this
.
form
.
replayType
==
'RtTrack'
?
0
:
1
resource
(
params
).
then
((
result
)
=>
{
MONITOR_SERVICE
.
getTrackHistory
(
params
).
then
((
result
)
=>
{
//result = mock.getTrackHistory
//result = mock.getTrackHistory
console
.
log
(
result
)
if
(
result
.
returnCode
==
'
0'
){
if
(
result
.
code
==
'20
0'
){
let
data
=
result
.
data
;
let
data
=
result
.
data
;
this
.
replayData
=
data
;
this
.
replayData
=
data
;
if
(
data
&&
data
.
length
){
if
(
data
&&
data
.
length
){
...
@@ -341,7 +341,7 @@
...
@@ -341,7 +341,7 @@
}
else
{
}
else
{
EventBus
.
$emit
(
'uiMap.replay.destroy'
);
EventBus
.
$emit
(
'uiMap.replay.destroy'
);
this
.
$confirm
(
`<p>
${
result
.
message
?
result
.
message
:
'暂无轨迹数据!'
}
</p>`
,
'提示'
,
{
this
.
$confirm
(
`<p>
${
'暂无轨迹数据!'
}
</p>`
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
showCancelButton
:
false
,
showCancelButton
:
false
,
dangerouslyUseHTMLString
:
true
dangerouslyUseHTMLString
:
true
...
@@ -425,7 +425,7 @@
...
@@ -425,7 +425,7 @@
case
'carName'
:
case
'carName'
:
case
'standNo'
:
case
'standNo'
:
case
'sn'
:
case
'sn'
:
case
'
t
ime'
:
case
'
dateT
ime'
:
case
'speed'
:
case
'speed'
:
case
'userTel'
:
case
'userTel'
:
case
'activeTime'
:
case
'activeTime'
:
...
@@ -448,10 +448,12 @@
...
@@ -448,10 +448,12 @@
paramArr
.
push
(
paramItem
);
paramArr
.
push
(
paramItem
);
});
});
exportExcel
(
'track/exportCsv'
,
{
exportExcel
(
'/devicemonitor/monitor/exporttrackpoint'
,
{
jsonStr
:
encodeURI
(
JSON
.
stringify
(
paramArr
)),
expData
:
encodeURI
(
JSON
.
stringify
(
paramArr
)),
sTime
:
moment
(
this
.
form
.
dateRange
[
0
]).
format
(
'YYYY-MM-DD HH:mm:ss'
),
startTime
:
moment
(
this
.
form
.
dateRange
[
0
]).
format
(
'YYYY-MM-DD HH:mm:ss'
),
eTime
:
moment
(
this
.
form
.
dateRange
[
1
]).
format
(
'YYYY-MM-DD HH:mm:ss'
),
endTime
:
moment
(
this
.
form
.
dateRange
[
1
]).
format
(
'YYYY-MM-DD HH:mm:ss'
),
locationType
:
this
.
form
.
replayType
==
'RtTrack'
?
0
:
1
,
sn
:
this
.
sn
},
'post'
,
()
=>
{
},
'post'
,
()
=>
{
this
.
exporting
=
false
;
this
.
exporting
=
false
;
});
});
...
@@ -459,12 +461,14 @@
...
@@ -459,12 +461,14 @@
getHistoryLocation
(){
getHistoryLocation
(){
this
.
resultList
=
[];
this
.
resultList
=
[];
MONITOR_SERVICE
.
getHistoryLocation
({
MONITOR_SERVICE
.
getHistoryLocation
({
sn
:
this
.
sn
,
sn
:
this
.
sn
,
//'90903010001',
s
Time
:
moment
(
this
.
form
.
dateRange
[
0
]).
startOf
(
'day'
).
format
(
'YYYY-MM-DD HH:mm:ss'
),
s
tartTime
:
moment
(
this
.
form
.
dateRange
[
0
]).
startOf
(
'day'
).
format
(
'YYYY-MM-DD HH:mm:ss'
),
//'2018-03-22 09:47:43',//
e
Time
:
moment
(
this
.
form
.
dateRange
[
1
]).
endOf
(
'day'
).
format
(
'YYYY-MM-DD HH:mm:ss'
),
e
ndTime
:
moment
(
this
.
form
.
dateRange
[
1
]).
endOf
(
'day'
).
format
(
'YYYY-MM-DD HH:mm:ss'
),
//'2019-10-27 09:56:45',//
times
:
'0'
,
times
:
'0'
,
locationType
:
this
.
form
.
replayType
==
'RtTrack'
?
0
:
1
}).
then
((
res
)
=>
{
}).
then
((
res
)
=>
{
if
(
res
.
returnCode
==
0
){
console
.
log
(
res
)
if
(
res
.
code
==
200
){
const
data
=
res
.
data
;
const
data
=
res
.
data
;
if
(
data
.
length
){
if
(
data
.
length
){
data
.
forEach
((
item
,
idx
)
=>
{
data
.
forEach
((
item
,
idx
)
=>
{
...
@@ -491,9 +495,12 @@
...
@@ -491,9 +495,12 @@
arr
.
push
(
item
);
arr
.
push
(
item
);
});
});
exportExcel
(
'track/exportVMData'
,
{
exportExcel
(
'/devicemonitor/monitor/exportstaypoint'
,
{
vmExportType
:
6
,
sn
:
this
.
sn
,
jsonStr
:
encodeURI
(
JSON
.
stringify
(
arr
))
vin
:
this
.
standno
,
name
:
this
.
name
,
locationType
:
this
.
form
.
replayType
==
'RtTrack'
?
0
:
1
,
expData
:
encodeURI
(
JSON
.
stringify
(
arr
))
},
'post'
);
},
'post'
);
}
}
},
},
...
@@ -600,7 +607,7 @@
...
@@ -600,7 +607,7 @@
//轨迹播放结束
//轨迹播放结束
EventBus
.
$on
(
'uiMap.replay.done'
,
()
=>
{
EventBus
.
$on
(
'uiMap.replay.done'
,
()
=>
{
this
.
replayIng
=
false
;
this
.
replayIng
=
false
;
this
.
$alert
(
`<p>开始时间:
${
this
.
replayData
[
0
].
time
}
</p><p>结束时间:
${
this
.
replayData
[
this
.
replayData
.
length
-
1
].
t
ime
}
</p>`
,
'轨迹播放完成'
,
{
this
.
$alert
(
`<p>开始时间:
${
this
.
replayData
[
0
].
dateTime
}
</p><p>结束时间:
${
this
.
replayData
[
this
.
replayData
.
length
-
1
].
dateT
ime
}
</p>`
,
'轨迹播放完成'
,
{
type
:
'success'
,
type
:
'success'
,
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
dangerouslyUseHTMLString
:
true
dangerouslyUseHTMLString
:
true
...
...
src/utils/exportExcel.js
View file @
88012d4
...
@@ -2,6 +2,7 @@ import { CONSTANT } from '../constant.js'
...
@@ -2,6 +2,7 @@ import { CONSTANT } from '../constant.js'
import
axios
from
'axios'
import
axios
from
'axios'
import
qs
from
'qs'
import
qs
from
'qs'
import
{
Message
}
from
"element-ui"
;
import
{
Message
}
from
"element-ui"
;
import
store
from
'../vuex/store'
export
default
(
url
,
oParam
,
datatype
,
cb
)
=>
{
export
default
(
url
,
oParam
,
datatype
,
cb
)
=>
{
/*let exportForm = document.querySelector("#exportForm");
/*let exportForm = document.querySelector("#exportForm");
...
@@ -25,12 +26,14 @@ export default (url, oParam, datatype, cb) => {
...
@@ -25,12 +26,14 @@ export default (url, oParam, datatype, cb) => {
}
}
exportForm.innerHTML = _input;
exportForm.innerHTML = _input;
exportForm.submit();*/
exportForm.submit();*/
url
=
CONSTANT
.
API_URL
+
url
let
BASE_URL
=
store
.
getters
.
baseURL
;
url
=
BASE_URL
+
url
if
(
datatype
==
'post'
)
{
if
(
datatype
==
'post'
)
{
axios
.
post
(
url
,
typeof
oParam
==
'string'
?
oParam
:
qs
.
stringify
(
oParam
),
{
axios
.
post
(
url
,
typeof
oParam
==
'string'
?
oParam
:
qs
.
stringify
(
oParam
),
{
responseType
:
'blob'
,
//指定返回数据的格式为blob
responseType
:
'blob'
,
//指定返回数据的格式为blob
headers
:
{
headers
:
{
'Content-Type'
:
typeof
oParam
==
'string'
?
'application/json'
:
'application/x-www-form-urlencoded; charset=UTF-8'
'Content-Type'
:
typeof
oParam
==
'string'
?
'application/json'
:
'application/x-www-form-urlencoded; charset=UTF-8'
,
Authorization
:
localStorage
.
getItem
(
'token'
)
||
''
}
}
})
})
.
then
(
response
=>
{
.
then
(
response
=>
{
...
@@ -49,7 +52,8 @@ export default (url, oParam, datatype, cb) => {
...
@@ -49,7 +52,8 @@ export default (url, oParam, datatype, cb) => {
responseType
:
'blob'
,
//指定返回数据的格式为blob
responseType
:
'blob'
,
//指定返回数据的格式为blob
params
:
oParam
,
params
:
oParam
,
headers
:
{
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded; charset=UTF-8'
'Content-Type'
:
'application/x-www-form-urlencoded; charset=UTF-8'
,
Authorization
:
localStorage
.
getItem
(
'token'
)
||
''
}
}
})
})
.
then
(
response
=>
{
.
then
(
response
=>
{
...
...
src/utils/mapService.js
View file @
88012d4
...
@@ -2,7 +2,7 @@ import ClipboardJS from 'clipboard'
...
@@ -2,7 +2,7 @@ import ClipboardJS from 'clipboard'
window
.
ClipboardJS
=
ClipboardJS
window
.
ClipboardJS
=
ClipboardJS
import
EventBus
from
'../event-bus'
import
EventBus
from
'../event-bus'
import
{
Message
}
from
"element-ui"
;
import
{
Message
}
from
"element-ui"
;
import
store
from
'../vuex/store.js'
EventBus
.
$on
(
'uiMap.copySuccess'
,
(
data
)
=>
{
EventBus
.
$on
(
'uiMap.copySuccess'
,
(
data
)
=>
{
Message
({
Message
({
type
:
'success'
,
type
:
'success'
,
...
@@ -10,11 +10,14 @@ EventBus.$on('uiMap.copySuccess', (data)=>{
...
@@ -10,11 +10,14 @@ EventBus.$on('uiMap.copySuccess', (data)=>{
});
});
});
});
function
MapService
(){
function
MapService
(){
this
.
map
=
null
;
this
.
map
=
null
;
this
.
restainLayer
=
null
;
this
.
restainLayer
=
null
;
}
}
var
zhongliType
=
sessionStorage
.
getItem
(
'zhongliType'
);
//获取是否仲利账号状态,从本地内存中拿取数据
MapService
.
prototype
=
{
MapService
.
prototype
=
{
init
:
function
(
id
){
init
:
function
(
id
){
var
self
=
this
;
var
self
=
this
;
...
@@ -31,7 +34,6 @@ MapService.prototype = {
...
@@ -31,7 +34,6 @@ MapService.prototype = {
self
.
geolocation
=
new
AMap
.
Geolocation
();
self
.
geolocation
=
new
AMap
.
Geolocation
();
});
});
return
self
.
map
;
return
self
.
map
;
},
},
toggleMapType
:
function
(){
toggleMapType
:
function
(){
...
@@ -275,7 +277,7 @@ MapService.prototype = {
...
@@ -275,7 +277,7 @@ MapService.prototype = {
infoDiv
.
querySelector
(
'[data-status]'
).
textContent
=
statusArr
[
info
.
status
];
infoDiv
.
querySelector
(
'[data-status]'
).
textContent
=
statusArr
[
info
.
status
];
}
}
infoDiv
.
querySelector
(
'[data-time]'
).
textContent
=
eLocation
.
t
ime
;
infoDiv
.
querySelector
(
'[data-time]'
).
textContent
=
eLocation
.
dateT
ime
;
infoDiv
.
querySelector
(
'[data-transferAddress]'
).
textContent
=
eLocation
.
transferAddress
;
infoDiv
.
querySelector
(
'[data-transferAddress]'
).
textContent
=
eLocation
.
transferAddress
;
infoDiv
.
querySelector
(
'[data-clipboard-text'
).
setAttribute
(
'data-clipboard-text'
,
eLocation
.
transferAddress
);
infoDiv
.
querySelector
(
'[data-clipboard-text'
).
setAttribute
(
'data-clipboard-text'
,
eLocation
.
transferAddress
);
...
@@ -289,6 +291,7 @@ MapService.prototype = {
...
@@ -289,6 +291,7 @@ MapService.prototype = {
let
gpsBtn
=
infoDiv
.
querySelector
(
'[data-gps]'
)
let
gpsBtn
=
infoDiv
.
querySelector
(
'[data-gps]'
)
let
baseBtn
=
infoDiv
.
querySelector
(
'[data-base]'
)
let
baseBtn
=
infoDiv
.
querySelector
(
'[data-base]'
)
let
wifiBtn
=
infoDiv
.
querySelector
(
'[data-wifi]'
)
if
(
info
.
eLocateType
===
'bsLocation'
){
if
(
info
.
eLocateType
===
'bsLocation'
){
gpsBtn
&&
gpsBtn
.
classList
.
remove
(
'el-button--primary'
);
gpsBtn
&&
gpsBtn
.
classList
.
remove
(
'el-button--primary'
);
baseBtn
.
classList
.
add
(
'el-button--primary'
);
baseBtn
.
classList
.
add
(
'el-button--primary'
);
...
@@ -308,11 +311,13 @@ MapService.prototype = {
...
@@ -308,11 +311,13 @@ MapService.prototype = {
});
});
return
;
return
;
}
}
gpsBtn
.
classList
.
remove
(
'el-button--primary'
);
gpsBtn
&&
gpsBtn
.
classList
.
remove
(
'el-button--primary'
);
baseBtn
.
classList
.
add
(
'el-button--primary'
);
wifiBtn
&&
wifiBtn
.
classList
.
remove
(
'el-button--primary'
);
baseBtn
&&
baseBtn
.
classList
.
add
(
'el-button--primary'
);
infoDiv
.
querySelector
(
'[data-transferAddress]'
).
textContent
=
eLocation
.
transferAddress
;
infoDiv
.
querySelector
(
'[data-transferAddress]'
).
textContent
=
eLocation
.
transferAddress
;
infoDiv
.
querySelector
(
'[data-time]'
).
textContent
=
eLocation
.
t
ime
;
infoDiv
.
querySelector
(
'[data-time]'
).
textContent
=
eLocation
.
dateT
ime
;
EventBus
.
$emit
(
'uiMap.monitor.changeELocate'
,
info
)
EventBus
.
$emit
(
'uiMap.monitor.changeELocate'
,
info
)
EventBus
.
$emit
(
'uiMap.monitor.drawDone'
);
})
})
gpsBtn
&&
(
gpsBtn
.
onclick
=
function
(
e
){
gpsBtn
&&
(
gpsBtn
.
onclick
=
function
(
e
){
...
@@ -326,24 +331,33 @@ MapService.prototype = {
...
@@ -326,24 +331,33 @@ MapService.prototype = {
});
});
return
;
return
;
}
}
gpsBtn
.
classList
.
add
(
'el-button--primary'
);
gpsBtn
&&
gpsBtn
.
classList
.
add
(
'el-button--primary'
);
baseBtn
.
classList
.
remove
(
'el-button--primary'
);
wifiBtn
&&
wifiBtn
.
classList
.
remove
(
'el-button--primary'
);
baseBtn
&&
baseBtn
.
classList
.
remove
(
'el-button--primary'
);
infoDiv
.
querySelector
(
'[data-transferAddress]'
).
textContent
=
eLocation
.
transferAddress
;
infoDiv
.
querySelector
(
'[data-transferAddress]'
).
textContent
=
eLocation
.
transferAddress
;
infoDiv
.
querySelector
(
'[data-time]'
).
textContent
=
eLocation
.
t
ime
;
infoDiv
.
querySelector
(
'[data-time]'
).
textContent
=
eLocation
.
dateT
ime
;
EventBus
.
$emit
(
'uiMap.monitor.changeELocate'
,
info
)
EventBus
.
$emit
(
'uiMap.monitor.changeELocate'
,
info
)
EventBus
.
$emit
(
'uiMap.monitor.drawDone'
);
})
})
if
(
info
.
alarmModelList
&&
info
.
alarmModelList
.
length
){
wifiBtn
&&
(
wifiBtn
.
onclick
=
function
(
e
){
//infoDiv.querySelector('[data-transferAddress]').textContent = eLocation.transferAddress;
//infoDiv.querySelector('[data-time]').textContent = eLocation.time;
EventBus
.
$emit
(
'uiMap.monitor.wifiLocate'
,
{
info
,
infoDiv
,
gpsBtn
,
baseBtn
,
wifiBtn
})
})
if
(
info
.
alarmTypeSet
&&
info
.
alarmTypeSet
.
length
){
let
_html
=
'<i class="icon icon-info_device_alarm"></i>报警状态:'
let
_html
=
'<i class="icon icon-info_device_alarm"></i>报警状态:'
info
.
alarm
ModelLis
t
.
forEach
((
item
)
=>
{
info
.
alarm
TypeSe
t
.
forEach
((
item
)
=>
{
if
(
item
.
alarmType
===
'1'
){
if
(
item
.
alarmType
===
1
){
_html
+=
`<button type="button" class="el-button el-button--mini el-button--danger" data-alarmoff data-alarmtime="
${
item
.
alarmTime
}
">断电</button>`
_html
+=
`<button type="button" class="el-button el-button--mini el-button--danger" data-alarmoff data-alarmtime="
${
item
.
alarmTime
}
">断电</button>`
}
else
if
(
item
.
alarmType
===
'99'
){
}
else
if
(
item
.
alarmType
===
99
){
_html
+=
`<button type="button" class="el-button el-button--mini el-button--danger" data-alarmlight data-alarmtime="
${
item
.
alarmTime
}
">光感</button>`
_html
+=
`<button type="button" class="el-button el-button--mini el-button--danger" data-alarmlight data-alarmtime="
${
item
.
alarmTime
}
">光感</button>`
}
}
});
});
infoDiv
.
querySelector
(
'[data-alarm]'
).
innerHTML
=
_html
;
infoDiv
.
querySelector
(
'[data-alarm]'
).
innerHTML
=
_html
;
if
(
infoDiv
.
querySelector
(
'[data-alarmoff]'
)){
/*
if(infoDiv.querySelector('[data-alarmoff]')){
infoDiv.querySelector('[data-alarmoff]').onclick = function(e){
infoDiv.querySelector('[data-alarmoff]').onclick = function(e){
console.log(e.target.dataset)
console.log(e.target.dataset)
window.open(`#/report/antiOffAlarm?type=1&time=${e.target.dataset.alarmtime}&sn=${info.sn}`)
window.open(`#/report/antiOffAlarm?type=1&time=${e.target.dataset.alarmtime}&sn=${info.sn}`)
...
@@ -354,7 +368,7 @@ MapService.prototype = {
...
@@ -354,7 +368,7 @@ MapService.prototype = {
console.log(e.target.dataset)
console.log(e.target.dataset)
window.open(`#/report/antiOffAlarm?type=99&time=${e.target.dataset.alarmtime}&sn=${info.sn}`)
window.open(`#/report/antiOffAlarm?type=99&time=${e.target.dataset.alarmtime}&sn=${info.sn}`)
}
}
}
}
*/
infoDiv
.
querySelector
(
'[data-alarm]'
).
style
.
display
=
'block'
;
infoDiv
.
querySelector
(
'[data-alarm]'
).
style
.
display
=
'block'
;
}
else
{
}
else
{
...
@@ -463,7 +477,7 @@ MapService.prototype = {
...
@@ -463,7 +477,7 @@ MapService.prototype = {
zoomOut
:
function
(){
zoomOut
:
function
(){
this
.
map
.
zoomOut
();
this
.
map
.
zoomOut
();
},
},
createMonitorInfo
:
function
(
info
){
console
.
log
(
info
)
createMonitorInfo
:
function
(
info
){
/*var _html = '<h3 class="uimap-info-title">'+ info.name+'/'+ info.standNo +'</h3><div class="uimap-info-ct"><p><span><i class="fa fa-inbox"></i></span>'+ info.sn +'</p>';
/*var _html = '<h3 class="uimap-info-title">'+ info.name+'/'+ info.standNo +'</h3><div class="uimap-info-ct"><p><span><i class="fa fa-inbox"></i></span>'+ info.sn +'</p>';
if(info.time){
if(info.time){
_html += '<p><span><i class="fa fa-clock-o"></i></span>'+ info.time +'</p>';
_html += '<p><span><i class="fa fa-clock-o"></i></span>'+ info.time +'</p>';
...
@@ -472,9 +486,26 @@ MapService.prototype = {
...
@@ -472,9 +486,26 @@ MapService.prototype = {
_html += '<p><span><i class="fa fa-car"></i></span>'+ '驻留次数:' +(info.totalTimes?info.totalTimes:'1')+'</p>';
_html += '<p><span><i class="fa fa-car"></i></span>'+ '驻留次数:' +(info.totalTimes?info.totalTimes:'1')+'</p>';
return _html;*/
return _html;*/
let
queryCode
=
`sn=
${
info
.
sn
}
&name=
${
encodeURI
(
info
.
name
)}
&standno=
${
info
.
standNo
}
`
;
let
queryCode
=
`sn=
${
info
.
sn
}
&name=
${
encodeURI
(
info
.
name
)}
&standno=
${
info
.
standNo
}
`
;
return
`<h3 class="map-infowindow-title">
${
info
.
name
}
/
${
info
.
standNo
}
</h3>
var
_html
=
`<h3 class="map-infowindow-title">
${
info
.
name
}
/
${
info
.
standNo
}
</h3>`
;
<div class="map-infowindow-ct">
_html
+=
`<div class="map-infowindow-ct">`
;
<p><i class="icon icon-info_device"></i> 设备号:<span class="des">
${
info
.
sn
}
(
${
info
.
isSource
===
'1'
?
'有线'
:
'无线'
}
)</span>
console
.
log
(
zhongliType
);
if
(
zhongliType
==
'yes'
){
_html
+=
`<div>`
;
if
(
info
.
shopName
){
_html
+=
`<p><i class="icon icon-icon_store"></i> 店面名称: <span class="des">
${
info
.
shopName
}
</span></p>`
;
}
if
(
info
.
shopContacts
){
_html
+=
`<p style="margin-left:29px;"> 店面联系人: <span class="des">
${
info
.
shopContacts
}
</span></p>`
;
}
if
(
info
.
contactsPhone
){
_html
+=
`<p style="margin-left:29px;"> 联系方式: <span class="des">
${
info
.
contactsPhone
}
</span></p>`
;
}
if
(
info
.
idnum
)
{
_html
+=
`<p style="margin-left:29px;"> 车牌号: <span class="des">
${
info
.
idnum
}
</span></p>`
;
}
_html
+=
`</div>`
;
}
_html
+=
`<p><i class="icon icon-info_device"></i> 设备号:<span class="des">
${
info
.
sn
}
(
${
info
.
isSource
===
'1'
?
'有线'
:
'无线'
}
)</span>
<span class="battery" data-battery>
<span class="battery" data-battery>
<i class="fill"><i class="fill-percentage" data-battery-percentage></i></i>
<i class="fill"><i class="fill-percentage" data-battery-percentage></i></i>
<i class="icon icon-battery_enough"></i>
<i class="icon icon-battery_enough"></i>
...
@@ -491,22 +522,101 @@ MapService.prototype = {
...
@@ -491,22 +522,101 @@ MapService.prototype = {
<a class="copy-btn" data-clipboard-text=""><i class="icon icon-info_copy"></i></a>
<a class="copy-btn" data-clipboard-text=""><i class="icon icon-info_copy"></i></a>
</p>
</p>
<p><i class="icon icon-info_type"></i> 定位类型:
<p><i class="icon icon-info_type"></i> 定位类型:
${
info
.
eLocateSingle
?
${
info
.
wifiLocation
?
(
info
.
eLocateType
===
'gpsLocation'
?
`<button type="button" class="el-button el-button--mini el-button--primary" data-gps>GPS</button> `
:
(
info
.
eLocateSingle
?
`<button type="button" class="el-button el-button--mini el-button--primary" data-base>基站</button>`
):
(
info
.
eLocateType
===
'gpsLocation'
?
`<span class="el-button-group">
`<span class="el-button-group">
<button type="button" class="el-button el-button--mini el-button--primary" data-gps>GPS</button>
<button type="button" class="el-button el-button--mini el-button--primary" data-gps>GPS</button>
<button type="button" class="el-button el-button--mini" data-base>基站</button>
<button type="button" class="el-button el-button--mini" data-wifi>wifi</button>
</span>`
</span>`
:
`<span class="el-button-group">
<button type="button" class="el-button el-button--mini el-button--primary" data-base>基站</button>
<button type="button" class="el-button el-button--mini" data-wifi>wifi</button>
</span>`
):
`<span class="el-button-group">
<button type="button" class="el-button el-button--mini el-button--primary" data-gps>GPS</button>
<button type="button" class="el-button el-button--mini" data-base>基站</button>
<button type="button" class="el-button el-button--mini" data-wifi>wifi</button>
</span>`
):
info
.
eLocateSingle
?
(
info
.
eLocateType
===
'gpsLocation'
?
`<button type="button" class="el-button el-button--mini el-button--primary" data-gps>GPS</button> `
:
`<button type="button" class="el-button el-button--mini el-button--primary" data-base>基站</button>`
):
`<span class="el-button-group">
<button type="button" class="el-button el-button--mini el-button--primary" data-gps>GPS</button>
<button type="button" class="el-button el-button--mini" data-base>基站</button>
</span>`
}
}
<
/p
>
<
/p
>
<
p
class
=
"redirect-row"
>
<
p
class
=
"redirect-row"
>
<
a
class
=
"redirect-btn"
onclick
=
"window.open('#/monitor/historyLocation?${queryCode}')"
>
历史停留
<
/a
>
<
a
class
=
"redirect-btn"
onclick
=
"window.open('#/monitor/historyLocation?${queryCode}')"
>
历史停留
<
/a
>
<
a
class
=
"redirect-btn"
onclick
=
"window.open('#/monitor/resident?${queryCode}')"
>
常驻地
<
/a
>
<
a
class
=
"redirect-btn"
onclick
=
"window.open('#/monitor/resident?${queryCode}')"
>
常驻地
<
/a
>
<
a
class
=
"redirect-btn"
onclick
=
"
window.open('#/monitor/replay?${queryCode}')
"
>
轨迹回放
<
/a
>
<
a
class
=
"redirect-btn"
onclick
=
"
location.href='oEshield#/monitor/replay?${queryCode}'
"
>
轨迹回放
<
/a
>
<
a
class
=
"redirect-btn"
onclick
=
"window.open('#/monitor/fence?${queryCode}')"
>
电子围栏
<
/a
>
<
a
class
=
"redirect-btn"
onclick
=
"window.open('#/monitor/fence?${queryCode}')"
>
电子围栏
<
/a
>
<
/p
>
<
/p
>
<
/div>`
;
<
/div>`
;
// return `<h3 class="map-infowindow-title">${info.name}/${info.standNo}</h3>
// <div class="map-infowindow-ct">
// <div v-show="zhongliType">
// <p><i class="icon icon-info_device_status"></i> 店面名称: <span class="des">${info.shopName}</span></p>
// <p><i class="icon icon-info_device_status"></i> 店面联系人: <span class="des">${info.shopContacts}</span></p>
// <p><i class="icon icon-info_device_status"></i> 联系方式: <span class="des">${info.contactsPhone}</span></p>
// </div>
// <p><i class="icon icon-info_device"></i> 设备号:<span class="des"> ${info.sn} (${info.isSource==='1'?'有线':'无线'})</span>
// <span class="battery" data-battery>
// <i class="fill"><i class="fill-percentage" data-battery-percentage></i></i>
// <i class="icon icon-battery_enough"></i>
// <i class="text" data-battery-text></i>
// </span></p>
// <p><i class="icon icon-info_device_status"></i> 设备状态: <span class="des" data-status></span></p>
// <p data-alarm>
// <button type="button" class="el-button el-button--mini el-button--primary" data-alarmoff>断电</button>
// <button type="button" class="el-button el-button--mini el-button--primary" data-alarmlight>光感</button>
// </p>
// <p><i class="icon icon-info_time"></i> 最后上点时间: <span class="des" data-time></span></p>
// <p><i class="icon icon-info_location"></i> 最后上点地址: <span class="des adr" data-transferAddress>${info.transferAddress}</span>
// <a class="copy-btn" data-clipboard-text=""><i class="icon icon-info_copy"></i></a>
// </p>
// <p><i class="icon icon-info_type"></i> 定位类型:
// ${info.wifiType===1?
// (info.eLocateSingle?
// (info.eLocateType==='gpsLocation'?
// `<span class="el-button-group">
// <button type="button" class="el-button el-button--mini el-button--primary" data-gps>GPS</button>
// <button type="button" class="el-button el-button--mini" data-wifi>wifi</button>
// </span>`:
// `<span class="el-button-group">
// <button type="button" class="el-button el-button--mini el-button--primary" data-base>基站</button>
// <button type="button" class="el-button el-button--mini" data-wifi>wifi</button>
// </span>`
// ):
// `<span class="el-button-group">
// <button type="button" class="el-button el-button--mini el-button--primary" data-gps>GPS</button>
// <button type="button" class="el-button el-button--mini" data-base>基站</button>
// <button type="button" class="el-button el-button--mini" data-wifi>wifi</button>
// </span>`
// ):
// info.eLocateSingle?
// (info.eLocateType==='gpsLocation'?`<button type="button" class="el-button el-button--mini el-button--primary" data-gps>GPS</button> `:
// `<button type="button" class="el-button el-button--mini el-button--primary" data-base>基站</button>`):
// `<span class="el-button-group">
// <button type="button" class="el-button el-button--mini el-button--primary" data-gps>GPS</button>
// <button type="button" class="el-button el-button--mini" data-base>基站</button>
// </span>`
// }
// </p>
// <p class="redirect-row">
// <a class="redirect-btn" onclick="window.open('#/monitor/historyLocation?${queryCode}')">历史停留</a>
// <a class="redirect-btn" onclick="window.open('#/monitor/resident?${queryCode}')">常驻地</a>
// <a class="redirect-btn" onclick="window.open('#/monitor/replay?${queryCode}')">轨迹回放</a>
// <a class="redirect-btn" onclick="window.open('#/monitor/fence?${queryCode}')">电子围栏</a>
// </p>
// </div>`;
return
_html
;
},
},
createFenceInfo
(
info
){
createFenceInfo
(
info
){
return
`<h3 class="map-infowindow-title">
${
info
.
name
}
/
${
info
.
standno
}
</h3>
return
`<h3 class="map-infowindow-title">
${
info
.
name
}
/
${
info
.
standno
}
</h3>
...
...
src/utils/monitor.js
View file @
88012d4
import
EventBus
from
'../event-bus'
import
EventBus
from
'../event-bus'
import
mapService
from
'./mapService.js'
import
mapService
from
'./mapService.js'
import
MAPGEO
from
'./mapgeo'
import
MAPGEO
from
'./mapgeo'
import
{
Message
}
from
"element-ui"
;
import
{
services
}
from
'../api'
const
MONITOR_SERVICE
=
services
.
monitor
;
//车辆监控
//车辆监控
const
monitor
=
{
const
monitor
=
{
...
@@ -95,6 +98,43 @@ const monitor = {
...
@@ -95,6 +98,43 @@ const monitor = {
this
.
compareDestroy
()
this
.
compareDestroy
()
this
.
isCompare
=
true
this
.
isCompare
=
true
});
});
EventBus
.
$on
(
'uiMap.monitor.wifiLocate'
,
(
data
)
=>
{
EventBus
.
$emit
(
'uiMap.monitor.terminate'
);
const
{
info
,
infoDiv
,
gpsBtn
,
baseBtn
,
wifiBtn
}
=
data
MONITOR_SERVICE
.
getWifiLocationBySn
({
apType
:
5
,
sn
:
info
.
sn
}).
then
((
res
)
=>
{
if
(
res
.
returnCode
==
0
){
const
data
=
res
.
data
if
(
data
){
const
transferObj
=
{
elat
:
data
.
wifiLat
,
elng
:
data
.
wifiLng
}
MAPGEO
.
transferAddressByGroup
({
data
:
[
transferObj
]},
()
=>
{
infoDiv
.
querySelector
(
'[data-transferAddress]'
).
textContent
=
transferObj
.
transferAddress
;
infoDiv
.
querySelector
(
'[data-time]'
).
textContent
=
data
.
lastReportTime
;
})
const
snSourceType
=
`
${
info
.
sn
}
:
${
info
.
isSource
}
`
if
(
this
.
markers
[
snSourceType
]){
this
.
markers
[
snSourceType
].
setPosition
(
mapService
.
getLngLat
(
parseFloat
(
transferObj
.
elng
),
parseFloat
(
transferObj
.
elat
)));
this
.
infowins
[
snSourceType
].
setPosition
(
mapService
.
getLngLat
(
parseFloat
(
transferObj
.
elng
),
parseFloat
(
transferObj
.
elat
)));
}
gpsBtn
&&
gpsBtn
.
classList
.
remove
(
'el-button--primary'
);
baseBtn
&&
baseBtn
.
classList
.
remove
(
'el-button--primary'
);
wifiBtn
&&
wifiBtn
.
classList
.
add
(
'el-button--primary'
);
info
.
eLocateType
=
'wifi'
}
else
{
Message
({
type
:
'info'
,
message
:
'暂无wifi数据'
});
}
}
EventBus
.
$emit
(
'uiMap.monitor.drawDone'
);
})
})
},
},
draw
(
data
,
autoOpenLastInfoWindow
){
draw
(
data
,
autoOpenLastInfoWindow
){
const
MAP
=
mapService
.
map
;
const
MAP
=
mapService
.
map
;
...
@@ -102,10 +142,10 @@ const monitor = {
...
@@ -102,10 +142,10 @@ const monitor = {
const
transferObj
=
[]
const
transferObj
=
[]
data
.
forEach
((
item
)
=>
{
data
.
forEach
((
item
)
=>
{
if
(
item
.
gpsLocation
.
elat
&&
item
.
gpsLocation
.
elng
){
if
(
item
.
gpsLocation
&&
item
.
gpsLocation
.
elat
&&
item
.
gpsLocation
.
elng
){
transferObj
.
push
(
item
.
gpsLocation
)
transferObj
.
push
(
item
.
gpsLocation
)
}
}
if
(
item
.
bsLocation
.
elat
&&
item
.
bsLocation
.
elng
){
if
(
item
.
bsLocation
&&
item
.
bsLocation
.
elat
&&
item
.
bsLocation
.
elng
){
transferObj
.
push
(
item
.
bsLocation
)
transferObj
.
push
(
item
.
bsLocation
)
}
}
})
})
...
...
src/utils/remoteLoad.js
View file @
88012d4
...
@@ -17,9 +17,6 @@ export default function remoteLoad (url, hasCallback) {
...
@@ -17,9 +17,6 @@ export default function remoteLoad (url, hasCallback) {
scriptElement
.
addEventListener
(
'load'
,
e
=>
{
scriptElement
.
addEventListener
(
'load'
,
e
=>
{
removeScript
(
scriptElement
)
removeScript
(
scriptElement
)
resolve
(
e
)
resolve
(
e
)
// if (!hasCallback) {
// resolve(e)
// }
},
false
)
},
false
)
scriptElement
.
addEventListener
(
'error'
,
e
=>
{
scriptElement
.
addEventListener
(
'error'
,
e
=>
{
...
...
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