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
16a30f72
Commit
16a30f72
authored
Sep 13, 2023
by
吴春
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/luochao/superman
parents
1d89c046
b5fc4bf0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
12 deletions
+33
-12
tripUtils.js
src/assets/utils/tripUtils.js
+1
-0
tripmap.vue
...omponents/newTravelmanager/TravelGroupControl/tripmap.vue
+25
-10
travelDaysTrip.vue
...onents/newTravelmanager/travelLineTrip/travelDaysTrip.vue
+7
-2
No files found.
src/assets/utils/tripUtils.js
View file @
16a30f72
...
...
@@ -518,6 +518,7 @@ var tripUtils = {
Title
:
""
,
Description
:
""
,
Rank
:
0
,
KMNumber
:
""
,
};
},
...
...
src/components/newTravelmanager/TravelGroupControl/tripmap.vue
View file @
16a30f72
<
template
>
<div
class=
"tripmap-form marginT20"
v-if=
"dataAll"
>
<div
class=
"row"
>
<div
class=
"row"
v-loading=
"setLoading"
>
<div
v-for=
"(x, index) in TripMapList"
::key=
"x.Id"
...
...
@@ -87,6 +88,7 @@ export default {
props
:
[
"dataAll"
,
"ConfigId"
],
data
()
{
return
{
setLoading
:
false
,
imageUrl
:
""
,
deviceMarkers
:
[],
loadingCity
:
false
,
...
...
@@ -202,6 +204,7 @@ export default {
container
:
"trip_map"
,
style
:
"mapbox://styles/alex9012/clm92pvs1011j01qzexlh6g2b"
,
// 'mapbox://styles/mapbox/light-v9','mapbox://styles/alex9012/clm92pvs1011j01qzexlh6g2b'
center
:
[
2.177432
,
41.382894
],
zoom
:
6
,
preserveDrawingBuffer
:
true
});
this
.
map
.
on
(
"load"
,
async
()
=>
{
...
...
@@ -242,13 +245,29 @@ export default {
},
methods
:
{
getResultImg
()
{
this
.
setLoading
=
true
let
that
=
this
var
postJson
=
{
ConfigId
:
this
.
ConfigId
,
};
this
.
imageUrl
=
this
.
map
.
getCanvas
().
toDataURL
(
"image/png"
);
let
mapCanvas
=
document
.
querySelector
(
".mapboxgl-canvas"
);
// mapCanvas.style.display = "none";
html2Canvas
(
document
.
getElementById
(
'trip_map'
)).
then
(
function
(
canvas
)
{
var
image
=
document
.
createElement
(
"a"
);
//image.href = canvas.toDataURL("image/jpeg").replace("image/jpeg", "image/octet-stream");
image
.
href
=
canvas
.
toDataURL
(
"image/png"
);
console
.
log
(
image
.
href
,
'========='
)
let
blob
=
that
.
base64ToBlob
(
image
.
href
);
let
newArr
=
[];
newArr
.
push
(
blob
);
var
path
=
`/Upload/Temporary`
;
that
.
uploadSelfBlob
(
path
,
newArr
,
postJson
,
x
=>
{
if
(
x
.
data
.
StatusCode
==
1
){
let
allPath
=
that
.
domainManager
().
ViittoFileUrl
+
x
.
data
.
FilePath
;
// console.log(allPath,'------')
}
that
.
setLoading
=
false
})
return
image
.
download
=
"map.png"
;
image
.
click
();
});
...
...
@@ -308,16 +327,12 @@ export default {
// 获取坐标信息
await
this
.
calcCitiesGeoInfoHandler
();
//console.log(this.citiesData)
console
.
log
(
this
.
map
);
// 可见范围
const
bounds
=
new
mapboxgl
.
LngLatBounds
();
this
.
citiesData
.
forEach
(
city
=>
{
bounds
.
extend
([
city
.
longitude
,
city
.
latitude
]);
});
console
.
log
(
bounds
);
this
.
map
.
fitBounds
(
bounds
);
console
.
log
(
bounds
,
'========bounds'
)
this
.
map
.
setCenter
(
bounds
.
getCenter
());
this
.
addMarker
();
//标记
this
.
createLineHandler
();
//连线
...
...
@@ -691,15 +706,15 @@ export default {
}
#trip_map
{
width
:
100%
;
/* height: 500px; */
height
:
500px
;
position
:
absolute
;
/* position: fixed; */
top
:
0
;
bottom
:
0
;
left
:
0
;
right
:
0
;
position
:
fixed
;
background
:
#FFF
;
z-index
:
5000
;
background
:
#FFF
;
z-index
:
5000
;
}
body
{
...
...
src/components/newTravelmanager/travelLineTrip/travelDaysTrip.vue
View file @
16a30f72
...
...
@@ -136,8 +136,13 @@
<el-input
type=
"textarea"
:autosize=
"
{minRows: 1, maxRows: 8 }" resize="none" class="w700"
placeholder="请输入行程大点信息" v-model="dayObj.TitleObj.Title">
</el-input>
</el-form-item>
<el-form-item
style=
"display:none;"
>
<el-input
placeholder=
"请输入公里数"
class=
"w120"
v-model=
"dayObj.TitleObj.KMNumber"
>
<template
slot=
"append"
>
KM
</
template
>
</el-input>
</el-form-item>
</span>
<span
class=
"TC-spanTitle"
v-if=
"dayObj.isRead"
>
{{
dayObj
.
TitleObj
.
Title
}}
</span>
<span
class=
"TC-spanTitle"
v-if=
"dayObj.isRead"
>
{{dayObj.TitleObj.Title}}
</span>
</div>
</div>
<div
class=
"TC-Comtitlediv"
>
...
...
@@ -626,7 +631,7 @@
scenicDescribeObj
.
Describe
=
s
.
About
;
//this.WarmTripDescribe.ScenicDescribeArr.push(scenicDescribeObj);
if
(
scenicDescribeObj
.
Describe
!=
null
&&
scenicDescribeObj
.
Describe
!=
""
)
{
// this.dayObj.WarmTipObj.Description += "
<
p
>
" + scenicDescribeObj.Describe + "
<
/p>"
;
// this.dayObj.WarmTipObj.Description += "
<
p
>
" + scenicDescribeObj.Describe + "
<
/p>"
;
}
}
});
...
...
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