获取学校id,删除个人档案

dev
yujialong 3 years ago
parent 706b7653ac
commit 615989e388
  1. 10
      src/api/index.js
  2. 3
      src/layouts/header/index.vue
  3. 35
      src/pages/setting/person/info.vue
  4. 3
      src/store/modules/user.js

@ -20,9 +20,12 @@ export default {
queryProvince: `/nakadai/nakadai/province/queryProvince`, queryProvince: `/nakadai/nakadai/province/queryProvince`,
queryCity: `/nakadai/nakadai/city/queryCity`, queryCity: `/nakadai/nakadai/city/queryCity`,
querySchool: `/nakadai/nakadai/school/querySchool`, querySchool: `/nakadai/nakadai/school/querySchool`,
queryCourseDiscipline: `/nakadai/nakadai/discipline/queryDiscipline`,
queryCourseProfessionalClass: `/nakadai/nakadai/professionalClass/queryProfessionalClass`, queryCourseDiscipline: `/nakadai/nakadai/subject/courseDiscipline`,
queryCourseProfessional: `/nakadai/nakadai/professional/queryProfessional`, queryCourseProfessionalClass: `/nakadai/nakadai/subject/courseProfessionalClass`,
queryCourseProfessional: `/nakadai/nakadai/subject/courseProfessional`,
getSchoolIdByToken: `/users/users/data/user/getSchoolIdByToken`,
// 个人中心 // 个人中心
uploadUserAvatars: `${Setting.apiBaseURL}/users/users/userAccount/updateUserAvatars`, uploadUserAvatars: `${Setting.apiBaseURL}/users/users/userAccount/updateUserAvatars`,
@ -46,6 +49,7 @@ export default {
bindPhoneOrEmail: `/users/users/userAccount/bindPhoneOrEmail`, bindPhoneOrEmail: `/users/users/userAccount/bindPhoneOrEmail`,
examinePassword: `/users/users/userAccount/examinePassword`, examinePassword: `/users/users/userAccount/examinePassword`,
isClient: `/users/users/user/isClient`, isClient: `/users/users/user/isClient`,
deleteProfile: `/users/users/userInfo/deleteProfile`,
userTemplate: `http://39.108.250.202/template/%E6%95%B0%E6%8D%AE%E5%B9%B3%E5%8F%B0%E7%94%A8%E6%88%B7%E5%AF%BC%E5%85%A5%E6%A8%A1%E6%9D%BF.xlsx`, userTemplate: `http://39.108.250.202/template/%E6%95%B0%E6%8D%AE%E5%B9%B3%E5%8F%B0%E7%94%A8%E6%88%B7%E5%AF%BC%E5%85%A5%E6%A8%A1%E6%9D%BF.xlsx`,
// 角色管理 // 角色管理

@ -134,8 +134,7 @@ export default {
this.id = userAccount.id this.id = userAccount.id
this.schoolName = res.schoolName this.schoolName = res.schoolName
this.setInfo({ this.setInfo({
avatar: userInfo.userAvatars, avatar: userInfo.userAvatars
schoolId: userAccount.schoolId,
}) })
}).catch(err => { }) }).catch(err => { })
}, },

@ -363,7 +363,7 @@ export default {
]), ]),
getdata() { getdata() {
this.$get(this.api.userInfo).then(res => { this.$get(this.api.userInfo).then(res => {
let userInfo = res.userInfo let userInfo = res.userInfo || {}
this.form = Object.assign(userInfo,res.userAccount) this.form = Object.assign(userInfo,res.userAccount)
this.originAccount = this.form.account this.originAccount = this.form.account
this.archivesList = res.personalFiles this.archivesList = res.personalFiles
@ -384,15 +384,15 @@ export default {
this.$set(e, 'schoolName', e.schoolName ? e.schoolName : '') this.$set(e, 'schoolName', e.schoolName ? e.schoolName : '')
if(e.disciplineId){ if(e.disciplineId){
this.$post(this.api.queryCourseProfessionalClass,[e.disciplineId]).then(res => { this.$get(this.api.queryCourseProfessionalClass, {disciplineId: e.disciplineId }).then(res => {
this.$set(e, 'ProfessionalClassList', res.result) this.$set(e, 'ProfessionalClassList', res.list)
}).catch(res => {}) }).catch(res => {})
}else{ }else{
this.$set(e, 'ProfessionalClassList', []) this.$set(e, 'ProfessionalClassList', [])
} }
if(e.professionalClassId){ if(e.professionalClassId){
this.$get(this.api.queryCourseProfessional,{ professionalClassId: e.professionalClassId }).then(res => { this.$get(this.api.queryCourseProfessional,{ professionalClassId: e.professionalClassId }).then(res => {
this.$set(e, 'ProfessionalList', res.result) this.$set(e, 'ProfessionalList', res.list)
}).catch(res => {}) }).catch(res => {})
}else{ }else{
this.$set(e, 'ProfessionalList', []) this.$set(e, 'ProfessionalList', [])
@ -487,12 +487,12 @@ export default {
this.setInfo({ this.setInfo({
userName: form.userName userName: form.userName
}) })
util.successMsg('提交成功') util.successMsg('更新成功')
this.updateTime = 0 this.updateTime = 0
this.$emit('updateStatus',false) this.$emit('updateStatus',false)
this.getdata() this.getdata()
}else{ }else{
util.errorMsg('提交失败') util.errorMsg('更新失败')
} }
}).catch(res => {}) }).catch(res => {})
}, },
@ -525,7 +525,10 @@ export default {
this.concatArch() this.concatArch()
}, },
delArchive(i) { delArchive(i) {
this.archivesList.splice(i, 1) const id = this.archivesList[i].personalFileId
id && this.$post(`${this.api.deleteProfile}?personalFileIds=${id}`).then(res => {
this.archivesList.splice(i, 1)
}).catch(err => {})
}, },
bindEmail() { bindEmail() {
this.email = this.form.email this.email = this.form.email
@ -568,8 +571,8 @@ export default {
}, },
// //
getSubject(){ getSubject(){
this.$post(this.api.queryCourseDiscipline).then(res => { this.$get(this.api.queryCourseDiscipline).then(res => {
this.subjectList = res.result this.subjectList = res.list
}).catch(res => {}) }).catch(res => {})
}, },
// //
@ -610,10 +613,10 @@ export default {
obj = this.subjectList.find(r =>{ obj = this.subjectList.find(r =>{
return r.disciplineId === item return r.disciplineId === item
}); });
this.$post(this.api.queryCourseProfessionalClass,[item]).then(res => { this.$get(this.api.queryCourseProfessionalClass, { disciplineId: item }).then(res => {
this.archivesList.map(e =>{ this.archivesList.map(e =>{
if(e.disciplineId == item){ if(e.disciplineId == item){
e.ProfessionalClassList = res.result e.ProfessionalClassList = res.list
e.disciplineName = obj.disciplineName e.disciplineName = obj.disciplineName
} }
}) })
@ -621,8 +624,10 @@ export default {
} }
}, },
getProfessionalClassData(value){ getProfessionalClassData(value){
this.$post(this.api.queryCourseProfessionalClass,[value]).then(res => { this.$get(this.api.queryCourseProfessionalClass, {
this.ProfessionalClassList = res.result disciplineId: value
}).then(res => {
this.ProfessionalClassList = res.list
}).catch(res => {}) }).catch(res => {})
}, },
// //
@ -655,7 +660,7 @@ export default {
obj = e.ProfessionalClassList.find(r =>{ obj = e.ProfessionalClassList.find(r =>{
return r.professionalClassId === item return r.professionalClassId === item
}) })
e.ProfessionalList = res.result e.ProfessionalList = res.list
e.professionalClassName = obj.professionalClassName e.professionalClassName = obj.professionalClassName
} }
}) })
@ -664,7 +669,7 @@ export default {
}, },
getProfessionalData(value){ getProfessionalData(value){
this.$get(this.api.queryCourseProfessional,{professionalClassId: value}).then(res => { this.$get(this.api.queryCourseProfessional,{professionalClassId: value}).then(res => {
this.ProfessionalList = res.result this.ProfessionalList = res.list
}).catch(res => {}) }).catch(res => {})
}, },
// //

@ -57,6 +57,9 @@ export default {
get(api.isClient).then(res => { get(api.isClient).then(res => {
commit('SET_CUSTOMER',res.customer) commit('SET_CUSTOMER',res.customer)
}).catch(res => {}) }).catch(res => {})
post(api.getSchoolIdByToken).then(res => {
commit('SET_INFO',res)
}).catch(res => {})
setTimeout(() => { setTimeout(() => {
// 登录次数+1 // 登录次数+1
post(api.saveRecord,{ post(api.saveRecord,{

Loading…
Cancel
Save