|
|
@ -6,13 +6,13 @@ |
|
|
|
<li> |
|
|
|
<li> |
|
|
|
<label>姓名</label> |
|
|
|
<label>姓名</label> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<el-input v-model="personalInformation.userName" clearable></el-input> |
|
|
|
<el-input v-model="form.userName" clearable></el-input> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
<li> |
|
|
|
<li> |
|
|
|
<label>性别</label> |
|
|
|
<label>性别</label> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<el-select v-model="personalInformation.sex"> |
|
|
|
<el-select v-model="form.sex"> |
|
|
|
<el-option v-for="item in sexList" :key="item.value" :label="item.name" :value="item.value"></el-option> |
|
|
|
<el-option v-for="item in sexList" :key="item.value" :label="item.name" :value="item.value"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -20,12 +20,7 @@ |
|
|
|
<li> |
|
|
|
<li> |
|
|
|
<label>出生年月日</label> |
|
|
|
<label>出生年月日</label> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<el-date-picker |
|
|
|
<el-date-picker v-model="form.dateBirth" :clearable="false" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd"></el-date-picker> |
|
|
|
v-model="personalInformation.dateBirth" |
|
|
|
|
|
|
|
:clearable="false" |
|
|
|
|
|
|
|
class="block-right" |
|
|
|
|
|
|
|
type="date"> |
|
|
|
|
|
|
|
</el-date-picker> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
<li> |
|
|
|
<li> |
|
|
@ -34,15 +29,15 @@ |
|
|
|
<div class="child"> |
|
|
|
<div class="child"> |
|
|
|
<span>国家</span> |
|
|
|
<span>国家</span> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<el-select v-model="personalInformation.countries" placeholder> |
|
|
|
<el-select v-model="form.countries" placeholder> |
|
|
|
<el-option v-for="item in countryList" :key="item.value" :label="item.label" :value="item.value"></el-option> |
|
|
|
<el-option v-for="item in countryList" :key="item.value" :label="item.label" :value="item.label"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="child"> |
|
|
|
<div class="child"> |
|
|
|
<span>省份</span> |
|
|
|
<span>省份</span> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<el-select v-model="personalInformation.provinceId" placeholder @change="id => getCity(id,1)"> |
|
|
|
<el-select v-model="form.provinceId" placeholder @change="id => getCity(id,1)"> |
|
|
|
<el-option v-for="item in provinceList" :key="item.provinceId" :label="item.provinceName" :value="item.provinceId"></el-option> |
|
|
|
<el-option v-for="item in provinceList" :key="item.provinceId" :label="item.provinceName" :value="item.provinceId"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -50,7 +45,7 @@ |
|
|
|
<div class="child"> |
|
|
|
<div class="child"> |
|
|
|
<span>城市</span> |
|
|
|
<span>城市</span> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<el-select v-model="personalInformation.cityId" placeholder :disabled="personalInformation.provinceId ? false : true"> |
|
|
|
<el-select v-model="form.cityId" placeholder :disabled="form.provinceId ? false : true"> |
|
|
|
<el-option v-for="item in cityList" :key="item.cityId" :label="item.cityName" :value="item.cityId"></el-option> |
|
|
|
<el-option v-for="item in cityList" :key="item.cityId" :label="item.cityName" :value="item.cityId"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -60,13 +55,13 @@ |
|
|
|
<li> |
|
|
|
<li> |
|
|
|
<label>证件</label> |
|
|
|
<label>证件</label> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<el-input v-model="personalInformation.idnumber" clearable></el-input> |
|
|
|
<el-input v-model="form.idNumber" clearable></el-input> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
<li> |
|
|
|
<li> |
|
|
|
<label>教育程度</label> |
|
|
|
<label>教育程度</label> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<el-select v-model="personalInformation.educationDegree" placeholder="请选择教育程度"> |
|
|
|
<el-select v-model="form.educationDegree" placeholder="请选择教育程度"> |
|
|
|
<el-option v-for="(item,index) in educationDegreeList" :key="index" :label="item.name" :value="item.value"></el-option> |
|
|
|
<el-option v-for="(item,index) in educationDegreeList" :key="index" :label="item.name" :value="item.value"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -84,32 +79,36 @@ |
|
|
|
<div class="archives" v-for="(archive,index) in archivesList" :key="index" v-show="index == 0 || showArch"> |
|
|
|
<div class="archives" v-for="(archive,index) in archivesList" :key="index" v-show="index == 0 || showArch"> |
|
|
|
<ul class="list"> |
|
|
|
<ul class="list"> |
|
|
|
<li> |
|
|
|
<li> |
|
|
|
<label>职业</label> |
|
|
|
<!-- <label>专业</label> --> |
|
|
|
|
|
|
|
<div class="mul"> |
|
|
|
|
|
|
|
<div class="child"> |
|
|
|
|
|
|
|
<span>职业</span> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<el-select v-model="archive.personalCareerId" placeholder="选择职业"> |
|
|
|
<el-select v-model="archive.personalCareerId" placeholder="选择职业"> |
|
|
|
<el-option v-for="item in occupationList" :key="item.value" :label="item.label" :value="item.value"></el-option> |
|
|
|
<el-option v-for="item in occupationList" :key="item.value" :label="item.label" :value="item.value"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</li> |
|
|
|
</div> |
|
|
|
<li> |
|
|
|
<div class="child"> |
|
|
|
<label>国家</label> |
|
|
|
<span>国家</span> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<el-select v-model="personalInformation.countries" placeholder> |
|
|
|
<el-select v-model="form.countries" placeholder> |
|
|
|
<el-option v-for="item in countryList" :key="item.value" :label="item.label" :value="item.value" ></el-option> |
|
|
|
<el-option v-for="item in countryList" :key="item.value" :label="item.label" :value="item.label" ></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</li> |
|
|
|
</div> |
|
|
|
<li> |
|
|
|
<div class="child"> |
|
|
|
<label>学校名称</label> |
|
|
|
<span>学校名称</span> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<el-select v-model="archive.schoolId" filterable placeholder="选择学校" @change="id => getSchoolName(id,index)"> |
|
|
|
<el-select v-model="archive.schoolId" filterable placeholder="选择学校" @change="id => getSchoolName(id,index)"> |
|
|
|
<el-option v-for="item in schoolList" :key="item.value" :label="item.schoolName" :value="item.schoolId"></el-option> |
|
|
|
<el-option v-for="item in schoolList" :key="item.value" :label="item.schoolName" :value="item.schoolId"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
|
|
|
|
|
|
|
|
<li> |
|
|
|
<li> |
|
|
|
<label>专业</label> |
|
|
|
|
|
|
|
<div class="mul"> |
|
|
|
<div class="mul"> |
|
|
|
<div class="child"> |
|
|
|
<div class="child"> |
|
|
|
<span>专业学科</span> |
|
|
|
<span>专业学科</span> |
|
|
@ -148,20 +147,20 @@ |
|
|
|
<li> |
|
|
|
<li> |
|
|
|
<label>用户账号</label> |
|
|
|
<label>用户账号</label> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<el-input v-model="personalInformation.account" clearable></el-input> |
|
|
|
<el-input v-model="form.account" clearable></el-input> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
<li> |
|
|
|
<li> |
|
|
|
<label>手机号</label> |
|
|
|
<label>手机号</label> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<span class="val" v-if="personalInformation.phone">{{personalInformation.phone}}</span> |
|
|
|
<span class="val" v-if="form.phone">{{form.phone}}</span> |
|
|
|
<el-button size="small" @click="bindPhone">更换</el-button> |
|
|
|
<el-button size="small" @click="bindPhone">更换</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
<li> |
|
|
|
<li> |
|
|
|
<label>邮箱</label> |
|
|
|
<label>邮箱</label> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<span class="val" v-if="personalInformation.email">{{personalInformation.email}}</span> |
|
|
|
<span class="val" v-if="form.email">{{form.email}}</span> |
|
|
|
<el-button size="small" @click="bindEmail">更换</el-button> |
|
|
|
<el-button size="small" @click="bindEmail">更换</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</li> |
|
|
|
</li> |
|
|
@ -177,7 +176,7 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<el-dialog :title="personalInformation.email ? '更换邮箱' : '绑定邮箱'" :visible.sync="emailVisible" :close-on-click-modal="false" @close="closeEmail" width="30%"> |
|
|
|
<el-dialog :title="form.email ? '更换邮箱' : '绑定邮箱'" :visible.sync="emailVisible" :close-on-click-modal="false" @close="closeEmail" width="30%"> |
|
|
|
<el-form ref="form" :model="form" label-width="60px"> |
|
|
|
<el-form ref="form" :model="form" label-width="60px"> |
|
|
|
<el-form-item label="邮箱"> |
|
|
|
<el-form-item label="邮箱"> |
|
|
|
<el-input placeholder="请输入邮箱" v-model="email"></el-input> |
|
|
|
<el-input placeholder="请输入邮箱" v-model="email"></el-input> |
|
|
@ -190,12 +189,12 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button @click="emailVisible = false">取 消</el-button> |
|
|
|
<el-button size="small" @click="emailVisible = false">取 消</el-button> |
|
|
|
<el-button type="primary" @click="emailSubmit">确 定</el-button> |
|
|
|
<el-button size="small" type="primary" @click="emailSubmit">确 定</el-button> |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
<el-dialog :title="personalInformation.phone ? '更换手机号' : '绑定手机号'" :visible.sync="phoneVisible" :close-on-click-modal="false" @close="closePhone" width="30%"> |
|
|
|
<el-dialog :title="form.phone ? '更换手机号' : '绑定手机号'" :visible.sync="phoneVisible" :close-on-click-modal="false" @close="closePhone" width="30%"> |
|
|
|
<el-form ref="form" :model="form" label-width="60px"> |
|
|
|
<el-form ref="form" :model="form" label-width="60px"> |
|
|
|
<el-form-item label="手机号"> |
|
|
|
<el-form-item label="手机号"> |
|
|
|
<el-input placeholder="请输入手机号" v-model="phone" maxlength="11"></el-input> |
|
|
|
<el-input placeholder="请输入手机号" v-model="phone" maxlength="11"></el-input> |
|
|
@ -208,8 +207,8 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button @click="phoneVisible = false">取 消</el-button> |
|
|
|
<el-button size="small" @click="phoneVisible = false">取 消</el-button> |
|
|
|
<el-button type="primary" @click="phoneSubmit">确 定</el-button> |
|
|
|
<el-button size="small" type="primary" @click="phoneSubmit">确 定</el-button> |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
@ -226,8 +225,8 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button @click="passwordVisible = false">取 消</el-button> |
|
|
|
<el-button size="small" @click="passwordVisible = false">取 消</el-button> |
|
|
|
<el-button type="primary" @click="editPassword">确 定</el-button> |
|
|
|
<el-button size="small" type="primary" @click="editPassword">确 定</el-button> |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -239,7 +238,7 @@ import util from '@/libs/util' |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
personalInformation: { |
|
|
|
form: { |
|
|
|
name:'', |
|
|
|
name:'', |
|
|
|
workNumber:'', |
|
|
|
workNumber:'', |
|
|
|
password:"", |
|
|
|
password:"", |
|
|
@ -249,6 +248,10 @@ export default { |
|
|
|
cityName:'', |
|
|
|
cityName:'', |
|
|
|
schoolName:'', |
|
|
|
schoolName:'', |
|
|
|
professionalName:'', |
|
|
|
professionalName:'', |
|
|
|
|
|
|
|
experimentName:'', |
|
|
|
|
|
|
|
sex: 1, |
|
|
|
|
|
|
|
dateBirth: '', |
|
|
|
|
|
|
|
educationDegree: '' |
|
|
|
}, |
|
|
|
}, |
|
|
|
emailVisible: false, |
|
|
|
emailVisible: false, |
|
|
|
passwordVisible: false, |
|
|
|
passwordVisible: false, |
|
|
@ -274,7 +277,13 @@ export default { |
|
|
|
label: '中国' |
|
|
|
label: '中国' |
|
|
|
} |
|
|
|
} |
|
|
|
], |
|
|
|
], |
|
|
|
form: {}, |
|
|
|
occupationList: [{ |
|
|
|
|
|
|
|
value: 1, |
|
|
|
|
|
|
|
label: '学生' |
|
|
|
|
|
|
|
},{ |
|
|
|
|
|
|
|
value: 2, |
|
|
|
|
|
|
|
label: '老师' |
|
|
|
|
|
|
|
}], |
|
|
|
provinceList:[], |
|
|
|
provinceList:[], |
|
|
|
cityList: [], |
|
|
|
cityList: [], |
|
|
|
educationDegreeList: [ |
|
|
|
educationDegreeList: [ |
|
|
@ -299,23 +308,24 @@ export default { |
|
|
|
value: 5 |
|
|
|
value: 5 |
|
|
|
} |
|
|
|
} |
|
|
|
], |
|
|
|
], |
|
|
|
|
|
|
|
subjectList: [], //专业学科 |
|
|
|
|
|
|
|
ProfessionalClassList: [], //专业类 |
|
|
|
|
|
|
|
ProfessionalList: [], //专业 |
|
|
|
schoolList: [], |
|
|
|
schoolList: [], |
|
|
|
curPassword: '', |
|
|
|
curPassword: '', |
|
|
|
accountRepeat: false, |
|
|
|
accountRepeat: false, |
|
|
|
|
|
|
|
|
|
|
|
archivesList: [], |
|
|
|
archivesList: [], |
|
|
|
archivesForm: { |
|
|
|
archivesForm: { |
|
|
|
//个人档案 |
|
|
|
personalCareerId: '', |
|
|
|
personalCareerId: '', //职业 |
|
|
|
schoolId: '', |
|
|
|
schoolId: '', //院校 |
|
|
|
schoolName: '', |
|
|
|
schoolName: '', //院校名称 |
|
|
|
professionalClassId: '', |
|
|
|
professionalClassId: '', //专业类 |
|
|
|
professionalClassName: '', |
|
|
|
professionalClassName: '', //专业类名称 |
|
|
|
disciplineId: '', |
|
|
|
disciplineId: '', //专业学科 |
|
|
|
disciplineName: '', |
|
|
|
disciplineName: '', //专业学科名称 |
|
|
|
professionalId: '', |
|
|
|
professionalId: '', //专业 |
|
|
|
professionalName: '', |
|
|
|
professionalName: '', //专业名称 |
|
|
|
|
|
|
|
userId: this.userId |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
email: '', |
|
|
|
email: '', |
|
|
|
emailBtnText: '发送验证码', |
|
|
|
emailBtnText: '发送验证码', |
|
|
@ -329,15 +339,11 @@ export default { |
|
|
|
phoneTimer: null |
|
|
|
phoneTimer: null |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
|
|
|
|
...mapState('user', [ |
|
|
|
|
|
|
|
'userId','avatar','userName' |
|
|
|
|
|
|
|
]), |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
mounted() { |
|
|
|
mounted() { |
|
|
|
this.getdata(); |
|
|
|
this.getdata(); |
|
|
|
this.getProvince() |
|
|
|
this.getProvince() |
|
|
|
this.getSchoolData() |
|
|
|
this.getSchoolData() |
|
|
|
|
|
|
|
this.getSubject() |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
...mapActions('user', [ |
|
|
|
...mapActions('user', [ |
|
|
@ -348,29 +354,28 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
getProvince(){ |
|
|
|
getProvince(){ |
|
|
|
this.$get(this.api.queryProvince).then(res => { |
|
|
|
this.$get(this.api.queryProvince).then(res => { |
|
|
|
this.provinceList = res.data.list |
|
|
|
this.provinceList = res.list |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => {}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 获取城市 |
|
|
|
|
|
|
|
getCity(id,type){ |
|
|
|
getCity(id,type){ |
|
|
|
this.personalInformation.cityId = 1 |
|
|
|
this.form.cityId = 1 |
|
|
|
this.getCityData() |
|
|
|
this.getCityData() |
|
|
|
}, |
|
|
|
}, |
|
|
|
getCityData(index){ |
|
|
|
getCityData(index){ |
|
|
|
let provinceId = this.personalInformation.provinceId |
|
|
|
let provinceId = this.form.provinceId |
|
|
|
this.$get(this.api.queryCity,{provinceId}).then(res => { |
|
|
|
this.$get(this.api.queryCity,{provinceId}).then(res => { |
|
|
|
this.cityList = res.data.list |
|
|
|
this.cityList = res.list |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => {}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 获取学校名称 |
|
|
|
getCityName(id,index){ |
|
|
|
|
|
|
|
this.archivesList[index].cityName = this.archivesList[index].cityList[id-1].cityName |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
getSchoolName(id,index){ |
|
|
|
|
|
|
|
this.archivesList[index].schoolName = this.schoolList[id-1].schoolName |
|
|
|
|
|
|
|
}, |
|
|
|
getSchoolData(){ |
|
|
|
getSchoolData(){ |
|
|
|
let data = { |
|
|
|
this.$get(this.api.querySchool,{schoolName: '',provinceId: this.provinceId,cityId: this.cityId}).then(res => { |
|
|
|
searchContent: '', |
|
|
|
this.schoolList = res.list |
|
|
|
provinceId: '', |
|
|
|
|
|
|
|
cityId: '' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.$get(`${this.api.queryClient}/1/1000`,data).then(res => { |
|
|
|
|
|
|
|
this.schoolList = res.data.list |
|
|
|
|
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => {}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
accountChange(){ |
|
|
|
accountChange(){ |
|
|
@ -384,50 +389,93 @@ export default { |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => {}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
getdata() { |
|
|
|
getdata() { |
|
|
|
this.$get(`${this.api.userInfo}/${this.userId}`) |
|
|
|
this.$get(this.api.userInfo).then(res => { |
|
|
|
.then(res => { |
|
|
|
let userInfo = res.userInfo |
|
|
|
this.personalInformation = res.data.userInfo |
|
|
|
this.form = Object.assign(userInfo,res.userAccount) |
|
|
|
this.personalInformation.countries = '中国' |
|
|
|
this.originAccount = this.form.account |
|
|
|
this.curPassword = this.personalInformation.password |
|
|
|
this.archivesList = res.personalFiles |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$nextTick(() => { |
|
|
|
if(this.personalInformation.provinceId){ |
|
|
|
if(this.form.provinceId){ |
|
|
|
this.getCityData(1) |
|
|
|
this.getCityData(1) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if(this.archivesList.length != 0){ |
|
|
|
|
|
|
|
this.archivesList.forEach((e,k) =>{ |
|
|
|
|
|
|
|
this.$set(e, 'subjectList', this.subjectList) |
|
|
|
|
|
|
|
this.$set(e, 'disciplineId', e.disciplineId ? e.disciplineId : '') |
|
|
|
|
|
|
|
this.$set(e, 'disciplineName', e.disciplineName ? e.disciplineName : '') |
|
|
|
|
|
|
|
this.$set(e, 'professionalClassId', e.professionalClassId ? e.professionalClassId : '') |
|
|
|
|
|
|
|
this.$set(e, 'professionalClassName', e.professionalClassName ? e.professionalClassName : '') |
|
|
|
|
|
|
|
this.$set(e, 'professionalId', e.professionalId ? e.professionalId : '') |
|
|
|
|
|
|
|
this.$set(e, 'professionalName', e.professionalName ? e.professionalName : '') |
|
|
|
|
|
|
|
this.$set(e, 'schoolId', e.schoolId ? e.schoolId : '') |
|
|
|
|
|
|
|
this.$set(e, 'schoolName', e.schoolName ? e.schoolName : '') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(e.disciplineId){ |
|
|
|
|
|
|
|
this.$post(this.api.queryCourseProfessionalClass,[e.disciplineId]).then(res => { |
|
|
|
|
|
|
|
this.$set(e, 'ProfessionalClassList', res.result) |
|
|
|
|
|
|
|
}).catch(res => {}) |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
this.$set(e, 'ProfessionalClassList', []) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(e.professionalClassId){ |
|
|
|
|
|
|
|
this.$get(this.api.queryCourseProfessional,{ professionalClassId: e.professionalClassId }).then(res => { |
|
|
|
|
|
|
|
this.$set(e, 'ProfessionalList', res.result) |
|
|
|
|
|
|
|
}).catch(res => {}) |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
this.$set(e, 'ProfessionalList', []) |
|
|
|
|
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
this.concatArch() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
.catch(err => { |
|
|
|
}).catch(err => {}) |
|
|
|
console.log(err) |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
save() { |
|
|
|
save() { |
|
|
|
if(this.personalInformation.idnumber && !/(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)/.test(this.personalInformation.idnumber)) return util.warningMsg('请输入正确的证件号码') |
|
|
|
if(this.form.idNumber && !/(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)/.test(this.form.idNumber)) return util.warningMsg('请输入正确的证件号码') |
|
|
|
if(this.accountRepeat) return util.warningMsg('该账号已存在') |
|
|
|
if(this.accountRepeat) return util.warningMsg('该账号已存在') |
|
|
|
if(this.personalInformation.phone && !/^1[3456789]\d{9}$/.test(this.personalInformation.phone)) return util.warningMsg('请输入正确的手机号') |
|
|
|
let form = this.form |
|
|
|
if(this.personalInformation.email && !/^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/.test(this.personalInformation.email)) return util.warningMsg('请输入正确的邮箱') |
|
|
|
let hrPersonalFileEntities = [] |
|
|
|
let personalInformation = this.personalInformation |
|
|
|
let archivesList = this.archivesList |
|
|
|
let userInfoEntity = { |
|
|
|
archivesList.map(n => { |
|
|
|
idnumber: personalInformation.idnumber, |
|
|
|
n.personalCareerId && hrPersonalFileEntities.push({ |
|
|
|
account: personalInformation.account, |
|
|
|
disciplineId: n.disciplineId, |
|
|
|
cityId: personalInformation.cityId, |
|
|
|
disciplineName: n.disciplineName, |
|
|
|
countries: personalInformation.countries, |
|
|
|
personalCareerId: n.personalCareerId, |
|
|
|
dateBirth: personalInformation.dateBirth, |
|
|
|
personalFileId: n.personalFileId, |
|
|
|
educationDegree: personalInformation.educationDegree, |
|
|
|
professionalClassId: n.professionalClassId, |
|
|
|
email: personalInformation.email, |
|
|
|
professionalClassName: n.professionalClassName, |
|
|
|
phone: personalInformation.phone, |
|
|
|
professionalId: n.professionalId, |
|
|
|
provinceId: personalInformation.provinceId, |
|
|
|
professionalName: n.professionalName, |
|
|
|
clientId: personalInformation.clientId, |
|
|
|
schoolId: n.schoolId, |
|
|
|
clientName: personalInformation.clientName, |
|
|
|
schoolName: n.schoolName, |
|
|
|
sex: personalInformation.sex, |
|
|
|
userId: form.userId, |
|
|
|
userId: personalInformation.userId, |
|
|
|
}) |
|
|
|
userName: personalInformation.userName, |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
let data = { |
|
|
|
let data = { |
|
|
|
userInfoEntity, |
|
|
|
hrUserAccount: { |
|
|
|
personalFileEntities: this.archivesList |
|
|
|
account: form.account, |
|
|
|
|
|
|
|
userId: form.userId, |
|
|
|
|
|
|
|
workNumber: form.workNumber, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
hrUserInfo: { |
|
|
|
|
|
|
|
cityId: form.cityId, |
|
|
|
|
|
|
|
countries: form.countries, |
|
|
|
|
|
|
|
dateBirth: form.dateBirth, |
|
|
|
|
|
|
|
educationDegree: form.educationDegree, |
|
|
|
|
|
|
|
idNumber: form.idNumber, |
|
|
|
|
|
|
|
provinceId: form.provinceId, |
|
|
|
|
|
|
|
schoolId: form.schoolId, |
|
|
|
|
|
|
|
sex: form.sex, |
|
|
|
|
|
|
|
userId: form.userId, |
|
|
|
|
|
|
|
userName: form.userName, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
hrPersonalFileEntities |
|
|
|
} |
|
|
|
} |
|
|
|
this.$post(this.api.updateUser,data).then(res => { |
|
|
|
this.$post(this.api.updateUser,data).then(res => { |
|
|
|
if(res.success){ |
|
|
|
if(res.status == 200){ |
|
|
|
this.setUserName(personalInformation.userName) |
|
|
|
this.setUserName(form.userName) |
|
|
|
util.successMsg('提交成功') |
|
|
|
util.successMsg('提交成功') |
|
|
|
this.$router.back() |
|
|
|
this.$router.back() |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
@ -436,70 +484,61 @@ export default { |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => {}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
concatArch(isLoadData) { |
|
|
|
concatArch() { |
|
|
|
this.archivesList = this.archivesList.concat({ |
|
|
|
this.archivesList = this.archivesList.concat({ |
|
|
|
isNew: true, |
|
|
|
countries: '中国', |
|
|
|
personalCareerId: '', //职业 |
|
|
|
personalCareerId: '', |
|
|
|
schoolId: '', //院校 |
|
|
|
schoolId: '', |
|
|
|
schoolName: '', //院校名称 |
|
|
|
schoolName: '', |
|
|
|
subjectList: this.subjectList, //专业学科 |
|
|
|
subjectList: this.subjectList, |
|
|
|
disciplineId: '', //专业学科 |
|
|
|
disciplineId: '', |
|
|
|
disciplineName: '', //专业学科名称 |
|
|
|
disciplineName: '', |
|
|
|
ProfessionalClassList: [], //专业类 |
|
|
|
ProfessionalClassList: [], |
|
|
|
professionalClassId: '', //专业类 |
|
|
|
professionalClassId: '', |
|
|
|
professionalClassName: '', //专业类名称 |
|
|
|
professionalClassName: '', |
|
|
|
ProfessionalList: [], //专业 |
|
|
|
ProfessionalList: [], |
|
|
|
professionalId: '', //专业 |
|
|
|
professionalId: '', |
|
|
|
professionalName: '', //专业名称 |
|
|
|
professionalName: '', |
|
|
|
userId: this.userId, |
|
|
|
|
|
|
|
personalFileId: '' |
|
|
|
personalFileId: '' |
|
|
|
}) |
|
|
|
}) |
|
|
|
if(!isLoadData){ |
|
|
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
|
|
document.body.scrollTop = document.querySelector('.content-box').scrollHeight |
|
|
|
|
|
|
|
document.documentElement.scrollTop = document.querySelector('.content-box').scrollHeight |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
addArch() { |
|
|
|
addArch() { |
|
|
|
// let isEmpty = false |
|
|
|
let isEmpty = false |
|
|
|
// this.archivesList.forEach((n,k) => { |
|
|
|
this.archivesList.forEach((n,k) => { |
|
|
|
// if(!n.personalCareerId) isEmpty = true |
|
|
|
if(!n.personalCareerId) isEmpty = true |
|
|
|
// }) |
|
|
|
}) |
|
|
|
// if(isEmpty) return this.$message.warning('请选择职业') |
|
|
|
if(isEmpty) return util.warningMsg('请选择职业') |
|
|
|
this.showArch = true |
|
|
|
this.showArch = true |
|
|
|
this.concatArch() |
|
|
|
this.concatArch() |
|
|
|
}, |
|
|
|
}, |
|
|
|
bindEmail() { |
|
|
|
bindEmail() { |
|
|
|
this.email = this.personalInformation.email |
|
|
|
this.email = this.form.email |
|
|
|
this.emailVisible = true |
|
|
|
this.emailVisible = true |
|
|
|
}, |
|
|
|
}, |
|
|
|
bindPhone() { |
|
|
|
bindPhone() { |
|
|
|
this.phone = this.personalInformation.phone |
|
|
|
this.phone = this.form.phone |
|
|
|
this.phoneVisible = true |
|
|
|
this.phoneVisible = true |
|
|
|
}, |
|
|
|
}, |
|
|
|
bindPassword() { |
|
|
|
bindPassword() { |
|
|
|
this.passwordVisible = true |
|
|
|
this.passwordVisible = true |
|
|
|
}, |
|
|
|
}, |
|
|
|
editPassword() { |
|
|
|
editPassword() { |
|
|
|
if(!this.passwordForm.password) return this.$message.warning('请输入原密码') |
|
|
|
if(!this.passwordForm.password) return util.warningMsg('请输入原密码') |
|
|
|
if(!this.passwordForm.newPassword) return this.$message.warning('请输入新密码') |
|
|
|
if(!this.passwordForm.newPassword) return util.warningMsg('请输入新密码') |
|
|
|
if(!this.passwordForm.reNewPassword) return this.$message.warning('请确认新密码') |
|
|
|
if(!this.passwordForm.reNewPassword) return util.warningMsg('请确认新密码') |
|
|
|
if(this.passwordForm.newPassword.length < 6 || this.passwordForm.reNewPassword.length < 6) return this.$message.warning('请输入6位数以上的密码') |
|
|
|
if(this.passwordForm.newPassword.length < 6 || this.passwordForm.reNewPassword.length < 6) return util.warningMsg('请输入6位数以上的密码') |
|
|
|
if(this.passwordForm.newPassword !== this.passwordForm.reNewPassword) return this.$message.warning('输入的新密码不一致,请重新确认') |
|
|
|
if(this.passwordForm.newPassword !== this.passwordForm.reNewPassword) return util.warningMsg('输入的新密码不一致,请重新确认') |
|
|
|
if(this.passwordForm.password === this.passwordForm.newPassword) return this.$message.warning('原密码跟新密码不能一致') |
|
|
|
if(this.passwordForm.password === this.passwordForm.newPassword) return util.warningMsg('原密码跟新密码不能一致') |
|
|
|
|
|
|
|
|
|
|
|
let data = this.passwordForm |
|
|
|
let data = this.passwordForm |
|
|
|
data.userid = this.userId |
|
|
|
data.accountId = this.form.id |
|
|
|
this.$post(this.api.examinePassword,data) |
|
|
|
this.$post(this.api.examinePassword,data) |
|
|
|
.then(res => { |
|
|
|
.then(res => { |
|
|
|
if(res.errmessage == 'success'){ |
|
|
|
if(res.status == 200){ |
|
|
|
this.$message.success('更换成功') |
|
|
|
util.successMsg('更换成功') |
|
|
|
this.passwordVisible = false |
|
|
|
this.passwordVisible = false |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch(err => { |
|
|
|
}).catch(err => {}) |
|
|
|
console.log(err) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
closePassword() { |
|
|
|
closePassword() { |
|
|
|
this.passwordForm = { |
|
|
|
this.passwordForm = { |
|
|
@ -515,6 +554,136 @@ export default { |
|
|
|
document.documentElement.scrollTop = document.querySelector('.content-box').scrollHeight |
|
|
|
document.documentElement.scrollTop = document.querySelector('.content-box').scrollHeight |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
// 获取学科类别 |
|
|
|
|
|
|
|
getSubject(){ |
|
|
|
|
|
|
|
this.$post(this.api.queryCourseDiscipline).then(res => { |
|
|
|
|
|
|
|
this.subjectList = res.result |
|
|
|
|
|
|
|
}).catch(res => {}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 清除学科类别 |
|
|
|
|
|
|
|
clearClass(){ |
|
|
|
|
|
|
|
this.archivesForm.professionalClassId = '', |
|
|
|
|
|
|
|
this.archivesForm.professionalId = '' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 获取专业类 |
|
|
|
|
|
|
|
getProfessionalClass(val){ |
|
|
|
|
|
|
|
this.clearClass() |
|
|
|
|
|
|
|
if(val){ |
|
|
|
|
|
|
|
let obj = {} |
|
|
|
|
|
|
|
obj = this.subjectList.find((item)=>{ |
|
|
|
|
|
|
|
return item.disciplineId === val |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
this.archivesForm.disciplineName = obj.disciplineName |
|
|
|
|
|
|
|
this.getProfessionalClassData(val) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
clearItemClass(index){ |
|
|
|
|
|
|
|
this.archivesList[index].professionalClassId = '' |
|
|
|
|
|
|
|
this.archivesList[index].professionalClassName = '' |
|
|
|
|
|
|
|
this.archivesList[index].professionalId = '' |
|
|
|
|
|
|
|
this.archivesList[index].professionalName = '' |
|
|
|
|
|
|
|
// this.archivesList.map(e =>{ |
|
|
|
|
|
|
|
// if(e.disciplineId == item){ |
|
|
|
|
|
|
|
// e.professionalClassId = '', |
|
|
|
|
|
|
|
// e.professionalClassName = '', |
|
|
|
|
|
|
|
// e.professionalId = '', |
|
|
|
|
|
|
|
// e.professionalName = '' |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// }) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
getItemProfessionalClass(item,index){ |
|
|
|
|
|
|
|
this.clearItemClass(index) |
|
|
|
|
|
|
|
if(item){ |
|
|
|
|
|
|
|
let obj = {} |
|
|
|
|
|
|
|
obj = this.subjectList.find(r =>{ |
|
|
|
|
|
|
|
return r.disciplineId === item |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
this.$post(this.api.queryCourseProfessionalClass,[item]).then(res => { |
|
|
|
|
|
|
|
this.archivesList.map(e =>{ |
|
|
|
|
|
|
|
if(e.disciplineId == item){ |
|
|
|
|
|
|
|
e.ProfessionalClassList = res.result |
|
|
|
|
|
|
|
e.disciplineName = obj.disciplineName |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}).catch(res => {}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
getProfessionalClassData(value){ |
|
|
|
|
|
|
|
this.$post(this.api.queryCourseProfessionalClass,[value]).then(res => { |
|
|
|
|
|
|
|
this.ProfessionalClassList = res.result |
|
|
|
|
|
|
|
}).catch(res => {}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 清除专业类 |
|
|
|
|
|
|
|
clearProfess(){ |
|
|
|
|
|
|
|
this.archivesForm.professionalId = '' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 获取专业 |
|
|
|
|
|
|
|
getProfessional(val){ |
|
|
|
|
|
|
|
this.clearProfess() |
|
|
|
|
|
|
|
if(val){ |
|
|
|
|
|
|
|
let obj = {} |
|
|
|
|
|
|
|
obj = this.ProfessionalClassList.find((item)=>{ |
|
|
|
|
|
|
|
return item.professionalClassId === val |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
this.archivesForm.professionalClassName = obj.professionalClassName |
|
|
|
|
|
|
|
this.getProfessionalData(val) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
clearItemProfess(index){ |
|
|
|
|
|
|
|
this.archivesList[index].professionalId = '' |
|
|
|
|
|
|
|
this.archivesList[index].professionalName = '' |
|
|
|
|
|
|
|
// this.archivesList.map(e =>{ |
|
|
|
|
|
|
|
// if(e.professionalClassId == item){ |
|
|
|
|
|
|
|
// e.professionalId = '', |
|
|
|
|
|
|
|
// e.professionalName = '' |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// }) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
getItemProfessional(item,index){ |
|
|
|
|
|
|
|
this.clearItemProfess(index) |
|
|
|
|
|
|
|
if(item){ |
|
|
|
|
|
|
|
this.$get(this.api.queryCourseProfessional,{ professionalClassId: item }).then(res => { |
|
|
|
|
|
|
|
this.archivesList.map(e =>{ |
|
|
|
|
|
|
|
if(e.professionalClassId == item){ |
|
|
|
|
|
|
|
let obj = {} |
|
|
|
|
|
|
|
obj = e.ProfessionalClassList.find(r =>{ |
|
|
|
|
|
|
|
return r.professionalClassId === item |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
e.ProfessionalList = res.result |
|
|
|
|
|
|
|
e.professionalClassName = obj.professionalClassName |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}).catch(res => {}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
getProfessionalData(value){ |
|
|
|
|
|
|
|
this.$get(this.api.queryCourseProfessional,{professionalClassId: value}).then(res => { |
|
|
|
|
|
|
|
this.ProfessionalList = res.result |
|
|
|
|
|
|
|
}).catch(res => {}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 获取专业名称 |
|
|
|
|
|
|
|
getStuGrade(val){ |
|
|
|
|
|
|
|
if(val){ |
|
|
|
|
|
|
|
let obj = {} |
|
|
|
|
|
|
|
obj = this.ProfessionalList.find(r =>{ |
|
|
|
|
|
|
|
return r.professionalId === val; |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
this.archivesForm.professionalName = obj.professionalName |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
getItemStuGrade(item){ |
|
|
|
|
|
|
|
if(item){ |
|
|
|
|
|
|
|
this.archivesList.map(e =>{ |
|
|
|
|
|
|
|
if(e.professionalId == item){ |
|
|
|
|
|
|
|
let obj = {} |
|
|
|
|
|
|
|
obj = e.ProfessionalList.find(r =>{ |
|
|
|
|
|
|
|
return r.professionalId === item; |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
e.professionalName = obj.professionalName |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
emailCountdown(){ |
|
|
|
emailCountdown(){ |
|
|
|
let count = 60 |
|
|
|
let count = 60 |
|
|
|
if(!this.emailTimer){ |
|
|
|
if(!this.emailTimer){ |
|
|
@ -557,32 +726,36 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
sendEmailCode(){ |
|
|
|
sendEmailCode(){ |
|
|
|
if(!this.email) return this.$message.warning('请输入邮箱') |
|
|
|
if(!this.email) return util.warningMsg('请输入邮箱') |
|
|
|
if(!/^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/.test(this.email)) return this.$message.warning('请输入正确的邮箱') |
|
|
|
if(!/^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/.test(this.email)) return util.warningMsg('请输入正确的邮箱') |
|
|
|
let data = { |
|
|
|
let data = { |
|
|
|
userId: this.userId, |
|
|
|
userId: this.form.userId, |
|
|
|
email: this.email, |
|
|
|
email: this.email, |
|
|
|
types: 1 |
|
|
|
types: 1 |
|
|
|
} |
|
|
|
} |
|
|
|
this.$post(this.api.findPasswordByEmail,data).then(res => { |
|
|
|
this.$post(this.api.sendPhoneOrEmailCode,data).then(res => { |
|
|
|
|
|
|
|
if(res.message.opener){ |
|
|
|
this.emailCountdown() |
|
|
|
this.emailCountdown() |
|
|
|
this.emailOpener = res.data |
|
|
|
this.emailOpener = res.message.opener |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
util.errorMsg(res.message) |
|
|
|
|
|
|
|
} |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => {}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
emailSubmit(){ |
|
|
|
emailSubmit(){ |
|
|
|
if(!this.email) return this.$message.warning('请输入邮箱') |
|
|
|
if(!this.email) return util.warningMsg('请输入邮箱') |
|
|
|
if(!/^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/.test(this.email)) return this.$message.warning('请输入正确的邮箱') |
|
|
|
if(!/^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/.test(this.email)) return util.warningMsg('请输入正确的邮箱') |
|
|
|
if(!this.emailCode) return this.$message.warning('请输入验证码') |
|
|
|
if(!this.emailCode) return util.warningMsg('请输入验证码') |
|
|
|
let data = { |
|
|
|
let data = { |
|
|
|
userId: this.userId, |
|
|
|
userId: this.form.userId, |
|
|
|
email: this.email, |
|
|
|
email: this.email, |
|
|
|
types: 1, |
|
|
|
types: 1, |
|
|
|
code: this.emailCode, |
|
|
|
code: this.emailCode, |
|
|
|
opener: this.emailOpener |
|
|
|
opener: this.emailOpener |
|
|
|
} |
|
|
|
} |
|
|
|
this.$put(this.api.bingEmail,data).then(res => { |
|
|
|
this.$post(this.api.bindPhoneOrEmail,data).then(res => { |
|
|
|
this.$message.success('绑定成功') |
|
|
|
util.successMsg('绑定成功') |
|
|
|
this.personalInformation.email = this.email |
|
|
|
this.form.email = this.email |
|
|
|
this.emailVisible = false |
|
|
|
this.emailVisible = false |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => {}) |
|
|
|
}, |
|
|
|
}, |
|
|
@ -592,32 +765,37 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
sendPhoneCode(){ |
|
|
|
sendPhoneCode(){ |
|
|
|
if(!this.phone) return this.$message.warning('请输入手机号') |
|
|
|
if(!this.phone) return util.warningMsg('请输入手机号') |
|
|
|
if(!/^1[3456789]\d{9}$/.test(this.phone)) return this.$message.warning('请输入正确的手机号') |
|
|
|
if(!/^1[3456789]\d{9}$/.test(this.phone)) return util.warningMsg('请输入正确的手机号') |
|
|
|
let data = { |
|
|
|
let data = { |
|
|
|
userId: this.userId, |
|
|
|
userId: this.form.userId, |
|
|
|
phone: this.phone, |
|
|
|
phone: this.phone, |
|
|
|
types: 2 |
|
|
|
types: 2 |
|
|
|
} |
|
|
|
} |
|
|
|
this.$post(this.api.sendPhoneCode,data).then(res => { |
|
|
|
this.$post(this.api.sendPhoneOrEmailCode,data).then(res => { |
|
|
|
|
|
|
|
if(res.message.opener){ |
|
|
|
this.phoneCountdown() |
|
|
|
this.phoneCountdown() |
|
|
|
this.phoneOpener = res.data |
|
|
|
this.phoneOpener = res.message.opener |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
util.errorMsg(res.message) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => {}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
phoneSubmit(){ |
|
|
|
phoneSubmit(){ |
|
|
|
if(!this.phone) return this.$message.warning('请输入手机号') |
|
|
|
if(!this.phone) return util.warningMsg('请输入手机号') |
|
|
|
if(!/^1[3456789]\d{9}$/.test(this.phone)) return this.$message.warning('请输入正确的手机号') |
|
|
|
if(!/^1[3456789]\d{9}$/.test(this.phone)) return util.warningMsg('请输入正确的手机号') |
|
|
|
if(!this.phoneCode) return this.$message.warning('请输入验证码') |
|
|
|
if(!this.phoneCode) return util.warningMsg('请输入验证码') |
|
|
|
let data = { |
|
|
|
let data = { |
|
|
|
userId: this.userId, |
|
|
|
userId: this.form.userId, |
|
|
|
phone: this.phone, |
|
|
|
phone: this.phone, |
|
|
|
types: 2, |
|
|
|
types: 2, |
|
|
|
code: this.phoneCode, |
|
|
|
code: this.phoneCode, |
|
|
|
opener: this.phoneOpener |
|
|
|
opener: this.phoneOpener |
|
|
|
} |
|
|
|
} |
|
|
|
this.$put(this.api.findPasswordByPhone,data).then(res => { |
|
|
|
this.$post(this.api.bindPhoneOrEmail,data).then(res => { |
|
|
|
this.$message.success('绑定成功') |
|
|
|
util.successMsg('绑定成功') |
|
|
|
this.personalInformation.phone = this.phone |
|
|
|
this.form.phone = this.phone |
|
|
|
this.phoneVisible = false |
|
|
|
this.phoneVisible = false |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => {}) |
|
|
|
}, |
|
|
|
}, |
|
|
|