Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
NewTruckTerminalSyetem
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
SQL_Mou
NewTruckTerminalSyetem
Commits
0643ba38
Commit
0643ba38
authored
Nov 21, 2022
by
xxx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
b384a68c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
81 additions
and
12 deletions
+81
-12
kongzhidian1.png
src/assets/images/truckTuPian/kongzhidian1.png
+0
-0
Map.vue
src/components/mars3d/Map.vue
+71
-7
index.vue
src/views/MLargeScreen/index.vue
+10
-5
No files found.
src/assets/images/truckTuPian/kongzhidian1.png
0 → 100644
View file @
0643ba38
11.6 KB
src/components/mars3d/Map.vue
View file @
0643ba38
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<
script
>
<
script
>
import
Vue
from
'
vue
'
import
Vue
from
'
vue
'
import
{
httpGet
,
httpPostForJson
}
from
"
@/common/httpBean.js
"
;
import
{
httpGet
,
httpPostForJson
}
from
"
@/common/httpBean.js
"
;
import
{
screenMapSetUpQuery
,
carRealTimeLocationQuery2
,
vehicleInformationQuery
,
apiCarClassQuery
}
from
"
@/axios/api.js
"
;
import
{
screenMapSetUpQuery
,
carRealTimeLocationQuery2
,
vehicleInformationQuery
,
apiCarClassQuery
,
apiCpointQuery
}
from
"
@/axios/api.js
"
;
// 使用免费开源版本
// 使用免费开源版本
import
'
mars3d/dist/mars3d.css
'
import
'
mars3d/dist/mars3d.css
'
...
@@ -17,6 +17,10 @@ import * as mars3d from 'mars3d'
...
@@ -17,6 +17,10 @@ import * as mars3d from 'mars3d'
import
*
as
Cesium
from
'
mars3d-cesium/Build/Cesium/Cesium
'
import
*
as
Cesium
from
'
mars3d-cesium/Build/Cesium/Cesium
'
import
{
initGraphicManager
,
initLayerManager
,
bindLayerContextMenu
,
bindLayerPopup
}
from
'
./js/graphicManager
'
import
{
initGraphicManager
,
initLayerManager
,
bindLayerContextMenu
,
bindLayerPopup
}
from
'
./js/graphicManager
'
import
ddd
from
'
../../assets/images/truckTuPian/qiche1.png
'
import
ddd
from
'
../../assets/images/truckTuPian/qiche1.png
'
import
zhuangchetubiao
from
'
../../assets/images/truckTuPian/zhuangchedian1.png
'
import
xiechetubiao
from
'
../../assets/images/truckTuPian/xiechedian1.png
'
import
kongzhidiantubiao
from
'
../../assets/images/truckTuPian/kongzhidian1.png
'
import
luzhangtubiao
from
'
../../assets/images/truckTuPian/luzhang.png
'
// 为了方便使用,绑定到原型链,在其他vue文件,直接 this.mars3d 来使用
// 为了方便使用,绑定到原型链,在其他vue文件,直接 this.mars3d 来使用
Vue
.
prototype
.
mars3d
=
mars3d
Vue
.
prototype
.
mars3d
=
mars3d
...
@@ -26,9 +30,8 @@ var map;
...
@@ -26,9 +30,8 @@ var map;
//画导航线
//画导航线
var
graphicLayerZ
;
var
graphicLayerZ
;
var
graphicZ
;
var
graphicZ
;
//路障展示
//路障展示
图层
var
graphicLayerR
;
var
graphicLayerR
;
var
graphicR
;
export
default
{
export
default
{
name
:
'
mars3dViewer
'
,
name
:
'
mars3dViewer
'
,
...
@@ -115,9 +118,15 @@ export default {
...
@@ -115,9 +118,15 @@ export default {
this
.
allCarInforData
=
arr11
;
this
.
allCarInforData
=
arr11
;
//获取所有关键控制点信息
//获取所有关键控制点信息
httpGet
(
apiCpointQuery
,{
size
:
9999
}).
then
((
res
)
=>
{
httpGet
(
apiCpointQuery
,{
size
:
9999
}).
then
((
res2
)
=>
{
if
(
res
.
code
==
200
){
if
(
res2
.
code
==
200
){
this
.
mapControlPointData
=
res
.
data
.
content
;
let
arr2
=
[];
res2
.
data
.
content
.
forEach
((
item2
,
index2
)
=>
{
if
(
item2
.
type
!=
"
控制点
"
){
arr2
.
push
(
item2
);
}
})
this
.
mapControlPointData
=
arr2
;
this
.
getCoordinate
();
this
.
getCoordinate
();
}
}
})
})
...
@@ -200,6 +209,14 @@ export default {
...
@@ -200,6 +209,14 @@ export default {
that
.
addDemoGraphics
(
graphicLayer4
,
item
.
number
,
item
.
equipmentName
,
item
.
carclass
,
item
.
pic
,
item
.
status
);
that
.
addDemoGraphics
(
graphicLayer4
,
item
.
number
,
item
.
equipmentName
,
item
.
carclass
,
item
.
pic
,
item
.
status
);
})
})
//装车点卸车点位置
that
.
mapControlPointData
.
forEach
(
function
(
item
,
index
){
var
graphicLayer
=
new
mars3d
.
layer
.
GraphicLayer
();
map
.
addLayer
(
graphicLayer
);
that
.
addDemoGraphic4
(
graphicLayer
,
item
);
})
// 抛出事件
// 抛出事件
this
.
$emit
(
'
onload
'
,
map
)
this
.
$emit
(
'
onload
'
,
map
)
},
},
...
@@ -307,9 +324,56 @@ export default {
...
@@ -307,9 +324,56 @@ export default {
graphicLayerZ
.
removeGraphic
(
graphicZ
);
graphicLayerZ
.
removeGraphic
(
graphicZ
);
}
}
},
},
//装车点卸车点位置
addDemoGraphic4
(
graphicLayer
,
item
)
{
const
graphic
=
new
mars3d
.
graphic
.
BillboardEntity
({
name
:
item
.
name
,
position
:
[
item
.
lon
,
item
.
lat
,
1000
],
style
:
{
image
:
item
.
type
==
'
装车点
'
?
zhuangchetubiao
:
item
.
type
==
'
卸车点
'
?
xiechetubiao
:
kongzhidiantubiao
,
scale
:
0.15
,
horizontalOrigin
:
Cesium
.
HorizontalOrigin
.
CENTER
,
verticalOrigin
:
Cesium
.
VerticalOrigin
.
BOTTOM
,
clampToGround
:
true
,
label
:
{
text
:
item
.
name
,
pixelOffsetY
:
-
40
,
color
:
'
blue
'
,
distanceDisplayCondition
:
true
,
distanceDisplayCondition_far
:
30000
,
distanceDisplayCondition_near
:
0
},
},
})
graphicLayer
.
addGraphic
(
graphic
)
},
//路障展示
//路障展示
roadblockShowFn
(
arr
){
roadblockShowFn
(
arr
){
map
.
removeLayer
(
graphicLayerR
);
graphicLayerR
=
new
mars3d
.
layer
.
GraphicLayer
();
map
.
addLayer
(
graphicLayerR
);
arr
.
forEach
((
item
,
index
)
=>
{
const
graphic
=
new
mars3d
.
graphic
.
BillboardEntity
({
name
:
item
.
carcode
+
index
,
position
:
[
item
.
lon
,
item
.
lat
,
1000
],
style
:
{
image
:
luzhangtubiao
,
scale
:
1
,
horizontalOrigin
:
Cesium
.
HorizontalOrigin
.
CENTER
,
verticalOrigin
:
Cesium
.
VerticalOrigin
.
BOTTOM
,
clampToGround
:
true
,
label
:
{
text
:
"
路障
"
,
pixelOffsetY
:
-
40
,
color
:
'
yellow
'
,
distanceDisplayCondition
:
true
,
distanceDisplayCondition_far
:
30000
,
distanceDisplayCondition_near
:
0
},
},
})
graphicLayerR
.
addGraphic
(
graphic
)
})
},
},
// 在图层绑定Popup弹窗
// 在图层绑定Popup弹窗
bindLayerPopup
(
graphicLayer
,
number
)
{
bindLayerPopup
(
graphicLayer
,
number
)
{
...
...
src/views/MLargeScreen/index.vue
View file @
0643ba38
...
@@ -221,9 +221,14 @@ export default {
...
@@ -221,9 +221,14 @@ export default {
}
}
}
}
});
});
//获取路障信息failureDeclarationAdd
//获取路障信息
httpGet
(
failureDeclarationAdd
,{
fault
:
'
路障申报
'
,
createTime
:
this
.
currentTime
()}).
then
((
res
)
=>
{
httpGet
(
failureDeclarationAdd
,{
fault
:
'
路障申报
'
,
createTime
:
this
.
currentTimeFn
()}).
then
((
res
)
=>
{
console
.
log
(
res
);
if
(
res
.
code
==
200
){
if
(
res
.
data
.
totalElements
>
this
.
roadblockNum
){
this
.
roadblockNum
=
res
.
data
.
totalElements
;
this
.
$refs
.
mars3dViewerMapMethod
.
roadblockShowFn
(
res
.
data
.
content
);
}
}
})
})
},
8000
)
},
8000
)
...
@@ -241,7 +246,7 @@ export default {
...
@@ -241,7 +246,7 @@ export default {
this
.
carnumber
=
res
.
data
.
content
[
0
].
car
;
this
.
carnumber
=
res
.
data
.
content
[
0
].
car
;
this
.
personalName
=
res
.
data
.
content
[
0
].
name
;
this
.
personalName
=
res
.
data
.
content
[
0
].
name
;
//展示二维地图
//展示二维地图
//
this.$refs.mars3dViewerMapMethod.getCarInforFn(this.carnumber);
this
.
$refs
.
mars3dViewerMapMethod
.
getCarInforFn
(
this
.
carnumber
);
//开启接受订单
//开启接受订单
this
.
$refs
.
startOrderReceivingMethod
.
loadData
(
this
.
carnumber
);
this
.
$refs
.
startOrderReceivingMethod
.
loadData
(
this
.
carnumber
);
//开启语音接收
//开启语音接收
...
@@ -672,7 +677,7 @@ export default {
...
@@ -672,7 +677,7 @@ export default {
this
.
$refs
.
voiceApplicationMethod
.
selectDeleteSituation
(
index
);
this
.
$refs
.
voiceApplicationMethod
.
selectDeleteSituation
(
index
);
},
},
//获取当前时间
//获取当前时间
currentTime
(){
currentTime
Fn
(){
var
date
=
new
Date
();
var
date
=
new
Date
();
var
year
=
date
.
getFullYear
();
//年 ,从 Date 对象以四位数字返回年份
var
year
=
date
.
getFullYear
();
//年 ,从 Date 对象以四位数字返回年份
var
month
=
date
.
getMonth
()
+
1
;
//月 ,从 Date 对象返回月份 (0 ~ 11) ,date.getMonth()比实际月份少 1 个月
var
month
=
date
.
getMonth
()
+
1
;
//月 ,从 Date 对象返回月份 (0 ~ 11) ,date.getMonth()比实际月份少 1 个月
...
...
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