添加通风设备设置
parent
75adf7f1c8
commit
b8ab64b5e4
70
README.md
70
README.md
|
|
@ -1,66 +1,6 @@
|
|||
<p align="center"><a href="https://laravel.com" target="_blank"><img src="https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg" width="400" alt="Laravel Logo"></a></p>
|
||||
php artisan k:g
|
||||
php artisan storage:link
|
||||
php artsian admin:publish
|
||||
php artisan admin:install
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/laravel/framework/actions"><img src="https://github.com/laravel/framework/workflows/tests/badge.svg" alt="Build Status"></a>
|
||||
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/dt/laravel/framework" alt="Total Downloads"></a>
|
||||
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/v/laravel/framework" alt="Latest Stable Version"></a>
|
||||
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/l/laravel/framework" alt="License"></a>
|
||||
</p>
|
||||
|
||||
## About Laravel
|
||||
|
||||
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:
|
||||
|
||||
- [Simple, fast routing engine](https://laravel.com/docs/routing).
|
||||
- [Powerful dependency injection container](https://laravel.com/docs/container).
|
||||
- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage.
|
||||
- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent).
|
||||
- Database agnostic [schema migrations](https://laravel.com/docs/migrations).
|
||||
- [Robust background job processing](https://laravel.com/docs/queues).
|
||||
- [Real-time event broadcasting](https://laravel.com/docs/broadcasting).
|
||||
|
||||
Laravel is accessible, powerful, and provides tools required for large, robust applications.
|
||||
|
||||
## Learning Laravel
|
||||
|
||||
Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
|
||||
|
||||
You may also try the [Laravel Bootcamp](https://bootcamp.laravel.com), where you will be guided through building a modern Laravel application from scratch.
|
||||
|
||||
If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains over 2000 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
|
||||
|
||||
## Laravel Sponsors
|
||||
|
||||
We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel [Patreon page](https://patreon.com/taylorotwell).
|
||||
|
||||
### Premium Partners
|
||||
|
||||
- **[Vehikl](https://vehikl.com/)**
|
||||
- **[Tighten Co.](https://tighten.co)**
|
||||
- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)**
|
||||
- **[64 Robots](https://64robots.com)**
|
||||
- **[Cubet Techno Labs](https://cubettech.com)**
|
||||
- **[Cyber-Duck](https://cyber-duck.co.uk)**
|
||||
- **[Many](https://www.many.co.uk)**
|
||||
- **[Webdock, Fast VPS Hosting](https://www.webdock.io/en)**
|
||||
- **[DevSquad](https://devsquad.com)**
|
||||
- **[Curotec](https://www.curotec.com/services/technologies/laravel/)**
|
||||
- **[OP.GG](https://op.gg)**
|
||||
- **[WebReinvent](https://webreinvent.com/?utm_source=laravel&utm_medium=github&utm_campaign=patreon-sponsors)**
|
||||
- **[Lendio](https://lendio.com)**
|
||||
|
||||
## Contributing
|
||||
|
||||
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).
|
||||
|
||||
## Code of Conduct
|
||||
|
||||
In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).
|
||||
|
||||
## Security Vulnerabilities
|
||||
|
||||
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed.
|
||||
|
||||
## License
|
||||
|
||||
The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
|
||||
php artisan db:seed AdminMenuSeeder
|
||||
|
|
@ -55,7 +55,8 @@ class CustomRegionController extends AdminController
|
|||
[
|
||||
'title' => '基地详情',
|
||||
'value' => 'detail',
|
||||
'tab'=>\amisMake()->Service()->schemaApi(admin_url('custom-region-detail?id='.$region['id']))
|
||||
'tab'=>\amisMake()->Service()->schemaApi(admin_url('custom-region-detail?id='.$region['id'])),
|
||||
'unmountOnExit' => true//每次切换tab都要销毁
|
||||
],
|
||||
[//有监控设备才有
|
||||
'title' => '监控视频',
|
||||
|
|
@ -66,27 +67,32 @@ class CustomRegionController extends AdminController
|
|||
[//有气象设备才有
|
||||
'title' => '气象数据',
|
||||
'value' => 'qixiang',
|
||||
'tab'=>\amisMake()->Service()->schemaApi(admin_url('custom-region-meteorological?id='.$region['id']))
|
||||
'tab'=>\amisMake()->Service()->schemaApi(admin_url('custom-region-meteorological?id='.$region['id'])),
|
||||
'unmountOnExit' => true//每次切换tab都要销毁
|
||||
],
|
||||
[//有水质设备才有
|
||||
'title' => '水质数据',
|
||||
'value' => 'shuizi',
|
||||
'tab'=>\amisMake()->Service()->schemaApi(admin_url('custom-region-water?id='.$region['id']))
|
||||
'tab'=>\amisMake()->Service()->schemaApi(admin_url('custom-region-water?id='.$region['id'])),
|
||||
'unmountOnExit' => true//每次切换tab都要销毁
|
||||
],
|
||||
[//有土壤设备才有
|
||||
'title' => '土壤数据',
|
||||
'value' => 'turang',
|
||||
'tab'=>\amisMake()->Service()->schemaApi(admin_url('custom-region-soil?id='.$region['id']))
|
||||
'tab'=>\amisMake()->Service()->schemaApi(admin_url('custom-region-soil?id='.$region['id'])),
|
||||
'unmountOnExit' => true//每次切换tab都要销毁
|
||||
],
|
||||
[//有通风设备才有
|
||||
'title' => '通风设备',
|
||||
'value' => 'tongfeng',
|
||||
'tab'=>\amisMake()->Service()->schemaApi(admin_url('custom-region-detail?type=tongfeng'))
|
||||
'value' => 'air',
|
||||
'tab'=>\amisMake()->Service()->schemaApi(admin_url('custom-region-air?id='.$region['id'])),
|
||||
'unmountOnExit' => true//每次切换tab都要销毁
|
||||
],
|
||||
[//有喷灌设备才有
|
||||
'title' => '喷灌设备',
|
||||
'value' => 'penguan',
|
||||
'tab'=>\amisMake()->Service()->schemaApi(admin_url('custom-region-detail?type=penguan'))
|
||||
'tab'=>\amisMake()->Service()->schemaApi(admin_url('custom-region-detail?type=penguan')),
|
||||
'unmountOnExit' => true//每次切换tab都要销毁
|
||||
],
|
||||
|
||||
]),
|
||||
|
|
|
|||
|
|
@ -422,4 +422,82 @@ class DeviceController extends AdminController
|
|||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 空气条件设置
|
||||
*/
|
||||
public function airDetail(){
|
||||
return amisMake()->Grid()->columns([
|
||||
amisMake()->Wrapper()->sm(4)->body([
|
||||
amisMake()->Panel()->title('智能开关设置')
|
||||
->subFormMode('horizontal')
|
||||
->labelWidth(100)
|
||||
->className('Panel--success')
|
||||
->body([
|
||||
amisMake()->FieldSetControl()->title('智能开启')->body([
|
||||
\amisMake()->SwitchControl()->label('开关'),
|
||||
\amisMake()->ConditionBuilderControl()->label('条件')->fields([
|
||||
[
|
||||
'label' => '温度', 'type'=>'number','step'=>'0.01',
|
||||
'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',
|
||||
'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()->label('开关'),
|
||||
\amisMake()->ConditionBuilderControl()->label('条件')->fields([
|
||||
[
|
||||
'label' => '温度', 'type'=>'number','step'=>'0.01',
|
||||
'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',
|
||||
'operators'=> [
|
||||
'equal', 'not_equal', 'less', 'less_or_equal', 'greater', 'greater_or_equal', 'between', 'not_between',
|
||||
// 'is_empty', 'is_not_empty'
|
||||
]
|
||||
],
|
||||
]),
|
||||
]),
|
||||
])
|
||||
]),
|
||||
amisMake()->Wrapper()->sm(8)->body([
|
||||
amisMake()->Panel()->title('开关记录')
|
||||
->className('Panel--success')
|
||||
->body([
|
||||
\amisMake()->Table()->title('')
|
||||
->data([
|
||||
'items' => [
|
||||
[
|
||||
'name'=> '温度>10℃',
|
||||
'name1'=> '关闭',
|
||||
'time1'=> '2023-03-21 10:00:00',
|
||||
]
|
||||
]
|
||||
])
|
||||
->columns([
|
||||
amisMake()->TableColumn()->name('name')->label('触发条件'),
|
||||
amisMake()->TableColumn()->name('name1')->label('状态'),
|
||||
amisMake()->TableColumn()->name('time1')->label('执行时间'),
|
||||
])
|
||||
->itemActions([
|
||||
// amisMake()->DialogAction()->label('收获记录')->level('link')
|
||||
])
|
||||
])
|
||||
]),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,5 +54,8 @@ Route::group([
|
|||
$router->get('custom-region-soil', '\App\Admin\Controllers\DeviceController@soilChart');
|
||||
$router->post('custom-region-soil', '\App\Admin\Controllers\DeviceController@soilChart');
|
||||
|
||||
$router->get('custom-region-air', '\App\Admin\Controllers\DeviceController@airDetail');
|
||||
$router->post('custom-region-air', '\App\Admin\Controllers\DeviceController@airDetail');
|
||||
|
||||
$router->resource('system/settings', \App\Admin\Controllers\SettingController::class);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue