|
@@ -313,18 +313,19 @@ class FormService implements FormServiceInterface
|
|
|
->get();
|
|
|
|
|
|
// 处理返回数据,将field_name替换为title
|
|
|
- $list = $list->map(function($item) use ($globalTableFields) {
|
|
|
- $newItem = new \stdClass();
|
|
|
- foreach ($globalTableFields as $field) {
|
|
|
- $fieldName = $field->field_name;
|
|
|
- if (isset($item->$fieldName)) {
|
|
|
- $newItem->{$field->title} = $item->$fieldName;
|
|
|
- }
|
|
|
- }
|
|
|
- return $newItem;
|
|
|
- });
|
|
|
+// $list = $list->map(function($item) use ($globalTableFields) {
|
|
|
+// $newItem = new \stdClass();
|
|
|
+// foreach ($globalTableFields as $field) {
|
|
|
+// $fieldName = $field->field_name;
|
|
|
+// if (isset($item->$fieldName)) {
|
|
|
+// $newItem->{$field->title} = $item->$fieldName;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// return $newItem;
|
|
|
+// });
|
|
|
|
|
|
return Result::success([
|
|
|
+ 'tableFields' => $globalTableFields,
|
|
|
'list' => $list,
|
|
|
'total' => $total,
|
|
|
'page' => $page,
|