|
@@ -191,11 +191,7 @@ export default defineComponent({
|
|
|
{title: '民族', dataIndex: 'nationName', key: 'nationName', width: 80, align: "center"},
|
|
|
{title: '联系电话', dataIndex: 'userMobile', key: 'userMobile',align: "center"},
|
|
|
{title: '所属驿站', dataIndex: 'siteName', key: 'siteName',align: "center"},
|
|
|
- {
|
|
|
- title: '年龄', dataIndex: 'age', key: 'age',align: "center", customRender: item => {
|
|
|
- return calculateAge(item.record.identityNumber);
|
|
|
- }
|
|
|
- },
|
|
|
+ {title: '年龄', dataIndex: 'age', key: 'age', align: "center"},
|
|
|
{title: '最高学历', dataIndex: 'cultureName', key: 'cultureName', align: "center"},
|
|
|
{title: '地址', dataIndex: 'address', key: 'address',align: "center"},
|
|
|
{title: '就业状态', dataIndex: 'jobStatusName', key: 'jobStatusName',align: "center"},
|
|
@@ -217,23 +213,6 @@ export default defineComponent({
|
|
|
const educationTypeList = ref<SelectProps['options']>();
|
|
|
const emphasisTypeList = ref<SelectProps['options']>();
|
|
|
|
|
|
- const calculateAge = (idCardNumber) => {
|
|
|
- // 假设身份证号中出生日期的格式为YYYYMMDD
|
|
|
- const birthYear = parseInt(idCardNumber.substring(6, 10), 10);
|
|
|
- const birthMonth = parseInt(idCardNumber.substring(10, 12), 10);
|
|
|
- const birthDay = parseInt(idCardNumber.substring(12, 14), 10);
|
|
|
- // 获取当前日期
|
|
|
- const currentDate = new Date();
|
|
|
- const currentYear = currentDate.getFullYear();
|
|
|
- const currentMonth = currentDate.getMonth() + 1; // 月份从 0 开始
|
|
|
- const currentDay = currentDate.getDate();
|
|
|
- // 计算年龄
|
|
|
- let age = currentYear - birthYear;
|
|
|
- if (currentMonth < birthMonth || (currentMonth === birthMonth && currentDay < birthDay)) {
|
|
|
- age--; // 生日还未过,减去一岁
|
|
|
- }
|
|
|
- return age;
|
|
|
- }
|
|
|
const onSelectChange = (selectedRowKeys: any) => {
|
|
|
formState.selectedRowKeys = selectedRowKeys;
|
|
|
};
|
|
@@ -356,7 +335,6 @@ export default defineComponent({
|
|
|
getSexList,
|
|
|
getEducationList,
|
|
|
getEmphasisTypeList,
|
|
|
- calculateAge,
|
|
|
onVitae,
|
|
|
expand,
|
|
|
exportSearchParams
|