Explorar o código

fix: department tree

trigger no permission when requested by top level personnel who are not administrators
Casper Dai %!s(int64=2) %!d(string=hai) anos
pai
achega
65de2ccb96
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/api/user.js

+ 2 - 2
src/api/user.js

@@ -314,7 +314,7 @@ export function getDepartments () {
 }
 
 export function getDepartmentTree () {
-  if (store.getters.isTopGroup) {
+  if (store.getters.isTenantAdmin) {
     return getDepartments().then(({ data }) => {
       return {
         data: [{
@@ -334,7 +334,7 @@ export function getDepartmentTree () {
         ? [{
           path: store.getters.org,
           name: '我的部门',
-          children: []
+          children: data
         }]
         : [data]
     }