|
@@ -37,9 +37,9 @@ class Group extends Apic
|
|
|
|
|
|
$this->childrenGroupIds = $this->auth->getChildrenGroupIds(true);
|
|
|
|
|
|
- $groupList = collection(AuthGroup::where('id', 'in', $this->childrenGroupIds)->select())->toArray();
|
|
|
+ $groupList = collection(AuthGroup::where('id', 'in', $this->childrenGroupIds)->field('id,pid as parentId,name,rules')->select())->toArray();
|
|
|
|
|
|
- Tree::instance()->init($groupList);
|
|
|
+ Tree::instance()->init($groupList,'parentId');
|
|
|
$groupList = [];
|
|
|
if ($this->auth->isSuperAdmin()) {
|
|
|
$groupList = Tree::instance()->getTreeList(Tree::instance()->getTreeArray(0));
|
|
@@ -256,26 +256,6 @@ class Group extends Apic
|
|
|
$this->error();
|
|
|
}
|
|
|
|
|
|
-/* public function simple_list(){
|
|
|
- $ruleList = collection(model('AuthRule')->field('id,title as name,pid as parentId,type')->order('weigh', 'desc')->order('id', 'asc')->select())->toArray();
|
|
|
-
|
|
|
- $this->success(1,$ruleList);
|
|
|
- }
|
|
|
- //此角色已选中的
|
|
|
- public function list_role_menus(){
|
|
|
- $id = input('id','');
|
|
|
-
|
|
|
- $currentrules = Db::name('pc_auth_group')->where('id',$id)->value('rules');
|
|
|
-
|
|
|
- $rules = explode(',',$currentrules);
|
|
|
- foreach($rules as $key => &$val){
|
|
|
- $val = intval($val);
|
|
|
- }
|
|
|
- unset($val);
|
|
|
-
|
|
|
- $this->success(1,$rules);
|
|
|
- }*/
|
|
|
-
|
|
|
/**
|
|
|
* 读取角色权限树
|
|
|
*
|