generated from liutk/owl-admin-base
57 lines
1.8 KiB
PHP
57 lines
1.8 KiB
PHP
<?php
|
|
|
|
namespace App\Admin\Controllers;
|
|
|
|
use App\Models\PersonChange;
|
|
use Slowlyo\OwlAdmin\Admin;
|
|
use Slowlyo\OwlAdmin\Renderers\Page;
|
|
use Slowlyo\OwlAdmin\Renderers\Form;
|
|
use Slowlyo\OwlAdmin\Controllers\AdminController;
|
|
use App\Admin\Components;
|
|
use App\Services\Admin\PersonChangeService;
|
|
|
|
/**
|
|
* 人口变动
|
|
*
|
|
*/
|
|
class PersonChangeController extends AdminController
|
|
{
|
|
protected string $serviceName = PersonChangeService::class;
|
|
|
|
public function list(): Page
|
|
{
|
|
$crud = $this->baseCRUD()->tableLayout('fixed')
|
|
->headerToolbar([
|
|
amis('reload')->align('right'),
|
|
amis('filter-toggler')->align('right'),
|
|
])
|
|
->filter($this->baseFilter()->labelWidth('80px')->body([
|
|
|
|
]))
|
|
->columns([
|
|
amis()->TableColumn('person.organized_body.name', __('admin.persons.organized_body'))->width('100px'),
|
|
amis()->TableColumn('changed_at', __('admin.person_changes.changed_at'))->width('100px'),
|
|
amis()->TableColumn('type', __('admin.person_changes.type'))->type('mapping')->map(PersonChange::typeMap()),
|
|
amis()->TableColumn('person.name', __('admin.persons.name'))->width('100px')->copyable(),
|
|
amis()->TableColumn('extends_mark', __('admin.person_changes.extends_mark')),
|
|
amis()->TableColumn('phone', __('admin.person_changes.phone')),
|
|
amis()->TableColumn('created_at', __('admin.person_changes.created_at'))->type('datetime')->sortable(true),
|
|
]);
|
|
|
|
return $this->baseList($crud);
|
|
}
|
|
|
|
public function form(): Form
|
|
{
|
|
return $this->baseForm()->body([
|
|
|
|
]);
|
|
}
|
|
|
|
public function detail(): Form
|
|
{
|
|
return $this->baseDetail()->body([
|
|
|
|
]);
|
|
}
|
|
} |