获取学校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`,
queryCity: `/nakadai/nakadai/city/queryCity`,
querySchool: `/nakadai/nakadai/school/querySchool`,
queryCourseDiscipline: `/nakadai/nakadai/discipline/queryDiscipline`,
queryCourseProfessionalClass: `/nakadai/nakadai/professionalClass/queryProfessionalClass`,
queryCourseProfessional: `/nakadai/nakadai/professional/queryProfessional`,
queryCourseDiscipline: `/nakadai/nakadai/subject/courseDiscipline`,
queryCourseProfessionalClass: `/nakadai/nakadai/subject/courseProfessionalClass`,
queryCourseProfessional: `/nakadai/nakadai/subject/courseProfessional`,
getSchoolIdByToken: `/users/users/data/user/getSchoolIdByToken`,
// 个人中心
uploadUserAvatars: `${Setting.apiBaseURL}/users/users/userAccount/updateUserAvatars`,
@ -46,6 +49,7 @@ export default {
bindPhoneOrEmail: `/users/users/userAccount/bindPhoneOrEmail`,
examinePassword: `/users/users/userAccount/examinePassword`,
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`,
// 角色管理

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

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

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

Loading…
Cancel
Save