36 lines
887 B
TypeScript
36 lines
887 B
TypeScript
export enum MachineAuthorizationTypeEnum {
|
|
|
|
/**
|
|
* 南枫AI
|
|
*/
|
|
NanFengAI = "南枫AI",
|
|
|
|
}
|
|
|
|
/**
|
|
* Maps a numeric index to a MachineAuthorizationType key-value pair
|
|
* @param index The numeric index to map
|
|
* @returns An object with the enum key and its corresponding value
|
|
*/
|
|
export function GetMachineAuthorizationTypeOption(index: number): string {
|
|
const keys = Object.keys(MachineAuthorizationTypeEnum);
|
|
switch (index) {
|
|
case 0:
|
|
return MachineAuthorizationTypeEnum[keys[0] as keyof typeof MachineAuthorizationTypeEnum];
|
|
default:
|
|
return MachineAuthorizationTypeEnum[keys[0] as keyof typeof MachineAuthorizationTypeEnum];
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 获取MachineAuthorizationType的选项
|
|
* @returns
|
|
*/
|
|
export function GetMachineAuthorizationTypeOptions(): { label: string, value: number }[] {
|
|
return [
|
|
{
|
|
label: "南枫AI",
|
|
value: 0
|
|
}
|
|
]
|
|
} |