Merge branch 'develop'
commit
92e5e18113
|
|
@ -34,7 +34,7 @@ class ArticleCategoryController extends AdminController
|
|||
->columns([
|
||||
TableColumn::make()->name('id')->label(__('article-category.id')),
|
||||
TableColumn::make()->name('name')->label(__('article-category.name')),
|
||||
TableColumn::make()->name('icon')->label(__('article-category.icon'))->type('image')->width(60),
|
||||
// TableColumn::make()->name('icon')->label(__('article-category.icon'))->type('image')->width(60),
|
||||
TableColumn::make()->name('sort')->label(__('article-category.sort'))->align('center')
|
||||
->quickEdit(
|
||||
Components::make()->sortControl('sort', __('article-category.sort'))->saveImmediately(true)),
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ class MonitorModeController extends AdminController
|
|||
public function form(): Form
|
||||
{
|
||||
return $this->baseForm()->body([
|
||||
TextControl::make()->name('name')->label('名称'),
|
||||
TextControl::make()->name('name')->label('名称')->required(),
|
||||
\amisMake()->RadiosControl()->name('type')->label('类型')->options(MonitorMode::typeMap())->required(true)->disabledOn('data.id > 0'),
|
||||
Components::make()->keywordsTagControl('group_tags', '分组', 'monitor-mode-group'),
|
||||
// Components::make()->sortControl('sort', __('admin.order')),
|
||||
|
|
|
|||
|
|
@ -22,6 +22,12 @@ class WarningNoticeController extends AdminController
|
|||
->filterTogglable(false)
|
||||
->headerToolbar([
|
||||
])
|
||||
->filter($this->baseFilter()->actions([])->body([
|
||||
amisMake()->SelectControl()->name('lv')->label('报警等级')->options(WarningNotice::lvMap())->clearable()->size('md'),
|
||||
amisMake()->SelectControl()->name('status')->label('状态')->options(WarningNotice::stateMap())->clearable()->size('md'),
|
||||
amis('button')->label(__('admin.reset'))->actionType('clear-and-submit'),
|
||||
amis('submit')->label(__('admin.search'))->level('primary'),
|
||||
]))
|
||||
->columns([
|
||||
TableColumn::make()->name('id')->label('ID')->sortable(true),
|
||||
TableColumn::make()->name('device.modes')->type('each')->items([
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@ use EloquentFilter\ModelFilter;
|
|||
|
||||
class WarningNoticeFilter extends ModelFilter
|
||||
{
|
||||
public function lv($lv){
|
||||
public function lv($lv)
|
||||
{
|
||||
return $this->where('lv', $lv);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
namespace App\Services\Admin;
|
||||
|
||||
use App\Models\WarningNotice;
|
||||
use App\Filters\WarningNoticeFilter;
|
||||
|
||||
/**
|
||||
* @method WarningNotice getModel()
|
||||
|
|
@ -13,4 +14,6 @@ class WarningNoticeService extends BaseService
|
|||
protected string $modelName = WarningNotice::class;
|
||||
|
||||
protected array $withRelationships = ['device.modes'];
|
||||
|
||||
protected string $modelFilterName = WarningNoticeFilter::class;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue