This commit is contained in:
yangsy
2025-08-17 01:22:08 +08:00
parent 0577042338
commit 8c8a791409
13 changed files with 663 additions and 62 deletions

View File

@@ -0,0 +1,18 @@
import { useStationStore } from '@/stores/station';
import { useQuery } from '@tanstack/vue-query';
import { storeToRefs } from 'pinia';
import { computed } from 'vue';
export function useLineDevicesQuery() {
const stationStore = useStationStore();
const { updatedTime, stationList, onlineStationList } = storeToRefs(stationStore);
return useQuery({
queryKey: ['line-devices', updatedTime],
enabled: computed(() => onlineStationList.value.length > 0),
queryFn: async () => {
if (!stationList?.value) {
}
},
});
}