Commit ff7e6cb4 authored by 杨梦雪's avatar 杨梦雪

个人信息新增

parent d6aad0e3
...@@ -99,46 +99,46 @@ ...@@ -99,46 +99,46 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- 入学年份 --> <!-- 入学年份 -->
<!-- <el-col :span="12">--> <!--<el-col :span="12">
<!-- <el-form-item label="入学年份" prop="start_school_date">--> <el-form-item label="入学年份" prop="start_school_date">
<!-- <el-row :gutter="20">--> <el-row :gutter="20">
<!-- <el-col :span="12">--> <el-col :span="12">
<!-- <el-select--> <el-select
<!-- v-model="start_grade"--> v-model="start_grade"
<!-- placeholder="年级"--> placeholder="年级"
<!-- :popper-append-to-body="false"--> :popper-append-to-body="false"
<!-- clearable--> clearable
<!-- >--> >
<!-- <el-option--> <el-option
<!-- v-for="(item, index) in gradeArrs"--> v-for="(item, index) in gradeArrs"
<!-- :key="index"--> :key="index"
<!-- :label="item"--> :label="item"
<!-- :value="item"--> :value="item"
<!-- >--> >
<!-- </el-option>--> </el-option>
<!-- </el-select>--> </el-select>
<!-- </el-col>--> </el-col>
<!-- <el-col :span="24">--> <el-col :span="24">
<!-- <el-select--> <el-select
<!-- ref="start_school_date"--> ref="start_school_date"
<!-- v-model="start_year"--> v-model="start_year"
<!-- placeholder="年份"--> placeholder="年份"
<!-- clearable--> clearable
<!-- :popper-append-to-body="false"--> :popper-append-to-body="false"
<!-- @change="getyear()"--> @change="getyear()"
<!-- >--> >
<!-- <el-option--> <el-option
<!-- v-for="(item, index) in yearArrs"--> v-for="(item, index) in yearArrs"
<!-- :key="index"--> :key="index"
<!-- :label="item"--> :label="item"
<!-- :value="item"--> :value="item"
<!-- >--> >
<!-- </el-option>--> </el-option>
<!-- </el-select>--> </el-select>
<!-- </el-col>--> </el-col>
<!-- </el-row>--> </el-row>
<!-- </el-form-item>--> </el-form-item>
<!-- </el-col>--> </el-col>-->
<!-- 身份证号 --> <!-- 身份证号 -->
<el-col :span="12" v-show="configJson.idCard == 1"> <el-col :span="12" v-show="configJson.idCard == 1">
<el-form-item <el-form-item
...@@ -541,7 +541,7 @@ ...@@ -541,7 +541,7 @@
<el-select <el-select
v-model="referForm.chooseSubject" v-model="referForm.chooseSubject"
multiple multiple
placeholder="请选" placeholder="请选"
:popper-append-to-body="false" :popper-append-to-body="false"
:multiple-limit="3" :multiple-limit="3"
@change="changeSubjectList" @change="changeSubjectList"
...@@ -600,6 +600,7 @@ ...@@ -600,6 +600,7 @@
<!-- 邀请码 --> <!-- 邀请码 -->
<el-col :span="12" v-show="doubt_code == 1"> <el-col :span="12" v-show="doubt_code == 1">
<el-form-item <el-form-item
prop="code"
label="邀请码" label="邀请码"
style="height: 73px" style="height: 73px"
> >
...@@ -609,6 +610,7 @@ ...@@ -609,6 +610,7 @@
placeholder="邀请码" placeholder="邀请码"
size="small" size="small"
:disabled="isCode" :disabled="isCode"
@change="changeCode"
clearable clearable
/> />
</el-form-item> </el-form-item>
...@@ -1118,7 +1120,7 @@ ...@@ -1118,7 +1120,7 @@
selectSchoolList: [], //就读中学-中学列表 selectSchoolList: [], //就读中学-中学列表
jgProvinceCode: "", //省份id jgProvinceCode: "", //省份id
jiguan_city: "", //城市id(和省份id拼接) jiguan_city: "", //城市id(和省份id拼接)
electSubjectArrs: ["已选科", "选科"], electSubjectArrs: ["未选科", "选科"],
SubjectArrs: ["物理", "历史", "化学", "地理", "生物", "政治",], SubjectArrs: ["物理", "历史", "化学", "地理", "生物", "政治",],
EducationArrs: ["初中", "高中", "大学", "硕士", "博士"], EducationArrs: ["初中", "高中", "大学", "硕士", "博士"],
yearArrs: [], //生日涉及的近10年的年份 yearArrs: [], //生日涉及的近10年的年份
...@@ -1224,7 +1226,6 @@ ...@@ -1224,7 +1226,6 @@
if (this.configJson.jiguanCity == 1 || this.configJson.school == 1) { if (this.configJson.jiguanCity == 1 || this.configJson.school == 1) {
this.getProAndCity(); this.getProAndCity();
} }
}, },
watch: { watch: {
referForm(val) { referForm(val) {
...@@ -1275,20 +1276,25 @@ ...@@ -1275,20 +1276,25 @@
this.changeProvince(2, this.referForm.school_province, true); this.changeProvince(2, this.referForm.school_province, true);
this.changeCity(this.referForm.school_city, true); this.changeCity(this.referForm.school_city, true);
} }
if (this.invitation_code != null) {
this.referForm.code = this.invitation_code if (val.elect_subject_situation != null &&
this.isCode = true val.elect_subject_situation !== '' &&
} val.elect_subject_situation !== '-') {
if (val.elect_subject_situation !== null) {
this.referForm.subjectState = '已选科'; this.referForm.subjectState = '已选科';
this.showSubject = 1; this.showSubject = 1;
this.referForm.chooseSubject = val.elect_subject_situation.split('#') this.referForm.chooseSubject = val.elect_subject_situation.split('#');
this.elect_subject_situation = val.elect_subject_situation this.elect_subject_situation = val.elect_subject_situation;
} else { } else {
this.referForm.subjectState = '未选科' this.referForm.subjectState = '未选科';
this.showSubject = 0; this.showSubject = 0;
this.elect_subject_situation = '-';
this.referForm.chooseSubject = [];
}
console.log(this.referForm)
if (this.invitation_code != null) {
this.referForm.code = this.invitation_code;
this.isCode = true;
} }
}, },
}, },
mounted() { mounted() {
...@@ -1301,8 +1307,43 @@ ...@@ -1301,8 +1307,43 @@
if (res.data.code != 200) { if (res.data.code != 200) {
return this.$message.error(res.data.message); return this.$message.error(res.data.message);
} }
this.referForm = res.data.info; let info = res.data.info;
console.log(this.referForm) info['code'] = null
let referForm = {
name: null,
gender: null,
age: null,
id_card: null,
education: null,
birthday: null,
jiguan_code: null,
address: null,
country: null,
nation: null,
start_school_date: null,
political_status: null,
phone: null,
grade: null,
unit_and_identity: null,
email: null,
recommend: null,
subjectState: null,
chooseSubject: [],
past_medical_history: null,
note_other: null,
emergency: null,
emergency_phone: null,
school_province: null,
school_city: null,
school: null,
school_contacts: null,
school_phone: null,
code: null
}
for (let k in info) {
referForm[k] = info[k];
}
this.referForm = referForm;
if (res.data.info.jiguan_province && res.data.info.jiguan_city) { if (res.data.info.jiguan_province && res.data.info.jiguan_city) {
this.referForm.jiguan_code = this.referForm.jiguan_code =
res.data.info.jiguan_province.toString() + res.data.info.jiguan_province.toString() +
...@@ -1325,16 +1366,20 @@ ...@@ -1325,16 +1366,20 @@
let year = currentYear - i; let year = currentYear - i;
yearArr.push(year); yearArr.push(year);
} }
console.log(yearArr, "yearArr"); // console.log(yearArr, "yearArr");
this.yearArrs = yearArr; this.yearArrs = yearArr;
}, },
//邀请码
changeCode(val) {
console.log(val)
console.log(this.referForm.chooseSubject)
},
//组装出生日期 //组装出生日期
getTime() { getTime() {
this.referForm.birthday = this.referForm.birthday =
this.bdYear.toString() + this.bdYear.toString() +
this.bdMonth.toString() + this.bdMonth.toString() +
this.bdDay.toString(); this.bdDay.toString();
// console.log(this.referForm.birthday);
}, },
// 国籍 // 国籍
//组装入学年份 //组装入学年份
...@@ -1345,17 +1390,17 @@ ...@@ -1345,17 +1390,17 @@
}, },
// 选科情况 // 选科情况
changeSubjectState(val) { changeSubjectState(val) {
console.log(val) // this.referForm.subjectState = val
console.log(this.referForm.subjectState)
this.referForm.subjectState = val
console.log(val == '未选科')
if (val == '已选科') { if (val == '已选科') {
this.showSubject = 1 this.referForm.subjectState = '已选科';
this.showSubject = 1;
this.elect_subject_situation = '';
// console.log(this.elect_subject_situation)
} else { } else {
this.showSubject = 0 this.showSubject = 0
this.referForm.subjectState = '未选科' this.referForm.subjectState = '未选科'
this.elect_subject_situation = '' this.elect_subject_situation = '-'
console.log(this.referForm.subjectState) // console.log(this.referForm.subjectState)
} }
}, },
changeSubjectList(val) { changeSubjectList(val) {
...@@ -1409,7 +1454,6 @@ ...@@ -1409,7 +1454,6 @@
if (res.data.code === 200) { if (res.data.code === 200) {
// this.selectProvince = res.data.province_list; // this.selectProvince = res.data.province_list;
this.CityName = res.data.city_list; this.CityName = res.data.city_list;
for (let key in this.CityName) { for (let key in this.CityName) {
if (this.CityName[key].parent_id == val) { if (this.CityName[key].parent_id == val) {
currentCity.push(this.CityName[key]); currentCity.push(this.CityName[key]);
...@@ -1452,7 +1496,6 @@ ...@@ -1452,7 +1496,6 @@
// console.log(12345333,val,status) // console.log(12345333,val,status)
this.selectSchoolList = []; this.selectSchoolList = [];
this.selectSchoolList = this.getCurrentSchoolLists(val); this.selectSchoolList = this.getCurrentSchoolLists(val);
console.log(this.selectSchoolList, "selectSchoolList");
if (!status) { if (!status) {
this.referForm.school = ""; this.referForm.school = "";
} }
...@@ -1491,11 +1534,9 @@ ...@@ -1491,11 +1534,9 @@
"schoolName" + code, "schoolName" + code,
JSON.stringify(res.data.list) JSON.stringify(res.data.list)
); );
for (let key in this.schoolName) { for (let key in this.schoolName) {
if (this.schoolName[key].city_id == val) { if (this.schoolName[key].city_id == val) {
currentSchool.push(this.schoolName[key]); currentSchool.push(this.schoolName[key]);
console.log(currentSchool, "currentSchool");
} }
} }
return currentSchool; return currentSchool;
...@@ -1536,7 +1577,6 @@ ...@@ -1536,7 +1577,6 @@
return (isJPG || isPng || isJPEG) && isLt10M; return (isJPG || isPng || isJPEG) && isLt10M;
}, },
handlePictureCardPreview(file) { handlePictureCardPreview(file) {
console.log(file, "11111111");
this.resultPicture = file.url; this.resultPicture = file.url;
this.dialogVisible = true; this.dialogVisible = true;
}, },
...@@ -1549,9 +1589,6 @@ ...@@ -1549,9 +1589,6 @@
} }
}, },
uploadSuccess(res, file, fileList) { uploadSuccess(res, file, fileList) {
// console.log(res, "res");
// console.log(file, "file");
// console.log(fileList, "fileList");
this.referForm.achievementPath = res; this.referForm.achievementPath = res;
this.fileList = { this.fileList = {
name: file.name, name: file.name,
...@@ -1595,7 +1632,6 @@ ...@@ -1595,7 +1632,6 @@
.then((ress) => { .then((ress) => {
// console.log(ress, "ress"); // console.log(ress, "ress");
if (ress.data.code != 200) { if (ress.data.code != 200) {
console.log(ress, "ress");
return this.$message.error(ress.data.message); return this.$message.error(ress.data.message);
} }
this.resultPicture = filename + "?t=" + Date.parse(new Date()); this.resultPicture = filename + "?t=" + Date.parse(new Date());
...@@ -1665,7 +1701,6 @@ ...@@ -1665,7 +1701,6 @@
); );
} }
}); });
// console.log(this.fileList);
this.$message.success(res.data.message); this.$message.success(res.data.message);
}); });
}) })
...@@ -1678,7 +1713,6 @@ ...@@ -1678,7 +1713,6 @@
}, },
// 滚动到固定地方 // 滚动到固定地方
scrollView(object) { scrollView(object) {
// console.log(object, "object");
for (let i in object) { for (let i in object) {
if (!i) { if (!i) {
continue; continue;
...@@ -1712,15 +1746,11 @@ ...@@ -1712,15 +1746,11 @@
}); });
}, },
confirm() { confirm() {
// console.log(111);
// console.log(this.referForm.birthday);
this.$refs["referRef"].validate((valid, object) => { this.$refs["referRef"].validate((valid, object) => {
// console.log(valid, "valid");
if (!valid) { if (!valid) {
this.scrollView(object); this.scrollView(object);
return false; return false;
} }
let _this = this; let _this = this;
let obj = {}; let obj = {};
if (this.configJson.name == 1) { if (this.configJson.name == 1) {
...@@ -1782,7 +1812,7 @@ ...@@ -1782,7 +1812,7 @@
if (this.configJson.pastMedicalHistory == 1) { if (this.configJson.pastMedicalHistory == 1) {
obj.past_medical_history = _this.referForm.past_medical_history; obj.past_medical_history = _this.referForm.past_medical_history;
} }
if (this.configJson.note_other == 1) { if (this.configJson.noteOther == 1) {
obj.note_other = _this.referForm.note_other; obj.note_other = _this.referForm.note_other;
} }
if (this.configJson.emergency == 1) { if (this.configJson.emergency == 1) {
......
...@@ -165,7 +165,7 @@ function checkCam(code, cb) { ...@@ -165,7 +165,7 @@ function checkCam(code, cb) {
} }
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
console.log(to, 'to') // console.log(to, 'to')
// console.log(from, 'from') // console.log(from, 'from')
let let
...@@ -176,7 +176,7 @@ router.beforeEach((to, from, next) => { ...@@ -176,7 +176,7 @@ router.beforeEach((to, from, next) => {
document.title = to.meta.title; document.title = to.meta.title;
if (to.path == toLogin || to.path == toRegister || to.path == toReset) { if (to.path == toLogin || to.path == toRegister || to.path == toReset) {
code = to.params.code ? to.params.code : to.query.code; code = to.params.code ? to.params.code : to.query.code;
console.log(code) // console.log(code)
checkCam(code, (res) => { checkCam(code, (res) => {
if (res) { if (res) {
let token = window.localStorage.getItem("index-token" + code); let token = window.localStorage.getItem("index-token" + code);
......
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