dataLists(new SafetyTargetLists()); } /** * @notes 添加安全目标 * @return \think\response\Json * @author likeadmin * @date 2023/12/19 11:20 */ public function add() { $params = (new SafetyTargetValidate())->post()->goCheck('add'); $result = SafetyTargetLogic::add($params,$this->adminId); if (true === $result) { return $this->success('添加成功', [], 1, 1); } return $this->fail(SafetyTargetLogic::getError()); } /** * @notes 编辑安全目标 * @return \think\response\Json * @author likeadmin * @date 2023/12/19 11:20 */ public function edit() { $params = (new SafetyTargetValidate())->post()->goCheck('edit'); $result = SafetyTargetLogic::edit($params,$this->adminId); if (true === $result) { return $this->success('编辑成功', [], 1, 1); } return $this->fail(SafetyTargetLogic::getError()); } /** * @notes 删除安全目标 * @return \think\response\Json * @author likeadmin * @date 2023/12/19 11:20 */ public function delete() { $params = (new SafetyTargetValidate())->post()->goCheck('delete'); SafetyTargetLogic::delete($params); return $this->success('删除成功', [], 1, 1); } /** * @notes 获取安全目标详情 * @return \think\response\Json * @author likeadmin * @date 2023/12/19 11:20 */ public function detail() { $params = (new SafetyTargetValidate())->goCheck('detail'); $result = SafetyTargetLogic::detail($params); return $this->data($result); } }