正在显示
1 个修改的文件
包含
7 行增加
和
2 行删除
| @@ -37,6 +37,11 @@ class CheckLogController extends BaseController | @@ -37,6 +37,11 @@ class CheckLogController extends BaseController | ||
| 37 | * @time :2025/4/17 10:17 | 37 | * @time :2025/4/17 10:17 |
| 38 | */ | 38 | */ |
| 39 | public function lists(){ | 39 | public function lists(){ |
| 40 | + $this->request->validate([ | ||
| 41 | + 'project_id'=>'required', | ||
| 42 | + ],[ | ||
| 43 | + 'project_id.required' => 'project_id不能为空', | ||
| 44 | + ]); | ||
| 40 | $field = ['id','check_id','date','status','images','result','created_at']; | 45 | $field = ['id','check_id','date','status','images','result','created_at']; |
| 41 | $this->map['status'] = 1; | 46 | $this->map['status'] = 1; |
| 42 | $lists = $this->model->lists($this->map,$this->page,$this->row,'id',$field); | 47 | $lists = $this->model->lists($this->map,$this->page,$this->row,'id',$field); |
| @@ -69,10 +74,10 @@ class CheckLogController extends BaseController | @@ -69,10 +74,10 @@ class CheckLogController extends BaseController | ||
| 69 | */ | 74 | */ |
| 70 | public function save(){ | 75 | public function save(){ |
| 71 | $this->request->validate([ | 76 | $this->request->validate([ |
| 72 | - 'id'=>'required', 'check_id'=>'required', | 77 | + 'project_id'=>'required', 'check_id'=>'required', |
| 73 | 'date'=>'required', 'result'=>'required', | 78 | 'date'=>'required', 'result'=>'required', |
| 74 | ],[ | 79 | ],[ |
| 75 | - 'id.required' => '主键不能为空', 'check_id.required' => '问题id不能为空', | 80 | + 'project_id.required' => 'project_id不能为空', 'check_id.required' => '问题id不能为空', |
| 76 | 'date.required' => '时间不能为空', 'result.required' => '检查结果不能为空', | 81 | 'date.required' => '时间不能为空', 'result.required' => '检查结果不能为空', |
| 77 | ]); | 82 | ]); |
| 78 | $this->param = $this->model->saveHandleParam($this->param,$this->manage['id']); | 83 | $this->param = $this->model->saveHandleParam($this->param,$this->manage['id']); |
-
请 注册 或 登录 后发表评论