1
0
Fork 0
master
panliang 2023-10-27 10:37:28 +08:00
parent 90e76b0400
commit 3c07ea26c0
2 changed files with 6 additions and 2 deletions

View File

@ -76,7 +76,7 @@ class PatientController extends AdminController
]
]
]),
amisMake()->TextControl()->name('name')->label(__('patient.name'))->id('patient_name')->required(true),
amisMake()->TextControl()->name('name')->label(__('patient.name'))->id('patient_name')->required(),
amisMake()->SelectControl()->options(Gender::options())->name('sex')->label(__('patient.sex'))->id('patient_sex'),
amisMake()->TextControl()->name('phone')->label(__('patient.phone'))->id('patient_phone'),
amisMake()->TextControl()->name('address')->label(__('patient.address'))->id('patient_address'),

View File

@ -73,7 +73,11 @@ class UserController extends AdminController
public function getList(Request $request)
{
$list = $this->service->listQuery()->get()->map(fn($item) => ['value' => $item->id, 'label' => $item->name . '-' . $item->phone]);
$list = $this->service->listQuery()->get()->map(function ($item) {
$item['value'] = $item->id;
$item['label'] = $item->name . '-' . $item->phone;
return $item;
});
return $this->response()->success($list);
}