policeSecurity/collect_information/src/enums/index.ts

31 lines
514 B
TypeScript
Raw Normal View History

2024-09-10 11:00:20 +08:00
export const SEX: SelectNode<number>[] = [
{
value: 0,
label: "男",
},
{
value: 1,
label: "女",
},
];
export const IDENTITY: SelectNode<string>[] = [
{
label: "公安",
value: "police"
},
{
label: "项目经理",
value: "project_manager"
},
]
export const getLabelByEnumValue = (enums: SelectNode<any>[], value: any): string => {
for (let i = 0; i < enums.length; i++) {
if (enums[i].value === value) {
return enums[i].label
}
}
return '-'
}