Compare commits
2 Commits
ed5591710d
...
ac066bacf9
| Author | SHA1 | Date |
|---|---|---|
|
|
ac066bacf9 | |
|
|
ec9f9acad9 |
|
|
@ -130,7 +130,20 @@ class CustomRegionController extends AdminController
|
|||
amisMake()->Panel()->title('种植记录')
|
||||
->className('Panel--success')
|
||||
->body([
|
||||
\amisMake()->Table()->title('')
|
||||
\amisMake()->Button()->className('absolute top-2 right-4')->actionType('dialog')->label('新增')->dialog([
|
||||
"title"=> "新增表单",
|
||||
"body"=> [
|
||||
"type"=> "form",
|
||||
"api"=> "post:/amis/api/mock2/sample",
|
||||
"body"=> [
|
||||
\amisMake()->TextControl()->label('作物名称'),
|
||||
\amisMake()->TextControl()->label('负责人'),
|
||||
\amisMake()->TextControl()->label('种植面积'),
|
||||
\amisMake()->DateControl()->label('种植时间'),
|
||||
]
|
||||
]
|
||||
])->level('primary'),
|
||||
\amisMake()->CRUDTable()->title('')
|
||||
->data([
|
||||
'items' => [
|
||||
[
|
||||
|
|
@ -144,11 +157,11 @@ class CustomRegionController extends AdminController
|
|||
->columns([
|
||||
amisMake()->TableColumn()->name('name')->label('名称'),
|
||||
amisMake()->TableColumn()->name('name1')->label('负责人'),
|
||||
amisMake()->TableColumn()->name('area')->label('种植范围'),
|
||||
amisMake()->TableColumn()->name('area')->label('种植面积'),
|
||||
amisMake()->TableColumn()->name('time1')->label('开始时间'),
|
||||
])
|
||||
->itemActions([
|
||||
// amisMake()->DialogAction()->label('收获记录')->level('link')
|
||||
\amisMake()->DialogAction()->label('收获记录')->level('link')
|
||||
])
|
||||
])
|
||||
]),
|
||||
|
|
|
|||
|
|
@ -430,46 +430,47 @@ class DeviceController extends AdminController
|
|||
return amisMake()->Grid()->columns([
|
||||
amisMake()->Wrapper()->sm(6)->body([
|
||||
amisMake()->Panel()->title('智能开关设置')
|
||||
->subFormMode('horizontal')
|
||||
->labelWidth(100)
|
||||
->className('Panel--success')
|
||||
->body([
|
||||
amisMake()->FieldSetControl()->title('智能开启')->body([
|
||||
\amisMake()->SwitchControl()->name('is_enable')->label('开关'),
|
||||
\amisMake()->ConditionBuilderControl()->label('条件')->fields([
|
||||
[
|
||||
'label' => '温度', 'type'=>'number','step'=>'0.01','name'=>'q',
|
||||
'operators'=> [
|
||||
'equal', 'not_equal', 'less', 'less_or_equal', 'greater', 'greater_or_equal', 'between', 'not_between',
|
||||
// 'is_empty', 'is_not_empty'
|
||||
]
|
||||
],
|
||||
[
|
||||
'label' => '湿度', 'type'=>'number','step'=>'0.01','name'=>'x',
|
||||
'operators'=> [
|
||||
'equal', 'not_equal', 'less', 'less_or_equal', 'greater', 'greater_or_equal', 'between', 'not_between',
|
||||
// 'is_empty', 'is_not_empty'
|
||||
]
|
||||
],
|
||||
\amisMake()->Form()->title('')->mode('horizontal')->body([
|
||||
amisMake()->FieldSetControl()->title('智能开启')->body([
|
||||
\amisMake()->SwitchControl()->name('open_is_enable')->label('开关'),
|
||||
\amisMake()->ConditionBuilderControl()->label('条件')->fields([
|
||||
[
|
||||
'label' => '温度', 'type'=>'number','step'=>'0.01','name'=>'q',
|
||||
'operators'=> [
|
||||
'equal', 'not_equal', 'less', 'less_or_equal', 'greater', 'greater_or_equal', 'between', 'not_between',
|
||||
// 'is_empty', 'is_not_empty'
|
||||
]
|
||||
],
|
||||
[
|
||||
'label' => '湿度', 'type'=>'number','step'=>'0.01','name'=>'x',
|
||||
'operators'=> [
|
||||
'equal', 'not_equal', 'less', 'less_or_equal', 'greater', 'greater_or_equal', 'between', 'not_between',
|
||||
// 'is_empty', 'is_not_empty'
|
||||
]
|
||||
],
|
||||
]),
|
||||
]),
|
||||
]),
|
||||
amisMake()->FieldSetControl()->title('智能关闭')->body([
|
||||
\amisMake()->SwitchControl()->name('is_enable')->label('开关'),
|
||||
\amisMake()->ConditionBuilderControl()->label('条件')->fields([
|
||||
[
|
||||
'label' => '温度', 'type'=>'number','step'=>'0.01','name'=>'q',
|
||||
'operators'=> [
|
||||
'equal', 'not_equal', 'less', 'less_or_equal', 'greater', 'greater_or_equal', 'between', 'not_between',
|
||||
// 'is_empty', 'is_not_empty'
|
||||
]
|
||||
],
|
||||
[
|
||||
'label' => '湿度', 'type'=>'number','step'=>'0.01','name'=>'x',
|
||||
'operators'=> [
|
||||
'equal', 'not_equal', 'less', 'less_or_equal', 'greater', 'greater_or_equal', 'between', 'not_between',
|
||||
// 'is_empty', 'is_not_empty'
|
||||
]
|
||||
],
|
||||
amisMake()->FieldSetControl()->title('智能关闭')->body([
|
||||
\amisMake()->SwitchControl()->name('close_is_enable')->label('开关'),
|
||||
\amisMake()->ConditionBuilderControl()->label('条件')->fields([
|
||||
[
|
||||
'label' => '温度', 'type'=>'number','step'=>'0.01','name'=>'q',
|
||||
'operators'=> [
|
||||
'equal', 'not_equal', 'less', 'less_or_equal', 'greater', 'greater_or_equal', 'between', 'not_between',
|
||||
// 'is_empty', 'is_not_empty'
|
||||
]
|
||||
],
|
||||
[
|
||||
'label' => '湿度', 'type'=>'number','step'=>'0.01','name'=>'x',
|
||||
'operators'=> [
|
||||
'equal', 'not_equal', 'less', 'less_or_equal', 'greater', 'greater_or_equal', 'between', 'not_between',
|
||||
// 'is_empty', 'is_not_empty'
|
||||
]
|
||||
],
|
||||
]),
|
||||
]),
|
||||
]),
|
||||
])
|
||||
|
|
@ -493,9 +494,6 @@ class DeviceController extends AdminController
|
|||
amisMake()->TableColumn()->name('name1')->label('状态'),
|
||||
amisMake()->TableColumn()->name('time1')->label('执行时间'),
|
||||
])
|
||||
->itemActions([
|
||||
// amisMake()->DialogAction()->label('收获记录')->level('link')
|
||||
])
|
||||
])
|
||||
]),
|
||||
]);
|
||||
|
|
@ -512,12 +510,14 @@ class DeviceController extends AdminController
|
|||
->labelWidth(80)
|
||||
->className('Panel--success')
|
||||
->body([
|
||||
amisMake()->FieldSetControl()->title('定时喷灌')->body([
|
||||
\amisMake()->SwitchControl()->name('is_enable')->label('开关'),
|
||||
\amisMake()->ArrayControl()->name('config')->label('定时')->items([
|
||||
amisMake()->ComboControl()->items([
|
||||
\amisMake()->InputTimeRange(),
|
||||
\amisMake()->TextControl()->name('input')->label('喷灌量')->labelWidth(30),
|
||||
\amisMake()->Form()->title('')->mode('horizontal')->body([
|
||||
amisMake()->FieldSetControl()->title('定时喷灌')->body([
|
||||
\amisMake()->SwitchControl()->name('is_enable')->label('开关'),
|
||||
\amisMake()->ArrayControl()->name('config')->label('定时')->items([
|
||||
amisMake()->ComboControl()->items([
|
||||
\amisMake()->InputTimeRange(),
|
||||
\amisMake()->TextControl()->name('input')->label('喷灌量')->labelWidth(30),
|
||||
]),
|
||||
]),
|
||||
]),
|
||||
]),
|
||||
|
|
@ -542,9 +542,6 @@ class DeviceController extends AdminController
|
|||
amisMake()->TableColumn()->name('name1')->label('状态'),
|
||||
amisMake()->TableColumn()->name('time1')->label('执行时间'),
|
||||
])
|
||||
->itemActions([
|
||||
// amisMake()->DialogAction()->label('收获记录')->level('link')
|
||||
])
|
||||
])
|
||||
]),
|
||||
]);
|
||||
|
|
|
|||
Loading…
Reference in New Issue