getKey(); // 调用服务恢复任务 $result = CleanupService::resumeTask($taskId); if (!$result['success']) { return $this->response() ->error('恢复失败:' . $result['message']); } return $this->response() ->success('任务恢复成功!') ->detail('任务已恢复执行,将从暂停点继续。') ->refresh(); } catch (\Exception $e) { return $this->response() ->error('恢复失败:' . $e->getMessage()); } } /** * 确认对话框 */ public function confirm() { return [ '确认恢复任务?', '任务将从暂停点继续执行。' ]; } /** * 权限检查 */ public function allowed() { $row = $this->row; return $row->status == 7; // 只有已暂停的任务可以恢复 }"> {$this->title} HTML; } }