main
parent
92e5e18113
commit
f296e06098
|
|
@ -78,7 +78,7 @@ class RegionController extends AdminController
|
|||
'aspectRatio'=> 1.1,
|
||||
'scalable' => true,
|
||||
])->autoUpload(true),
|
||||
Components::make()->fuEditorControl('description', '介绍'),
|
||||
Components::make()->fuEditorControl('description', '介绍', 300),
|
||||
Components::make()->decimalControl('area', '面积m²'),
|
||||
Components::make()->sortControl(),
|
||||
\amisMake()->SwitchControl()->name('is_enable')->value(1)->label('显示'),
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ class WarningNoticeController extends Controller
|
|||
public function warningLogNum(Request $request){
|
||||
$list = WarningNotice::filter($request->input(), WarningNoticeFilter::class)
|
||||
->select(DB::raw('lv, count(1) as num'))
|
||||
->where('status', 0)
|
||||
->groupBy('lv')
|
||||
->get()
|
||||
->pluck('num', 'lv')->toArray();
|
||||
|
|
@ -35,7 +36,9 @@ class WarningNoticeController extends Controller
|
|||
*/
|
||||
public function warningLog(Request $request)
|
||||
{
|
||||
$query = WarningNotice::with(['device.modes'])->filter($request->input(), WarningNoticeFilter::class)->orderBy('created_at', 'desc');
|
||||
$query = WarningNotice::with(['device.modes'])->filter($request->input(), WarningNoticeFilter::class)
|
||||
->where('status', 0)
|
||||
->orderBy('created_at', 'desc');
|
||||
$list = $query->simplePaginate(Paginator::resolvePerPage('per_page', 20, 50));
|
||||
|
||||
return $this->json(WarningNoticeResource::collection($list));
|
||||
|
|
|
|||
Loading…
Reference in New Issue