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