lex-xin 4 년 전
부모
커밋
7d554f9df5
2개의 변경된 파일12개의 추가작업 그리고 24개의 파일을 삭제
  1. 1 0
      src/router/notKeepAliveList.js
  2. 11 24
      src/views/categroyManager/insideSetting/staffManager.vue

+ 1 - 0
src/router/notKeepAliveList.js

@@ -37,4 +37,5 @@ export default [
   '/business/repairList', // 维修单列表
   '/business/afterSchoolManager', // 课外训练
   '/business/afterSchoolDetail', // 课外训练详情
+  '/insideSetting/staffManager', // 员工管理
 ]

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

@@ -36,10 +36,10 @@
                      clearable
                      filterable
                      placeholder="请选择分部">
-            <el-option v-for="item in branchList"
-                       :key="item.value"
-                       :label="item.label"
-                       :value="item.value"></el-option>
+            <el-option v-for="item in selects.branchs"
+                       :key="item.id"
+                       :label="item.name"
+                       :value="item.id"></el-option>
           </el-select>
         </el-form-item>
         <el-form-item>
@@ -198,12 +198,13 @@
           <el-select style="width: calc(100% - 75px) !important;"
                      filterable
                      clearable
+                     collapse-tags
                      v-model.trim="form.organIdLists"
                      multiple>
-            <el-option v-for="item in branchList"
-                       :key="item.value"
-                       :label="item.label"
-                       :value="item.value"></el-option>
+            <el-option v-for="item in selects.branchs"
+                       :key="item.id"
+                       :label="item.name"
+                       :value="item.id"></el-option>
           </el-select>
           <el-button @click="onBranchCheckAll">全选</el-button>
         </el-form-item>
@@ -328,7 +329,6 @@ export default {
       roleStatus: false,
       formActionTitle: 'create',
       roleList: [], // 角色列表
-      branchList: [], // 分部列表
       formTitle: {
         create: '添加员工',
         update: '修改员工'
@@ -376,7 +376,7 @@ export default {
     onBranchCheckAll () {
       this.form.organIdLists = []
 
-      this.branchList.forEach(item => {
+      this.selects.branchs.forEach(item => {
         this.form.organIdLists.push(item.value)
       })
     },
@@ -444,20 +444,7 @@ export default {
           })
         }
       })
-      branchQueryPage({ // 获取分部
-        delFlag: 0,
-        rows: 9999
-      }).then(res => {
-        if (res.code == 200 && res.data && res.data.rows) {
-          this.branchList = []
-          res.data.rows.forEach(item => {
-            this.branchList.push({
-              label: item.name,
-              value: item.id
-            })
-          })
-        }
-      })
+      this.$store.dispatch('setBranchs')
 
     },
     roleOperation (type, data) {