mo пре 2 година
родитељ
комит
03741c1a8d

+ 2 - 2
src/components/remote-search/index.vue

@@ -43,7 +43,7 @@ import { throttle, slice, uniqBy } from "lodash";
 import selects from "@/store/modules/selects";
 import selects from "@/store/modules/selects";
 export default {
 export default {
   name: "remote-search",
   name: "remote-search",
-  props: ["commit", "number", "value", "width", "multiple", "ariaPlaceholder"],
+  props: ["commit", "number", "value", "width", "multiple", "ariaPlaceholder",'demissionFlag'],
   data() {
   data() {
     return {
     return {
       options: [],
       options: [],
@@ -70,7 +70,7 @@ export default {
         if(this.commit == 'setTenantUser'){
         if(this.commit == 'setTenantUser'){
           await this.$store.dispatch(commit,this.value);
           await this.$store.dispatch(commit,this.value);
         }else{
         }else{
-          await this.$store.dispatch(commit);
+          await this.$store.dispatch(commit,this.demissionFlag);
         }
         }
 
 
       if (commit == "setOrganRole") {
       if (commit == "setOrganRole") {

+ 2 - 1
src/store/modules/selects.js

@@ -126,11 +126,12 @@ export default {
       }
       }
     },
     },
     async setTeachers({ commit, state }, force) {
     async setTeachers({ commit, state }, force) {
+      console.log('force',force)
       if (
       if (
         (!state.teachers.length || force === true) &&
         (!state.teachers.length || force === true) &&
         !loadings.commit_teachers
         !loadings.commit_teachers
       ) {
       ) {
-        loadings.commit_teachers = getTeacher();
+        loadings.commit_teachers = getTeacher({demissionFlag:force});
         try {
         try {
           const res = await loadings.commit_teachers;
           const res = await loadings.commit_teachers;
           commit("commit_teachers", res.data);
           commit("commit_teachers", res.data);

+ 1 - 0
src/views/teamDetail/teamCourseList.vue

@@ -34,6 +34,7 @@
           <remote-search
           <remote-search
             :commit="'setTeachers'"
             :commit="'setTeachers'"
             v-model="searchForm.teacherIdList"
             v-model="searchForm.teacherIdList"
+            :demissionFlag="true"
           />
           />
         </el-form-item>
         </el-form-item>
         <el-form-item>
         <el-form-item>