Commit d67be0df authored by 黄奎's avatar 黄奎

页面修改

parent 7615a005
...@@ -40,7 +40,6 @@ ...@@ -40,7 +40,6 @@
}, },
mounted() { mounted() {
console.log(this.dataList, 'datalist组件');
this.mapBuild() //初始化实例之后调用 this.mapBuild() //初始化实例之后调用
}, },
methods: { methods: {
...@@ -73,8 +72,6 @@ ...@@ -73,8 +72,6 @@
if (this.dataList && this.dataList.length > 0) { if (this.dataList && this.dataList.length > 0) {
let lat = parseFloat(this.dataList[0].lat) let lat = parseFloat(this.dataList[0].lat)
let lng = parseFloat(this.dataList[0].lng) let lng = parseFloat(this.dataList[0].lng)
// let lat = parseFloat(this.dataList[0].lat)
// let lng = parseFloat(this.dataList[0].lng)
let center = { let center = {
lng: lng, lng: lng,
lat: lat lat: lat
......
...@@ -830,10 +830,12 @@ ...@@ -830,10 +830,12 @@
<div class="border"></div> <div class="border"></div>
</div> </div>
<ul> <ul>
<li v-for="(item,index) in dataList.dayList" :key="index" :class="crtnav=='dayList'+(index+1)?'active':''" @click="goScroll('dayList'+(index+1),index)"> <li v-for="(item,index) in dataList.dayList" :key="index"
:class="crtnav=='dayList'+(index+1)?'active':''" @click="goScroll('dayList'+(index+1),index)">
<span class="dayIndex">D{{index+1}}</span> <span class="dayIndex">D{{index+1}}</span>
<template v-for="(suItem,subIndex) in item.dayArray"> <template v-for="(suItem,subIndex) in item.dayArray">
<template v-if="suItem.type==1" v-for="(childItem,childIndex) in suItem.childItem.subTraffic"> <template v-if="suItem.type==1"
v-for="(childItem,childIndex) in suItem.childItem.subTraffic">
<template v-if="childIndex==0"> <template v-if="childIndex==0">
<span class="city">{{childItem.startCityName}}</span> <span class="city">{{childItem.startCityName}}</span>
<i>-</i> <i>-</i>
...@@ -864,7 +866,8 @@ ...@@ -864,7 +866,8 @@
</div> </div>
<div class="cities"> <div class="cities">
<template v-for="suItem in item.dayArray"> <template v-for="suItem in item.dayArray">
<template v-if="suItem.type==1" v-for="(childItem,childIndex) in suItem.childItem.subTraffic"> <template v-if="suItem.type==1"
v-for="(childItem,childIndex) in suItem.childItem.subTraffic">
<template v-if="childIndex==0"> <template v-if="childIndex==0">
<span class="city">{{childItem.startCityName}}</span> <span class="city">{{childItem.startCityName}}</span>
<i class="iconfont icon-daoda icon"></i> <i class="iconfont icon-daoda icon"></i>
...@@ -907,7 +910,8 @@ ...@@ -907,7 +910,8 @@
<span class="subTitle">交通方案</span> <span class="subTitle">交通方案</span>
</div> </div>
</div> </div>
<div class="col-md-12 col-sm-12" v-if="dataList.currentPriceInfo.priceFlight&&dataList.currentPriceInfo.priceFlight!=null" <div class="col-md-12 col-sm-12"
v-if="dataList.currentPriceInfo.priceFlight&&dataList.currentPriceInfo.priceFlight!=null"
v-for="(item,index) in dataList.currentPriceInfo.priceFlight" :key="index"> v-for="(item,index) in dataList.currentPriceInfo.priceFlight" :key="index">
<div class="arrangementSubContainer"> <div class="arrangementSubContainer">
<div class="header"> <div class="header">
...@@ -942,7 +946,8 @@ ...@@ -942,7 +946,8 @@
<span class="subTitle">酒店安排</span> <span class="subTitle">酒店安排</span>
</div> </div>
<template v-for="(item,index) in dataList.dayList"> <template v-for="(item,index) in dataList.dayList">
<template v-for="(subItem,subIndex) in item.dayArray" v-if="subItem.type==3"> <template v-for="(subItem,subIndex) in item.dayArray"
v-if="subItem.type==3">
<div class="col-md-12 col-sm-12"> <div class="col-md-12 col-sm-12">
<div class="arrangementSubContainer"> <div class="arrangementSubContainer">
<div class="header hotel"> <div class="header hotel">
...@@ -956,7 +961,8 @@ ...@@ -956,7 +961,8 @@
<span class="left"> <span class="left">
<i class="iconfont icon-bed"></i> <i class="iconfont icon-bed"></i>
</span> </span>
<span class="right">{{subItem.childItem.newHotelName}}</span> <span
class="right">{{subItem.childItem.newHotelName}}</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -968,7 +974,8 @@ ...@@ -968,7 +974,8 @@
</div> </div>
</div> </div>
</div> </div>
<div class="swiper-slide" v-for="(item,index) in dataList.dayList" :id="'dayList'+(index+1)" :key="index"> <div class="swiper-slide" v-for="(item,index) in dataList.dayList" :id="'dayList'+(index+1)"
:key="index">
<div class="inner"> <div class="inner">
<div class="slideHeader" style="position:relative;"> <div class="slideHeader" style="position:relative;">
<div class="dayNum">D{{index+1}}</div> <div class="dayNum">D{{index+1}}</div>
...@@ -976,7 +983,8 @@ ...@@ -976,7 +983,8 @@
<div class="dateEleSpace"></div> <div class="dateEleSpace"></div>
<div class="cities"> <div class="cities">
<template v-for="suItem in item.dayArray"> <template v-for="suItem in item.dayArray">
<template v-if="suItem.type==1" v-for="(childItem,childIndex) in suItem.childItem.subTraffic"> <template v-if="suItem.type==1"
v-for="(childItem,childIndex) in suItem.childItem.subTraffic">
<template v-if="childIndex==0"> <template v-if="childIndex==0">
<span class="city">{{childItem.startCityName}}</span> <span class="city">{{childItem.startCityName}}</span>
<i class="iconfont icon-daoda icon"></i> <i class="iconfont icon-daoda icon"></i>
...@@ -1007,84 +1015,96 @@ ...@@ -1007,84 +1015,96 @@
<template v-if="subItem.type==2"> <template v-if="subItem.type==2">
<div class="agendaBox"> <div class="agendaBox">
<div class="indexNum numberList">{{index+1}}</div> <div class="indexNum numberList">{{index+1}}</div>
<div class="coverWrap" :style="`background: url(${subItem.childItem.imaArray[0].url}) no-repeat 100% 100%`"> <div class="coverWrap"
:style="`background: url(${subItem.childItem.imaArray[0].url}) no-repeat 100% 100%`">
</div> </div>
<div class="txtCont icon-triangle"> <div class="txtCont icon-triangle">
<div class="detailBox"> <div class="detailBox">
<div style="border-top:0;margin:20px 0;" v-html='subItem.childItem.descriptionText'></div> <div style="border-top:0;margin:20px 0;"
v-html='subItem.childItem.descriptionText'></div>
</div> </div>
<div class="Divtriangle"> <div class="Divtriangle">
<span></span> <span></span>
</div> </div>
<div class="detailSection" style="margin-top:0;" v-if="subItem.childItem.playTimeHour||subItem.childItem.playTimeMinutes"> <div class="detailSection" style="margin-top:0;"
v-if="subItem.childItem.playTimeHour||subItem.childItem.playTimeMinutes">
<div class="item"> <div class="item">
<span class="label">建议游玩时间</span> <span class="label">建议游玩时间</span>
<span class="text"> <span class="text">
<template v-if="subItem.childItem.playTimeHour">{{subItem.childItem.playTimeHour}}小时</template> <template
v-if="subItem.childItem.playTimeHour">{{subItem.childItem.playTimeHour}}小时</template>
<template <template
v-if="subItem.childItem.playTimeMinutes">{{subItem.childItem.playTimeMinutes}}分钟</template> v-if="subItem.childItem.playTimeMinutes">{{subItem.childItem.playTimeMinutes}}分钟</template>
</span>
</div>
</div>
</div>
</div>
</template>
<template v-if="subItem.type==3">
<div class="agendaBox">
<div class="indexNum tos-icon hotelPre ">
<i class="iconfont icon-moono"></i>
</div>
<div class="coverWrap" v-if="subItem.childItem.imaArray.length>0" :style="`background: url(${subItem.childItem.imaArray[0].url}) no-repeat 100% 100%`">
</div>
<div class="txtCont icon-triangle" v-if="subItem.childItem.imaArray.length>0">
<div class="agendaPoi">
<i class="iconfont icon-bed bed"></i>
<span class="title">{{subItem.childItem.newHotelName}}</span>
</div>
<div class="detailBox">
<div class="detailSection">
<div class="item">
<span class="label">酒店星级</span>
<span class="text">
<el-rate v-model="subItem.childItem.star" disabled></el-rate>
</span> </span>
</div> </div>
<div class="item">
<span class="label">设施服务</span>
<span class="text">{{getService(subItem.childItem.facilityServices)}}</span>
</div>
</div> </div>
<div class="subSection" v-if="subItem.childItem.hotelNewDescriptionText">{{subItem.childItem.hotelNewDescriptionText}}</div> </div>
<div class="detailSection" style="margin-top:0;"> </div>
<div class="item"> </template>
<span class="label">地址</span> <template v-if="subItem.type==3">
<span class="text">{{subItem.childItem.hotelAddress}}</span> <div class="agendaBox">
<div class="indexNum tos-icon hotelPre ">
<i class="iconfont icon-moono"></i>
</div>
<div class="coverWrap" v-if="subItem.childItem.imaArray.length>0"
:style="`background: url(${subItem.childItem.imaArray[0].url}) no-repeat 100% 100%`">
</div>
<div class="txtCont icon-triangle"
v-if="subItem.childItem.imaArray.length>0">
<div class="agendaPoi">
<i class="iconfont icon-bed bed"></i>
<span
class="title">{{subItem.childItem.newHotelName}}</span>
</div>
<div class="detailBox">
<div class="detailSection">
<div class="item">
<span class="label">酒店星级</span>
<span class="text">
<el-rate v-model="subItem.childItem.star"
disabled></el-rate>
</span>
</div>
<div class="item">
<span class="label">设施服务</span>
<span
class="text">{{getService(subItem.childItem.facilityServices)}}</span>
</div>
</div> </div>
<div class="item"> <div class="subSection"
<span class="label">网址</span> v-if="subItem.childItem.hotelNewDescriptionText">
<span class="text">{{subItem.childItem.url}}</span> {{subItem.childItem.hotelNewDescriptionText}}</div>
<div class="detailSection" style="margin-top:0;">
<div class="item">
<span class="label">地址</span>
<span
class="text">{{subItem.childItem.hotelAddress}}</span>
</div>
<div class="item">
<span class="label">网址</span>
<span class="text">{{subItem.childItem.url}}</span>
</div>
</div> </div>
</div> </div>
</div> <div class="Divtriangle">
<div class="Divtriangle"> <span></span>
<span></span> </div>
</div> </div>
</div> </div>
</div> </template>
</template> </template>
</template> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> <div class="viewTripMap">
<div class="viewTripMap"> <tripMap :dataList="travelLngLat" :type="1" ref="tripMap"></tripMap>
<tripMap :dataList="travelLngLat" :type="1" ref="tripMap"></tripMap> </div>
</div> </div>
</div> </div>
</div>
</template> </template>
<script> <script>
import tripMap from '../global/tripMap' import tripMap from '../global/tripMap'
...@@ -1109,7 +1129,6 @@ ...@@ -1109,7 +1129,6 @@
mounted() { mounted() {
this.msg.ID = this.$route.query.ID; this.msg.ID = this.$route.query.ID;
this.msg.tcid = this.$route.query.tcid; this.msg.tcid = this.$route.query.tcid;
this.crtnav = 'tripLine'; this.crtnav = 'tripLine';
this.scrollobj = document.getElementsByClassName('el-scrollbar__wrap')[0]; this.scrollobj = document.getElementsByClassName('el-scrollbar__wrap')[0];
this.scrollobj.addEventListener('scroll', this.handleScroll); this.scrollobj.addEventListener('scroll', this.handleScroll);
...@@ -1130,19 +1149,15 @@ ...@@ -1130,19 +1149,15 @@
} }
} }
}, },
methods: { methods: {
//加载数据 //加载数据
getTrip() { getTrip() {
this.apipost('b2b_get_GetB2BTravelInfoV1', this.msg, res => { this.apipost('b2b_get_GetB2BTravelInfoV1', this.msg, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.dataList = res.data.data; this.dataList = res.data.data;
console.log(" this.dataList ", this.dataList); console.log("this.dataList", this.dataList);
this.isShow = true; this.isShow = true;
this.getAllPoint(); this.getAllPoint();
// this.$refs.tripMap.mapBuild();
} else { } else {
this.Error(res.data.message) this.Error(res.data.message)
} }
...@@ -1166,14 +1181,13 @@ ...@@ -1166,14 +1181,13 @@
this.getDayPoint(index); this.getDayPoint(index);
this.$refs.tripMap.mapBuild(); this.$refs.tripMap.mapBuild();
} }
this.crtnav = id; this.crtnav = id;
this.scrollobj.scrollTop = document.getElementById(id).offsetTop; this.scrollobj.scrollTop = document.getElementById(id).offsetTop;
}, },
//加载所有坐标点 //加载所有坐标点
getAllPoint() { getAllPoint() {
let Arr = []; let Arr = [];
if (this.dataList && this.dataList.length > 0) { if (this.dataList && this.dataList.dayList && this.dataList.dayList.length > 0) {
this.dataList.dayList.forEach(x => { this.dataList.dayList.forEach(x => {
x.dayArray.forEach(y => { x.dayArray.forEach(y => {
if (y.type == 1) { if (y.type == 1) {
...@@ -1195,39 +1209,38 @@ ...@@ -1195,39 +1209,38 @@
}) })
} }
}) })
}) });
this.travelLngLat = Arr;
} }
console.log(Arr, 'Arrrr');
this.travelLngLat = Arr;
}, },
//加载当日坐标点 //加载当日坐标点
getDayPoint(index) { getDayPoint(index) {
let Arr = []; let Arr = [];
this.dataList.dayList[index].dayArray.forEach(x => { if (this.dataList && this.dataList.dayList && this.dataList.dayList.length > 0) {
if (x.type == 1) { this.dataList.dayList[index].dayArray.forEach(x => {
x.childItem.subTraffic.forEach(z => { if (x.type == 1) {
let obj1 = { x.childItem.subTraffic.forEach(z => {
lat: z.startCityPoint[1], let obj1 = {
lng: z.startCityPoint[0], lat: z.startCityPoint[1],
name: z.arrivalCityName, lng: z.startCityPoint[0],
type: 1 name: z.arrivalCityName,
} type: 1
let obj2 = { }
lat: z.arrivalCityPoint[1], let obj2 = {
lng: z.arrivalCityPoint[0], lat: z.arrivalCityPoint[1],
name: z.startCityName, lng: z.arrivalCityPoint[0],
type: 1 name: z.startCityName,
} type: 1
Arr.push(obj1); }
Arr.push(obj2); Arr.push(obj1);
}) Arr.push(obj2);
} })
}) }
console.log(Arr, 'day加载'); })
this.travelLngLat = Arr; console.log('day加载' + index, Arr);
this.travelLngLat = Arr;
}
}, },
//滚动选中 //滚动选中
handleScroll() { handleScroll() {
try { try {
...@@ -1243,18 +1256,12 @@ ...@@ -1243,18 +1256,12 @@
} }
}) })
this.crtnav = current this.crtnav = current
// if(current=='tripLine'||current=='aboutTrip'||current=='tripArrange'){
// this.getAllPoint();
// }
if (current.indexOf("dayList") != -1) { if (current.indexOf("dayList") != -1) {
let index = current.split('dayList')[1]; let index = current.split('dayList')[1];
this.dataindex = index; this.dataindex = index;
} }
} catch (error) { } catch (error) {}
}
}, },
} }
} }
</script> </script>
\ No newline at end of file
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