个人中心-专业三级联查使用新接口

dev
yujialong 3 years ago
parent 8a3c7bc81a
commit f29634358d
  1. 6
      src/utils/api.js
  2. 23
      src/views/setting/Person.vue

@ -129,9 +129,9 @@ export default {
queryProvince: `${host}/nakadai/nakadai/province/queryProvince`, //查询省份 queryProvince: `${host}/nakadai/nakadai/province/queryProvince`, //查询省份
queryCity: `${host}/nakadai/nakadai/city/queryCity`, //查询城市 queryCity: `${host}/nakadai/nakadai/city/queryCity`, //查询城市
queryCourseDiscipline: `${host}/nakadai/nakadai/discipline/queryDiscipline`, //查询课程学科 queryCourseDiscipline: `${host}/nakadai/nakadai/subject/courseDiscipline`, //查询课程学科
queryCourseProfessionalClass: `${host}/nakadai/nakadai/professionalClass/queryProfessionalClass`, //查询专业类 queryCourseProfessionalClass: `${host}/nakadai/nakadai/subject/courseProfessionalClass`, //查询专业类
queryCourseProfessional: `${host}/nakadai/nakadai/professional/queryProfessional`, //查询专业 queryCourseProfessional: `${host}/nakadai/nakadai/subject/courseProfessional`, //查询专业
queryAppConfig: `${host}/liuwanr/course/queryAppConfig`, //查询应用配置 queryAppConfig: `${host}/liuwanr/course/queryAppConfig`, //查询应用配置
queryTrainingConfig: `${host}/liuwanr/course/queryConfig`, //查询实训配置 queryTrainingConfig: `${host}/liuwanr/course/queryConfig`, //查询实训配置

@ -595,15 +595,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', []);
@ -694,8 +694,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 => {})
}, },
// //
@ -736,10 +736,11 @@ 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 => { console.log(item);
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
} }
}) })
@ -747,8 +748,8 @@ export default {
} }
}, },
getProfessionalClassData(value){ getProfessionalClassData(value){
this.$post(this.api.queryCourseProfessionalClass,[value]).then(res => { this.$get(this.api.queryCourseProfessionalClass,{disciplineId: value}).then(res => {
this.ProfessionalClassList = res.result this.ProfessionalClassList = res.list
}).catch(res => {}) }).catch(res => {})
}, },
// //
@ -787,7 +788,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
} }
}) })
@ -796,7 +797,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 => {})
}, },
// //

Loading…
Cancel
Save