From f29634358dfe7da5386af4b9c0f70d9605b41429 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Thu, 14 Oct 2021 11:50:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=AD=E5=BF=83-=E4=B8=93?= =?UTF-8?q?=E4=B8=9A=E4=B8=89=E7=BA=A7=E8=81=94=E6=9F=A5=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E6=96=B0=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/api.js | 6 +++--- src/views/setting/Person.vue | 23 ++++++++++++----------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/utils/api.js b/src/utils/api.js index 8b9e41d..550c16a 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -129,9 +129,9 @@ export default { queryProvince: `${host}/nakadai/nakadai/province/queryProvince`, //查询省份 queryCity: `${host}/nakadai/nakadai/city/queryCity`, //查询城市 - queryCourseDiscipline: `${host}/nakadai/nakadai/discipline/queryDiscipline`, //查询课程学科 - queryCourseProfessionalClass: `${host}/nakadai/nakadai/professionalClass/queryProfessionalClass`, //查询专业类 - queryCourseProfessional: `${host}/nakadai/nakadai/professional/queryProfessional`, //查询专业 + queryCourseDiscipline: `${host}/nakadai/nakadai/subject/courseDiscipline`, //查询课程学科 + queryCourseProfessionalClass: `${host}/nakadai/nakadai/subject/courseProfessionalClass`, //查询专业类 + queryCourseProfessional: `${host}/nakadai/nakadai/subject/courseProfessional`, //查询专业 queryAppConfig: `${host}/liuwanr/course/queryAppConfig`, //查询应用配置 queryTrainingConfig: `${host}/liuwanr/course/queryConfig`, //查询实训配置 diff --git a/src/views/setting/Person.vue b/src/views/setting/Person.vue index 68eff3b..b107e42 100644 --- a/src/views/setting/Person.vue +++ b/src/views/setting/Person.vue @@ -595,15 +595,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', []); @@ -694,8 +694,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 => {}) }, // 清除学科类别 @@ -736,10 +736,11 @@ export default { obj = this.subjectList.find(r =>{ 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 =>{ if(e.disciplineId == item){ - e.ProfessionalClassList = res.result + e.ProfessionalClassList = res.list e.disciplineName = obj.disciplineName } }) @@ -747,8 +748,8 @@ 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 => {}) }, // 清除专业类 @@ -787,7 +788,7 @@ export default { obj = e.ProfessionalClassList.find(r =>{ return r.professionalClassId === item }) - e.ProfessionalList = res.result + e.ProfessionalList = res.list e.professionalClassName = obj.professionalClassName } }) @@ -796,7 +797,7 @@ export default { }, getProfessionalData(value){ this.$get(this.api.queryCourseProfessional,{professionalClassId: value}).then(res => { - this.ProfessionalList = res.result + this.ProfessionalList = res.list }).catch(res => {}) }, // 获取专业名称