更新
This commit is contained in:
parent
461208df60
commit
a2a179b26e
@ -54,12 +54,13 @@ class UserMenuLists extends BaseAdminDataLists implements ListsSearchInterface
|
|||||||
*/
|
*/
|
||||||
public function lists(): array
|
public function lists(): array
|
||||||
{
|
{
|
||||||
return UserMenu::where($this->searchWhere)
|
$lists = UserMenu::where($this->searchWhere)
|
||||||
->field(['id', 'pid', 'type', 'name', 'icon', 'sort', 'paths', 'params', 'is_show', 'is_disable'])
|
->field(['id', 'pid', 'type', 'name', 'icon', 'sort', 'paths', 'params', 'is_show', 'is_disable'])
|
||||||
->limit($this->limitOffset, $this->limitLength)
|
->limit($this->limitOffset, $this->limitLength)
|
||||||
->order(['id' => 'desc'])
|
->order(['id' => 'desc'])
|
||||||
->select()
|
->select()
|
||||||
->toArray();
|
->toArray();
|
||||||
|
return linear_to_tree($lists, 'children');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -73,5 +74,4 @@ class UserMenuLists extends BaseAdminDataLists implements ListsSearchInterface
|
|||||||
{
|
{
|
||||||
return UserMenu::where($this->searchWhere)->count();
|
return UserMenu::where($this->searchWhere)->count();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user