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
Hide 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 @@
...
@@ -3,6 +3,7 @@
.card
{
width
:
100
vm
;
.card
{
width
:
100
vm
;
height
:
320px
;
height
:
320px
;
border
:
1px
solid
#F0EFEF
;
border
:
1px
solid
#F0EFEF
;
border-radius
:
8px
;}
border-radius
:
8px
;}
</
style
>
</
style
>
<
template
>
<
template
>
...
@@ -32,6 +33,9 @@
...
@@ -32,6 +33,9 @@
this
.
createMap
();
this
.
createMap
();
this
.
addMarker
();
this
.
addMarker
();
this
.
addLabel
()
this
.
addLabel
()
if
(
this
.
center
.
Range
&&
this
.
center
.
Range
>
0
){
this
.
addCircle
()
}
},
},
methods
:
{
methods
:
{
createMap
()
{
createMap
()
{
...
@@ -44,7 +48,7 @@
...
@@ -44,7 +48,7 @@
this
.
map
=
map
;
this
.
map
=
map
;
},
},
addMarker
()
{
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
),
{
var
myIcon
=
new
BMapGL
.
Icon
(
icon
,
new
BMapGL
.
Size
(
23
,
25
),
{
// 指定定位位置。
// 指定定位位置。
// 当标注显示在地图上时,其所指向的地理位置距离图标左上
// 当标注显示在地图上时,其所指向的地理位置距离图标左上
...
@@ -67,19 +71,26 @@
...
@@ -67,19 +71,26 @@
var
label
=
new
BMapGL
.
Label
(
content
,
{
var
label
=
new
BMapGL
.
Label
(
content
,
{
// 创建文本标注
// 创建文本标注
position
:
point
,
// 设置标注的地理位置
position
:
point
,
// 设置标注的地理位置
offset
:
new
BMapGL
.
Size
(
10
,
-
8
0
),
// 设置标注的偏移量
offset
:
new
BMapGL
.
Size
(
10
,
-
6
0
),
// 设置标注的偏移量
});
});
this
.
map
.
addOverlay
(
label
);
// 将标注添加到地图中
this
.
map
.
addOverlay
(
label
);
// 将标注添加到地图中
label
.
addEventListener
(
"click"
,
function
()
{
label
.
addEventListener
(
"click"
,
function
()
{
alert
(
"您点击了标注"
);
//
alert("您点击了标注");
});
});
label
.
setStyle
({
label
.
setStyle
({
// 设置label的样式
// 设置label的样式
color
:
"#000"
,
color
:
"#000"
,
fontSize
:
"30px"
,
fontSize
:
"18px"
,
border
:
"2px solid #1E90FF"
,
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
>
</
script
>
src/components/car/orderPreview.vue
View file @
443c80c9
...
@@ -10,7 +10,21 @@
...
@@ -10,7 +10,21 @@
flat
flat
/>
/>
</div>
</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"
>
<div
class=
"row wrap"
>
<q-btn
@
click=
"handleSelect(item)"
<q-btn
@
click=
"handleSelect(item)"
:color=
"item.Id === selectedCar?'primary':'grey-5'"
:color=
"item.Id === selectedCar?'primary':'grey-5'"
...
@@ -103,13 +117,15 @@
...
@@ -103,13 +117,15 @@
<
script
>
<
script
>
export
default
{
export
default
{
props
:
[
"price"
,
"CarTypeList"
,
"configId"
,
"Month"
],
props
:
[
"price"
,
"CarTypeList"
,
"
AirportList"
,
"
configId"
,
"Month"
],
watch
:
{
watch
:
{
price
:
{
price
:
{
handler
(
n
,
o
)
{
handler
(
n
,
o
)
{
this
.
p
=
n
;
this
.
p
=
n
;
if
(
n
&&
n
.
startDate
){
if
(
n
&&
n
.
startDate
){
this
.
chosenObj
.
startDate
=
n
.
startDate
;
this
.
chosenObj
.
startDate
=
n
.
startDate
;
this
.
selectedCar
=
this
.
CarTypeList
[
0
].
Id
this
.
selectedObj
=
this
.
CarTypeList
[
0
]
}
}
this
.
calcMoney
()
this
.
calcMoney
()
...
@@ -120,7 +136,7 @@ export default {
...
@@ -120,7 +136,7 @@ export default {
CarTypeList
:
{
CarTypeList
:
{
handler
(
n
,
o
)
{
handler
(
n
,
o
)
{
this
.
CarTypeList
=
n
;
this
.
CarTypeList
=
n
;
this
.
selectedCar
=
this
.
CarTypeList
[
0
].
Id
},
},
deep
:
true
,
deep
:
true
,
immediate
:
true
immediate
:
true
...
@@ -131,9 +147,11 @@ export default {
...
@@ -131,9 +147,11 @@ export default {
p
:
{},
p
:
{},
chosenObj
:
null
,
chosenObj
:
null
,
sumPrice
:
0
,
sumPrice
:
0
,
selectedCar
:
0
,
selectedObj
:
null
,
selectedObj
:
null
,
priceList
:
[],
priceList
:
[],
selectedCar
:
0
selectedAirport
:
0
,
selectedAirportObj
:
null
,
};
};
},
},
created
()
{
created
()
{
...
@@ -142,7 +160,8 @@ export default {
...
@@ -142,7 +160,8 @@ export default {
this
.
chosenObj
.
startDate
=
this
.
p
.
startDate
;
this
.
chosenObj
.
startDate
=
this
.
p
.
startDate
;
this
.
calcMoney
()
this
.
calcMoney
()
this
.
getCarPriceData2
()
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 {
...
@@ -177,12 +196,32 @@ export default {
arr
.
push
(
dataObj
)
arr
.
push
(
dataObj
)
}
}
})
})
this
.
$emit
(
'getPriceList'
,
JSON
.
stringify
(
arr
),
this
.
selectedCar
)
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
)
},
null
)
},
},
handleSelectAirport
(
item
){
this
.
selectedAirportObj
=
item
this
.
selectedAirport
=
item
.
Id
},
handleSelect
(
item
){
handleSelect
(
item
){
this
.
selectedObj
=
item
this
.
selectedObj
=
item
this
.
selectedCar
=
item
.
Id
this
.
selectedCar
=
item
.
Id
...
@@ -196,9 +235,17 @@ export default {
...
@@ -196,9 +235,17 @@ export default {
remark
:
""
,
remark
:
""
,
};
};
},
},
resetHandler
()
{
resetHandler
(
type
)
{
this
.
p
=
{};
if
(
type
&&
type
!=
1
){
this
.
initModel
()
this
.
selectedCar
=
0
this
.
selectedObj
=
null
this
.
selectedAirportObj
=
null
this
.
selectedAirport
=
0
}
setTimeout
(()
=>
{
this
.
p
=
{};
this
.
initModel
()
},
100
)
this
.
$emit
(
"reset"
);
this
.
$emit
(
"reset"
);
},
},
changePeople
(
val
)
{},
changePeople
(
val
)
{},
...
...
src/pages/detailsCar.vue
View file @
443c80c9
...
@@ -280,6 +280,7 @@
...
@@ -280,6 +280,7 @@
:configId=
"msg.configId"
:configId=
"msg.configId"
:Month=
"currentYM.str"
:Month=
"currentYM.str"
:CarTypeList=
"dataList.CarTypeList"
:CarTypeList=
"dataList.CarTypeList"
:AirportList=
"dataList.AirportList"
:price=
"currentPrice"
:price=
"currentPrice"
@
reset=
"resetHandler"
@
reset=
"resetHandler"
@
getPriceList=
"getPriceList"
@
getPriceList=
"getPriceList"
...
@@ -368,6 +369,7 @@
...
@@ -368,6 +369,7 @@
:configId=
"msg.configId"
:configId=
"msg.configId"
:Month=
"currentYM.str"
:Month=
"currentYM.str"
:CarTypeList=
"dataList.CarTypeList"
:CarTypeList=
"dataList.CarTypeList"
:AirportList=
"dataList.AirportList"
:price=
"currentPrice"
:price=
"currentPrice"
@
reset=
"resetHandler"
@
reset=
"resetHandler"
@
getPriceList=
"getPriceList"
@
getPriceList=
"getPriceList"
...
@@ -447,7 +449,7 @@
...
@@ -447,7 +449,7 @@
'q-px-md': $q.screen.width < 1220 && $q.platform.is.mobile,
'q-px-md': $q.screen.width < 1220 && $q.platform.is.mobile,
}"
}"
>
>
集合地點
接送點範圍
</div>
</div>
<div
<div
class=
"q-mt-lg trip-text rounded-borders q-mb-xl"
class=
"q-mt-lg trip-text rounded-borders q-mb-xl"
...
@@ -457,7 +459,7 @@
...
@@ -457,7 +459,7 @@
}"
}"
v-for=
"(x,index) in dataList.PlaceList"
>
v-for=
"(x,index) in dataList.PlaceList"
>
<div
class=
"q-pa-md"
style=
"border-bottom: 1px dashed var(--q-color-warning)"
>
<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
class=
"text-grey-9"
>
地址:{{x.Address}}
</div>
</div>
</div>
<div
class=
"q-pa-md"
:class=
"{
<div
class=
"q-pa-md"
:class=
"{
...
@@ -474,7 +476,7 @@
...
@@ -474,7 +476,7 @@
'q-px-md': $q.screen.width < 1220 && $q.platform.is.mobile,
'q-px-md': $q.screen.width < 1220 && $q.platform.is.mobile,
}"
}"
>
>
體驗
地點
機場
地點
</div>
</div>
<div
<div
class=
"q-mt-lg trip-text rounded-borders q-mb-xl"
class=
"q-mt-lg trip-text rounded-borders q-mb-xl"
...
@@ -686,13 +688,13 @@ export default {
...
@@ -686,13 +688,13 @@ export default {
id
:
"#assemblypoint"
,
id
:
"#assemblypoint"
,
top
:
0
,
top
:
0
,
isActive
:
false
,
isActive
:
false
,
display
:
"
集合地點
"
,
display
:
"
接送點範圍
"
,
},
},
{
{
id
:
"#experiencelocation"
,
id
:
"#experiencelocation"
,
top
:
0
,
top
:
0
,
isActive
:
false
,
isActive
:
false
,
display
:
"
體驗
地點"
,
display
:
"
機場
地點"
,
},
},
{
{
id
:
"#tips"
,
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