Bladeren bron

📦 非遗路线优化

快乐的梦鱼 3 weken geleden
bovenliggende
commit
14622bf351
1 gewijzigde bestanden met toevoegingen van 27 en 22 verwijderingen
  1. 27 22
      src/pages/travel/route/travel-route.vue

+ 27 - 22
src/pages/travel/route/travel-route.vue

@@ -123,27 +123,25 @@
                               @click="(step as any).open=true"
                             />
                           </FlexRow>
-                          <CollapseBox :open="(step as any).open || step.lines?.length == 1">
-                            <FlexCol v-for="(line, lineIdx) in step.lines" :key="lineIdx" :gap="10">
-                              <FlexRow :gap="8" align="center">
-                                <template v-if="line.vehicle === 'BUS'">
-                                  <Icon v-if="line.vehicle === 'BUS'" icon="bus" :size="40" />
-                                  <Text color="text.second">公交</Text>
-                                </template>
-                                <template v-else-if="line.vehicle === 'SUBWAY'">
-                                  <Icon icon="subway" :size="40" />
-                                  <Text color="text.second">地铁</Text>
-                                </template>
-                                <template v-else-if="line.vehicle === 'RAIL'">
-                                  <Icon icon="rail" :size="40" />
-                                  <Text color="text.second">火车</Text>
-                                </template>
-                                <Text bold :color="(line as any).line_color || '#000'">{{ line.title }}</Text>
-                                <Text color="text.second" :margin="[0,0,0,8]">{{ line.geton?.title }} → {{ line.getoff?.title }}</Text>
-                              </FlexRow>
-                              <Text color="text.second">约 {{ formatDuration(line.duration) }} · {{ line.station_count || 0 }} 站</Text>
-                            </FlexCol>
-                          </CollapseBox>
+                          <FlexCol v-for="(line, lineIdx) in step.lines" :key="lineIdx" :gap="10" :padding="[0,0,0,50]">
+                            <FlexRow :gap="8" align="center">
+                              <template v-if="line.vehicle === 'BUS'">
+                                <Icon v-if="line.vehicle === 'BUS'" icon="bus" :size="40" />
+                                <Text color="text.second">公交</Text>
+                              </template>
+                              <template v-else-if="line.vehicle === 'SUBWAY'">
+                                <Icon icon="subway" :size="40" />
+                                <Text color="text.second">地铁</Text>
+                              </template>
+                              <template v-else-if="line.vehicle === 'RAIL'">
+                                <Icon icon="rail" :size="40" />
+                                <Text color="text.second">火车</Text>
+                              </template>
+                              <Text bold :color="(line as any).line_color || '#000'">{{ line.title }}</Text>
+                              <Text color="text.second" :margin="[0,0,0,8]">{{ line.geton?.title }} → {{ line.getoff?.title }}</Text>
+                            </FlexRow>
+                            <Text color="text.second">约 {{ formatDuration(line.duration) }} · {{ line.station_count || 0 }} 站</Text>
+                          </FlexCol>
                         </template>
                       </FlexCol>
                     </FlexCol>
@@ -332,7 +330,14 @@ function buildPolylineFromRouteInfo(info: RouteInfo) {
         const points = polylineToPoints(polylines[k]);
         if (points.length < 2) continue;
         const segmentTexts = k === 0 ? [{ name: label, startIndex: 0, endIndex: points.length - 1 }] : undefined;
-        segments.push({ points, color, width, level: 'aboveroads', segmentTexts, textStyle: segmentTexts ? textStyle : undefined });
+        segments.push({ 
+          points, 
+          color, 
+          width, 
+          level: 'aboveroads', 
+          segmentTexts, 
+          textStyle: segmentTexts ? textStyle : undefined 
+        });
       }
     } else {
       const encoded = (routeData as { polyline?: number[]; duration?: number })?.polyline;