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
8d550eb9
Commit
8d550eb9
authored
May 11, 2022
by
caicaicai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
0f394f0e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
11 deletions
+30
-11
Map.vue
src/components/mars3d/Map.vue
+6
-3
Map3.vue
src/components/mars3d/Map3.vue
+2
-1
index.vue
src/views/regionalManagement/regionalInformation/index.vue
+13
-2
index.vue
src/views/regionalManagement/regionalType/index.vue
+9
-5
No files found.
src/components/mars3d/Map.vue
View file @
8d550eb9
...
...
@@ -87,6 +87,7 @@ export default {
zuobianData
:[],
toJavaCoordinates
:[],
weilanName
:[],
areaColorData
:[],
}
},
...
...
@@ -136,6 +137,7 @@ export default {
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
=
[];
...
...
@@ -145,6 +147,7 @@ export default {
arrays
.
push
(
arr
);
})
data1
.
push
(
arrays
)
}
that
.
zuobianData
=
data1
//console.log("zuobianData",that.zuobianData);
...
...
@@ -203,7 +206,7 @@ export default {
var
graphicLayer
=
new
mars3d
.
layer
.
GraphicLayer
();
map
.
addLayer
(
graphicLayer
);
initLayerManager
(
graphicLayer
,
that
.
weilanName
[
index
]);
that
.
addGraphic_01
(
graphicLayer
,
item
,
that
.
weilanName
[
index
]);
that
.
addGraphic_01
(
graphicLayer
,
item
,
that
.
weilanName
[
index
]
,
that
.
areaColorData
[
index
]
);
})
//实时位置
...
...
@@ -217,11 +220,11 @@ export default {
this
.
$emit
(
'
onload
'
,
map
)
},
//围栏回显
addGraphic_01
(
graphicLayer
,
positions
,
weilanName
){
addGraphic_01
(
graphicLayer
,
positions
,
weilanName
,
color
){
let
graphic
=
new
mars3d
.
graphic
.
PolygonEntity
({
positions
:
positions
,
style
:
{
color
:
"
red
"
,
color
:
color
,
opacity
:
0.5
,
outline
:
true
,
outlineWidth
:
3
,
...
...
src/components/mars3d/Map3.vue
View file @
8d550eb9
...
...
@@ -171,7 +171,7 @@ export default {
// })
},
//上传围栏数据
uploaded
(
text
){
uploaded
(
text
,
color
){
let
newData
=
[...
this
.
toJavaCoordinates
];
newData
.
pop
();
// if(this.toJavaCoordinates.length == 0){
...
...
@@ -183,6 +183,7 @@ export default {
let
allObj
=
{};
allObj
.
name
=
text
;
allObj
.
zuobiao
=
newData
;
allObj
.
color
=
color
;
this
.
toJavaCoordinates
=
[];
//console.log(allObj);
//发送添加电子围栏请求
...
...
src/views/regionalManagement/regionalInformation/index.vue
View file @
8d550eb9
...
...
@@ -146,6 +146,9 @@ export default {
name
:
[
{
required
:
true
,
message
:
'
请输入区域名称
'
,
trigger
:
'
blur
'
}
],
areaclass
:
[
{
required
:
true
,
message
:
'
请选择所属类别
'
,
trigger
:
'
change
'
}
],
},
}
...
...
@@ -270,6 +273,14 @@ export default {
},
//新增区域信息
reqAddItem
(
form
,
item
){
let
areaclass1
=
item
.
areaclass
;
let
areaColor
=
''
;
this
.
RegionalTypeData
.
forEach
((
obj1
)
=>
{
if
(
obj1
.
classname
==
areaclass1
){
areaColor
=
obj1
.
color
;
}
})
let
panduan1
=
this
.
tableData
.
find
((
obj
,
index
)
=>
{
return
obj
.
name
==
item
.
name
;
})
...
...
@@ -284,7 +295,7 @@ export default {
}
else
{
let
lastData
=
{...
item
};
lastData
.
card
=
this
.
picFileName
;
this
.
$refs
.
mars3dViewerMapMethod
.
uploaded
(
lastData
.
name
);
//
this.$refs.mars3dViewerMapMethod.uploaded(lastData.name);
HttpReq
.
truckDispatching
.
RegionalInformationAdd
(
lastData
).
then
((
res
)
=>
{
form
.
visible
=
false
;
if
(
res
.
code
==
200
){
...
...
@@ -295,7 +306,7 @@ export default {
});
this
.
loadData
();
this
.
$nextTick
(()
=>
{
this
.
$refs
.
mars3dViewerMapMethod
.
uploaded
(
lastData
.
name
);
this
.
$refs
.
mars3dViewerMapMethod
.
uploaded
(
lastData
.
name
,
areaColor
);
})
}
else
{
this
.
$notify
({
...
...
src/views/regionalManagement/regionalType/index.vue
View file @
8d550eb9
...
...
@@ -13,7 +13,7 @@
<div
class=
"content"
>
<el-table
:data=
"tableData"
v-loading=
"loading"
border
style=
"width:auto"
:row-class-name=
"tableRowClassName"
>
<el-table-column
prop=
"classname"
label=
"区域类别名称"
align=
"center"
></el-table-column>
<el-table-column
prop=
"color"
label=
"区域遮罩层颜色"
align=
"center"
></el-table-column>
<el-table-column
prop=
"color"
label=
"区域遮罩层颜色"
align=
"center"
:formatter=
"colorChange"
></el-table-column>
<el-table-column
prop=
"createTime"
label=
"日期"
align=
"center"
></el-table-column>
<el-table-column
label=
"操作"
align=
"center"
fixed=
"right"
>
<template
slot-scope=
"scope"
>
...
...
@@ -38,10 +38,10 @@
</el-form-item>
<el-form-item
label=
"区域遮罩层颜色"
prop=
"color"
>
<el-select
v-model=
"form.item.color"
placeholder=
"请选择区域遮罩层颜色"
style=
"width:280px;"
>
<el-option
label=
"蓝色"
value=
"
蓝色
"
></el-option>
<el-option
label=
"绿色"
value=
"
绿色
"
></el-option>
<el-option
label=
"红色"
value=
"
红色
"
></el-option>
<el-option
label=
"黄色"
value=
"
黄色
"
></el-option>
<el-option
label=
"蓝色"
value=
"
blue
"
></el-option>
<el-option
label=
"绿色"
value=
"
green
"
></el-option>
<el-option
label=
"红色"
value=
"
red
"
></el-option>
<el-option
label=
"黄色"
value=
"
yellow
"
></el-option>
</el-select>
</el-form-item>
</el-form>
...
...
@@ -234,6 +234,10 @@ export default {
this
.
loadData
();
})
},
//颜色转换
colorChange
(
row
){
return
row
.
color
==
'
blue
'
?
'
蓝色
'
:
row
.
color
==
'
green
'
?
'
绿色
'
:
row
.
color
==
'
red
'
?
'
红色
'
:
row
.
color
==
'
yellow
'
?
'
黄色
'
:
''
;
},
}
}
</
script
>
...
...
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