Commit 4bbf02ac authored by baixian's avatar baixian

最新代码提交2

parent c2800aa1
...@@ -693,6 +693,10 @@ class StudentMgt extends React.Component { ...@@ -693,6 +693,10 @@ class StudentMgt extends React.Component {
}, },
}); });
} }
let studentAge;
if (studentsdetail.birthday) {
studentAge = (new Date().getFullYear() + 1) - new Date(studentsdetail.birthday).getFullYear();
}
return ( return (
<div className={pageStyle.container}> <div className={pageStyle.container}>
{cropperboxShow && <Cropper {cropperboxShow && <Cropper
...@@ -747,7 +751,7 @@ class StudentMgt extends React.Component { ...@@ -747,7 +751,7 @@ class StudentMgt extends React.Component {
</Descriptions> </Descriptions>
<Descriptions> <Descriptions>
<Descriptions.Item label="状态">{studentsdetail.student_courses && studentsdetail.student_courses.length == 0 ? '未在读' : '在读'}</Descriptions.Item> <Descriptions.Item label="状态">{studentsdetail.student_courses && studentsdetail.student_courses.length == 0 ? '未在读' : '在读'}</Descriptions.Item>
<Descriptions.Item label="年龄">{(new Date().getFullYear() + 1) - new Date(studentsdetail.birthday).getFullYear()}</Descriptions.Item> <Descriptions.Item label="年龄">{studentAge || 0}</Descriptions.Item>
<Descriptions.Item label="备注">{studentsdetail.remark}</Descriptions.Item> <Descriptions.Item label="备注">{studentsdetail.remark}</Descriptions.Item>
</Descriptions> </Descriptions>
</Col> </Col>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment