50 lines
1.5 KiB
PHP
50 lines
1.5 KiB
PHP
<?php
|
|
|
|
namespace App\Admin\Controllers;
|
|
|
|
use Illuminate\Http\Request;
|
|
use Slowlyo\OwlAdmin\Controllers\AdminController;
|
|
|
|
class WarningSettingController extends AdminController
|
|
{
|
|
public function settingIndex(){
|
|
$page = $this->basePage()->body([
|
|
amisMake()->Card()->className('border-0')->body([
|
|
$this->settingForm()
|
|
]),
|
|
]);
|
|
|
|
return $this->response()->success($page);
|
|
}
|
|
|
|
private function settingForm(){
|
|
return \amisMake()->Tabs()->name('detailTab')->tabs([
|
|
[
|
|
'title' => '气象预警',
|
|
'value' => 'meteorological',
|
|
'tab'=>$this->meteorologicalForm(),
|
|
'unmountOnExit' => true//每次切换tab都要销毁
|
|
],
|
|
[
|
|
'title' => '水质预警',
|
|
'value' => 'detail',
|
|
'tab'=>'',
|
|
'unmountOnExit' => true//每次切换tab都要销毁
|
|
],
|
|
[
|
|
'title' => '土壤预警',
|
|
'value' => 'detail',
|
|
'tab'=>'',
|
|
'unmountOnExit' => true//每次切换tab都要销毁
|
|
],
|
|
]);
|
|
}
|
|
|
|
public function meteorologicalForm(){
|
|
return \amisMake()->Form()->title('')->body([
|
|
\amisMake()->TextControl()->label('设备名称'),
|
|
\amisMake()->DateRangeControl()->label('时间范围'),
|
|
amis('submit')->label(__('admin.save'))->level('primary'),
|
|
]);
|
|
}
|
|
} |