Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
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
罗超
SuperMan
Commits
07d9efe7
Commit
07d9efe7
authored
Sep 15, 2023
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
8d568a4f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
64 deletions
+26
-64
TravelManagerThree.vue
...ewTravelmanager/TravelGroupControl/TravelManagerThree.vue
+1
-1
tripmap.vue
...omponents/newTravelmanager/TravelGroupControl/tripmap.vue
+25
-63
No files found.
src/components/newTravelmanager/TravelGroupControl/TravelManagerThree.vue
View file @
07d9efe7
...
...
@@ -62,7 +62,7 @@
:preview-src-list=
"[PostConfig.MapUrl]"
>
</el-image>
</div>
<p
v-else
>
地图暂未生成图
</p>
<p
v-else
@
click=
"ShowMap=!ShowMap"
>
地图暂未生成图
</p>
</div>
</div>
<Tripmap
v-if=
"ShowMap"
:dataAll=
"PostConfig"
:ConfigId=
"ConfigId"
@
Cancel=
"ShowMap=false"
@
Success=
"getMapImgSuccess"
></Tripmap>
...
...
src/components/newTravelmanager/TravelGroupControl/tripmap.vue
View file @
07d9efe7
...
...
@@ -64,6 +64,13 @@
<div>
<span
class=
"MapImgButtom CancelMapImg"
@
click=
"Cancel"
>
取消
</span>
</div>
<div
style=
"margin-left: 20px;"
>
<span
class=
"MapImgButtom setMapImg"
@
click=
"SavePositionStr"
>
保存坐标
</span
>
</div>
<div
style=
"margin-left: 20px;"
>
<span
class=
"MapImgButtom setMapImg"
...
...
@@ -298,31 +305,25 @@ export default {
await
this
.
addCountriesMaker
();
//标记国家
//this.addDocumentEventListener();
},
// 记录PositionStr
SavePositionStr
(
type
)
{
if
(
type
)
{
this
.
TripMapList
.
forEach
(
x
=>
{
x
.
CityList
.
forEach
(
y
=>
{
this
.
citiesData
.
forEach
(
z
=>
{
if
(
y
.
MName
==
z
.
name
)
{
y
.
Lng
=
z
.
Lng
;
y
.
Lat
=
z
.
Lat
;
}
});
});
// 保存标记坐标
SavePositionStr
()
{
this
.
TripMapList
.
forEach
(
x
=>
{
x
.
CityList
.
forEach
(
y
=>
{
this
.
citiesData
.
forEach
(
z
=>
{
if
(
y
.
MName
==
z
.
name
)
{
y
.
Lng
=
z
.
Lng
;
y
.
Lat
=
z
.
Lat
;
}
});
this
.
dataAll
.
TripMapList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
TripMapList
));
}
else
{
this
.
TripMapList
.
forEach
(
x
=>
{
this
.
countriesData
.
forEach
(
y
=>
{
if
(
x
.
MName
==
y
.
name
)
{
x
.
Lng
=
y
.
Lng
;
x
.
Lat
=
y
.
Lat
;
}
});
});
this
.
countriesData
.
forEach
(
y
=>
{
if
(
x
.
MName
==
y
.
name
)
{
x
.
Lng
=
y
.
Lng
;
x
.
Lat
=
y
.
Lat
;
}
});
// this.dataAll.TripMapList = JSON.parse(JSON.stringify(this.TripMapList))
}
});
this
.
dataAll
.
TripMapList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
TripMapList
));
},
// 导出地图片
getResultImg
()
{
...
...
@@ -636,44 +637,7 @@ export default {
source
:
source
,
paint
:
paintBgObj
})
};
return
var
layTextObj
=
{
id
:
"mapLayer-"
+
x
.
MId
,
type
:
"fill"
,
source
:
"word-source-japan"
,
//创建的数据源id
filter
:
[
"=="
,
"NAME_ZH"
,
x
.
MName
],
paint
:
{},
layout
:
{
'text-field'
:
"{name}"
}
};
this
.
map
.
addLayer
(
layTextObj
);
var
paintBgObj
=
{
//设置属性
"fill-color"
:
{
'property'
:
'cartodb_id'
,
stops
:
[
[
1
,
"#0080ff"
],
[
10
,
"#FFC0CB"
],
[
20
,
"#DB7093"
],
[
30
,
"#EE82EE"
],
[
30
,
"#BA55D3"
],
[
50
,
"#6A5ACD"
]
]
},
"fill-outline-color"
:
"#4f4f4f"
,
"fill-opacity"
:
0.5
};
var
layBg
=
{
id
:
"mapLayerId-"
+
x
.
MId
,
type
:
"fill"
,
source
:
"word-source-japan"
,
//创建的数据源id
paint
:
paintBgObj
};
this
.
map
.
addLayer
(
layBg
);
}
});
},
...
...
@@ -726,7 +690,6 @@ export default {
let currentMarkerLngLat = marker.getLngLat();
that.citiesData[i].Lng = currentMarkerLngLat.lng;
that.citiesData[i].Lat = currentMarkerLngLat.lat;
that.SavePositionStr(1);
});
this.deviceMarkers.push(marker);
...
...
@@ -919,7 +882,6 @@ export default {
let
currentMarkerLngLat
=
marker
.
getLngLat
();
that
.
countriesData
[
i
].
Lng
=
currentMarkerLngLat
.
lng
;
that
.
countriesData
[
i
].
Lat
=
currentMarkerLngLat
.
lat
;
// that.SavePositionStr()
});
this
.
countriesMarkers
.
push
(
marker
);
}
...
...
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