| | |
| | | const getGenderText = (gender: number) => { |
| | | const genderMap: Record<number, string> = { |
| | | 1: '男', |
| | | 2: '女' |
| | | 0: '女' |
| | | } |
| | | return genderMap[gender] || '-' |
| | | } |
| | | |
| | | // 获取学历文本 |
| | | const getEducationText = (education: number) => { |
| | | const getEducationText = (education: number | string) => { |
| | | const educationMap: Record<number, string> = { |
| | | 1: '高中', |
| | | 2: '大专', |
| | |
| | | 4: '硕士', |
| | | 5: '博士' |
| | | } |
| | | return educationMap[education] || '-' |
| | | const numEducation = typeof education === 'string' ? parseInt(education) : education |
| | | return educationMap[numEducation] || '-' |
| | | } |
| | | |
| | | // 获取状态文本 |