Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
卡
卡车调度系统
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
caicaicai
卡车调度系统
Commits
f7e46e64
Commit
f7e46e64
authored
Oct 24, 2022
by
xxx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
fd5b0fc0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
15 deletions
+39
-15
Map2.vue
src/components/mars3d/Map2.vue
+13
-11
index.vue
src/views/carManagement/carTrajectory/index.vue
+26
-4
No files found.
src/components/mars3d/Map2.vue
View file @
f7e46e64
...
@@ -89,12 +89,13 @@ export default {
...
@@ -89,12 +89,13 @@ export default {
methods
:
{
methods
:
{
//获取数据
//获取数据
getCoordinate
(
equipmentName
,
number
,
speed
,
bTime
,
eTime
,
stopPointData
)
{
getCoordinate
(
equipmentName
,
number
,
speed
,
bTime
,
eTime
,
stopPointData
,
leadTimeShow
)
{
let
that
=
this
;
let
that
=
this
;
that
.
deviceId
=
equipmentName
;
that
.
deviceId
=
equipmentName
;
that
.
carNumber
=
number
;
that
.
carNumber
=
number
;
that
.
carPlaySpeed
=
speed
;
that
.
carPlaySpeed
=
speed
;
that
.
stopPointData
=
stopPointData
;
that
.
stopPointData
=
stopPointData
;
that
.
leadTime
=
leadTimeShow
;
//获取历史轨迹
//获取历史轨迹
if
(
number
==
''
){
if
(
number
==
''
){
return
return
...
@@ -155,7 +156,6 @@ export default {
...
@@ -155,7 +156,6 @@ export default {
//创建地图电子围栏
//创建地图电子围栏
initMars3d
(
options
)
{
initMars3d
(
options
)
{
let
that
=
this
;
let
that
=
this
;
//if (this[`map${this.mapKey}`]) return
const
mapOptions
=
{
const
mapOptions
=
{
...
options
,
...
options
,
...
@@ -222,6 +222,7 @@ export default {
...
@@ -222,6 +222,7 @@ export default {
color
:
"
rgb(251,84,48)
"
,
color
:
"
rgb(251,84,48)
"
,
opacity
:
1.0
,
opacity
:
1.0
,
leadTime
:
that
.
leadTime
?
9999
:
0
,
// 前方的路线不显示
leadTime
:
that
.
leadTime
?
9999
:
0
,
// 前方的路线不显示
trailTime
:
that
.
leadTime
?
9999
:
0
,
//高亮时的样式(默认为鼠标移入,也可以指定type:'click'单击高亮),构造后也可以openHighlight、closeHighlight方法来手动调用
//高亮时的样式(默认为鼠标移入,也可以指定type:'click'单击高亮),构造后也可以openHighlight、closeHighlight方法来手动调用
highlight
:
{
highlight
:
{
type
:
mars3d
.
EventType
.
click
,
type
:
mars3d
.
EventType
.
click
,
...
@@ -402,15 +403,16 @@ export default {
...
@@ -402,15 +403,16 @@ export default {
}
}
},
},
callback
:
(
e
)
=>
{
callback
:
(
e
)
=>
{
const
graphic
=
e
.
graphic
// const graphic = e.graphic
if
(
!
graphic
)
{
// if (!graphic) {
return
// return
}
// }
const
parent
=
graphic
.
parent
// 右击是编辑点时
// const parent = graphic.parent // 右击是编辑点时
graphicLayer
.
removeGraphic
(
graphic
)
// graphicLayer.removeGraphic(graphic)
if
(
parent
)
{
// if (parent) {
graphicLayer
.
removeGraphic
(
parent
)
// graphicLayer.removeGraphic(parent)
}
// }
// map.removeLayer(graphicLayer);
}
}
},
},
// {
// {
...
...
src/views/carManagement/carTrajectory/index.vue
View file @
f7e46e64
...
@@ -54,6 +54,11 @@
...
@@ -54,6 +54,11 @@
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
""
style=
"display: inline-block;"
>
<el-button
type=
"primary"
@
click=
"trajectoryShow(true)"
plain
>
显示所有轨迹
</el-button>
<el-button
type=
"primary"
@
click=
"trajectoryShow(false)"
plain
>
关闭所有轨迹
</el-button>
</el-form-item>
</el-form>
</el-form>
<div
id=
"centerDiv"
class=
"mapcontainer2"
>
<div
id=
"centerDiv"
class=
"mapcontainer2"
>
<mars3dViewerMap
:url=
"configUrl"
@
onload=
"onMapload"
ref=
"mars3dViewerMapMethod"
:key=
"shuaxinTimer"
/>
<mars3dViewerMap
:url=
"configUrl"
@
onload=
"onMapload"
ref=
"mars3dViewerMapMethod"
:key=
"shuaxinTimer"
/>
...
@@ -102,6 +107,7 @@ export default {
...
@@ -102,6 +107,7 @@ export default {
tishiTextShow
:
true
,
tishiTextShow
:
true
,
trajectoryTableData
:[],
trajectoryTableData
:[],
measureDistanceDis
:
true
,
measureDistanceDis
:
true
,
leadTime
:
false
,
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -137,7 +143,7 @@ export default {
...
@@ -137,7 +143,7 @@ export default {
if
(
res
.
code
==
200
&&
res
.
data
.
totalElements
!=
0
){
if
(
res
.
code
==
200
&&
res
.
data
.
totalElements
!=
0
){
this
.
tishiTextShow
=
false
;
this
.
tishiTextShow
=
false
;
this
.
shuaxinTimer
=
new
Date
().
getTime
();
this
.
shuaxinTimer
=
new
Date
().
getTime
();
that
.
$refs
.
mars3dViewerMapMethod
.
getCoordinate
(
res
.
data
.
content
[
0
].
equipmentName
,
res
.
data
.
content
[
0
].
number
,
that
.
playSpeedNum
,
that
.
query
.
bTime
,
that
.
query
.
eTime
,
this
.
trajectoryTableData
);
that
.
$refs
.
mars3dViewerMapMethod
.
getCoordinate
(
res
.
data
.
content
[
0
].
equipmentName
,
res
.
data
.
content
[
0
].
number
,
that
.
playSpeedNum
,
that
.
query
.
bTime
,
that
.
query
.
eTime
,
this
.
trajectoryTableData
,
this
.
leadTime
);
}
else
{
}
else
{
this
.
$notify
({
this
.
$notify
({
title
:
'
暂无该车辆轨迹信息!
'
,
title
:
'
暂无该车辆轨迹信息!
'
,
...
@@ -186,7 +192,7 @@ export default {
...
@@ -186,7 +192,7 @@ export default {
this
.
measureDistanceDis
=
false
;
this
.
measureDistanceDis
=
false
;
this
.
trajectoryTableData
=
res1
.
data
;
this
.
trajectoryTableData
=
res1
.
data
;
this
.
shuaxinTimer
=
new
Date
().
getTime
();
this
.
shuaxinTimer
=
new
Date
().
getTime
();
that
.
$refs
.
mars3dViewerMapMethod
.
getCoordinate
(
res
.
data
.
content
[
0
].
equipmentName
,
res
.
data
.
content
[
0
].
number
,
that
.
playSpeedNum
,
that
.
query
.
bTime
,
that
.
query
.
eTime
,
this
.
trajectoryTableData
);
that
.
$refs
.
mars3dViewerMapMethod
.
getCoordinate
(
res
.
data
.
content
[
0
].
equipmentName
,
res
.
data
.
content
[
0
].
number
,
that
.
playSpeedNum
,
that
.
query
.
bTime
,
that
.
query
.
eTime
,
this
.
trajectoryTableData
,
this
.
leadTime
);
}
}
})
})
}
else
{
}
else
{
...
@@ -214,7 +220,7 @@ export default {
...
@@ -214,7 +220,7 @@ export default {
this
.
loadData
();
this
.
loadData
();
this
.
tishiTextShow
=
true
;
this
.
tishiTextShow
=
true
;
this
.
shuaxinTimer
=
new
Date
().
getTime
();
this
.
shuaxinTimer
=
new
Date
().
getTime
();
this
.
$refs
.
mars3dViewerMapMethod
.
getCoordinate
(
''
,
''
,
5
,
''
,
''
,[]);
this
.
$refs
.
mars3dViewerMapMethod
.
getCoordinate
(
''
,
''
,
5
,
''
,
''
,[]
,
this
.
leadTime
);
this
.
measureDistanceDis
=
true
;
this
.
measureDistanceDis
=
true
;
},
},
//获取数据
//获取数据
...
@@ -252,7 +258,7 @@ export default {
...
@@ -252,7 +258,7 @@ export default {
if
(
res
.
code
==
200
){
if
(
res
.
code
==
200
){
this
.
tishiTextShow
=
false
;
this
.
tishiTextShow
=
false
;
this
.
shuaxinTimer
=
new
Date
().
getTime
();
this
.
shuaxinTimer
=
new
Date
().
getTime
();
that
.
$refs
.
mars3dViewerMapMethod
.
getCoordinate
(
res
.
data
.
content
[
0
].
equipmentName
,
res
.
data
.
content
[
0
].
number
,
parseFloat
(
numSpeed1
),
that
.
query
.
bTime
,
that
.
query
.
eTime
,
th
is
.
trajectoryTableData
);
that
.
$refs
.
mars3dViewerMapMethod
.
getCoordinate
(
res
.
data
.
content
[
0
].
equipmentName
,
res
.
data
.
content
[
0
].
number
,
parseFloat
(
numSpeed1
),
that
.
query
.
bTime
,
that
.
query
.
eTime
,
th
at
.
trajectoryTableData
,
that
.
leadTime
);
}
}
})
})
}
}
...
@@ -265,6 +271,22 @@ export default {
...
@@ -265,6 +271,22 @@ export default {
measureDistanceClose
(){
measureDistanceClose
(){
this
.
$refs
.
mars3dViewerMapMethod
.
startDrawGraphic
(
false
);
this
.
$refs
.
mars3dViewerMapMethod
.
startDrawGraphic
(
false
);
},
},
//轨迹显示与否
trajectoryShow
(
boo
){
let
that
=
this
;
this
.
leadTime
=
boo
;
if
(
this
.
query
.
number
==
''
||
this
.
query
.
bTime
==
''
||
this
.
query
.
eTime
==
''
){
return
;
}
else
{
HttpReq
.
truckDispatching
.
carInformationQuery
({
number
:
this
.
query
.
number
}).
then
((
res
)
=>
{
if
(
res
.
code
==
200
){
this
.
tishiTextShow
=
false
;
this
.
shuaxinTimer
=
new
Date
().
getTime
();
that
.
$refs
.
mars3dViewerMapMethod
.
getCoordinate
(
res
.
data
.
content
[
0
].
equipmentName
,
res
.
data
.
content
[
0
].
number
,
that
.
playSpeedNum
,
that
.
query
.
bTime
,
that
.
query
.
eTime
,
that
.
trajectoryTableData
,
that
.
leadTime
);
}
})
}
},
// 地图构造完成回调
// 地图构造完成回调
onMapload
(
map
)
{
onMapload
(
map
)
{
// 以下为演示代码
// 以下为演示代码
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment