refactor:

- extend NdmDeviceAlarmLogVO
- only query alarm counts
- separate request and store update in useQuery
- refactor station card and alarm modal, data fetching is now inside modal
- optimize device tree
- optimize query station list
- make export size follow page size
- fix query sequence and make them follow stations -> devices -> alarms
This commit is contained in:
yangsy
2025-09-02 14:21:13 +08:00
parent 54a150ec07
commit 7afb79f826
21 changed files with 475 additions and 439 deletions

View File

@@ -1 +1,26 @@
export * from './station-devices';
import type {
NdmCameraResultVO,
NdmDecoderResultVO,
NdmKeyboardResultVO,
NdmMediaServerResultVO,
NdmNvrResultVO,
NdmSecurityBoxResultVO,
NdmSwitchResultVO,
NdmVideoServerResultVO,
} from '@/apis/models';
import type { DeviceType } from '@/enums/device-type';
export interface StationDevices {
[DeviceType.Camera]: NdmCameraResultVO[];
[DeviceType.Decoder]: NdmDecoderResultVO[];
[DeviceType.Keyboard]: NdmKeyboardResultVO[];
[DeviceType.MediaServer]: NdmMediaServerResultVO[];
[DeviceType.Nvr]: NdmNvrResultVO[];
[DeviceType.SecurityBox]: NdmSecurityBoxResultVO[];
[DeviceType.Switch]: NdmSwitchResultVO[];
[DeviceType.VideoServer]: NdmVideoServerResultVO[];
}
export interface LineDevices {
[stationCode: string]: StationDevices;
}

View File

@@ -1,22 +0,0 @@
import type {
NdmCameraResultVO,
NdmDecoderResultVO,
NdmKeyboardResultVO,
NdmMediaServerResultVO,
NdmNvrResultVO,
NdmSecurityBoxResultVO,
NdmSwitchResultVO,
NdmVideoServerResultVO,
} from '@/apis/models';
import type { DeviceType } from '@/enums/device-type';
export interface StationDevices {
[DeviceType.Camera]: NdmCameraResultVO[];
[DeviceType.Decoder]: NdmDecoderResultVO[];
[DeviceType.Keyboard]: NdmKeyboardResultVO[];
[DeviceType.MediaServer]: NdmMediaServerResultVO[];
[DeviceType.Nvr]: NdmNvrResultVO[];
[DeviceType.SecurityBox]: NdmSecurityBoxResultVO[];
[DeviceType.Switch]: NdmSwitchResultVO[];
[DeviceType.VideoServer]: NdmVideoServerResultVO[];
}