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
b1f1d06b
Commit
b1f1d06b
authored
Apr 06, 2022
by
caicaicai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
d14e4a4b
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
1379 additions
and
11 deletions
+1379
-11
config.json
public/config/config.json
+348
-0
common.js
src/assets/js/common.js
+31
-0
Map.vue
src/components/mars3d/Map.vue
+525
-0
graphicManager.js
src/components/mars3d/js/graphicManager.js
+392
-0
index.vue
src/views/MLargeScreen/index.vue
+58
-2
vue.config.js
vue.config.js
+25
-9
No files found.
public/config/config.json
0 → 100644
View file @
b1f1d06b
{
"map3d"
:
{
"scene"
:
{
"center"
:
{
"lat"
:
39.276448
,
"lng"
:
115.358833
,
"alt"
:
2784
,
"heading"
:
360
,
"pitch"
:
-90
},
"scene3DOnly"
:
false
,
"shadows"
:
false
,
"removeDblClick"
:
true
,
"sceneMode"
:
2
,
"showSun"
:
true
,
"showMoon"
:
true
,
"showSkyBox"
:
true
,
"showSkyAtmosphere"
:
true
,
"fog"
:
true
,
"fxaa"
:
true
,
"globe"
:
{
"depthTestAgainstTerrain"
:
false
,
"baseColor"
:
"#546a53"
,
"showGroundAtmosphere"
:
true
,
"enableLighting"
:
false
},
"cameraController"
:
{
"zoomFactor"
:
3.0
,
"minimumZoomDistance"
:
1
,
"maximumZoomDistance"
:
50000000
,
"enableRotate"
:
true
,
"enableTranslate"
:
true
,
"enableTilt"
:
true
,
"enableZoom"
:
true
,
"enableCollisionDetection"
:
true
,
"minimumCollisionTerrainHeight"
:
15000
}
},
"control"
:
{
"homeButton"
:
true
,
"baseLayerPicker"
:
true
,
"sceneModePicker"
:
false
,
"vrButton"
:
false
,
"fullscreenButton"
:
true
,
"navigationHelpButton"
:
true
,
"animation"
:
false
,
"timeline"
:
false
,
"infoBox"
:
false
,
"geocoder"
:
false
,
"geocoderConfig"
:
{
"key"
:
[
"ae29a37307840c7ae4a785ac905927e0"
]
},
"selectionIndicator"
:
false
,
"defaultContextMenu"
:
true
,
"mouseDownView"
:
true
,
"compass"
:
{
"bottom"
:
"240px"
,
"right"
:
"2px"
},
"distanceLegend"
:
{
"left"
:
"100px"
,
"bottom"
:
"0px"
},
"locationBar"
:
{
"fps"
:
true
,
"template"
:
"<div>经度:{lng}</div> <div>纬度:{lat}</div><div>海拔:{alt}米</div> <div>层级:{level}</div><div>方向:{heading}度</div> <div>俯仰角:{pitch}度</div><div>视高:{cameraHeight}米</div>"
}
},
"terrain"
:
{
"url"
:
"//data.mars3d.cn/terrain"
,
"show"
:
true
},
"basemaps"
:
[
{
"id"
:
10
,
"name"
:
"地图底图"
,
"type"
:
"group"
},
{
"id"
:
2021
,
"pid"
:
10
,
"name"
:
"天地图影像"
,
"icon"
:
"http://mars3d.cn/example/img/basemaps/tdt_img.png"
,
"type"
:
"tdt"
,
"layer"
:
"img_d"
,
"key"
:
[
"9ae78c51a0a28f06444d541148496e36"
]
},
{
"pid"
:
10
,
"name"
:
"天地图电子"
,
"icon"
:
"http://mars3d.cn/example/img/basemaps/tdt_vec.png"
,
"type"
:
"group"
,
"layers"
:
[
{
"name"
:
"底图"
,
"type"
:
"tdt"
,
"layer"
:
"vec_d"
,
"key"
:
[
"9ae78c51a0a28f06444d541148496e36"
]
},
{
"name"
:
"注记"
,
"type"
:
"tdt"
,
"layer"
:
"vec_z"
,
"key"
:
[
"9ae78c51a0a28f06444d541148496e36"
]
}
]
},
{
"pid"
:
10
,
"name"
:
"高德影像"
,
"type"
:
"group"
,
"icon"
:
"http://mars3d.cn/example/img/basemaps/gaode_img.png"
,
"layers"
:
[
{
"name"
:
"底图"
,
"type"
:
"gaode"
,
"layer"
:
"img_d"
},
{
"name"
:
"注记"
,
"type"
:
"gaode"
,
"layer"
:
"img_z"
}
]
},
{
"pid"
:
10
,
"name"
:
"高德电子"
,
"type"
:
"gaode"
,
"icon"
:
"http://mars3d.cn/example/img/basemaps/gaode_vec.png"
,
"layer"
:
"vec"
},
{
"pid"
:
10
,
"name"
:
"百度影像"
,
"type"
:
"group"
,
"icon"
:
"http://mars3d.cn/example/img/basemaps/bd-img.png"
,
"layers"
:
[
{
"name"
:
"底图"
,
"type"
:
"baidu"
,
"layer"
:
"img_d"
},
{
"name"
:
"注记"
,
"type"
:
"baidu"
,
"layer"
:
"img_z"
}
]
},
{
"pid"
:
10
,
"name"
:
"百度电子"
,
"icon"
:
"http://mars3d.cn/example/img/basemaps/bd-vec.png"
,
"type"
:
"baidu"
,
"layer"
:
"vec"
},
{
"pid"
:
10
,
"name"
:
"腾讯影像"
,
"icon"
:
"http://mars3d.cn/example/img/basemaps/gaode_img.png"
,
"type"
:
"group"
,
"layers"
:
[
{
"name"
:
"底图"
,
"type"
:
"tencent"
,
"layer"
:
"img_d"
},
{
"name"
:
"注记"
,
"type"
:
"tencent"
,
"layer"
:
"img_z"
}
],
"show"
:
false
},
{
"pid"
:
10
,
"name"
:
"腾讯电子"
,
"icon"
:
"http://mars3d.cn/example/img/basemaps/gaode_vec.png"
,
"type"
:
"tencent"
,
"layer"
:
"vec"
},
{
"pid"
:
10
,
"name"
:
"ArcGIS影像"
,
"icon"
:
"http://mars3d.cn/example/img/basemaps/esriWorldImagery.png"
,
"type"
:
"xyz"
,
"url"
:
"https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"
,
"enablePickFeatures"
:
false
},
{
"pid"
:
10
,
"name"
:
"微软影像"
,
"icon"
:
"http://mars3d.cn/example/img/basemaps/bingAerial.png"
,
"type"
:
"bing"
,
"key"
:
"AuKhM0WRkjhX8E4y1OM0TukYycaw_4Vh3eSfXONDf7OARls-WEB3K_Rfx89bWxof"
,
"layer"
:
"Aerial"
},
{
"pid"
:
10
,
"name"
:
"OSM地图"
,
"type"
:
"xyz"
,
"icon"
:
"http://mars3d.cn/example/img/basemaps/osm.png"
,
"url"
:
"http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
,
"subdomains"
:
"abc"
},
{
"id"
:
2017
,
"pid"
:
10
,
"name"
:
"蓝色底图"
,
"icon"
:
"http://mars3d.cn/example/img/basemaps/bd-c-midnight.png"
,
"type"
:
"xyz"
,
"url"
:
"http://map.geoq.cn/arcgis/rest/services/ChinaOnlineStreetPurplishBlue/MapServer/tile/{z}/{y}/{x}"
,
"chinaCRS"
:
"GCJ02"
,
"enablePickFeatures"
:
false
},
{
"pid"
:
10
,
"name"
:
"黑色底图"
,
"icon"
:
"http://mars3d.cn/example/img/basemaps/bd-c-dark.png"
,
"type"
:
"tencent"
,
"layer"
:
"custom"
,
"style"
:
"4"
},
{
"pid"
:
10
,
"name"
:
"灰色底图"
,
"icon"
:
"http://mars3d.cn/example/img/basemaps/bd-c-grayscale.png"
,
"type"
:
"mapbox"
,
"username"
:
"marsgis"
,
"styleId"
:
"cki0a92b123qo1aluk0e5v7sb"
,
"scaleFactor"
:
true
},
{
"pid"
:
10
,
"name"
:
"离线地图 (供参考)"
,
"type"
:
"xyz"
,
"icon"
:
"http://mars3d.cn/example/img/basemaps/mapboxSatellite.png"
,
"url"
:
"//data.mars3d.cn/tile/googleImg/{z}/{x}/{y}.jpg"
,
"minimumLevel"
:
1
,
"maximumLevel"
:
18
,
"minimumTerrainLevel"
:
1
,
"maximumTerrainLevel"
:
18
,
"rectangle"
:
{
"xmin"
:
-180
,
"xmax"
:
180
,
"ymin"
:
-85
,
"ymax"
:
85
}
},
{
"pid"
:
10
,
"name"
:
"单张图片 (本地离线)"
,
"icon"
:
"http://mars3d.cn/example/img/basemaps/offline.png"
,
"type"
:
"image"
,
"url"
:
"//data.mars3d.cn/file/img/world/world.jpg"
}
],
"layers"
:
[
{
"id"
:
20
,
"name"
:
"辅助图层"
,
"type"
:
"group"
},
{
"pid"
:
20
,
"name"
:
"行政区划界线"
,
"type"
:
"xyz"
,
"url"
:
"https://t{s}.tianditu.gov.cn/DataServer?T=ibo_w&x={x}&y={y}&l={z}&tk=9ae78c51a0a28f06444d541148496e36"
,
"subdomains"
:
"01234567"
,
"maximumLevel"
:
10
,
"show"
:
false
},
{
"pid"
:
20
,
"name"
:
"天地图注记"
,
"type"
:
"tdt"
,
"layer"
:
"img_z"
,
"key"
:
[
"9ae78c51a0a28f06444d541148496e36"
],
"show"
:
false
},
{
"id"
:
30
,
"name"
:
"实时路况"
,
"type"
:
"group"
},
{
"pid"
:
30
,
"name"
:
"高德实时路况"
,
"type"
:
"gaode"
,
"layer"
:
"time"
,
"minimumTerrainLevel"
:
4
,
"minimumLevel"
:
4
,
"proxy"
:
"//server.mars3d.cn/proxy/"
},
{
"pid"
:
30
,
"name"
:
"百度实时路况"
,
"type"
:
"baidu"
,
"layer"
:
"time"
},
{
"pid"
:
10
,
"name"
:
"天地图电子"
,
"icon"
:
"http://mars3d.cn/example/img/basemaps/tdt_vec.png"
,
"type"
:
"group"
,
"layers"
:
[
{
"name"
:
"底图"
,
"type"
:
"tdt"
,
"layer"
:
"vec_d"
,
"key"
:
[
"9ae78c51a0a28f06444d541148496e36"
]
},
{
"name"
:
"注记"
,
"type"
:
"tdt"
,
"layer"
:
"vec_z"
,
"key"
:
[
"9ae78c51a0a28f06444d541148496e36"
]
}
],
"show"
:
false
},
{
"pid"
:
40
,
"name"
:
"单张图片 (本地离线)"
,
"icon"
:
"http://mars3d.cn/example/img/basemaps/offline.png"
,
"type"
:
"image"
,
"url"
:
"/dianziweilan/dianziweilan.jpg"
,
"rectangle"
:
{
"xmin"
:
115.34449339
,
"xmax"
:
115.383424
,
"ymin"
:
39.269255
,
"ymax"
:
39.2829251
},
"show"
:
true
}
]
}
}
\ No newline at end of file
src/assets/js/common.js
View file @
b1f1d06b
...
@@ -1847,6 +1847,37 @@ var HttpReq = function(){
...
@@ -1847,6 +1847,37 @@ var HttpReq = function(){
params
:
param
,
params
:
param
,
})
})
},
},
//大屏——地图的增删改查
screenMapSetUpQuery
:
function
(
param
){
return
request
({
url
:
'
/Weilan/list
'
,
method
:
'
get
'
,
params
:
param
,
})
},
screenMapSetUpAdd
:
function
(
data
){
return
request
({
url
:
'
/Weilan/addWeilan
'
,
method
:
'
POST
'
,
data
:
data
,
}).
then
((
res
)
=>
{
return
res
})
},
screenMapSetUpUpdate
:
function
(
data
){
return
request
({
url
:
'
/Weilan/updateWeilan
'
,
method
:
'
PUT
'
,
data
:
data
,
})
},
screenMapSetUpDel
:
function
(
data
){
return
request
({
url
:
'
/Weilan/delWeilan
'
,
method
:
'
Delete
'
,
data
:
data
,
})
},
...
...
src/components/mars3d/Map.vue
0 → 100644
View file @
b1f1d06b
This diff is collapsed.
Click to expand it.
src/components/mars3d/js/graphicManager.js
0 → 100644
View file @
b1f1d06b
This diff is collapsed.
Click to expand it.
src/views/MLargeScreen/index.vue
View file @
b1f1d06b
...
@@ -28,6 +28,9 @@
...
@@ -28,6 +28,9 @@
<div
class=
"carExample"
@
click=
"showSpecificInforFn()"
>
<div
class=
"carExample"
@
click=
"showSpecificInforFn()"
>
<span
class=
"el-icon-location"
></span>
<span
class=
"el-icon-location"
></span>
</div>
</div>
<div
id=
"centerDiv"
class=
"mapcontainer"
>
<mars3dViewerMap
:url=
"configUrl"
@
onload=
"onMapload"
/>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -38,6 +41,7 @@ import carManagement from './components/carManagement/index.vue' //车辆管理
...
@@ -38,6 +41,7 @@ import carManagement from './components/carManagement/index.vue' //车辆管理
import
intelligentSchedul
from
'
./components/intelligentSchedul/index.vue
'
//智能调度
import
intelligentSchedul
from
'
./components/intelligentSchedul/index.vue
'
//智能调度
import
dataAnalysis
from
'
./components/dataAnalysis/index.vue
'
//数据分析
import
dataAnalysis
from
'
./components/dataAnalysis/index.vue
'
//数据分析
import
carSpecificInfor
from
'
./components/carSpecificInfor/index.vue
'
//车辆信息弹框
import
carSpecificInfor
from
'
./components/carSpecificInfor/index.vue
'
//车辆信息弹框
import
mars3dViewerMap
from
'
../../components/mars3d/Map.vue
'
//地图
export
default
{
export
default
{
components
:
{
components
:
{
...
@@ -46,9 +50,13 @@ export default {
...
@@ -46,9 +50,13 @@ export default {
intelligentSchedul
,
intelligentSchedul
,
dataAnalysis
,
dataAnalysis
,
carSpecificInfor
,
carSpecificInfor
,
mars3dViewerMap
,
},
},
data
()
{
data
()
{
const
basePathUrl
=
window
.
basePathUrl
||
''
return
{
return
{
//地图图片
configUrl
:
basePathUrl
+
'
config/config.json
'
,
//时间
//时间
timer
:
null
,
timer
:
null
,
currentTime
:
''
,
currentTime
:
''
,
...
@@ -220,6 +228,44 @@ export default {
...
@@ -220,6 +228,44 @@ export default {
let
week
=
weeks
[
wk
];
let
week
=
weeks
[
wk
];
this
.
currentTime
=
yy
+
'
/
'
+
mm
+
'
/
'
+
dd
+
'
'
+
hou
+
'
:
'
+
min
+
'
:
'
+
sec
;
this
.
currentTime
=
yy
+
'
/
'
+
mm
+
'
/
'
+
dd
+
'
'
+
hou
+
'
:
'
+
min
+
'
:
'
+
sec
;
},
},
// 地图构造完成回调
onMapload
(
map
)
{
// 以下为演示代码
// 创建entity图层
const
graphicLayer
=
new
this
.
mars3d
.
layer
.
GraphicLayer
()
map
.
addLayer
(
graphicLayer
)
// 2.在layer上绑定监听事件
graphicLayer
.
on
(
this
.
mars3d
.
EventType
.
click
,
function
(
event
)
{
console
.
log
(
'
监听layer,单击了矢量对象
'
,
event
)
})
graphicLayer
.
on
(
this
.
mars3d
.
EventType
.
mouseOver
,
function
(
event
)
{
console
.
log
(
'
监听layer,鼠标移入了矢量对象
'
,
event
)
})
graphicLayer
.
on
(
this
.
mars3d
.
EventType
.
mouseOut
,
function
(
event
)
{
console
.
log
(
'
监听layer,鼠标移出了矢量对象
'
,
event
)
})
// 可在图层上绑定popup,对所有加到这个图层的矢量数据都生效
graphicLayer
.
bindPopup
(
'
我是layer上绑定的Popup
'
,
{
anchor
:
[
0
,
-
10
]
})
// 可在图层绑定右键菜单,对所有加到这个图层的矢量数据都生效
graphicLayer
.
bindContextMenu
([
{
text
:
'
删除对象
'
,
iconCls
:
'
fa fa-trash-o
'
,
callback
:
function
(
e
)
{
const
graphic
=
e
.
graphic
if
(
graphic
)
{
graphicLayer
.
removeGraphic
(
graphic
)
}
}
}
])
},
},
},
destroyed
(){
destroyed
(){
this
.
timer
=
null
;
this
.
timer
=
null
;
...
@@ -228,12 +274,19 @@ export default {
...
@@ -228,12 +274,19 @@ export default {
</
script
>
</
script
>
<
style
scope
>
<
style
scope
>
.mapcontainer
{
height
:
100vh
;
width
:
100vw
;
top
:
0px
;
position
:
absolute
;
overflow
:
hidden
;
}
.bigScreenView
{
.bigScreenView
{
width
:
100vw
;
width
:
100vw
;
height
:
100vh
;
height
:
100vh
;
overflow
:
hidden
;
overflow
:
hidden
;
background
:
no-repeat
center
center
url('~@/assets/images/cutGraph/wallhaven-4x3j3l.jpg')
;
/*
background:no-repeat center center url('~@/assets/images/cutGraph/wallhaven-4x3j3l.jpg');
background-size
:
100%
100%
;
background-size:100% 100%;
*/
}
}
.top_title
{
.top_title
{
width
:
100%
;
width
:
100%
;
...
@@ -242,11 +295,13 @@ export default {
...
@@ -242,11 +295,13 @@ export default {
background
:
no-repeat
center
center
url('~@/assets/images/cutGraph/top_title.png')
;
background
:
no-repeat
center
center
url('~@/assets/images/cutGraph/top_title.png')
;
background-size
:
100%
100%
;
background-size
:
100%
100%
;
position
:
relative
;
position
:
relative
;
z-index
:
1
;
}
}
.content_view
{
.content_view
{
width
:
100%
;
width
:
100%
;
height
:
94vh
;
height
:
94vh
;
overflow
:
hidden
;
overflow
:
hidden
;
z-index
:
1
;
}
}
.top_titl_left
{
.top_titl_left
{
display
:
flex
;
display
:
flex
;
...
@@ -286,5 +341,6 @@ export default {
...
@@ -286,5 +341,6 @@ export default {
font-size
:
30px
;
font-size
:
30px
;
color
:
blue
;
color
:
blue
;
cursor
:
pointer
;
cursor
:
pointer
;
z-index
:
1
;
}
}
</
style
>
</
style
>
\ No newline at end of file
vue.config.js
View file @
b1f1d06b
'
use strict
'
'
use strict
'
const
webpack
=
require
(
'
webpack
'
)
const
path
=
require
(
'
path
'
)
const
path
=
require
(
'
path
'
)
const
defaultSettings
=
require
(
'
./src/settings.js
'
);
const
defaultSettings
=
require
(
'
./src/settings.js
'
);
const
cesiumSource
=
'
node_modules/mars3d-cesium/Build/Cesium/
'
// copy-webpack-plugin@4.5.2
// copy-webpack-plugin@4.5.2
const
CopyWebpackPlugin
=
require
(
'
copy-webpack-plugin
'
)
const
CopyWebpackPlugin
=
require
(
'
copy-webpack-plugin
'
)
...
@@ -22,8 +24,8 @@ module.exports = {
...
@@ -22,8 +24,8 @@ module.exports = {
lintOnSave
:
process
.
env
.
NODE_ENV
===
'
development
'
,
lintOnSave
:
process
.
env
.
NODE_ENV
===
'
development
'
,
productionSourceMap
:
false
,
productionSourceMap
:
false
,
devServer
:
{
devServer
:
{
//
host: 'localhost', // 也可以直接写IP地址这样方便真机测试
host
:
'
localhost
'
,
// 也可以直接写IP地址这样方便真机测试
host
:
'
192.168.0.102
'
,
// 也可以直接写IP地址这样方便真机测试
//
host: '192.168.0.102', // 也可以直接写IP地址这样方便真机测试
port
:
port
,
port
:
port
,
open
:
true
,
open
:
true
,
overlay
:
{
overlay
:
{
...
@@ -44,18 +46,32 @@ module.exports = {
...
@@ -44,18 +46,32 @@ module.exports = {
pathRewrite
:
{
pathRewrite
:
{
'
^/auth
'
:
'
auth
'
'
^/auth
'
:
'
auth
'
}
}
}
},
'
/dianziweilan
'
:
{
target
:
process
.
env
.
VUE_APP_BASE_API
,
},
}
}
},
},
configureWebpack
:
{
configureWebpack
:
{
// provide the app's title in webpack's name field, so that
// provide the app's title in webpack's name field, so that
// it can be accessed in index.html to inject the correct title.
// it can be accessed in index.html to inject the correct title.
plugins
:
[
plugins
:
[
new
CopyWebpackPlugin
([{
// new CopyWebpackPlugin([{
from
:
"
./static
"
,
// from: "./static",
to
:
'
static
'
// to: 'static'
}])
// }]),
],
new
webpack
.
DefinePlugin
({
CESIUM_BASE_URL
:
JSON
.
stringify
(
'
static
'
)
}),
new
CopyWebpackPlugin
([{
from
:
path
.
join
(
cesiumSource
,
'
Workers
'
),
to
:
'
static/Workers
'
}]),
new
CopyWebpackPlugin
([{
from
:
path
.
join
(
cesiumSource
,
'
Assets
'
),
to
:
'
static/Assets
'
}]),
new
CopyWebpackPlugin
([{
from
:
path
.
join
(
cesiumSource
,
'
ThirdParty
'
),
to
:
'
static/ThirdParty
'
}]),
new
CopyWebpackPlugin
([{
from
:
path
.
join
(
cesiumSource
,
'
Widgets
'
),
to
:
'
static/Widgets
'
}])
],
module
:
{
unknownContextCritical
:
false
,
unknownContextRegExp
:
/
\/
cesium
\/
cesium
\/
Source
\/
Core
\/
buildModuleUrl
\.
js/
},
name
:
name
,
name
:
name
,
resolve
:
{
resolve
:
{
alias
:
{
alias
:
{
...
...
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