|
@@ -1,6 +1,6 @@
|
|
|
/* eslint-disable no-empty */
|
|
|
import { branchQueryPage } from '@/api/specialSetting'
|
|
|
-import { getSubject, getTeacher } from '@/api/buildTeam'
|
|
|
+import { getSubject, getTeacher,findEducationUsers } from '@/api/buildTeam'
|
|
|
import { getSchool } from '@/api/systemManage'
|
|
|
import { vipGroupCategory } from "@/api/vipSeting"
|
|
|
|
|
@@ -21,7 +21,8 @@ export default {
|
|
|
subjects: [],
|
|
|
teachers: [],
|
|
|
schools: [],
|
|
|
- vipGroupCategory: []
|
|
|
+ vipGroupCategory: [],
|
|
|
+ educations:[]
|
|
|
},
|
|
|
mutations: {
|
|
|
commit_branchs: (state, branchs) => {
|
|
@@ -31,13 +32,23 @@ export default {
|
|
|
state.subjects = subjects
|
|
|
},
|
|
|
commit_teachers: (state, teachers) => {
|
|
|
- state.teachers = teachers
|
|
|
+ state.teachers = teachers.map(teacher=>{
|
|
|
+ return {
|
|
|
+ id:teacher.id,
|
|
|
+ userId:teacher.id,
|
|
|
+ userName:teacher.realName,
|
|
|
+ realName:teacher.realName
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
commit_schools: (state, schools) => {
|
|
|
state.schools = schools
|
|
|
},
|
|
|
commit_vip_group_category: (state, vipGroupCategory) => {
|
|
|
state.vipGroupCategory = vipGroupCategory
|
|
|
+ },
|
|
|
+ commit_educations:(state,educations)=>{
|
|
|
+ state.educations = educations
|
|
|
}
|
|
|
},
|
|
|
actions: {
|
|
@@ -59,6 +70,7 @@ export default {
|
|
|
},
|
|
|
async setTeachers ({ commit, state }, force) {
|
|
|
if (!state.teachers.length || force === true) {
|
|
|
+
|
|
|
try {
|
|
|
const res = await getTeacher()
|
|
|
commit('commit_teachers', res.data)
|
|
@@ -81,5 +93,14 @@ export default {
|
|
|
} catch (error) { }
|
|
|
}
|
|
|
},
|
|
|
+ async setEducations({commit,state},force){
|
|
|
+ if (!state.educations.length || force === true) {
|
|
|
+ try {
|
|
|
+
|
|
|
+ const res = await findEducationUsers()
|
|
|
+ commit('commit_educations', res.data)
|
|
|
+ } catch (error) { }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|