diff --git a/app/adminapi/logic/TaskHandlingThreeLevelReviewLogic.php b/app/adminapi/logic/TaskHandlingThreeLevelReviewLogic.php index 608a5d75c..82f3cfe97 100644 --- a/app/adminapi/logic/TaskHandlingThreeLevelReviewLogic.php +++ b/app/adminapi/logic/TaskHandlingThreeLevelReviewLogic.php @@ -170,6 +170,11 @@ class TaskHandlingThreeLevelReviewLogic extends BaseLogic */ public static function detail($params): array { - return TaskHandlingThreeLevelReview::with(['projectInfo'])->findOrEmpty($params['id'])->toArray(); + $data = TaskHandlingThreeLevelReview::with(['projectInfo'])->findOrEmpty($params['id'])->toArray(); + $data['result_file'] = json_decode($data['result_file'], true); + $data['master_annex'] = json_decode($data['master_annex'], true); + $data['bm_annex'] = json_decode($data['bm_annex'], true); + $data['shb_annex'] = json_decode($data['shb_annex'], true); + return $data; } } \ No newline at end of file diff --git a/app/adminapi/logic/task/TaskAllocationLogic.php b/app/adminapi/logic/task/TaskAllocationLogic.php index 40137aad6..a8c0d49bf 100644 --- a/app/adminapi/logic/task/TaskAllocationLogic.php +++ b/app/adminapi/logic/task/TaskAllocationLogic.php @@ -19,6 +19,7 @@ use app\adminapi\logic\TaskDetailLogic; use app\common\model\task\TaskAllocation; use app\common\logic\BaseLogic; use app\common\model\task\TaskType; +use app\common\model\TaskDetail; use think\facade\Db; @@ -132,6 +133,12 @@ class TaskAllocationLogic extends BaseLogic */ public static function detail($params): array { - return TaskAllocation::findOrEmpty($params['id'])->with(['taskTypeInfo', 'projectInfo'])->toArray(); + $data = TaskAllocation::with(['taskTypeInfo', 'projectInfo'])->findOrEmpty($params['id'])->toArray(); + $data['annex'] = json_decode($data['annex'], true); + $data['task_detail'] = TaskDetail::where('task_allocation_id', $data['id'])->select()->each(function ($item){ + $taskTypeInfo = TaskType::findOrEmpty($item['task_type_id'])->toArray(); + $item['task_name'] = $taskTypeInfo['name']; + })->toArray(); + return $data; } } \ No newline at end of file