35 lines
557 B
TypeScript
35 lines
557 B
TypeScript
export const SEX: SelectNode<number>[] = [
|
|
{
|
|
value: 0,
|
|
label: "男",
|
|
},
|
|
{
|
|
value: 1,
|
|
label: "女",
|
|
},
|
|
{
|
|
value: 2,
|
|
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 '-'
|
|
}
|