mirror of
https://github.com/Spythere/srjp-td2.git
synced 2026-05-03 05:28:12 +00:00
chore: add up to three visible locomotives, if there any
This commit is contained in:
+24
-7
@@ -104,10 +104,11 @@
|
|||||||
'align-top': row.arrivalTracks != row.departureTracks,
|
'align-top': row.arrivalTracks != row.departureTracks,
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<td :colspan="row.departureTracks == 2 ? '1' : '2'">
|
<td :colspan="row.departureTracks == 2 ? '1' : '2'" class="font-bold" width="35">
|
||||||
{{ row.departureSpeed != row.arrivalSpeed || row.departureTracks != row.arrivalTracks ? row.departureSpeed : ' ' }}
|
{{ row.departureSpeed != row.arrivalSpeed || row.departureTracks != row.arrivalTracks ? row.departureSpeed : ' ' }}
|
||||||
</td>
|
</td>
|
||||||
<td v-if="row.departureTracks == 2" class="border-l print:border-l-black">
|
|
||||||
|
<td v-if="row.departureTracks == 2" class="border-l print:border-l-black" width="35">
|
||||||
{{ row.departureSpeed != row.arrivalSpeed || row.departureTracks != row.arrivalTracks ? row.departureSpeed : ' ' }}
|
{{ row.departureSpeed != row.arrivalSpeed || row.departureTracks != row.arrivalTracks ? row.departureSpeed : ' ' }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -161,13 +162,13 @@
|
|||||||
<table class="h-full">
|
<table class="h-full">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr class="border-b-[1px] border-b-white print:border-b-black">
|
<tr class="border-b-[1px] border-b-white print:border-b-black">
|
||||||
<td>{{ selectedTrain!.stockString.split(';')[0].split('-')[0] }}</td>
|
<td>{{ row.headLocos[0] }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="border-b-[1px] border-b-white print:border-b-black">
|
<tr class="border-b-[1px] border-b-white print:border-b-black">
|
||||||
<td> </td>
|
<td>{{ row.headLocos[1] ?? ' ' }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> </td>
|
<td>{{ row.headLocos[2] ?? ' ' }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@@ -178,10 +179,10 @@
|
|||||||
<table class="h-full">
|
<table class="h-full">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr class="border-b-[1px] border-b-white print:border-b-black">
|
<tr class="border-b-[1px] border-b-white print:border-b-black">
|
||||||
<td>{{ Math.floor(selectedTrain!.mass / 1000) }}</td>
|
<td>{{ row.stockMass }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ selectedTrain!.length }}</td>
|
<td>{{ row.stockLength }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@@ -227,6 +228,11 @@ interface StopRow {
|
|||||||
|
|
||||||
departureSpeed: number;
|
departureSpeed: number;
|
||||||
departureTracks: number;
|
departureTracks: number;
|
||||||
|
|
||||||
|
headLocos: string[];
|
||||||
|
stockVmax: number;
|
||||||
|
stockLength: number;
|
||||||
|
stockMass: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
@@ -255,6 +261,12 @@ export default defineComponent({
|
|||||||
|
|
||||||
if (!timetable) return null;
|
if (!timetable) return null;
|
||||||
|
|
||||||
|
const headLocos = this.selectedTrain.stockString.split(';').slice(0, 3).filter((s, i) => i == 0 || /-\d+$/.test(s)).map(s => s.slice(0, s.indexOf('-')));
|
||||||
|
|
||||||
|
const stockVmax = 70,
|
||||||
|
stockMass = Math.floor(this.selectedTrain.mass / 1000),
|
||||||
|
stockLength = this.selectedTrain.length;
|
||||||
|
|
||||||
const timetablePath = timetable.path.split(';').map((pathEl) => {
|
const timetablePath = timetable.path.split(';').map((pathEl) => {
|
||||||
const [arrivalLine, scenery, departureLine] = pathEl.split(',');
|
const [arrivalLine, scenery, departureLine] = pathEl.split(',');
|
||||||
const sceneryName = scenery.split(' ').slice(0, -1).join(' ');
|
const sceneryName = scenery.split(' ').slice(0, -1).join(' ');
|
||||||
@@ -337,6 +349,11 @@ export default defineComponent({
|
|||||||
|
|
||||||
departureSpeed: departureSpeed,
|
departureSpeed: departureSpeed,
|
||||||
departureTracks: departureTracks,
|
departureTracks: departureTracks,
|
||||||
|
|
||||||
|
headLocos,
|
||||||
|
stockVmax,
|
||||||
|
stockLength,
|
||||||
|
stockMass,
|
||||||
};
|
};
|
||||||
|
|
||||||
// console.log(stop.stopNameRAW, stop.departureLine);
|
// console.log(stop.stopNameRAW, stop.departureLine);
|
||||||
|
|||||||
Reference in New Issue
Block a user