lex-xin 4 年之前
父节点
当前提交
11b0492a98
共有 1 个文件被更改,包括 11 次插入4 次删除
  1. 11 4
      src/views/categroyManager/insideSetting/staffManager.vue

+ 11 - 4
src/views/categroyManager/insideSetting/staffManager.vue

@@ -211,7 +211,7 @@
                      collapse-tags
                      v-model.trim="form.organIdLists"
                      multiple>
-            <el-option v-for="item in selects.branchs"
+            <el-option v-for="item in organList"
                        :key="item.id"
                        :label="item.name"
                        :value="item.id"></el-option>
@@ -317,7 +317,7 @@
 <script>
 import pagination from '@/components/Pagination/index'
 import { permission } from "@/utils/directivePage";
-import { queryEmployByOrganId, employeeOperate, getUserRole, employeeAdd, employeeUpdate, hasCourseGroupRelation, updateEducationTeacherId } from '@/api/systemManage'
+import { queryEmployByOrganId, employeeOperate, getUserRole, employeeAdd, employeeUpdate, hasCourseGroupRelation, updateEducationTeacherId, queryEmployeeOrganByUser } from '@/api/systemManage'
 import { findEducationTeacher } from '@/api/specialSetting'
 import { findEducationUsers } from '@/api/buildTeam'
 import Tooltip from '@/components/Tooltip/index'
@@ -337,6 +337,7 @@ export default {
   components: { pagination, Tooltip, handover },
   data () {
     return {
+      organList: [],
       tableList: [],
       educationList: [],
       educationForm: {
@@ -403,7 +404,7 @@ export default {
     onBranchCheckAll () {
       this.form.organIdLists = []
 
-      this.selects.branchs.forEach(item => {
+      this.organList.forEach(item => {
         this.form.organIdLists.push(item.id)
       })
     },
@@ -477,7 +478,13 @@ export default {
       })
       this.$store.dispatch('setBranchs')
     },
-    roleOperation (type, data) {
+    async roleOperation (type, data) {
+      // 获取分部
+      await queryEmployeeOrganByUser().then(res => {
+        if(res.code == 200) {
+          this.organList = res.data
+        }
+      })
       this.formActionTitle = type
       this.roleStatus = true
       // 修改的时候