Browse Source

pc权限调整

lizhen_gitee 6 months ago
parent
commit
a7d0235128
1 changed files with 5 additions and 2 deletions
  1. 5 2
      application/company/controller/auth/Group.php

+ 5 - 2
application/company/controller/auth/Group.php

@@ -37,9 +37,9 @@ class Group extends Apic
 
         $this->childrenGroupIds = $this->auth->getChildrenGroupIds(true);
 
-        $groupList = collection(AuthGroup::where('id', 'in', $this->childrenGroupIds)->field('id,pid as parentId,name,rules')->select())->toArray();
+        $groupList = collection(AuthGroup::where('id', 'in', $this->childrenGroupIds)->select())->toArray();
 
-        Tree::instance()->init($groupList,'parentId');
+        Tree::instance()->init($groupList,null,'');
         $groupList = [];
         if ($this->auth->isSuperAdmin()) {
             $groupList = Tree::instance()->getTreeList(Tree::instance()->getTreeArray(0));
@@ -75,6 +75,9 @@ class Group extends Apic
     {
 
             $list = $this->grouplist;
+        foreach($list as $key => &$val){
+            $val['parentId'] = $val['pid'];
+        }
 //            $total = count($list);
 //            $result = array("total" => $total, "list" => $list);