Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
million
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
viitto
million
Commits
443c80c9
Commit
443c80c9
authored
Mar 02, 2023
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
22fe9fce
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
80 additions
and
20 deletions
+80
-20
Map.vue
src/components/car/Map.vue
+16
-5
orderPreview.vue
src/components/car/orderPreview.vue
+57
-10
detailsCar.vue
src/pages/detailsCar.vue
+7
-5
No files found.
src/components/car/Map.vue
View file @
443c80c9
...
...
@@ -3,6 +3,7 @@
.card
{
width
:
100
vm
;
height
:
320px
;
border
:
1px
solid
#F0EFEF
;
border-radius
:
8px
;}
</
style
>
<
template
>
...
...
@@ -32,6 +33,9 @@
this
.
createMap
();
this
.
addMarker
();
this
.
addLabel
()
if
(
this
.
center
.
Range
&&
this
.
center
.
Range
>
0
){
this
.
addCircle
()
}
},
methods
:
{
createMap
()
{
...
...
@@ -44,7 +48,7 @@
this
.
map
=
map
;
},
addMarker
()
{
let
icon
=
require
(
`../../assets/img/
info-time
.png`
);
let
icon
=
require
(
`../../assets/img/
marker
.png`
);
var
myIcon
=
new
BMapGL
.
Icon
(
icon
,
new
BMapGL
.
Size
(
23
,
25
),
{
// 指定定位位置。
// 当标注显示在地图上时,其所指向的地理位置距离图标左上
...
...
@@ -67,19 +71,26 @@
var
label
=
new
BMapGL
.
Label
(
content
,
{
// 创建文本标注
position
:
point
,
// 设置标注的地理位置
offset
:
new
BMapGL
.
Size
(
10
,
-
8
0
),
// 设置标注的偏移量
offset
:
new
BMapGL
.
Size
(
10
,
-
6
0
),
// 设置标注的偏移量
});
this
.
map
.
addOverlay
(
label
);
// 将标注添加到地图中
label
.
addEventListener
(
"click"
,
function
()
{
alert
(
"您点击了标注"
);
//
alert("您点击了标注");
});
label
.
setStyle
({
// 设置label的样式
color
:
"#000"
,
fontSize
:
"30px"
,
border
:
"2px solid #1E90FF"
,
fontSize
:
"18px"
,
border
:
"0 solid #1E90FF"
,
padding
:
'0 5px'
,
borderRadius
:
'3px'
,
});
},
addCircle
(){
var
mPoint
=
new
BMapGL
.
Point
(
this
.
center
.
Lng
,
this
.
center
.
Lat
);
var
circle
=
new
BMapGL
.
Circle
(
mPoint
,
this
.
center
.
Range
,{
fillColor
:
"blue"
,
strokeWeight
:
1
,
fillOpacity
:
0.3
,
strokeOpacity
:
0.3
});
this
.
map
.
addOverlay
(
circle
);
}
},
}
</
script
>
src/components/car/orderPreview.vue
View file @
443c80c9
...
...
@@ -10,7 +10,21 @@
flat
/>
</div>
<div
class=
"text-grey-6 f12 q-my-md"
>
選擇類型
</div>
<template>
<div
class=
"text-grey-6 f12 q-my-md"
>
選擇機場
</div>
<div
class=
"row wrap"
>
<q-btn
@
click=
"handleSelectAirport(item)"
:color=
"item.Id === selectedAirport?'primary':'grey-5'"
unelevated
class=
"car-tag mr"
v-for=
"item in AirportList"
:key=
"item.Id"
>
{{
item
.
AirportName
}}
</q-btn>
</div>
</
template
>
<div
class=
"text-grey-6 f12 q-my-md"
>
選擇車類型
</div>
<div
class=
"row wrap"
>
<q-btn
@
click=
"handleSelect(item)"
:color=
"item.Id === selectedCar?'primary':'grey-5'"
...
...
@@ -103,13 +117,15 @@
<
script
>
export
default
{
props
:
[
"price"
,
"CarTypeList"
,
"configId"
,
"Month"
],
props
:
[
"price"
,
"CarTypeList"
,
"
AirportList"
,
"
configId"
,
"Month"
],
watch
:
{
price
:
{
handler
(
n
,
o
)
{
this
.
p
=
n
;
if
(
n
&&
n
.
startDate
){
this
.
chosenObj
.
startDate
=
n
.
startDate
;
this
.
selectedCar
=
this
.
CarTypeList
[
0
].
Id
this
.
selectedObj
=
this
.
CarTypeList
[
0
]
}
this
.
calcMoney
()
...
...
@@ -120,7 +136,7 @@ export default {
CarTypeList
:
{
handler
(
n
,
o
)
{
this
.
CarTypeList
=
n
;
this
.
selectedCar
=
this
.
CarTypeList
[
0
].
Id
},
deep
:
true
,
immediate
:
true
...
...
@@ -131,9 +147,11 @@ export default {
p
:
{},
chosenObj
:
null
,
sumPrice
:
0
,
selectedCar
:
0
,
selectedObj
:
null
,
priceList
:
[],
selectedCar
:
0
selectedAirport
:
0
,
selectedAirportObj
:
null
,
};
},
created
()
{
...
...
@@ -142,7 +160,8 @@ export default {
this
.
chosenObj
.
startDate
=
this
.
p
.
startDate
;
this
.
calcMoney
()
this
.
getCarPriceData2
()
this
.
selectedCar
=
this
.
CarTypeList
[
0
].
Id
// this.selectedCar = this.CarTypeList[0].Id
// this.selectedObj = this.CarTypeList[0]
}
},
...
...
@@ -177,12 +196,32 @@ export default {
arr
.
push
(
dataObj
)
}
})
const
temp
=
JSON
.
parse
(
JSON
.
stringify
(
r
.
data
.
data
))
let
PriceArr
=
temp
.
filter
(
x
=>
{
return
x
.
Price
>
0
})
if
(
PriceArr
.
length
>
0
){
this
.
$emit
(
'getPriceList'
,
JSON
.
stringify
(
arr
),
this
.
selectedCar
)
}
else
{
let
dataObj
=
{
startDate
:
''
,
originalB2CPrice
:
''
,
remainNum
:
0
,
Count
:
0
,
isSupportChildren
:
0
,
safeMoney
:
0
,
}
this
.
priceList
.
push
(
dataObj
)
this
.
$emit
(
'getPriceList'
,
JSON
.
stringify
(
this
.
priceList
),
this
.
selectedCar
)
this
.
p
.
originalB2CPrice
=
0
this
.
resetHandler
(
1
)
}
}
},
null
)
},
handleSelectAirport
(
item
){
this
.
selectedAirportObj
=
item
this
.
selectedAirport
=
item
.
Id
},
handleSelect
(
item
){
this
.
selectedObj
=
item
this
.
selectedCar
=
item
.
Id
...
...
@@ -196,9 +235,17 @@ export default {
remark
:
""
,
};
},
resetHandler
()
{
resetHandler
(
type
)
{
if
(
type
&&
type
!=
1
){
this
.
selectedCar
=
0
this
.
selectedObj
=
null
this
.
selectedAirportObj
=
null
this
.
selectedAirport
=
0
}
setTimeout
(()
=>
{
this
.
p
=
{};
this
.
initModel
()
},
100
)
this
.
$emit
(
"reset"
);
},
changePeople
(
val
)
{},
...
...
src/pages/detailsCar.vue
View file @
443c80c9
...
...
@@ -280,6 +280,7 @@
:configId=
"msg.configId"
:Month=
"currentYM.str"
:CarTypeList=
"dataList.CarTypeList"
:AirportList=
"dataList.AirportList"
:price=
"currentPrice"
@
reset=
"resetHandler"
@
getPriceList=
"getPriceList"
...
...
@@ -368,6 +369,7 @@
:configId=
"msg.configId"
:Month=
"currentYM.str"
:CarTypeList=
"dataList.CarTypeList"
:AirportList=
"dataList.AirportList"
:price=
"currentPrice"
@
reset=
"resetHandler"
@
getPriceList=
"getPriceList"
...
...
@@ -447,7 +449,7 @@
'q-px-md': $q.screen.width < 1220 && $q.platform.is.mobile,
}"
>
集合地點
接送點範圍
</div>
<div
class=
"q-mt-lg trip-text rounded-borders q-mb-xl"
...
...
@@ -457,7 +459,7 @@
}"
v-for=
"(x,index) in dataList.PlaceList"
>
<div
class=
"q-pa-md"
style=
"border-bottom: 1px dashed var(--q-color-warning)"
>
<div
class=
"text-weight-bold text-h6"
>
地
点名称
:{{x.Name}}
</div>
<div
class=
"text-weight-bold text-h6"
>
地
點名稱
:{{x.Name}}
</div>
<div
class=
"text-grey-9"
>
地址:{{x.Address}}
</div>
</div>
<div
class=
"q-pa-md"
:class=
"{
...
...
@@ -474,7 +476,7 @@
'q-px-md': $q.screen.width < 1220 && $q.platform.is.mobile,
}"
>
體驗
地點
機場
地點
</div>
<div
class=
"q-mt-lg trip-text rounded-borders q-mb-xl"
...
...
@@ -686,13 +688,13 @@ export default {
id
:
"#assemblypoint"
,
top
:
0
,
isActive
:
false
,
display
:
"
集合地點
"
,
display
:
"
接送點範圍
"
,
},
{
id
:
"#experiencelocation"
,
top
:
0
,
isActive
:
false
,
display
:
"
體驗
地點"
,
display
:
"
機場
地點"
,
},
{
id
:
"#tips"
,
...
...
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