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

个人信息新增

parent 54f8c72e
......@@ -503,15 +503,15 @@
<el-col :span="12" v-show="configJson.electSubjectSituation == 1">
<el-form-item
label="选科情况"
prop="elect_subject_situation"
prop="subjectState"
:rules="
configJson.electSubjectSituation == 1
? referInfoRules.elect_subject_situation
? referInfoRules.subjectState
: [{ required: false }]
"
>
<el-select
v-model="subjectState"
v-model="referForm.subjectState"
placeholder="请选科"
:popper-append-to-body="false"
@change="changeSubjectState"
......@@ -528,7 +528,7 @@
</el-form-item>
</el-col>
<!--已选科-->
<el-col :span="12" v-show="showSubject == 1">
<el-col :span="12" v-if="showSubject == 1">
<el-form-item
label="选科(最多选三科)"
prop="chooseSubject"
......@@ -539,7 +539,7 @@
"
>
<el-select
v-model="referForm.elect_subject_situation"
v-model="referForm.chooseSubject"
multiple
placeholder="请选课"
:popper-append-to-body="false"
......@@ -557,10 +557,10 @@
</el-select>
</el-form-item>
</el-col>
<!-- 既往病史 -->
<!-- 既往病史或过敏史 -->
<el-col :span="12" v-show="configJson.pastMedicalHistory == 1">
<el-form-item
label="既往病史"
label="既往病史或过敏史"
prop="past_medical_history"
:rules="
configJson.pastMedicalHistory == 1
......@@ -571,7 +571,7 @@
<el-input
ref="code"
v-model="referForm.past_medical_history"
placeholder="填写既往病史"
placeholder="填写既往病史或过敏史"
size="small"
clearable
/>
......@@ -608,7 +608,7 @@
v-model="referForm.code"
placeholder="邀请码"
size="small"
:disabled="referForm.code==null?false:true"
:disabled="isCode"
clearable
/>
</el-form-item>
......@@ -932,6 +932,7 @@
return {
configJson: {},
isUploading: false, // 图片上传蒙层
isCode: false, // 邀请码是否禁用
showSubject: 0,//是否展示选科(多选)
subjectState: '',
elect_subject_situation: null,
......@@ -953,7 +954,8 @@
unit_and_identity: null,
email: null,
recommend: null,
elect_subject_situation: null,
subjectState: null,
chooseSubject: [],
past_medical_history: null,
note_other: null,
emergency: null,
......@@ -1035,13 +1037,12 @@
trigger: "blur",
},
],
elect_subject_situation: [
subjectState: [
{
required: true,
message: "选科不能为空!",
message: "选科情况不能为空!",
trigger: "change",
},
],
chooseSubject: [
{
......@@ -1053,7 +1054,7 @@
past_medical_history: [
{
required: true,
message: "既往病史不能为空!",
message: "既往病史或过敏史不能为空!",
trigger: "blur",
},
],
......@@ -1228,7 +1229,7 @@
watch: {
referForm(val) {
console.log(val, "val");
for (var k in val) {
for (let k in val) {
if (val[k] == null || !val[k]) {
val[k] = this.referForm[k];
}
......@@ -1261,7 +1262,6 @@
this.changeProvince(1, this.jgProvinceCode, true);
this.jiguan_city = Number(val.jiguan_city);
}
// console.log(val.school_province, val.school_city, val.school);
//学校
if (
val.school_province !== null &&
......@@ -1272,27 +1272,21 @@
this.referForm.school_province = Number(val.school_province);
this.referForm.school_city = Number(val.school_city);
this.referForm.school = Number(val.school);
// console.log(
// this.referForm.school_province,
// this.referForm.school_city,
// this.referForm.school
// );
this.changeProvince(2, this.referForm.school_province, true);
// console.log(this.referForm.school_city, 12322);
this.changeCity(this.referForm.school_city, true);
// console.log(this.referForm.school_city, 12322);
}
if (this.invitation_code != null) {
this.referForm.code = this.invitation_code
this.isCode = true
}
if (val.elect_subject_situation !== null) {
this.subjectState = '已选科';
this.referForm.subjectState = '已选科';
this.showSubject = 1;
this.referForm.elect_subject_situation=val.elect_subject_situation.split('#')
this.elect_subject_situation=val.elect_subject_situation
console.log(this.referForm.elect_subject_situation)
this.referForm.chooseSubject = val.elect_subject_situation.split('#')
this.elect_subject_situation = val.elect_subject_situation
} else {
this.subjectState = '未选科'
this.referForm.subjectState = '未选科'
this.showSubject = 0;
}
},
......@@ -1351,19 +1345,23 @@
},
// 选科情况
changeSubjectState(val) {
// console.log(val)
this.subjectState = val
console.log(val)
console.log(this.referForm.subjectState)
this.referForm.subjectState = val
console.log(val == '未选科')
if (val == '已选科') {
this.showSubject = 1
} else {
this.showSubject = 0
this.referForm.subjectState = '未选科'
this.elect_subject_situation = ''
console.log(this.referForm.subjectState)
}
},
changeSubjectList(val) {
val.forEach((i) => {
this.elect_subject_situation = val.join("#", i)
console.log(this.elect_subject_situation)
})
this.referForm.chooseSubject = val;
this.elect_subject_situation = val.join("#");
this.$forceUpdate();
},
// 获取省份城市
getProAndCity() {
......
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