|
@@ -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);
|
|
|
|