|
...
|
...
|
@@ -20,13 +20,13 @@ class DeptController extends BaseController |
|
|
|
|
|
|
|
public function lists(DeptLogic $logic)
|
|
|
|
{
|
|
|
|
// $map = [];
|
|
|
|
// if(!empty($this->param['search'])){
|
|
|
|
// $map[] = ['title', 'like', "%{$this->param['search']}%"];
|
|
|
|
// }
|
|
|
|
// $sort = ['id' => 'desc'];
|
|
|
|
// $data = $logic->getList($map, $sort, ['id', 'pid', 'title'],0);
|
|
|
|
// return $this->success(Arr::listToTree($data));
|
|
|
|
$map = [];
|
|
|
|
if(!empty($this->param['search'])){
|
|
|
|
$map[] = ['title', 'like', "%{$this->param['search']}%"];
|
|
|
|
}
|
|
|
|
$sort = ['id' => 'desc'];
|
|
|
|
$data = $logic->getList($map, $sort, ['id', 'pid', 'title'],0);
|
|
|
|
return $this->success(Arr::listToTree($data));
|
|
|
|
}
|
|
|
|
|
|
|
|
public function info(Request $request, DeptLogic $logic){
|
...
|
...
|
|