feat: apply new stores to UI and hope it works
This commit is contained in:
@@ -3,15 +3,21 @@ import StationCard from '@/components/station-card.vue';
|
||||
import { NGrid, NGi } from 'naive-ui';
|
||||
import { useStationStore } from '@/stores/station';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { useLineDevicesStore } from '@/stores/line-devices';
|
||||
import { useLineAlarmsStore } from '@/stores/line-alarms';
|
||||
|
||||
const stationStore = useStationStore();
|
||||
const { stationList } = storeToRefs(stationStore);
|
||||
const lineDevicesStore = useLineDevicesStore();
|
||||
const { lineDevices } = storeToRefs(lineDevicesStore);
|
||||
const lineAlarmsStore = useLineAlarmsStore();
|
||||
const { lineAlarms } = storeToRefs(lineAlarmsStore);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NGrid :cols="8" :x-gap="6" :y-gap="6" style="padding: 8px">
|
||||
<NGi v-for="station in stationList" :key="station.name">
|
||||
<StationCard :station="station" />
|
||||
<StationCard :station="station" :station-devices="lineDevices[station.code]" :station-alarms="lineAlarms[station.code]" />
|
||||
</NGi>
|
||||
</NGrid>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user