region
parent
ae12a7aceb
commit
372f19fc0c
|
|
@ -53,7 +53,7 @@ class AdminUserController extends AdminController
|
|||
amisMake()->TextControl('username', __('admin.username'))->required(),
|
||||
amisMake()->TextControl('name', __('admin.admin_user.name'))->required(),
|
||||
amisMake()->TextControl('password', __('admin.password'))->type('input-password')->required()->validations(['minLength' => 6]),
|
||||
amisMake()->TextControl('confirm_password', __('admin.confirm_password'))->type('input-password')->validations(['minLength' => 6]),
|
||||
amisMake()->TextControl('confirm_password', __('admin.confirm_password'))->type('input-password')->required()->validations(['minLength' => 6]),
|
||||
amisMake()->SelectControl('roles', __('admin.admin_user.roles'))
|
||||
->searchable()
|
||||
->multiple()
|
||||
|
|
|
|||
|
|
@ -44,17 +44,23 @@ class CropPlantController extends AdminController
|
|||
amisMake()->TableColumn()->name('area')->label('收获面积m²'),
|
||||
amisMake()->TableColumn()->name('output')->label('收获产量kg'),
|
||||
amisMake()->TableColumn()->name('harvest_at')->label('收获时间'),
|
||||
])->itemActions([
|
||||
\amisMake()->DialogAction()->label('编辑')->dialog(
|
||||
Dialog::make()->title('编辑种植记录')->body($this->harvestEditForm())
|
||||
),
|
||||
\amisMake()->AjaxAction()->label('删除')->level('link')
|
||||
->actionType('ajax')
|
||||
->confirmText(__('admin.confirm_delete'))
|
||||
->api([
|
||||
'method' => 'delete',
|
||||
'url' => admin_url('crop-harvestes/${id}')
|
||||
])
|
||||
amisMake()->Operation()->label(__('admin.actions'))->buttons([
|
||||
\amisMake()
|
||||
->DialogAction()
|
||||
->label('编辑')
|
||||
->level('link')
|
||||
->dialog(Dialog::make()->title('编辑种植记录')->body($this->harvestEditForm())),
|
||||
\amisMake()
|
||||
->AjaxAction()
|
||||
->label('删除')
|
||||
->level('link')
|
||||
->actionType('ajax')
|
||||
->confirmText(__('admin.confirm_delete'))
|
||||
->api([
|
||||
'method' => 'delete',
|
||||
'url' => admin_url('crop-harvestes/${id}')
|
||||
])
|
||||
]),
|
||||
])
|
||||
]),
|
||||
]),
|
||||
|
|
|
|||
|
|
@ -108,6 +108,20 @@ class CustomRegionController extends AdminController
|
|||
1 => ['label' => '种植中','icon' => 'fa fa-warning','color' => '#ff9326'],
|
||||
2 => ['label' => '已结束','icon' => 'fa fa-check-circle','color' => '#ffb6b3']
|
||||
])->label('种植状态'),
|
||||
amisMake()->Operation()->label(__('admin.actions'))->buttons([
|
||||
amisMake()
|
||||
->DialogAction()
|
||||
->label('编辑')
|
||||
->level('link')
|
||||
->dialog(Dialog::make()->title('编辑种植记录')->body($this->plantEditForm())),
|
||||
amisMake()->AjaxAction()->label('删除')->level('link')
|
||||
->actionType('ajax')
|
||||
->confirmText(__('admin.confirm_delete'))
|
||||
->api([
|
||||
'method' => 'delete',
|
||||
'url' => admin_url('crop-plants/${id}')
|
||||
])
|
||||
]),
|
||||
])
|
||||
->itemAction([
|
||||
'type'=>'button',
|
||||
|
|
@ -136,18 +150,6 @@ class CustomRegionController extends AdminController
|
|||
])
|
||||
])
|
||||
])
|
||||
->itemActions([
|
||||
\amisMake()->DialogAction()->label('编辑')->dialog(
|
||||
Dialog::make()->title('编辑种植记录')->body($this->plantEditForm())
|
||||
),
|
||||
\amisMake()->AjaxAction()->label('删除')->level('link')
|
||||
->actionType('ajax')
|
||||
->confirmText(__('admin.confirm_delete'))
|
||||
->api([
|
||||
'method' => 'delete',
|
||||
'url' => admin_url('crop-plants/${id}')
|
||||
])
|
||||
])
|
||||
])
|
||||
]),
|
||||
])
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ class RegionController extends AdminController
|
|||
Components::make()->decimalControl('area', '面积m²'),
|
||||
Components::make()->sortControl(),
|
||||
\amisMake()->SwitchControl()->name('is_enable')->value(1)->label('显示'),
|
||||
\amisMake()->TransferControl()->name('monitorModes')->label('关联监测')
|
||||
\amisMake()->TransferControl()->name('monitorModes')->label(__('region.monitor'))
|
||||
->selectMode('chained')->searchable(true)
|
||||
->joinValues(false)->extractValue(true)
|
||||
->options($monitorModeType),
|
||||
|
|
|
|||
|
|
@ -2,4 +2,5 @@
|
|||
|
||||
return [
|
||||
'cover' => '封面图',
|
||||
'monitor' => '关联监测点位',
|
||||
];
|
||||
|
|
|
|||
Loading…
Reference in New Issue