add(); HelpHander::success([],'操作成功'); } // 编辑 public function update(){ model('Roles')->add(); HelpHander::success([],'操作成功'); } // 详情 public function detail(){ $id = input('id/d',0); $ret = model('Roles')->info($id); HelpHander::success($ret); } // 列表 public function list(){ $page = input('page/d',1); $size = input('size/d',10); $name = input('name','','trim'); $code = input('code','','trim'); $ret = model('Roles')->lists($page,$size,$name,$code); HelpHander::success($ret); } // 删除 public function del(){ $id = input('id/d',0); model('Roles')->del($id); HelpHander::success([],'操作成功'); } // 公共角色列表 public function queryCommonRoles(){ $ret = model('Roles')->queryCommonRoles(); HelpHander::success($ret); } // 查询用户的所有普通角色 public function queryUserRoles(){ $page = input('page/d',1); $size = input('size/d',10); $name = input('name','','trim'); $code = input('code','','trim'); $phone = input('phone','','trim'); $depId = input('depId/d',0); $jobId = input('jobId/d',0); $orgId = input('orgId/d',0); $ret = model('Roles')->queryUserRoles($page,$size,$name,$code,$phone,$depId,$jobId,$orgId); HelpHander::success($ret); } // 分配人员组织默认角色(不同组织调人) public function saveUserRoles(){ $uId = input('uId/d',0); $orgId = input('orgId/d',0); model('Roles')->saveUserRoles($uId,$orgId); HelpHander::success([],'操作成功'); } // 获取机构管理员列表 public function queryUserByRoles(){ $page = input('page/d',1); $size = input('size/d',10); $account = input('account','','trim'); $code = input('code','','trim'); $oId = input('oId/d',0); $ret = model('Roles')->queryUserByRoles($page,$size,$account,$code,$oId); HelpHander::success($ret); } // 保存权限 public function saveRules(){ model('Roles')->saveRules(); HelpHander::success([],'操作成功'); } }