|
@@ -434,12 +434,13 @@ class EmployeeService extends Service
|
|
if(! empty($data['code'])) $model->where('code', 'LIKE', '%'.$data['code'].'%');
|
|
if(! empty($data['code'])) $model->where('code', 'LIKE', '%'.$data['code'].'%');
|
|
|
|
|
|
$list = $model->get()->toArray();
|
|
$list = $model->get()->toArray();
|
|
-// if(! empty($list)) {
|
|
|
|
-// $list = $this->makeTree(0,$list);
|
|
|
|
-// $list = $this->set_sort_circle($list);
|
|
|
|
-// }
|
|
|
|
|
|
+ $list_tree = $list;
|
|
|
|
+ if(! empty($list_tree)) {
|
|
|
|
+ $list_tree = $this->makeTree(0,$list_tree);
|
|
|
|
+ $list_tree = $this->set_sort_circle($list_tree);
|
|
|
|
+ }
|
|
|
|
|
|
- return [200,$list];
|
|
|
|
|
|
+ return [200,['data' => $list,'tree' => $list_tree]];
|
|
}
|
|
}
|
|
|
|
|
|
public function departRule($data, $is_check = true){
|
|
public function departRule($data, $is_check = true){
|