作者 lyh

gx

@@ -21,6 +21,9 @@ class ProjectDeptController extends BaseController @@ -21,6 +21,9 @@ class ProjectDeptController extends BaseController
21 * @time :2023/6/17 16:13 21 * @time :2023/6/17 16:13
22 */ 22 */
23 public function lists(DeptLogic $deptLogic){ 23 public function lists(DeptLogic $deptLogic){
  24 + if(isset($this->param['pid'])){
  25 + $this->map['pid'] = $this->param['pid'];
  26 + }
24 if(isset($this->map['title']) && !empty($this->map['title'])){ 27 if(isset($this->map['title']) && !empty($this->map['title'])){
25 $this->map['title'] = ['like','%'.$this->map['title'].'%']; 28 $this->map['title'] = ['like','%'.$this->map['title'].'%'];
26 } 29 }
@@ -28,7 +28,13 @@ class ProjectMenuController extends BaseController @@ -28,7 +28,13 @@ class ProjectMenuController extends BaseController
28 */ 28 */
29 public function lists(){ 29 public function lists(){
30 $menuModel = new ProjectMenuModel(); 30 $menuModel = new ProjectMenuModel();
31 - $this->map['pid'] = $this->param['pid']; 31 + if(isset($this->param['pid'])){
  32 + $this->map['pid'] = $this->param['pid'];
  33 + }
  34 + //是否为权限菜单
  35 + if(isset($this->param['is_role'])){
  36 + $this->map['is_role'] = $this->param['is_role'];
  37 + }
32 $lists = $menuModel->lists($this->map,$this->page,$this->row,$this->order,['*']); 38 $lists = $menuModel->lists($this->map,$this->page,$this->row,$this->order,['*']);
33 $this->response('success',Code::SUCCESS,$lists); 39 $this->response('success',Code::SUCCESS,$lists);
34 } 40 }