refactor: 重构项目结构
- 优化 `车站-设备-告警` 轮询机制 - 改进设备卡片的布局 - 支持修改设备 - 告警轮询中获取完整告警数据 - 车站告警详情支持导出完整的 `今日告警列表` - 支持将状态持久化到 `IndexedDB` - 新增轮询控制 (调试模式) - 新增离线开发模式 (调试模式) - 新增 `IndexedDB` 数据控制 (调试模式)
This commit is contained in:
43
src/apis/domain/biz/station/device.ts
Normal file
43
src/apis/domain/biz/station/device.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
import type {
|
||||
NdmAlarmHostResultVO,
|
||||
NdmCameraResultVO,
|
||||
NdmDecoderResultVO,
|
||||
NdmKeyboardResultVO,
|
||||
NdmMediaServerResultVO,
|
||||
NdmNvrResultVO,
|
||||
NdmSecurityBoxResultVO,
|
||||
NdmSwitchResultVO,
|
||||
NdmVideoServerResultVO,
|
||||
Station,
|
||||
} from '@/apis';
|
||||
import { DEVICE_TYPE_LITERALS } from '@/enums';
|
||||
|
||||
export interface StationDevices {
|
||||
[DEVICE_TYPE_LITERALS.ndmAlarmHost]: NdmAlarmHostResultVO[];
|
||||
[DEVICE_TYPE_LITERALS.ndmCamera]: NdmCameraResultVO[];
|
||||
[DEVICE_TYPE_LITERALS.ndmDecoder]: NdmDecoderResultVO[];
|
||||
[DEVICE_TYPE_LITERALS.ndmKeyboard]: NdmKeyboardResultVO[];
|
||||
[DEVICE_TYPE_LITERALS.ndmMediaServer]: NdmMediaServerResultVO[];
|
||||
[DEVICE_TYPE_LITERALS.ndmNvr]: NdmNvrResultVO[];
|
||||
[DEVICE_TYPE_LITERALS.ndmSecurityBox]: NdmSecurityBoxResultVO[];
|
||||
[DEVICE_TYPE_LITERALS.ndmSwitch]: NdmSwitchResultVO[];
|
||||
[DEVICE_TYPE_LITERALS.ndmVideoServer]: NdmVideoServerResultVO[];
|
||||
}
|
||||
|
||||
export interface LineDevices {
|
||||
[stationCode: Station['code']]: StationDevices;
|
||||
}
|
||||
|
||||
export const initStationDevices = (): StationDevices => {
|
||||
return {
|
||||
[DEVICE_TYPE_LITERALS.ndmAlarmHost]: [],
|
||||
[DEVICE_TYPE_LITERALS.ndmCamera]: [],
|
||||
[DEVICE_TYPE_LITERALS.ndmDecoder]: [],
|
||||
[DEVICE_TYPE_LITERALS.ndmKeyboard]: [],
|
||||
[DEVICE_TYPE_LITERALS.ndmMediaServer]: [],
|
||||
[DEVICE_TYPE_LITERALS.ndmNvr]: [],
|
||||
[DEVICE_TYPE_LITERALS.ndmSecurityBox]: [],
|
||||
[DEVICE_TYPE_LITERALS.ndmSwitch]: [],
|
||||
[DEVICE_TYPE_LITERALS.ndmVideoServer]: [],
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user