31 lines
514 B
TypeScript
31 lines
514 B
TypeScript
|
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 '-'
|
||
|
}
|