mo пре 4 година
родитељ
комит
b8c8ce1d57
3 измењених фајлова са 40 додато и 10 уклоњено
  1. 5 5
      src/store/modules/selects.js
  2. 2 1
      src/utils/request.js
  3. 33 4
      src/views/teamDetail/components/resetClass.vue

+ 5 - 5
src/store/modules/selects.js

@@ -64,7 +64,7 @@ export default {
       if ((!state.branchs.length || force === true) && !loadings.commit_branchs) {
         loadings.commit_branchs = true
         try {
-          state.branchsLoading = true
+          state.branchsLoading = getEmployeeOrgan()
           const res = await getEmployeeOrgan()
           commit('commit_branchs', res.data)
         } catch (error) { }
@@ -73,7 +73,7 @@ export default {
     },
     async setSubjects ({ commit, state }, force) {
       if ((!state.subjects.length || force === true) && !loadings.commit_subjects) {
-        loadings.commit_subjects = true
+        loadings.commit_subjects = getSubject({rows: 9999, tenantId: '1'})
         try {
           state.subjectsLoading = true
           const res = await getSubject({rows: 9999, tenantId: '1'})
@@ -107,7 +107,7 @@ export default {
     },
     async setVipGroupCategory ({ commit, state }, force) {
       if ((!state.vipGroupCategory.length || force === true) && !loadings.commit_vip_group_category) {
-        loadings.commit_vip_group_category = true
+        loadings.commit_vip_group_category = vipGroupCategory()
         try {
           state.vipGroupCategoryLoading = true
           const res = await vipGroupCategory()
@@ -118,7 +118,7 @@ export default {
     },
     async setEducations({commit,state},force){
       if ((!state.educations.length || force === true) && !loadings.commit_educations) {
-        loadings.commit_educations = true
+        loadings.commit_educations = findEducationUsers()
         try {
           const res = await findEducationUsers()
           commit('commit_educations', res.data)
@@ -128,7 +128,7 @@ export default {
     },
     async setTechnician({commit,state},force){
       if ((!state.technician.length || force === true) && !loadings.commit_technician) {
-        loadings.commit_technician = true
+        loadings.commit_technician = findTechnician()
         try {
           const res = await findTechnician()
           commit('commit_technician', res.data)

+ 2 - 1
src/utils/request.js

@@ -92,7 +92,7 @@ service.interceptors.request.use(
     // do something before request is sent
     showFullScreenLoading()
     if (store.getters.token) {
-      // let each request carry token 
+      // let each request carry token
       // ['X-Token'] is a custom headers key
       // please modify it according to the actual situation
       config.headers['Authorization'] = getToken()
@@ -100,6 +100,7 @@ service.interceptors.request.use(
     }
     config.params = cleanDeep(config.params)
     //  params: cleanDeep(options.params),
+    // console.log(config)
     return config
   },
   error => {

+ 33 - 4
src/views/teamDetail/components/resetClass.vue

@@ -346,10 +346,24 @@
             { required: true, message: '请选择主教老师', trigger: 'blur' },
           ]"
         >
-          <remote-search
+           <el-select
+          v-model.trim="newClassForm.bishop"
+          placeholder="请选择主教老师"
+          clearable
+          filterable
+
+        >
+          <el-option
+            v-for="(item, index) in teacherList"
+            :key="index"
+            :label="item.realName"
+            :value="String(item.id)"
+          ></el-option>
+        </el-select>
+          <!-- <remote-search
             :commit="'setTeachers'"
             v-model="newClassForm.bishop"
-          />
+          /> -->
         </el-form-item>
         <el-form-item
           label="预计招生数"
@@ -371,12 +385,27 @@
           v-if="newClassForm.type != 'HIGH_ONLINE' && newClassForm.type != 'HIGH'&&newClassForm.type"
           prop="teaching"
         >
-          <remote-search
+              <el-select
+          v-model.trim="newClassForm.teaching"
+          placeholder="请选择助教老师"
+          filterable
+          clearable
+          multiple
+            @change="setAssistant1"
+        >
+          <el-option
+            v-for="(item, index) in cooperationList"
+            :key="index"
+            :label="item.realName"
+            :value="item.id"
+          ></el-option>
+        </el-select>
+          <!-- <remote-search
             :commit="'setTeachers'"
             v-model="newClassForm.teaching"
             @change="setAssistant1"
             :multiple="true"
-          />
+          /> -->
         </el-form-item>
         <el-form-item
           label="声部"