fixed bug 1515 1509
parent
39429174ae
commit
c3df092d3c
|
|
@ -34,7 +34,7 @@ class ArticleCategoryController extends AdminController
|
||||||
->columns([
|
->columns([
|
||||||
TableColumn::make()->name('id')->label(__('article-category.id')),
|
TableColumn::make()->name('id')->label(__('article-category.id')),
|
||||||
TableColumn::make()->name('name')->label(__('article-category.name')),
|
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')
|
TableColumn::make()->name('sort')->label(__('article-category.sort'))->align('center')
|
||||||
->quickEdit(
|
->quickEdit(
|
||||||
Components::make()->sortControl('sort', __('article-category.sort'))->saveImmediately(true)),
|
Components::make()->sortControl('sort', __('article-category.sort'))->saveImmediately(true)),
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ class MonitorModeController extends AdminController
|
||||||
public function form(): Form
|
public function form(): Form
|
||||||
{
|
{
|
||||||
return $this->baseForm()->body([
|
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'),
|
\amisMake()->RadiosControl()->name('type')->label('类型')->options(MonitorMode::typeMap())->required(true)->disabledOn('data.id > 0'),
|
||||||
Components::make()->keywordsTagControl('group_tags', '分组', 'monitor-mode-group'),
|
Components::make()->keywordsTagControl('group_tags', '分组', 'monitor-mode-group'),
|
||||||
// Components::make()->sortControl('sort', __('admin.order')),
|
// Components::make()->sortControl('sort', __('admin.order')),
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,12 @@ class WarningNoticeController extends AdminController
|
||||||
->headerToolbar([
|
->headerToolbar([
|
||||||
...$this->baseHeaderToolBar(),
|
...$this->baseHeaderToolBar(),
|
||||||
])
|
])
|
||||||
|
->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([
|
->columns([
|
||||||
TableColumn::make()->name('id')->label('ID')->sortable(true),
|
TableColumn::make()->name('id')->label('ID')->sortable(true),
|
||||||
TableColumn::make()->name('device.modes')->type('each')->items([
|
TableColumn::make()->name('device.modes')->type('each')->items([
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,8 @@ use EloquentFilter\ModelFilter;
|
||||||
|
|
||||||
class WarningNoticeFilter extends ModelFilter
|
class WarningNoticeFilter extends ModelFilter
|
||||||
{
|
{
|
||||||
public function lv($lv){
|
public function lv($lv)
|
||||||
|
{
|
||||||
return $this->where('lv', $lv);
|
return $this->where('lv', $lv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
namespace App\Services\Admin;
|
namespace App\Services\Admin;
|
||||||
|
|
||||||
use App\Models\WarningNotice;
|
use App\Models\WarningNotice;
|
||||||
|
use App\Filters\WarningNoticeFilter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @method WarningNotice getModel()
|
* @method WarningNotice getModel()
|
||||||
|
|
@ -13,4 +14,6 @@ class WarningNoticeService extends BaseService
|
||||||
protected string $modelName = WarningNotice::class;
|
protected string $modelName = WarningNotice::class;
|
||||||
|
|
||||||
protected array $withRelationships = ['device.modes'];
|
protected array $withRelationships = ['device.modes'];
|
||||||
|
|
||||||
|
protected string $modelFilterName = WarningNoticeFilter::class;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue