//获取生日和性别
getBirth(idCard) {
var birthday = "";
if(idCard != null && idCard != ""){
if(idCard.length == 15){
birthday = "19"+idCard.slice(6,12);
} else if(idCard.length == 18){
birthday = idCard.slice(6,14);
}
this.studentForm.birthday = birthday.replace(/(.{4})(.{2})/,"$1-$2-");
//通过正则表达式来指定输出格式为:1990-01-01
}
if (parseInt(idCard.slice(-2, -1)) % 2 == 1) {
this.studentForm.sex = '0';
}
else {
this.studentForm.sex = '1';
}
},