Commit 443c80c9 authored by youjie's avatar youjie

no message

parent 22fe9fce
......@@ -3,6 +3,7 @@
.card {width: 100vm;
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, -80), // 设置标注的偏移量
offset: new BMapGL.Size(10, -60), // 设置标注的偏移量
});
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>
......@@ -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)
}
})
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)
},
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() {
this.p = {};
this.initModel()
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) {},
......
......@@ -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",
......
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