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

个人信息新增

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