rkljw 1 ماه پیش
والد
کامیت
cf6cac5c6c
1فایلهای تغییر یافته به همراه11 افزوده شده و 10 حذف شده
  1. 11 10
      app/JsonRpc/FormService.php

+ 11 - 10
app/JsonRpc/FormService.php

@@ -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,