|
@@ -8,7 +8,7 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
wxinit:false,
|
|
|
- mapopen:false,
|
|
|
+ mapopen:true,
|
|
|
initBl: false,
|
|
|
title: '乘车人',
|
|
|
show: false,
|
|
@@ -31,7 +31,8 @@ export default {
|
|
|
caritem:{
|
|
|
driverInfo:{}
|
|
|
},
|
|
|
- caritemBl:false,
|
|
|
+ caritemBl:false,
|
|
|
+ caritemBl2:false,
|
|
|
stationList: [],
|
|
|
routeTimeTableList:[],
|
|
|
dis:'',
|
|
@@ -210,7 +211,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
API.routeShiftList(obj).then((response) => {
|
|
|
- this.carList=response.data;
|
|
|
+ this.carList=[response.data];
|
|
|
|
|
|
if(!this.centerBl&&this.carList.length){
|
|
|
this.centerBl=this.$refs.amap.setCenter(this.carList[0]);
|
|
@@ -297,7 +298,7 @@ export default {
|
|
|
console.log("--------this.carList----------")
|
|
|
|
|
|
this.$refs.amap.setCarList(this.carList);
|
|
|
- this.vehicleStationDis();
|
|
|
+ //this.vehicleStationDis();
|
|
|
}).catch(error => {
|
|
|
console.log(error);
|
|
|
this.$refs.common.showLoading(false,error)
|
|
@@ -318,7 +319,7 @@ export default {
|
|
|
this.$refs.amap.setCenter(item);
|
|
|
this.downid=item.id;
|
|
|
this.downItem=item;
|
|
|
- this.vehicleStationDis();
|
|
|
+ //this.vehicleStationDis();
|
|
|
this.$forceUpdate()
|
|
|
},
|
|
|
remindAdd(){
|
|
@@ -385,7 +386,7 @@ export default {
|
|
|
|
|
|
},
|
|
|
carShow(item){
|
|
|
-
|
|
|
+ return
|
|
|
var caritem =null;
|
|
|
for(var i in this.carList){
|
|
|
var car= this.carList[i]
|
|
@@ -417,7 +418,7 @@ export default {
|
|
|
this.centerBl=false;
|
|
|
this.stationList.reverse();
|
|
|
this.getCar()
|
|
|
- this.passengerShiftRemindList();
|
|
|
+ // this.passengerShiftRemindList();
|
|
|
|
|
|
this.$refs.amap.setStartend(this.stationList);
|
|
|
document.getElementById('map-route-main').scrollLeft = 0
|
|
@@ -483,7 +484,7 @@ export default {
|
|
|
this.downItem=list[i];
|
|
|
}
|
|
|
}
|
|
|
- this.passengerShiftRemindList();
|
|
|
+ //this.passengerShiftRemindList();
|
|
|
|
|
|
this.$refs.common.showLoading(false)
|
|
|
|
|
@@ -534,16 +535,22 @@ export default {
|
|
|
}
|
|
|
if(this.downid){
|
|
|
this.downBtn(this.downItem)
|
|
|
+ }
|
|
|
+ if(this.mapopen){
|
|
|
+ this.$refs.amap.setMyStyle("width: 100%; height: 340px;")
|
|
|
+ }else{
|
|
|
+ this.$refs.amap.setMyStyle("width: 100%; height: 140px;")
|
|
|
+
|
|
|
}
|
|
|
|
|
|
},
|
|
|
getPoint() {
|
|
|
|
|
|
if (!this.info.init) {
|
|
|
- WxJsApi.getWxConfig([ 'getLocation','getSetting']).then(() => {
|
|
|
- // this.$refs.common.showLoading(false)
|
|
|
- this.getLocation()
|
|
|
- });
|
|
|
+ // WxJsApi.getWxConfig([ 'getLocation','getSetting']).then(() => {
|
|
|
+ // // this.$refs.common.showLoading(false)
|
|
|
+ // this.getLocation()
|
|
|
+ // });
|
|
|
}else{
|
|
|
this.getLocation()
|
|
|
}
|
|
@@ -555,6 +562,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
getLocation(){
|
|
|
+ return false;
|
|
|
WxJsApi.getLocation().then((res) => {
|
|
|
console.log("----getLocation ok-----")
|
|
|
var latitude = parseFloat(res.latitude);
|
|
@@ -577,9 +585,12 @@ export default {
|
|
|
|
|
|
},
|
|
|
onLoad(op) {
|
|
|
- this.upid=op.upid;
|
|
|
- this.id = op.id
|
|
|
- this.downid=op.downid;
|
|
|
+ // this.upid=op.upid;
|
|
|
+ // this.id = op.id
|
|
|
+ // this.downid=op.downid;
|
|
|
+
|
|
|
+ this.upid=1
|
|
|
+ this.id = 1
|
|
|
},
|
|
|
onUnload() {
|
|
|
if (this.myinterval) {
|
|
@@ -587,12 +598,12 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
onReady() {
|
|
|
- WxJsApi.getWxConfig([ 'getLocation','getSetting']).then(() => {
|
|
|
- // this.$refs.common.showLoading(false)
|
|
|
- this.wxinit=true;
|
|
|
+ // WxJsApi.getWxConfig([ 'getLocation','getSetting']).then(() => {
|
|
|
+ // // this.$refs.common.showLoading(false)
|
|
|
+ // this.wxinit=true;
|
|
|
|
|
|
|
|
|
- });
|
|
|
+ // });
|
|
|
|
|
|
this.getPassengerInfo()
|
|
|
|