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
d0345395
Commit
d0345395
authored
Oct 25, 2022
by
xxx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
43ac3573
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
23 deletions
+38
-23
Map2.vue
src/components/mars3d/Map2.vue
+26
-7
index.vue
src/views/carManagement/carTrajectory/index.vue
+12
-16
No files found.
src/components/mars3d/Map2.vue
View file @
d0345395
...
@@ -28,6 +28,7 @@ Vue.prototype.Cesium = mars3d.Cesium
...
@@ -28,6 +28,7 @@ Vue.prototype.Cesium = mars3d.Cesium
var
map
;
var
map
;
//画测距属性
//画测距属性
var
graphicLayerPolyline
;
var
graphicLayerPolyline
;
var
currentTimeInterval
=
null
;
export
default
{
export
default
{
name
:
'
mars3dViewer
'
,
name
:
'
mars3dViewer
'
,
...
@@ -94,7 +95,6 @@ export default {
...
@@ -94,7 +95,6 @@ export default {
that
.
deviceId
=
equipmentName
;
that
.
deviceId
=
equipmentName
;
that
.
carNumber
=
number
;
that
.
carNumber
=
number
;
that
.
carPlaySpeed
=
speed
;
that
.
carPlaySpeed
=
speed
;
console
.
log
(
that
.
carPlaySpeed
);
that
.
stopPointData
=
stopPointData
;
that
.
stopPointData
=
stopPointData
;
that
.
leadTime
=
leadTimeShow
;
that
.
leadTime
=
leadTimeShow
;
//获取历史轨迹
//获取历史轨迹
...
@@ -168,7 +168,7 @@ export default {
...
@@ -168,7 +168,7 @@ export default {
"
vrButton
"
:
false
,
"
vrButton
"
:
false
,
"
fullscreenButton
"
:
true
,
"
fullscreenButton
"
:
true
,
"
navigationHelpButton
"
:
true
,
"
navigationHelpButton
"
:
true
,
"
animation
"
:
tru
e
,
"
animation
"
:
fals
e
,
"
timeline
"
:
false
,
"
timeline
"
:
false
,
"
infoBox
"
:
false
,
"
infoBox
"
:
false
,
"
geocoder
"
:
false
,
"
geocoder
"
:
false
,
...
@@ -196,7 +196,8 @@ export default {
...
@@ -196,7 +196,8 @@ export default {
scene
:{
scene
:{
"
clock
"
:{
"
clock
"
:{
currentTime
:
that
.
currentTime1
(
that
.
historyTrajectoryData
[
0
].
arrays
[
0
][
3
]),
currentTime
:
that
.
currentTime1
(
that
.
historyTrajectoryData
[
0
].
arrays
[
0
][
3
]),
shouldAnimate
:
true
shouldAnimate
:
true
,
multiplier
:
1
,
},
},
"
center
"
:
{
"
lat
"
:
37.4900
,
"
lng
"
:
122.04849
,
"
alt
"
:
1000
,
"
heading
"
:
360
,
"
pitch
"
:
-
90
},
"
center
"
:
{
"
lat
"
:
37.4900
,
"
lng
"
:
122.04849
,
"
alt
"
:
1000
,
"
heading
"
:
360
,
"
pitch
"
:
-
90
},
"
scene3DOnly
"
:
false
,
"
scene3DOnly
"
:
false
,
...
@@ -258,9 +259,9 @@ export default {
...
@@ -258,9 +259,9 @@ export default {
})
})
//画测距
//画测距
graphicLayerPolyline
=
new
mars3d
.
layer
.
GraphicLayer
();
//
graphicLayerPolyline = new mars3d.layer.GraphicLayer();
//that.bindLayerContextMenu(graphicLayerPolyline);
//that.bindLayerContextMenu(graphicLayerPolyline);
map
.
addLayer
(
graphicLayerPolyline
);
//
map.addLayer(graphicLayerPolyline);
// 抛出事件
// 抛出事件
this
.
$emit
(
'
onload
'
,
map
)
this
.
$emit
(
'
onload
'
,
map
)
...
@@ -278,6 +279,11 @@ export default {
...
@@ -278,6 +279,11 @@ export default {
property
.
addSample
(
tempTime
,
Cesium
.
Cartesian3
.
fromDegrees
(
positions
[
i
][
0
],
positions
[
i
][
1
],
positions
[
i
][
2
]));
property
.
addSample
(
tempTime
,
Cesium
.
Cartesian3
.
fromDegrees
(
positions
[
i
][
0
],
positions
[
i
][
1
],
positions
[
i
][
2
]));
}
}
//将当前进度时间传给父组件
currentTimeInterval
=
setInterval
(
function
(){
that
.
$parent
.
progressTimeFn
(
that
.
currentTime1
(
map
.
clock
.
currentTime
));
},
1000
)
var
graphic
=
new
mars3d
.
graphic
.
PathEntity
({
var
graphic
=
new
mars3d
.
graphic
.
PathEntity
({
position
:
property
,
position
:
property
,
style
:
{
style
:
{
...
@@ -471,7 +477,6 @@ export default {
...
@@ -471,7 +477,6 @@ export default {
// text: "计算长度",
// text: "计算长度",
// icon: "fa fa-medium",
// icon: "fa fa-medium",
// callback: (e) => {
// callback: (e) => {
// console.log(e);
// const graphic = e.graphic
// const graphic = e.graphic
// const strDis = mars3d.MeasureUtil.formatDistance(graphic.distance)
// const strDis = mars3d.MeasureUtil.formatDistance(graphic.distance)
// alert("该对象的长度为:" + strDis)
// alert("该对象的长度为:" + strDis)
...
@@ -539,8 +544,22 @@ export default {
...
@@ -539,8 +544,22 @@ export default {
}
}
//获取当前系统时间 格式(yyyy-mm-dd hh:mm:ss)
//获取当前系统时间 格式(yyyy-mm-dd hh:mm:ss)
let
currentFormatDate
=
year
+
"
-
"
+
month
+
"
-
"
+
day
+
"
"
+
hours
+
"
:
"
+
minutes
+
"
:
"
+
seconds
;
let
currentFormatDate
=
year
+
"
-
"
+
month
+
"
-
"
+
day
+
"
"
+
hours
+
"
:
"
+
minutes
+
"
:
"
+
seconds
;
//console.log(currentFormatDate);
return
currentFormatDate
;
return
currentFormatDate
;
},
//暂停继续
pauseResume
(
boo
){
map
.
clock
.
shouldAnimate
=
boo
;
},
//改变倍速
changeSpeed
(
num
){
map
.
clock
.
multiplier
=
parseInt
(
num
);
},
//清除定时器
closeInterval
(){
if
(
currentTimeInterval
){
clearInterval
(
currentTimeInterval
)
currentTimeInterval
=
null
;
}
}
}
}
}
}
}
...
...
src/views/carManagement/carTrajectory/index.vue
View file @
d0345395
...
@@ -34,8 +34,8 @@
...
@@ -34,8 +34,8 @@
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-button
style=
"display: inline-block;"
>
暂停
</el-button>
<el-button
style=
"display: inline-block;"
@
click=
"pauseResume(false)"
>
暂停
</el-button>
<el-button
style=
"display: inline-block;"
>
继续
</el-button>
<el-button
style=
"display: inline-block;"
@
click=
"pauseResume(true)"
>
继续
</el-button>
<el-button
type=
"primary"
@
click=
"changeSpeed(1)"
plain
>
1倍
</el-button>
<el-button
type=
"primary"
@
click=
"changeSpeed(1)"
plain
>
1倍
</el-button>
<el-button
type=
"primary"
@
click=
"changeSpeed(4)"
plain
>
4倍
</el-button>
<el-button
type=
"primary"
@
click=
"changeSpeed(4)"
plain
>
4倍
</el-button>
<el-button
type=
"primary"
@
click=
"changeSpeed(8)"
plain
>
8倍
</el-button>
<el-button
type=
"primary"
@
click=
"changeSpeed(8)"
plain
>
8倍
</el-button>
...
@@ -216,6 +216,7 @@ export default {
...
@@ -216,6 +216,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
.
closeInterval
();
this
.
$refs
.
mars3dViewerMapMethod
.
getCoordinate
(
''
,
''
,
1
,
''
,
''
,[],
this
.
leadTime
);
this
.
$refs
.
mars3dViewerMapMethod
.
getCoordinate
(
''
,
''
,
1
,
''
,
''
,[],
this
.
leadTime
);
this
.
measureDistanceDis
=
true
;
this
.
measureDistanceDis
=
true
;
},
},
...
@@ -255,20 +256,7 @@ export default {
...
@@ -255,20 +256,7 @@ export default {
},
},
//改变倍速
//改变倍速
changeSpeed
(
num
){
changeSpeed
(
num
){
let
that
=
this
;
this
.
$refs
.
mars3dViewerMapMethod
.
changeSpeed
(
num
);
let
numSpeed1
=
parseFloat
(
num
);
this
.
playSpeedNum
=
parseFloat
(
num
);
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
,
parseFloat
(
numSpeed1
),
that
.
query
.
bTime
,
that
.
query
.
eTime
,
that
.
trajectoryTableData
,
that
.
leadTime
);
}
})
}
},
},
//开测量距离
//开测量距离
measureDistance
(){
measureDistance
(){
...
@@ -302,6 +290,14 @@ export default {
...
@@ -302,6 +290,14 @@ export default {
this
.
query
.
number
=
''
;
this
.
query
.
number
=
''
;
}
}
},
},
//暂停继续
pauseResume
(
boo
){
this
.
$refs
.
mars3dViewerMapMethod
.
pauseResume
(
boo
);
},
//接收当前进度时间
progressTimeFn
(
time
){
console
.
log
(
time
);
},
// 地图构造完成回调
// 地图构造完成回调
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