|  | @@ -1,6 +1,6 @@
 | 
	
		
			
				|  |  |  /* eslint-disable no-empty */
 | 
	
		
			
				|  |  |  // import { branchQueryPage } from '@/api/specialSetting'
 | 
	
		
			
				|  |  | -import { getSubject, getTeacher,findEducationUsers,getEmployeeOrgan } from '@/api/buildTeam'
 | 
	
		
			
				|  |  | +import { getSubject, getTeacher,findEducationUsers,getEmployeeOrgan, getOrganRole } from '@/api/buildTeam'
 | 
	
		
			
				|  |  |  import { getSchool,queryEmployByOrganId } from '@/api/systemManage'
 | 
	
		
			
				|  |  |  import { vipGroupCategory } from "@/api/vipSeting"
 | 
	
		
			
				|  |  |  import { findTechnician } from '@/api/repairManager'
 | 
	
	
		
			
				|  | @@ -28,6 +28,7 @@ export default {
 | 
	
		
			
				|  |  |      educations:[],
 | 
	
		
			
				|  |  |      technician: [],
 | 
	
		
			
				|  |  |      employs:[],
 | 
	
		
			
				|  |  | +    roles: []
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    mutations: {
 | 
	
		
			
				|  |  |      commit_branchs: (state, branchs) => {
 | 
	
	
		
			
				|  | @@ -59,6 +60,9 @@ export default {
 | 
	
		
			
				|  |  |      commit_technician: (state, technician) => {
 | 
	
		
			
				|  |  |        state.technician = technician
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | +    commit_roles: (state, roles) => {
 | 
	
		
			
				|  |  | +      state.roles = roles
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |      commit_employs:(state,employs)=>{
 | 
	
		
			
				|  |  |        state.employs = employs.map(emloys=>{
 | 
	
		
			
				|  |  |          return {
 | 
	
	
		
			
				|  | @@ -133,6 +137,34 @@ export default {
 | 
	
		
			
				|  |  |          loadings.commit_educations = false
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | +    async setOrganRole({commit,state},force) {
 | 
	
		
			
				|  |  | +      if ((!state.educations.length || force === true) && !loadings.commit_roles) {
 | 
	
		
			
				|  |  | +        loadings.commit_roles = getOrganRole()
 | 
	
		
			
				|  |  | +        try {
 | 
	
		
			
				|  |  | +          const res = await loadings.commit_roles
 | 
	
		
			
				|  |  | +          const tempArr = []
 | 
	
		
			
				|  |  | +          const tempData = res.data
 | 
	
		
			
				|  |  | +          // 初始化数据
 | 
	
		
			
				|  |  | +          for(let i in tempData) {
 | 
	
		
			
				|  |  | +            tempArr[i] = []
 | 
	
		
			
				|  |  | +            if(tempData[i]) {
 | 
	
		
			
				|  |  | +              for(let t in tempData[i]) {
 | 
	
		
			
				|  |  | +                tempArr[i].push({
 | 
	
		
			
				|  |  | +                  value: t,
 | 
	
		
			
				|  |  | +                  label: tempData[i][t],
 | 
	
		
			
				|  |  | +                  userName: tempData[i][t],
 | 
	
		
			
				|  |  | +                  userId: t,
 | 
	
		
			
				|  |  | +                })
 | 
	
		
			
				|  |  | +              }
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +          console.log(tempArr, 'tempArr')
 | 
	
		
			
				|  |  | +          commit('commit_roles', tempArr)
 | 
	
		
			
				|  |  | +        } catch (error) { }
 | 
	
		
			
				|  |  | +        loadings.commit_roles = false
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      getOrganRole
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |      async setTechnician({commit,state},force){
 | 
	
		
			
				|  |  |        if ((!state.technician.length || force === true) && !loadings.commit_technician) {
 | 
	
		
			
				|  |  |          loadings.commit_technician = findTechnician()
 |