|
|
|
@ -40,18 +40,19 @@ class QuestionnairesLogsController extends Controller
|
|
|
|
foreach ($log as $value) {
|
|
|
|
foreach ($log as $value) {
|
|
|
|
$person_info = json_decode($value->person_info, true);
|
|
|
|
$person_info = json_decode($value->person_info, true);
|
|
|
|
$age = !!$person_info['birthday'] ? date('Y') - date('Y', strtotime($person_info['birthday'])) : 0;
|
|
|
|
$age = !!$person_info['birthday'] ? date('Y') - date('Y', strtotime($person_info['birthday'])) : 0;
|
|
|
|
$check_items = json_decode($value->check_items, true);
|
|
|
|
// $check_items = json_decode($value->check_items, true);
|
|
|
|
$count = count($check_items);
|
|
|
|
// $count = count($check_items);
|
|
|
|
$list[] = [
|
|
|
|
$list[] = [
|
|
|
|
'id' => $value->id,
|
|
|
|
'id' => $value->id,
|
|
|
|
'title' => $value->title,
|
|
|
|
'title' => $value->title,
|
|
|
|
'name' => $person_info['name'],
|
|
|
|
'name' => $person_info['name'],
|
|
|
|
'age' => $age,
|
|
|
|
'age' => $age,
|
|
|
|
'created_at' => $value->created_at,
|
|
|
|
'created_at' => $value->created_at,
|
|
|
|
'count' => $count
|
|
|
|
'count' => 0
|
|
|
|
];
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return \Yz::Return(true, '操作完成', [
|
|
|
|
return \Yz::Return(true, '操作完成', [
|
|
|
|
|
|
|
|
'log'=>$log,
|
|
|
|
'list' => $list,
|
|
|
|
'list' => $list,
|
|
|
|
]);
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|