refactor(enums): Tab order of DeviceTree
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
export const DeviceType = {
|
||||
AlarmHost: 'ndmAlarmHost',
|
||||
Camera: 'ndmCamera',
|
||||
Nvr: 'ndmNvr',
|
||||
Switch: 'ndmSwitch',
|
||||
@@ -8,13 +7,13 @@ export const DeviceType = {
|
||||
MediaServer: 'ndmMediaServer',
|
||||
VideoServer: 'ndmVideoServer',
|
||||
Keyboard: 'ndmKeyboard',
|
||||
AlarmHost: 'ndmAlarmHost',
|
||||
} as const;
|
||||
|
||||
export type DeviceTypeKey = keyof typeof DeviceType;
|
||||
export type DeviceTypeVal = (typeof DeviceType)[DeviceTypeKey];
|
||||
|
||||
export const DeviceTypeCode: Record<DeviceTypeVal, string[]> = {
|
||||
[DeviceType.AlarmHost]: ['117'],
|
||||
[DeviceType.Camera]: ['131', '132'],
|
||||
[DeviceType.Nvr]: ['111', '118'],
|
||||
[DeviceType.Switch]: ['220'],
|
||||
@@ -23,10 +22,10 @@ export const DeviceTypeCode: Record<DeviceTypeVal, string[]> = {
|
||||
[DeviceType.MediaServer]: ['403'],
|
||||
[DeviceType.VideoServer]: ['401'],
|
||||
[DeviceType.Keyboard]: ['141'],
|
||||
[DeviceType.AlarmHost]: ['117'],
|
||||
};
|
||||
|
||||
export const DeviceTypeName: Record<DeviceTypeVal, string> = {
|
||||
[DeviceType.AlarmHost]: '报警主机',
|
||||
[DeviceType.Camera]: '摄像机',
|
||||
[DeviceType.Nvr]: '网络录像机',
|
||||
[DeviceType.Switch]: '交换机',
|
||||
@@ -35,6 +34,7 @@ export const DeviceTypeName: Record<DeviceTypeVal, string> = {
|
||||
[DeviceType.MediaServer]: '媒体服务器',
|
||||
[DeviceType.VideoServer]: '视频服务器',
|
||||
[DeviceType.Keyboard]: '网络键盘',
|
||||
[DeviceType.AlarmHost]: '报警主机',
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user