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
0e7e6280
Commit
0e7e6280
authored
Nov 11, 2022
by
xxx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
5e7a447f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
110 additions
and
27 deletions
+110
-27
Map4.vue
src/components/mars3d/Map4.vue
+75
-26
index.vue
src/views/regionalManagement/regionalPathMap/index.vue
+35
-1
No files found.
src/components/mars3d/Map4.vue
View file @
0e7e6280
...
@@ -47,6 +47,9 @@
...
@@ -47,6 +47,9 @@
toJavaCoordinates
:[],
toJavaCoordinates
:[],
controlPointId
:
0
,
controlPointId
:
0
,
lineData
:[],
lineData
:[],
weilanzuobianData
:[],
weilanName
:[],
areaColorData
:[],
}
}
},
},
...
@@ -90,6 +93,7 @@
...
@@ -90,6 +93,7 @@
methods
:
{
methods
:
{
//后台获取数据
//后台获取数据
getCoordinate
(
data
)
{
getCoordinate
(
data
)
{
let
that
=
this
;
this
.
zuobianData
=
data
;
this
.
zuobianData
=
data
;
HttpReq
.
truckDispatching
.
apiPathmapQuery
({
size
:
9999
}).
then
((
res
)
=>
{
HttpReq
.
truckDispatching
.
apiPathmapQuery
({
size
:
9999
}).
then
((
res
)
=>
{
if
(
res
.
code
==
200
){
if
(
res
.
code
==
200
){
...
@@ -117,11 +121,31 @@
...
@@ -117,11 +121,31 @@
arr1
.
push
(
obj1
);
arr1
.
push
(
obj1
);
});
});
this
.
lineData
=
arr1
;
this
.
lineData
=
arr1
;
//获取电子围栏
HttpReq
.
truckDispatching
.
screenMapSetUpQuery
({
size
:
9999
}).
then
((
res
)
=>
{
if
(
true
){;
let
data1
=
[];
for
(
let
key
in
res
){
that
.
weilanName
.
push
(
key
);
that
.
areaColorData
.
push
(
res
[
key
][
0
].
color
);
let
arrays
=
[];
res
[
key
].
forEach
(
function
(
item
){
var
arr
=
[];
arr
[
0
]
=
item
.
lon
;
arr
[
1
]
=
item
.
lat
;
arr
[
2
]
=
"
500
"
;
arrays
.
push
(
arr
);
})
data1
.
push
(
arrays
)
}
that
.
weilanzuobianData
=
data1
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
if
(
this
.
appendToBody
)
{
if
(
this
.
appendToBody
)
{
document
.
body
.
appendChild
(
this
.
$el
)
document
.
body
.
appendChild
(
this
.
$el
)
}
}
if
(
this
.
mapKey
)
{
if
(
this
.
mapKey
)
{
this
.
initMars3d
(
this
.
options
)
this
.
initMars3d
(
this
.
options
)
}
else
{
}
else
{
...
@@ -130,6 +154,9 @@
...
@@ -130,6 +154,9 @@
})
})
}
}
})
})
}
})
})
})
}
}
})
})
...
@@ -164,14 +191,12 @@
...
@@ -164,14 +191,12 @@
})
})
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$notify
({
this
.
$notify
({
title
:
'
关键点信息上传成功
,即将刷新页面
!
'
,
title
:
'
关键点信息上传成功!
'
,
type
:
'
success
'
,
type
:
'
success
'
,
duration
:
2000
,
duration
:
2000
,
dangerouslyUseHTMLString
:
true
,
dangerouslyUseHTMLString
:
true
,
});
});
setTimeout
(
function
(){
this
.
$parent
.
resetData
();
window
.
location
.
reload
();
},
2000
);
})
})
}
}
})
})
...
@@ -191,14 +216,12 @@
...
@@ -191,14 +216,12 @@
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
if
(
res
.
code
==
200
){
if
(
res
.
code
==
200
){
this
.
$notify
({
this
.
$notify
({
title
:
'
关键点信息上传成功
,即将刷新页面
!
'
,
title
:
'
关键点信息上传成功!
'
,
type
:
'
success
'
,
type
:
'
success
'
,
duration
:
2000
,
duration
:
2000
,
dangerouslyUseHTMLString
:
true
,
dangerouslyUseHTMLString
:
true
,
});
});
setTimeout
(
function
(){
this
.
$parent
.
resetData
();
window
.
location
.
reload
();
},
2000
);
}
}
})
})
})
})
...
@@ -238,14 +261,12 @@
...
@@ -238,14 +261,12 @@
})
})
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$notify
({
this
.
$notify
({
title
:
'
关键点信息上传成功
,即将刷新页面
!
'
,
title
:
'
关键点信息上传成功!
'
,
type
:
'
success
'
,
type
:
'
success
'
,
duration
:
2000
,
duration
:
2000
,
dangerouslyUseHTMLString
:
true
,
dangerouslyUseHTMLString
:
true
,
});
});
setTimeout
(
function
(){
this
.
$parent
.
resetData
();
window
.
location
.
reload
();
},
2000
);
})
})
}
}
})
})
...
@@ -269,14 +290,12 @@
...
@@ -269,14 +290,12 @@
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
if
(
res
.
code
==
200
){
if
(
res
.
code
==
200
){
this
.
$notify
({
this
.
$notify
({
title
:
'
关键点信息上传成功
,即将刷新页面
!
'
,
title
:
'
关键点信息上传成功!
'
,
type
:
'
success
'
,
type
:
'
success
'
,
duration
:
2000
,
duration
:
2000
,
dangerouslyUseHTMLString
:
true
,
dangerouslyUseHTMLString
:
true
,
});
});
setTimeout
(
function
(){
this
.
$parent
.
resetData
();
window
.
location
.
reload
();
},
2000
);
}
}
})
})
})
})
...
@@ -301,6 +320,14 @@
...
@@ -301,6 +320,14 @@
map
=
new
mars3d
.
Map
(
`mars3d-container
${
this
.
mapKey
}
`
,
mapOptions
)
map
=
new
mars3d
.
Map
(
`mars3d-container
${
this
.
mapKey
}
`
,
mapOptions
)
this
[
`map
${
this
.
mapKey
}
`
]
=
map
this
[
`map
${
this
.
mapKey
}
`
]
=
map
//围栏回显
that
.
weilanzuobianData
.
forEach
(
function
(
item
,
index
){
var
graphicLayer
=
new
mars3d
.
layer
.
GraphicLayer
();
map
.
addLayer
(
graphicLayer
);
initLayerManager
(
graphicLayer
,
that
.
weilanName
[
index
]);
that
.
addGraphic_01
(
graphicLayer
,
item
,
that
.
weilanName
[
index
],
that
.
areaColorData
[
index
]);
})
//关键点显示
//关键点显示
that
.
zuobianData
.
forEach
(
function
(
item
,
index
){
that
.
zuobianData
.
forEach
(
function
(
item
,
index
){
var
graphicLayer
=
new
mars3d
.
layer
.
GraphicLayer
();
var
graphicLayer
=
new
mars3d
.
layer
.
GraphicLayer
();
...
@@ -342,6 +369,28 @@
...
@@ -342,6 +369,28 @@
})
})
graphicLayer
.
addGraphic
(
graphic
)
graphicLayer
.
addGraphic
(
graphic
)
},
},
//围栏回显
addGraphic_01
(
graphicLayer
,
positions
,
weilanName
,
color
){
let
graphic
=
new
mars3d
.
graphic
.
PolygonEntity
({
positions
:
positions
,
style
:
{
color
:
color
,
opacity
:
0.5
,
outline
:
true
,
outlineWidth
:
3
,
outlineColor
:
"
#ffffff
"
,
label
:
{
text
:
weilanName
,
font_size
:
18
,
color
:
"
#ffffff
"
,
distanceDisplayCondition
:
true
,
distanceDisplayCondition_far
:
500000
,
distanceDisplayCondition_near
:
0
,
},
},
});
graphicLayer
.
addGraphic
(
graphic
);
//还可以另外一种写法: graphic.addTo(graphicLayer)
},
//画线
//画线
addDemoGraphic2
(
graphicLayer
,
item
)
{
addDemoGraphic2
(
graphicLayer
,
item
)
{
const
graphic
=
new
mars3d
.
graphic
.
PolylineEntity
({
const
graphic
=
new
mars3d
.
graphic
.
PolylineEntity
({
...
...
src/views/regionalManagement/regionalPathMap/index.vue
View file @
0e7e6280
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
<el-input-number
v-model=
"query.coefficient"
:precision=
"2"
:step=
"0.1"
:min=
"0"
:max=
"9999"
@
change=
"inputInitialFn()"
></el-input-number>
<el-input-number
v-model=
"query.coefficient"
:precision=
"2"
:step=
"0.1"
:min=
"0"
:max=
"9999"
@
change=
"inputInitialFn()"
></el-input-number>
<el-button
size=
"mini"
type=
"success"
@
click=
"addKeyPoints()"
:disabled=
"addKeyPointsAble"
>
添加路径关键点
</el-button>
<el-button
size=
"mini"
type=
"success"
@
click=
"addKeyPoints()"
:disabled=
"addKeyPointsAble"
>
添加路径关键点
</el-button>
<div
style=
"width:62vw;height: 72vh;overflow: hidden;margin-top: 1vh;"
>
<div
style=
"width:62vw;height: 72vh;overflow: hidden;margin-top: 1vh;"
>
<mars3dViewerMap
:url=
"configUrl"
@
onload=
"onMapload"
ref=
"mars3dViewerMapMethod"
/>
<mars3dViewerMap
:url=
"configUrl"
@
onload=
"onMapload"
ref=
"mars3dViewerMapMethod"
:key=
"shuaxinTimer"
/>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -122,6 +122,8 @@ export default {
...
@@ -122,6 +122,8 @@ export default {
faControlPointId
:
0
,
faControlPointId
:
0
,
//选择连接点数据
//选择连接点数据
selectConnectPointArray
:[],
selectConnectPointArray
:[],
//重置地图
shuaxinTimer
:
null
,
};
};
},
},
mounted
(){
mounted
(){
...
@@ -440,6 +442,38 @@ export default {
...
@@ -440,6 +442,38 @@ export default {
})
})
}
}
},
},
//重置数据
resetData
(){
//获取各个点的数据
HttpReq
.
truckDispatching
.
apiCpointQuery
({
size
:
9999
}).
then
((
res
)
=>
{
if
(
res
.
code
==
200
){
let
arr1
=
[];
res
.
data
.
content
.
forEach
((
item
,
index
)
=>
{
let
obj1
=
{};
obj1
.
end
=
item
.
name
;
obj1
.
weight
=
0
;
arr1
.
push
(
obj1
);
})
this
.
controlPointData
=
arr1
;
this
.
shuaxinTimer
=
new
Date
().
getTime
();
this
.
$refs
.
mars3dViewerMapMethod
.
getCoordinate
(
res
.
data
.
content
);
//添加路径关键点按钮可否使用
this
.
addKeyPointsAble
=
false
;
//选择关键点类型
this
.
activeName
=
""
;
//装卸车点名称
this
.
entruckingValue1
=
[];
this
.
detrainingValue2
=
[];
this
.
controlPointValue3
=
''
;
//保存时判断为添加还是修改
this
.
transmitWay
=
'
add
'
;
//暂存修改删除时的id
this
.
faControlPointId
=
0
;
//选择连接点数据
this
.
selectConnectPointArray
=
[];
}
})
},
// 地图构造完成回调
// 地图构造完成回调
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