|
@@ -179,6 +179,7 @@
|
|
|
:key="station.id"
|
|
|
:position="station.position"
|
|
|
:title="station.title"
|
|
|
+ :icon="station.icon"
|
|
|
></el-amap-marker>
|
|
|
<!--路线-->
|
|
|
<el-amap-polyline
|
|
@@ -263,6 +264,9 @@ import routeInfoApi from "@/api/bus/routeInfo";
|
|
|
import SelectTree from "@/components/SelectTree";
|
|
|
import companyInfoApi from "@/api/bus/companyInfo";
|
|
|
|
|
|
+import stationIcon from "@/assets/icons/station.svg";
|
|
|
+import greenIcon from "@/assets/icons/green.svg";
|
|
|
+import redIcon from "@/assets/icons/red.svg";
|
|
|
|
|
|
|
|
|
import { getToken } from "@/utils/auth"; // get token from cookie
|
|
@@ -625,10 +629,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);
|
|
|
}
|