|
@@ -200,6 +200,7 @@ export default {
|
|
return name.substring(0,1)+'师傅';
|
|
return name.substring(0,1)+'师傅';
|
|
},
|
|
},
|
|
getCar(){
|
|
getCar(){
|
|
|
|
+
|
|
if(this.stationList.length==0){
|
|
if(this.stationList.length==0){
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -210,6 +211,7 @@ export default {
|
|
|
|
|
|
API.routeShiftList(obj).then((response) => {
|
|
API.routeShiftList(obj).then((response) => {
|
|
this.carList=response.data;
|
|
this.carList=response.data;
|
|
|
|
+
|
|
if(!this.centerBl&&this.carList.length){
|
|
if(!this.centerBl&&this.carList.length){
|
|
this.centerBl=this.$refs.amap.setCenter(this.carList[0]);
|
|
this.centerBl=this.$refs.amap.setCenter(this.carList[0]);
|
|
//this.centerBl=true;
|
|
//this.centerBl=true;
|
|
@@ -246,31 +248,43 @@ export default {
|
|
var station =this.stationList[j];
|
|
var station =this.stationList[j];
|
|
station.currentStationStatus="1";
|
|
station.currentStationStatus="1";
|
|
}
|
|
}
|
|
|
|
+ console.log("this.stationList")
|
|
|
|
+
|
|
|
|
+ console.log(this.stationList)
|
|
|
|
+ console.log("this.stationList")
|
|
for(var j in this.stationList){
|
|
for(var j in this.stationList){
|
|
|
|
+
|
|
var station =this.stationList[j];
|
|
var station =this.stationList[j];
|
|
// station.currentStationStatus="1";
|
|
// station.currentStationStatus="1";
|
|
|
|
|
|
for(var i in this.carList){
|
|
for(var i in this.carList){
|
|
var car =this.carList[i];
|
|
var car =this.carList[i];
|
|
-
|
|
|
|
|
|
+
|
|
|
|
|
|
if(car.currentStationId==station.id){
|
|
if(car.currentStationId==station.id){
|
|
-
|
|
|
|
|
|
+ console.log(car.licensePlateNumber+"------"+station.name)
|
|
if(car.currentStationStatus==3){
|
|
if(car.currentStationStatus==3){
|
|
|
|
|
|
if(eval(j+"+"+1)!=this.stationList.length){
|
|
if(eval(j+"+"+1)!=this.stationList.length){
|
|
console.log(this.stationList[eval(j+"+"+1)].id);
|
|
console.log(this.stationList[eval(j+"+"+1)].id);
|
|
car.currentStationId2=this.stationList[eval(j+"+"+1)].id
|
|
car.currentStationId2=this.stationList[eval(j+"+"+1)].id
|
|
this.stationList[eval(j+"+"+1)].currentStationStatus="2";
|
|
this.stationList[eval(j+"+"+1)].currentStationStatus="2";
|
|
|
|
+
|
|
|
|
+ console.log("--------this.carList----A------"+car.licensePlateNumber)
|
|
|
|
+
|
|
|
|
+
|
|
}else{
|
|
}else{
|
|
- car.currentStationStatus==1
|
|
|
|
|
|
+ car.currentStationStatus=1
|
|
this.stationList[j].currentStationStatus="1";
|
|
this.stationList[j].currentStationStatus="1";
|
|
|
|
+ console.log("--------this.carList----B------"+car.licensePlateNumber)
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
}else{
|
|
}else{
|
|
this.stationList[j].currentStationStatus=car.currentStationStatus;
|
|
this.stationList[j].currentStationStatus=car.currentStationStatus;
|
|
|
|
+ console.log("--------this.carList----c------"+car.licensePlateNumber)
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
break;
|
|
break;
|
|
@@ -278,10 +292,14 @@ export default {
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+ console.log("--------this.carList----------")
|
|
console.log(this.carList)
|
|
console.log(this.carList)
|
|
|
|
+ console.log("--------this.carList----------")
|
|
|
|
+
|
|
this.$refs.amap.setCarList(this.carList);
|
|
this.$refs.amap.setCarList(this.carList);
|
|
this.vehicleStationDis();
|
|
this.vehicleStationDis();
|
|
- }).catch(error => {
|
|
|
|
|
|
+ }).catch(error => {
|
|
|
|
+ console.log(error);
|
|
this.$refs.common.showLoading(false,error)
|
|
this.$refs.common.showLoading(false,error)
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -335,7 +353,7 @@ export default {
|
|
console.log(item)
|
|
console.log(item)
|
|
if(item.type=="car"){
|
|
if(item.type=="car"){
|
|
setTimeout(()=>{
|
|
setTimeout(()=>{
|
|
- this.carShow({id:item.obj.currentStationId})
|
|
|
|
|
|
+ this.carShow3(item.obj)
|
|
}, 100);
|
|
}, 100);
|
|
}
|
|
}
|
|
if(item.type=="point"){
|
|
if(item.type=="point"){
|
|
@@ -357,6 +375,14 @@ export default {
|
|
}, 100);
|
|
}, 100);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ },
|
|
|
|
+ carShow3(item){
|
|
|
|
+
|
|
|
|
+ var caritem =item;
|
|
|
|
+
|
|
|
|
+ this.caritem=caritem;
|
|
|
|
+ this.caritemBl=true;
|
|
|
|
+
|
|
},
|
|
},
|
|
carShow(item){
|
|
carShow(item){
|
|
|
|
|