weizong song 4 years ago
parent 1db84238de
commit ae114f3c87

BIN
.DS_Store vendored

Binary file not shown.

@ -30,11 +30,19 @@ class ParamedicController extends CommonController
public function index(Request $request)
{
$data = $this->model->with("project")->paginate(10);
$data = $this->model->with("project");
if (request()->keyword) {
$data->where(function ($query) {
$query->where("name", "like", "%" . request()->keyword . "%")
->orWhere("id_card_number", "like", "%" . request()->keyword . "%");
});
}
$data = $data->paginate(10);
return view($this->bladePath . ".index", compact("data"));
}
public function getLevels(Request $request) {
public function getLevels(Request $request)
{
$levels = (new ParamedicLevel())->where("project_id", $request->project_id)->get();
return $this->ajaxResponse($levels);
}
@ -89,7 +97,8 @@ class ParamedicController extends CommonController
}
}
public function export() {
public function export()
{
return Excel::download(new ParamedicExport(), "paramedics.xlsx");
}
}

BIN
public/.DS_Store vendored

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -6,9 +6,14 @@
<div class="card">
<div class="card-body">
<div class="mb-3">
<a class="btn btn-primary" href="{{url($urlPrefix.'/create')}}">
<form class="form-inline" id="search-form" autocomplete="off">
<a class="btn btn-primary mr-1" href="{{url($urlPrefix.'/create')}}">
@lang("icons.action_create") @lang('actions.create'){{$modelName}}
</a>
<input class="form-control" type="text" name="keyword" value="{{ request()->keyword }}"
placeholder="姓名/身份证">
</form>
</div>
<table class="table table-bordered" id="data-table">

Loading…
Cancel
Save