generated from liutk/owl-admin-base
main
parent
85949ca756
commit
9a666e77de
|
|
@ -26,6 +26,21 @@ class ManageController extends AdminController
|
||||||
amis()->LinkAction()->link(admin_url('/manages/create'))->label('新增')->icon('fa fa-add')->level('primary'),
|
amis()->LinkAction()->link(admin_url('/manages/create'))->label('新增')->icon('fa fa-add')->level('primary'),
|
||||||
...$this->baseHeaderToolBar(),
|
...$this->baseHeaderToolBar(),
|
||||||
])
|
])
|
||||||
|
->filter($this->baseFilter()->labelWidth('80px')->body([
|
||||||
|
amis()->GroupControl()->mode('horizontal')->body([
|
||||||
|
amis()->TextControl('name', '姓名')->columnRatio(3),
|
||||||
|
amis()->SelectControl('gender', '性别')->options([
|
||||||
|
'1'=>'男', '2'=>'女'
|
||||||
|
])->columnRatio(3)->clearable(true),
|
||||||
|
amis()->TextControl('technical_position', '专业技术职务')->columnRatio(3),
|
||||||
|
amis()->TextControl('subject', '学科门类')->columnRatio(3),
|
||||||
|
]),
|
||||||
|
amis()->GroupControl()->mode('horizontal')->body([
|
||||||
|
amis()->TextControl('research_direction', '研究方向')->columnRatio(3),
|
||||||
|
amis()->TextControl('company', '工作单位')->columnRatio(3),
|
||||||
|
amis()->TextControl('mobile_phone', '移动电话')->columnRatio(3),
|
||||||
|
]),
|
||||||
|
]))
|
||||||
->columns([
|
->columns([
|
||||||
amis()->TableColumn('id', 'ID')->sortable(),
|
amis()->TableColumn('id', 'ID')->sortable(),
|
||||||
amis()->TableColumn('name', '姓名'),
|
amis()->TableColumn('name', '姓名'),
|
||||||
|
|
@ -45,7 +60,7 @@ class ManageController extends AdminController
|
||||||
amis()->TableColumn('subject', '学科门类'),
|
amis()->TableColumn('subject', '学科门类'),
|
||||||
amis()->TableColumn('research_direction', '研究方向'),
|
amis()->TableColumn('research_direction', '研究方向'),
|
||||||
amis()->TableColumn('address', '通讯地址(邮编)'),
|
amis()->TableColumn('address', '通讯地址(邮编)'),
|
||||||
amis()->TableColumn('work_phone', '电话'),
|
amis()->TableColumn('work_phone', '办公电话'),
|
||||||
amis()->TableColumn('mobile_phone', '移动电话'),
|
amis()->TableColumn('mobile_phone', '移动电话'),
|
||||||
amis()->TableColumn('email', '邮箱'),
|
amis()->TableColumn('email', '邮箱'),
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,5 +6,66 @@ use EloquentFilter\ModelFilter;
|
||||||
|
|
||||||
class ManageFilter extends ModelFilter
|
class ManageFilter extends ModelFilter
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
public function id($id)
|
||||||
|
{
|
||||||
|
return $this->where('id', $id);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 姓名
|
||||||
|
*/
|
||||||
|
public function name($name)
|
||||||
|
{
|
||||||
|
return $this->where('name','like', '%'.$name.'%');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 性别
|
||||||
|
*/
|
||||||
|
public function gender($gender)
|
||||||
|
{
|
||||||
|
return $this->where('gender', $gender);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 专业技术职务
|
||||||
|
*/
|
||||||
|
public function technicalPosition($technicalPosition)
|
||||||
|
{
|
||||||
|
return $this->where('technical_position','like', '%'.$technicalPosition.'%');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学科门类
|
||||||
|
*/
|
||||||
|
public function subject($subject)
|
||||||
|
{
|
||||||
|
return $this->where('subject','like', '%'.$subject.'%');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 研究方向
|
||||||
|
*/
|
||||||
|
public function researchDirection($researchDirection)
|
||||||
|
{
|
||||||
|
return $this->where('research_direction','like', '%'.$researchDirection.'%');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工作单位
|
||||||
|
*/
|
||||||
|
public function company($company)
|
||||||
|
{
|
||||||
|
return $this->where('company','like', '%'.$company.'%');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 移动电话
|
||||||
|
*/
|
||||||
|
public function mobilePhone($mobilePhone)
|
||||||
|
{
|
||||||
|
return $this->where('mobile_phone','like', '%'.$mobilePhone.'%');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -84,7 +84,7 @@ return [
|
||||||
|
|
||||||
'layout' => [
|
'layout' => [
|
||||||
// 浏览器标题, 功能名称使用 %title% 代替
|
// 浏览器标题, 功能名称使用 %title% 代替
|
||||||
'title' => '%title% | OwlAdmin',
|
'title' => '%title% | 专家管理',
|
||||||
'header' => [
|
'header' => [
|
||||||
// 是否显示 [刷新] 按钮
|
// 是否显示 [刷新] 按钮
|
||||||
'refresh' => true,
|
'refresh' => true,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue