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

个人信息新增

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