From 4272cd90deef3bd5cf5332da8b7bfcd65f1c1d48 Mon Sep 17 00:00:00 2001 From: yangsy Date: Fri, 28 Nov 2025 14:41:48 +0800 Subject: [PATCH] fix: wait for 5s after syncCamera then refetch polling --- src/pages/station-page.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pages/station-page.vue b/src/pages/station-page.vue index de6b7ff..7126a53 100644 --- a/src/pages/station-page.vue +++ b/src/pages/station-page.vue @@ -3,6 +3,7 @@ import { syncCameraApi, syncNvrChannelsApi, type Station } from '@/apis'; import { DeviceAlarmDetailModal, DeviceExportModal, DeviceParamsConfigModal, OfflineDeviceDetailModal, RecordCheckExportModal, StationCard } from '@/components'; import { useLineAlarmsQuery, useLineDevicesQuery } from '@/composables'; import { useAlarmStore, useDeviceStore, usePollingStore, useSettingStore, useStationStore } from '@/stores'; +import { sleep } from '@/utils'; import { useMutation } from '@tanstack/vue-query'; import { NGrid, NGi, NScrollbar, NFlex, NButtonGroup, NButton, NCheckbox } from 'naive-ui'; import { storeToRefs } from 'pinia'; @@ -71,6 +72,7 @@ const { mutate: syncCamera, isPending: cameraSyncing } = useMutation({ .map(([code]) => code); for (const stationCode of stationCodes) { await syncCameraApi({ stationCode }); + await sleep(5000); } }, onSuccess: () => {