|
@@ -6,7 +6,7 @@
|
|
|
:plugin="plugin"
|
|
|
:center="centerPoint"
|
|
|
:zoom="15"
|
|
|
- style="width: 100%; height: 400px"
|
|
|
+ style="width: 100%; height: 550px"
|
|
|
>
|
|
|
<!--车辆当前位置-->
|
|
|
<el-amap-marker
|
|
@@ -23,7 +23,7 @@
|
|
|
:key="station.id"
|
|
|
:position="station.position"
|
|
|
:title="station.title"
|
|
|
- :icon="stationIcon"
|
|
|
+ :icon="station.icon"
|
|
|
></el-amap-marker>
|
|
|
|
|
|
<!--路线-->
|
|
@@ -50,6 +50,9 @@ import routeInfoApi from "@/api/bus/routeInfo";
|
|
|
import vehicleInfoApi from "@/api/bus/vehicleInfo";
|
|
|
import busIcon from "@/assets/icons/bus.svg";
|
|
|
import stationIcon from "@/assets/icons/station.svg";
|
|
|
+import greenIcon from "@/assets/icons/green.svg";
|
|
|
+import redIcon from "@/assets/icons/red.svg";
|
|
|
+
|
|
|
|
|
|
export default {
|
|
|
props :{
|
|
@@ -91,9 +94,9 @@ export default {
|
|
|
|
|
|
console.log(this.centerPoint);
|
|
|
|
|
|
- setTimeout(()=>{
|
|
|
- this.loadVehicle(vehicleId);
|
|
|
- },60000);
|
|
|
+ // setTimeout(()=>{
|
|
|
+ // this.loadVehicle(vehicleId);
|
|
|
+ // },60000);
|
|
|
});
|
|
|
},
|
|
|
loadRouteMap(routeId) {
|
|
@@ -131,10 +134,24 @@ export default {
|
|
|
id: item.id,
|
|
|
title: item.name,
|
|
|
position: item.location.split(","),
|
|
|
+ icon: stationIcon
|
|
|
};
|
|
|
|
|
|
this.stationList.push(station);
|
|
|
|
|
|
+ if(item.stationSubInfoList!=null){
|
|
|
+ item.stationSubInfoList.forEach(subItem=>{
|
|
|
+ var startToEnd = subItem.startStationId == this.stationList[0].id;
|
|
|
+
|
|
|
+ this.stationList.push({
|
|
|
+ id: subItem.id,
|
|
|
+ title: item.name + "入口" + (startToEnd ? "(起)" : "(终)"),
|
|
|
+ position: [subItem.longitude,subItem.latitude],
|
|
|
+ icon: startToEnd ? greenIcon : redIcon
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
if (initMapPath) {
|
|
|
this.mapPath.push(station.position);
|
|
|
}
|