|
@@ -137,17 +137,18 @@ class Work extends Base{
|
|
|
}
|
|
|
//岗位模板新建
|
|
|
public function list(){
|
|
|
- $param=$this->request->param(['work_name'=>'','belong'=>'','level'=>'','size'=>1,'page'=>15],'post','trim');
|
|
|
+ $param=$this->request->param(['work_name'=>'','belong'=>'','status'=>'','level'=>'','size'=>1,'page'=>15],'post','trim');
|
|
|
$where=[];
|
|
|
if($param['level']!='')$where[]=['level','=',$param['level']];
|
|
|
if($param['belong']!='')$where[]=['belong','=',$param['belong']];
|
|
|
+ if($param['status']!='')$where[]=['status','=',$param['status']];
|
|
|
if($param['work_name']!='')$where[]=['work_name','like',"%{$param['work_name']}%"];
|
|
|
$list =$this->model->where($where)->order('id desc')->paginate(['list_rows'=>$param['size'],'page'=>$param['page']]);
|
|
|
return success('获取成功',['list'=>$list->items(),'count'=>$list->total()]);
|
|
|
}
|
|
|
//岗位模板新建
|
|
|
public function status(){
|
|
|
- $param=$this->request->param(['id'=>'','sttaus'=>''],'post','trim');
|
|
|
+ $param=$this->request->param(['id'=>'','status'=>''],'post','trim');
|
|
|
$valid =Validate::rule([
|
|
|
'id|岗位ID'=>'require|number|gt:0',
|
|
|
'status|状态'=>'require|number|in:0,1'
|