更新目录结构

This commit is contained in:
2023-10-21 17:45:00 +08:00
parent 59cc869bb2
commit 664295167d
55 changed files with 1856 additions and 6329 deletions

View File

@@ -11,7 +11,7 @@ namespace app\controller\auth;
use think\facade\Request;
use app\model\auth\Departments;
use app\services\auth\DepartmentService;
use sent\tree\Tree;
use Xin\Support\Arr;
use app\controller\Base;
class Department extends Base {
@@ -35,7 +35,7 @@ class Department extends Base {
}
}
}
$tree = (new Tree())->listToTree($list, 'id', 'parent_id', 'children', $root);
$tree = Arr::tree($list, null, 0, ['id'=>'id', 'parent' => 'parent_id', 'child' => 'children']);
if(empty($tree)){
$this->data['data'] = $list;
}else{