Commit 77d68051 by 汪伟伟

筛选

parent 9086adf8
......@@ -68,9 +68,10 @@ class AlreadyApproveController extends AdminController
// $grid->tools('<a class="btn btn-primary disable-outline">测试按钮</a>');
$grid->disableEditButton()->disableDeleteButton()->disableCreateButton()->disableFilterButton()->disableBatchDelete();
$grid->disableEditButton()->disableDeleteButton()->disableCreateButton()->disableBatchDelete();
$grid->filter(function (Grid\Filter $filter) {
$filter->equal('id');
$filter->equal('user.id','用户')->select('/getUsers');
$filter->like('task.name','指标名称');
});
$grid->actions(function (Grid\Displayers\Actions $actions) {
......@@ -84,6 +85,12 @@ class AlreadyApproveController extends AdminController
});
}
public function getUsers()
{
$users = \App\Models\AdminUser::query()->where('is_admin',0)->get(['id','name as text'])->toArray();
return $users;
}
/**
* Make a show builder.
*
......
......@@ -19,6 +19,7 @@ Route::group([
$router->get('getCity', 'TaskController@getCity');
$router->get('getUsers', 'AlreadyApproveController@getUsers');
$router->get('receive/{id}', 'TaskController@receiveDetail');
......
......@@ -21,6 +21,12 @@
style="margin-right:3px">
<i class="feather icon-refresh-cw"></i><span class="d-none d-sm-inline">&nbsp; 刷新</span>
</button>
{{-- <div class="btn-group filter-button-group dropdown" style="margin-right:3px">--}}
{{-- <button class="btn btn-primary filter-btn-ATDVmyrF btn-outline">--}}
{{-- <i class="feather icon-filter"></i><span class="d-none d-sm-inline">&nbsp;&nbsp;筛选</span>--}}
{{-- <span class="filter-count"></span>--}}
{{-- </button>--}}
{{-- </div>--}}
<div class="pull-right" data-responsive-table-toolbar="grid-table">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment