policeSecurity/collect_information/src/enums/index.ts

35 lines
557 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: "女",
},
2024-09-13 09:40:08 +08:00
{
value: 2,
label: "隐藏",
}
2024-09-10 11:00:20 +08:00
];
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 '-'
}