chore
This commit is contained in:
@@ -7,7 +7,6 @@ import { storeToRefs } from 'pinia';
|
||||
import { computed } from 'vue';
|
||||
import dayjs from 'dayjs';
|
||||
import { postNdmDeviceAlarmLogPage } from '@/apis/requests';
|
||||
import { sleepFrame } from '@/utils/sleep';
|
||||
import type { Station } from '@/apis/domains';
|
||||
import { DeviceType, getDeviceTypeVal } from '@/enums/device-type';
|
||||
import type { StationAlarmCounts } from './domains';
|
||||
@@ -47,6 +46,7 @@ export function useLineAlarmCountsQuery() {
|
||||
await getStationAlarmCounts({ station, signal });
|
||||
}
|
||||
console.timeEnd('useLineALarmCountsQuery');
|
||||
// queryControlStore.updateAlarmQueryUpdatedAt();
|
||||
return null;
|
||||
},
|
||||
});
|
||||
|
||||
@@ -8,7 +8,6 @@ import type { StationDevices } from './domains';
|
||||
import { useLineDevicesStore } from '@/stores/line-devices';
|
||||
import { LINE_DEVICES_QUERY_KEY } from '@/constants';
|
||||
import { ndmClient } from '@/apis/client';
|
||||
import { sleepFrame } from '@/utils/sleep';
|
||||
import type { Station } from '@/apis/domains';
|
||||
import { runTask } from '@/utils/run-task';
|
||||
|
||||
@@ -54,6 +53,7 @@ export function useLineDevicesQuery() {
|
||||
await getStationDevices({ station, signal });
|
||||
}
|
||||
console.timeEnd('useLineDevicesQuery');
|
||||
// queryControlStore.updateDeviceQueryUpdatedAt();
|
||||
return null;
|
||||
},
|
||||
});
|
||||
|
||||
@@ -12,6 +12,11 @@ export const useQueryControlStore = defineStore('ndm-query-control-store', () =>
|
||||
const updateDeviceQueryStamp = () => (deviceQueryStamp.value = dayjs().valueOf());
|
||||
const updateAlarmQueryStamp = () => (alarmQueryStamp.value = dayjs().valueOf());
|
||||
|
||||
const deviceQueryUpdatedAt = ref(0);
|
||||
const alarmQueryUpdatedAt = ref(0);
|
||||
const updateDeviceQueryUpdatedAt = () => (deviceQueryUpdatedAt.value = dayjs().valueOf());
|
||||
const updateAlarmQueryUpdatedAt = () => (alarmQueryUpdatedAt.value = dayjs().valueOf());
|
||||
|
||||
return {
|
||||
pollingEnabled,
|
||||
enablePolling,
|
||||
@@ -21,5 +26,10 @@ export const useQueryControlStore = defineStore('ndm-query-control-store', () =>
|
||||
alarmQueryStamp,
|
||||
updateDeviceQueryStamp,
|
||||
updateAlarmQueryStamp,
|
||||
|
||||
deviceQueryUpdatedAt,
|
||||
alarmQueryUpdatedAt,
|
||||
updateDeviceQueryUpdatedAt,
|
||||
updateAlarmQueryUpdatedAt,
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user