|
|
|
@ -349,45 +349,6 @@ export default { |
|
|
|
|
...mapActions('user', [ |
|
|
|
|
'setAvatar','setInfo' |
|
|
|
|
]), |
|
|
|
|
tabChange(index){ |
|
|
|
|
this.active = index |
|
|
|
|
}, |
|
|
|
|
getProvince(){ |
|
|
|
|
this.$get(this.api.queryProvince).then(res => { |
|
|
|
|
this.provinceList = res.list |
|
|
|
|
}).catch(res => {}) |
|
|
|
|
}, |
|
|
|
|
getCity(id,type){ |
|
|
|
|
this.form.cityId = 1 |
|
|
|
|
this.getCityData() |
|
|
|
|
}, |
|
|
|
|
getCityData(index){ |
|
|
|
|
let provinceId = this.form.provinceId |
|
|
|
|
this.$get(this.api.queryCity,{provinceId}).then(res => { |
|
|
|
|
this.cityList = res.list |
|
|
|
|
}).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(){ |
|
|
|
|
this.$get(this.api.querySchool,{schoolName: '',provinceId: this.provinceId,cityId: this.cityId}).then(res => { |
|
|
|
|
this.schoolList = res.list |
|
|
|
|
}).catch(res => {}) |
|
|
|
|
}, |
|
|
|
|
accountChange(){ |
|
|
|
|
this.$get(`${this.api.getAccount}?account=${this.form.account}`).then(res => { |
|
|
|
|
if(res.data.userInfo){ |
|
|
|
|
this.accountRepeat = true |
|
|
|
|
util.warningMsg('该账号已存在') |
|
|
|
|
}else{ |
|
|
|
|
this.accountRepeat = false |
|
|
|
|
} |
|
|
|
|
}).catch(res => {}) |
|
|
|
|
}, |
|
|
|
|
getdata() { |
|
|
|
|
this.$get(this.api.userInfo).then(res => { |
|
|
|
|
let userInfo = res.userInfo |
|
|
|
@ -432,6 +393,42 @@ export default { |
|
|
|
|
}) |
|
|
|
|
}).catch(err => {}) |
|
|
|
|
}, |
|
|
|
|
getProvince(){ |
|
|
|
|
this.$get(this.api.queryProvince).then(res => { |
|
|
|
|
this.provinceList = res.list |
|
|
|
|
}).catch(res => {}) |
|
|
|
|
}, |
|
|
|
|
getCity(id,type){ |
|
|
|
|
this.form.cityId = 1 |
|
|
|
|
this.getCityData() |
|
|
|
|
}, |
|
|
|
|
getCityData(index){ |
|
|
|
|
let provinceId = this.form.provinceId |
|
|
|
|
this.$get(this.api.queryCity,{provinceId}).then(res => { |
|
|
|
|
this.cityList = res.list |
|
|
|
|
}).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(){ |
|
|
|
|
this.$get(this.api.querySchool,{schoolName: '',provinceId: this.provinceId,cityId: this.cityId}).then(res => { |
|
|
|
|
this.schoolList = res.list |
|
|
|
|
}).catch(res => {}) |
|
|
|
|
}, |
|
|
|
|
accountChange(){ |
|
|
|
|
this.$get(`${this.api.getAccount}?account=${this.form.account}`).then(res => { |
|
|
|
|
if(res.data.userInfo){ |
|
|
|
|
this.accountRepeat = true |
|
|
|
|
util.warningMsg('该账号已存在') |
|
|
|
|
}else{ |
|
|
|
|
this.accountRepeat = false |
|
|
|
|
} |
|
|
|
|
}).catch(res => {}) |
|
|
|
|
}, |
|
|
|
|
save() { |
|
|
|
|
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('该账号已存在') |
|
|
|
@ -456,7 +453,7 @@ export default { |
|
|
|
|
let data = { |
|
|
|
|
hrUserAccount: { |
|
|
|
|
account: form.account, |
|
|
|
|
userId: form.userId, |
|
|
|
|
id: form.id, |
|
|
|
|
workNumber: form.workNumber, |
|
|
|
|
}, |
|
|
|
|
hrUserInfo: { |
|
|
|
@ -634,12 +631,6 @@ export default { |
|
|
|
|
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) |
|
|
|
|