Commit 443c80c9 authored by youjie's avatar youjie

no message

parent 22fe9fce
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
.card {width: 100vm; .card {width: 100vm;
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, -80), // 设置标注的偏移量 offset: new BMapGL.Size(10, -60), // 设置标注的偏移量
}); });
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>
...@@ -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) {},
......
...@@ -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",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment