Commit 7d091b23 authored by 罗林杰's avatar 罗林杰

修改校验

parent 16c8e0dc
...@@ -14,12 +14,12 @@ ...@@ -14,12 +14,12 @@
> >
<u-form-item <u-form-item
label="民族" label="民族"
prop="form.memNationText" prop="memNationText"
borderBottom borderBottom
@click="showNation = true; hideKeyboard()" @click="showNation = true; hideKeyboard()"
> >
<u--input <u--input
v-model="form.memNationText" v-model="userInfo.memNationText"
disabled disabled
disabledColor="#ffffff" disabledColor="#ffffff"
placeholder="请选择民族" placeholder="请选择民族"
...@@ -43,12 +43,12 @@ ...@@ -43,12 +43,12 @@
</u-form-item> </u-form-item>
<u-form-item <u-form-item
label="性别" label="性别"
prop="form.memSexText" prop="memSexText"
borderBottom borderBottom
@click="showSex = true; hideKeyboard()" @click="showSex = true; hideKeyboard()"
> >
<u--input <u--input
v-model="form.memSexText" v-model="userInfo.memSexText"
disabled disabled
disabledColor="#ffffff" disabledColor="#ffffff"
placeholder="请选择性别" placeholder="请选择性别"
...@@ -79,11 +79,11 @@ ...@@ -79,11 +79,11 @@
</u-form-item> </u-form-item>
<u-form-item <u-form-item
label="星座" label="星座"
prop="form.memConstellationText" prop="memConstellationText"
borderBottom borderBottom
> >
<u--input <u--input
v-model="form.memConstellationText" v-model="userInfo.memConstellationText"
disabled disabled
disabledColor="#ffffff" disabledColor="#ffffff"
placeholder="星座" placeholder="星座"
...@@ -124,12 +124,12 @@ ...@@ -124,12 +124,12 @@
</u-form-item> </u-form-item>
<u-form-item <u-form-item
label="教育经历" label="教育经历"
prop="form.memMaxEducationText" prop="memMaxEducationText"
borderBottom borderBottom
@click="showEducation = true; hideKeyboard()" @click="showEducation = true; hideKeyboard()"
> >
<u--input <u--input
v-model="form.memMaxEducationText" v-model="userInfo.memMaxEducationText"
disabled disabled
disabledColor="#ffffff" disabledColor="#ffffff"
placeholder="请选择教育经历" placeholder="请选择教育经历"
...@@ -187,12 +187,12 @@ ...@@ -187,12 +187,12 @@
</u-form-item> </u-form-item>
<u-form-item <u-form-item
label="居住地" label="居住地"
prop="form.memResidence" prop="memResidence"
borderBottom borderBottom
@click="showResidence = true; hideKeyboard()" @click="showResidence = true; hideKeyboard()"
> >
<u--input <u--input
v-model="form.memResidence" v-model="userInfo.memResidence"
disabled disabled
disabledColor="#ffffff" disabledColor="#ffffff"
placeholder="请选择居住地" placeholder="请选择居住地"
...@@ -205,12 +205,12 @@ ...@@ -205,12 +205,12 @@
</u-form-item> </u-form-item>
<u-form-item <u-form-item
label="籍贯" label="籍贯"
prop="form.memNative" prop="memNative"
borderBottom borderBottom
@click="showNative = true; hideKeyboard()" @click="showNative = true; hideKeyboard()"
> >
<u--input <u--input
v-model="form.memNative" v-model="userInfo.memNative"
disabled disabled
disabledColor="#ffffff" disabledColor="#ffffff"
placeholder="请选择籍贯" placeholder="请选择籍贯"
...@@ -223,12 +223,12 @@ ...@@ -223,12 +223,12 @@
</u-form-item> </u-form-item>
<u-form-item <u-form-item
label="婚姻状况" label="婚姻状况"
prop="form.memMarriageText" prop="memMarriageText"
borderBottom borderBottom
@click="showMarriage = true; hideKeyboard()" @click="showMarriage = true; hideKeyboard()"
> >
<u--input <u--input
v-model="form.memMarriageText" v-model="userInfo.memMarriageText"
disabled disabled
disabledColor="#ffffff" disabledColor="#ffffff"
placeholder="请选择婚姻状况" placeholder="请选择婚姻状况"
...@@ -414,19 +414,18 @@ export default { ...@@ -414,19 +414,18 @@ export default {
memMarriageRemarks:'',//婚姻状态备注 memMarriageRemarks:'',//婚姻状态备注
memMbti:'',//人格 memMbti:'',//人格
}, },
form:{},
tipMsg: '', tipMsg: '',
isConfirm: false, isConfirm: false,
birthday: Number(new Date()), birthday: Number(new Date()),
rules: { rules: {
// 'form.memNationText': [ memNationText: [
// { {
// type: 'string', type: 'string',
// required: true, required: true,
// message: '请选择民族', message: '请选择民族',
// trigger: ['blur', 'change'] trigger: ['blur', 'change']
// } }
// ], ],
memNickName: [ memNickName: [
{ {
type: 'string', type: 'string',
...@@ -459,14 +458,14 @@ export default { ...@@ -459,14 +458,14 @@ export default {
trigger: ['blur'] trigger: ['blur']
} }
], ],
// 'form.memMaxEducationText': [ memMaxEducationText: [
// { {
// type: 'string', type: 'string',
// required: true, required: true,
// message: '请选择教育经历', message: '请选择教育经历',
// trigger: ['blur', 'change'] trigger: ['blur', 'change']
// } }
// ], ],
memCollege: [ memCollege: [
{ {
type: 'string', type: 'string',
...@@ -475,6 +474,14 @@ export default { ...@@ -475,6 +474,14 @@ export default {
trigger: ['blur'] trigger: ['blur']
} }
], ],
memCareer: [
{
type: 'string',
required: true,
message: '请输入职业',
trigger: ['blur']
}
],
memYearIncome: [ memYearIncome: [
{ {
type: 'number', type: 'number',
...@@ -483,22 +490,22 @@ export default { ...@@ -483,22 +490,22 @@ export default {
trigger: ['blur'] trigger: ['blur']
} }
], ],
// 'form.memResidence': [ memResidence: [
// { {
// type: 'string', type: 'string',
// required: true, required: true,
// message: '请选择居住地', message: '请选择居住地',
// trigger: ['blur', 'change'] trigger: ['blur', 'change']
// } }
// ], ],
// 'form.memNative': [ memNative: [
// { {
// type: 'string', type: 'string',
// required: true, required: true,
// message: '请选择籍贯', message: '请选择籍贯',
// trigger: ['blur', 'change'] trigger: ['blur', 'change']
// } }
// ], ],
memIntroduce: [ memIntroduce: [
{ {
type: 'string', type: 'string',
...@@ -531,14 +538,14 @@ export default { ...@@ -531,14 +538,14 @@ export default {
trigger: ['blur'] trigger: ['blur']
} }
], ],
// 'form.memMarriageText': [ memMarriageText: [
// { {
// type: 'string', type: 'string',
// required: true, required: true,
// message: '请选择婚姻状况', message: '请选择婚姻状况',
// trigger: ['change'] trigger: ['change']
// } }
// ] ]
} }
} }
}, },
...@@ -555,35 +562,35 @@ export default { ...@@ -555,35 +562,35 @@ export default {
this.userInfo = res.data.data this.userInfo = res.data.data
//处理性别 //处理性别
if(this.judgment(res.data.data.memSex)){ if(this.judgment(res.data.data.memSex)){
this.form.memSexText = getValue('sex',res.data.data.memSex) this.userInfo.memSexText = getValue('sex',res.data.data.memSex)
} }
//处理学历 //处理学历
if(this.judgment(res.data.data.memMaxEducation)){ if(this.judgment(res.data.data.memMaxEducation)){
this.form.memMaxEducationText = getValue('education',res.data.data.memMaxEducation) this.userInfo.memMaxEducationText = getValue('education',res.data.data.memMaxEducation)
} }
//处理星座 //处理星座
if(this.judgment(res.data.data.memConstellation)){ if(this.judgment(res.data.data.memConstellation)){
this.form.memConstellationText = getValue('constellation',res.data.data.memConstellation) this.userInfo.memConstellationText = getValue('constellation',res.data.data.memConstellation)
} }
//处理民族 //处理民族
if(this.judgment(res.data.data.memNation)){ if(this.judgment(res.data.data.memNation)){
this.form.memNationText = getValue('nation',Number(res.data.data.memNation)) this.userInfo.memNationText = getValue('nation',Number(res.data.data.memNation))
} }
//处理教育经历 //处理教育经历
if(this.judgment(res.data.data.memMaxEducation)){ if(this.judgment(res.data.data.memMaxEducation)){
this.form.memEducationText = getValue('education',res.data.data.memMaxEducation) this.userInfo.memEducationText = getValue('education',res.data.data.memMaxEducation)
} }
//处理居住地 //处理居住地
if (this.judgment(res.data.data.memResidenceProvince) && this.judgment(res.data.data.memResidenceCity)){ if (this.judgment(res.data.data.memResidenceProvince) && this.judgment(res.data.data.memResidenceCity)){
this.form.memResidence = getResidence(res.data.data.memResidenceProvince,res.data.data.memResidenceCity) this.userInfo.memResidence = getResidence(res.data.data.memResidenceProvince,res.data.data.memResidenceCity)
} }
//处理籍贯 //处理籍贯
if (this.judgment(res.data.data.memNativeProvince) && this.judgment(res.data.data.memNativeCity)){ if (this.judgment(res.data.data.memNativeProvince) && this.judgment(res.data.data.memNativeCity)){
this.form.memNative = getResidence(res.data.data.memNativeProvince,res.data.data.memNativeCity) this.userInfo.memNative = getResidence(res.data.data.memNativeProvince,res.data.data.memNativeCity)
} }
//处理婚姻状况 //处理婚姻状况
if(this.judgment(res.data.data.memMarriage)){ if(this.judgment(res.data.data.memMarriage)){
this.form.memMarriageText = getValue('marriage',Number(res.data.data.memMarriage)) this.userInfo.memMarriageText = getValue('marriage',Number(res.data.data.memMarriage))
} }
}) })
}, },
...@@ -593,12 +600,12 @@ export default { ...@@ -593,12 +600,12 @@ export default {
confirmMarriage(e){ confirmMarriage(e){
this.showMarriage = false this.showMarriage = false
this.userInfo.memMarriage = e.value[0].value this.userInfo.memMarriage = e.value[0].value
this.form.memMarriageText = e.value[0].label this.userInfo.memMarriageText = e.value[0].label
}, },
confirmEducation(e){ confirmEducation(e){
this.showEducation = false this.showEducation = false
this.userInfo.memMaxEducation = e.value[0].value this.userInfo.memMaxEducation = e.value[0].value
this.form.memMaxEducationText = e.value[0].label this.userInfo.memMaxEducationText = e.value[0].label
}, },
confirmBirthday(e) { confirmBirthday(e) {
this.showBirthday = false this.showBirthday = false
...@@ -615,55 +622,55 @@ export default { ...@@ -615,55 +622,55 @@ export default {
if ((formattedMonth === 1 && dayInMonth >= 20) || (formattedMonth === 2 && dayInMonth <= 18)) { if ((formattedMonth === 1 && dayInMonth >= 20) || (formattedMonth === 2 && dayInMonth <= 18)) {
this.userInfo.memConstellation = 1 this.userInfo.memConstellation = 1
this.form.memConstellationText = '水瓶座' this.userInfo.memConstellationText = '水瓶座'
} else if ((formattedMonth === 2 && dayInMonth >= 19) || (formattedMonth === 3 && dayInMonth <= 20)) { } else if ((formattedMonth === 2 && dayInMonth >= 19) || (formattedMonth === 3 && dayInMonth <= 20)) {
this.userInfo.memConstellation = 2 this.userInfo.memConstellation = 2
this.form.memConstellationText = '双鱼座' this.userInfo.memConstellationText = '双鱼座'
} else if ((formattedMonth === 3 && dayInMonth >= 21) || (formattedMonth === 4 && dayInMonth <= 19)) { } else if ((formattedMonth === 3 && dayInMonth >= 21) || (formattedMonth === 4 && dayInMonth <= 19)) {
this.userInfo.memConstellation = 3 this.userInfo.memConstellation = 3
this.form.memConstellationText = '白羊座' this.userInfo.memConstellationText = '白羊座'
} else if ((formattedMonth === 4 && dayInMonth >= 20) || (formattedMonth === 5 && dayInMonth <= 20)) { } else if ((formattedMonth === 4 && dayInMonth >= 20) || (formattedMonth === 5 && dayInMonth <= 20)) {
this.userInfo.memConstellation = 4 this.userInfo.memConstellation = 4
this.form.memConstellationText = '金牛座' this.userInfo.memConstellationText = '金牛座'
} else if ((formattedMonth === 5 && dayInMonth >= 21) || (formattedMonth === 6 && dayInMonth <= 20)) { } else if ((formattedMonth === 5 && dayInMonth >= 21) || (formattedMonth === 6 && dayInMonth <= 20)) {
this.userInfo.memConstellation = 5 this.userInfo.memConstellation = 5
this.form.memConstellationText = '双子座' this.userInfo.memConstellationText = '双子座'
} else if ((formattedMonth === 6 && dayInMonth >= 21) || (formattedMonth === 7 && dayInMonth <= 22)) { } else if ((formattedMonth === 6 && dayInMonth >= 21) || (formattedMonth === 7 && dayInMonth <= 22)) {
this.userInfo.memConstellation = 6 this.userInfo.memConstellation = 6
this.form.memConstellationText = '巨蟹座' this.userInfo.memConstellationText = '巨蟹座'
} else if ((formattedMonth === 7 && dayInMonth >= 23) || (formattedMonth === 8 && dayInMonth <= 22)) { } else if ((formattedMonth === 7 && dayInMonth >= 23) || (formattedMonth === 8 && dayInMonth <= 22)) {
this.userInfo.memConstellation = 7 this.userInfo.memConstellation = 7
this.form.memConstellationText = '狮子座' this.userInfo.memConstellationText = '狮子座'
} else if ((formattedMonth === 8 && dayInMonth >= 23) || (formattedMonth === 9 && dayInMonth <= 22)) { } else if ((formattedMonth === 8 && dayInMonth >= 23) || (formattedMonth === 9 && dayInMonth <= 22)) {
this.userInfo.memConstellation = 8 this.userInfo.memConstellation = 8
this.form.memConstellationText = '处女座' this.userInfo.memConstellationText = '处女座'
} else if ((formattedMonth === 9 && dayInMonth >= 23) || (formattedMonth === 10 && dayInMonth <= 22)) { } else if ((formattedMonth === 9 && dayInMonth >= 23) || (formattedMonth === 10 && dayInMonth <= 22)) {
this.userInfo.memConstellation = 9 this.userInfo.memConstellation = 9
this.form.memConstellationText = '天秤座' this.userInfo.memConstellationText = '天秤座'
} else if ((formattedMonth === 10 && dayInMonth >= 23) || (formattedMonth === 11 && dayInMonth <= 21)) { } else if ((formattedMonth === 10 && dayInMonth >= 23) || (formattedMonth === 11 && dayInMonth <= 21)) {
this.userInfo.memConstellation = 10 this.userInfo.memConstellation = 10
this.form.memConstellationText = '天蝎座' this.userInfo.memConstellationText = '天蝎座'
} else if ((formattedMonth === 11 && dayInMonth >= 22) || (formattedMonth === 12 && dayInMonth <= 21)) { } else if ((formattedMonth === 11 && dayInMonth >= 22) || (formattedMonth === 12 && dayInMonth <= 21)) {
this.userInfo.memConstellation = 11 this.userInfo.memConstellation = 11
this.form.memConstellationText = '射手座' this.userInfo.memConstellationText = '射手座'
} else if ((formattedMonth === 12 && dayInMonth >= 22) || (formattedMonth === 1 && dayInMonth <= 19)) { } else if ((formattedMonth === 12 && dayInMonth >= 22) || (formattedMonth === 1 && dayInMonth <= 19)) {
this.userInfo.memConstellation = 12 this.userInfo.memConstellation = 12
this.form.memConstellationText = '摩羯座' this.userInfo.memConstellationText = '摩羯座'
} }
}, },
confirmSex(e){ confirmSex(e){
this.showSex = false this.showSex = false
this.userInfo.memSex = e.value[0].value this.userInfo.memSex = e.value[0].value
this.form.memSexText = e.value[0].label this.userInfo.memSexText = e.value[0].label
}, },
confirmNation(e){ confirmNation(e){
this.showNation = false this.showNation = false
this.userInfo.memNation = e.value[0].value this.userInfo.memNation = e.value[0].value
this.form.memNationText = e.value[0].label this.userInfo.memNationText = e.value[0].label
}, },
confirmResidence(e){ confirmResidence(e){
this.showResidence = false this.showResidence = false
this.form.memResidence = e.value[0].label + '/' + e.value[1].label this.userInfo.memResidence = e.value[0].label + '/' + e.value[1].label
this.userInfo.memResidenceProvince = e.value[0].value this.userInfo.memResidenceProvince = e.value[0].value
this.userInfo.memResidenceCity = e.value[1].value this.userInfo.memResidenceCity = e.value[1].value
}, },
...@@ -673,7 +680,7 @@ export default { ...@@ -673,7 +680,7 @@ export default {
}, },
confirmNative(e){ confirmNative(e){
this.showNative = false this.showNative = false
this.form.memNative = e.value[0].label + '/' + e.value[1].label this.userInfo.memNative = e.value[0].label + '/' + e.value[1].label
this.userInfo.memNativeProvince = e.value[0].value this.userInfo.memNativeProvince = e.value[0].value
this.userInfo.memNativeCity = e.value[1].value this.userInfo.memNativeCity = e.value[1].value
}, },
......
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