perf: optimize query and device tree
This commit is contained in:
@@ -7,7 +7,7 @@ import { storeToRefs } from 'pinia';
|
||||
import { computed } from 'vue';
|
||||
import dayjs from 'dayjs';
|
||||
import { postNdmDeviceAlarmLogPage } from '@/apis/requests';
|
||||
import { sleep } from '@/utils/sleep';
|
||||
import { sleep, sleepFrame, sleepIdle } from '@/utils/sleep';
|
||||
import type { Station } from '@/apis/domains';
|
||||
import { DeviceType, getDeviceTypeVal } from '@/enums/device-type';
|
||||
import type { StationAlarmCounts } from './domains';
|
||||
@@ -94,7 +94,7 @@ function useStationAlarmCountsMutation() {
|
||||
},
|
||||
onSuccess: async (stationAlarmCounts, { station }) => {
|
||||
lineAlarmCounts.value[station.code] = stationAlarmCounts;
|
||||
await sleep();
|
||||
await sleepFrame();
|
||||
},
|
||||
onError: (error, { station }) => {
|
||||
console.error(`获取车站 ${station.name} 设备告警数据失败:`, error);
|
||||
|
||||
Reference in New Issue
Block a user