Quellcode durchsuchen

显示站点入口。

tomatozq vor 4 Jahren
Ursprung
Commit
446812e689
3 geänderte Dateien mit 13 neuen und 8 gelöschten Zeilen
  1. 1 1
      src/assets/icons/green.svg
  2. 1 0
      src/assets/icons/red.svg
  3. 11 7
      src/views/bus/shiftInfo-map.vue

+ 1 - 1
src/assets/icons/sub.svg → src/assets/icons/green.svg

@@ -1 +1 @@
-<svg t="1620830894455" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7357" width="32" height="32"><path d="M768 678.4C608 844.8 512 832 512 832s-121.6-12.8-249.6-153.6C128 531.2 128 396.8 128 339.2 128 147.2 307.2 0 512 0c211.2 0 384 147.2 384 339.2 0 76.8 12.8 198.4-128 339.2zM512 256c-70.4 0-128 57.6-128 128s57.6 128 128 128 128-57.6 128-128-57.6-128-128-128z m0 640c140.8 0 192 25.6 192 64s-51.2 64-192 64-192-25.6-192-64c0-32 51.2-64 192-64z" fill="#13227a" p-id="7358"></path></svg>
+<svg t="1620834019526" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1070" width="32" height="32"><path d="M768 678.4C608 844.8 512 832 512 832s-121.6-12.8-249.6-153.6C128 531.2 128 396.8 128 339.2 128 147.2 307.2 0 512 0c211.2 0 384 147.2 384 339.2 0 76.8 12.8 198.4-128 339.2zM512 256c-70.4 0-128 57.6-128 128s57.6 128 128 128 128-57.6 128-128-57.6-128-128-128z m0 640c140.8 0 192 25.6 192 64s-51.2 64-192 64-192-25.6-192-64c0-32 51.2-64 192-64z" fill="#1afa29" p-id="1071"></path></svg>

+ 1 - 0
src/assets/icons/red.svg

@@ -0,0 +1 @@
+<svg t="1620834019526" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1070" width="32" height="32"><path d="M768 678.4C608 844.8 512 832 512 832s-121.6-12.8-249.6-153.6C128 531.2 128 396.8 128 339.2 128 147.2 307.2 0 512 0c211.2 0 384 147.2 384 339.2 0 76.8 12.8 198.4-128 339.2zM512 256c-70.4 0-128 57.6-128 128s57.6 128 128 128 128-57.6 128-128-57.6-128-128-128z m0 640c140.8 0 192 25.6 192 64s-51.2 64-192 64-192-25.6-192-64c0-32 51.2-64 192-64z" fill="#d81e06" p-id="1071"></path></svg>

+ 11 - 7
src/views/bus/shiftInfo-map.vue

@@ -6,7 +6,7 @@
         :plugin="plugin"
         :center="centerPoint"
         :zoom="15"
-        style="width: 100%; height: 400px"
+        style="width: 100%; height: 550px"
       >
         <!--车辆当前位置-->
         <el-amap-marker
@@ -50,7 +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 subIcon from "@/assets/icons/sub.svg";
+import greenIcon from "@/assets/icons/green.svg";
+import redIcon from "@/assets/icons/red.svg";
+
 
 export default {
     props :{
@@ -92,9 +94,9 @@ export default {
 
                 console.log(this.centerPoint);
 
-                setTimeout(()=>{
-                    this.loadVehicle(vehicleId);
-                },60000);
+                // setTimeout(()=>{
+                //     this.loadVehicle(vehicleId);
+                // },60000);
             });
         },
         loadRouteMap(routeId) {
@@ -139,11 +141,13 @@ export default {
 
                             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 + "入口",
+                                        title: item.name + "入口" + (startToEnd ? "(起)" : "(终)"),
                                         position: [subItem.longitude,subItem.latitude],
-                                        icon: subIcon
+                                        icon: startToEnd ? greenIcon : redIcon
                                     });
                                 });
                             }