From 23cc8cc5ef0ba40f9808b3359e0380a0bb0280b9 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Wed, 15 May 2024 11:30:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/model/cost_project/CostProject.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/common/model/cost_project/CostProject.php b/app/common/model/cost_project/CostProject.php index 4014a275b..83a50ac9c 100644 --- a/app/common/model/cost_project/CostProject.php +++ b/app/common/model/cost_project/CostProject.php @@ -73,7 +73,9 @@ public function getPersonTextAttr($value, $data): string { - $person = Admin::where('id', 'in', json_decode($data['person'], true))->column('name'); + if(isset($data['person']) && !empty($data['person'])){ + $person = Admin::where('id', 'in', json_decode($data['person'], true))->column('name'); + } return !empty($person) ? implode(',', $person) : ''; } } \ No newline at end of file