mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-05 19:41:44 +08:00
优化搜索
This commit is contained in:
parent
150047c197
commit
e7f99f47eb
@ -54,7 +54,7 @@ class Queue extends Controller
|
||||
}
|
||||
}
|
||||
}, function (QueryHelper $query) {
|
||||
$query->equal('status')->like('code,title,command');
|
||||
$query->equal('status')->like('code|title#title,command');
|
||||
$query->timeBetween('enter_time,exec_time')->dateBetween('create_at');
|
||||
});
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ class User extends Controller
|
||||
|
||||
// 数据列表搜索过滤
|
||||
$query->equal('status,usertype')->dateBetween('login_at,create_at');
|
||||
$query->like('username,nickname,contact_phone#phone,contact_mail#mail');
|
||||
$query->like('username|nickname#username,contact_phone#phone,contact_mail#mail');
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -3,16 +3,9 @@
|
||||
<form class="layui-form layui-form-pane form-search" action="{:sysuri()}" onsubmit="return false" method="get" autocomplete="off">
|
||||
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">任务编号</label>
|
||||
<label class="layui-form-label">编号名称</label>
|
||||
<label class="layui-input-inline">
|
||||
<input name="code" value="{$get.code|default=''}" placeholder="请输入任务编号" class="layui-input">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">任务名称</label>
|
||||
<label class="layui-input-inline">
|
||||
<input name="title" value="{$get.title|default=''}" placeholder="请输入任务名称" class="layui-input">
|
||||
<input name="title" value="{$get.title|default=''}" placeholder="请输入名称或编号" class="layui-input">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
@ -47,13 +47,13 @@
|
||||
return layui.laytpl('<div class="headimg headimg-xs margin-0" data-tips-image data-tips-hover data-lazy-src="{{d.headimg}}"></div>').render(d);
|
||||
}
|
||||
},
|
||||
{field: 'username', title: '登录账号', minWidth: 100, templet: '<div>{{d.username||"-"}}</div>'},
|
||||
{field: 'nickname', title: '用户名称', minWidth: 100, templet: '<div>{{d.nickname||"-"}}</div>'},
|
||||
{field: 'username', title: '登录账号', minWidth: 100, align: 'center', templet: '<div>{{d.username||"-"}}</div>'},
|
||||
{field: 'nickname', title: '用户名称', minWidth: 100, align: 'center', templet: '<div>{{d.nickname||"-"}}</div>'},
|
||||
/* {notempty name='bases'} */
|
||||
{
|
||||
field: 'usertype', title: '角色身份', minWidth: 140, sort: true, templet: function (d) {
|
||||
field: 'usertype', title: '角色身份', minWidth: 100, align: 'center', templet: function (d) {
|
||||
d.userinfo = d.userinfo || {};
|
||||
return d.userinfo.code ? (d.userinfo.name + ' ( ' + d.userinfo.code + ' ) ') : '';
|
||||
return d.userinfo.code ? (d.userinfo.name + ' ( ' + d.userinfo.code + ' ) ') : '-';
|
||||
}
|
||||
},
|
||||
/* {/notempty} */
|
||||
@ -63,7 +63,7 @@
|
||||
{field: 'login_num', title: '登录次数', align: 'center', minWidth: 100, sort: true},
|
||||
{field: 'login_at', title: '最后登录', align: 'center', minWidth: 170, sort: true},
|
||||
{field: 'create_at', title: '创建时间', align: 'center', minWidth: 170, sort: true},
|
||||
{toolbar: '#toolbar', title: '操作面板', align: 'center', minWidth: 160, fixed: 'right'}
|
||||
{toolbar: '#toolbar', title: '操作面板', align: 'center', minWidth: 150, fixed: 'right'}
|
||||
]]
|
||||
});
|
||||
|
||||
|
@ -1,16 +1,9 @@
|
||||
<form class="layui-form layui-form-pane form-search" action="{:sysuri()}" onsubmit="return false" method="get" autocomplete="off">
|
||||
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">登录账号</label>
|
||||
<label class="layui-form-label">账号名称</label>
|
||||
<label class="layui-input-inline">
|
||||
<input name="username" value="{$get.username|default=''}" placeholder="请输入登录账号" class="layui-input">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">用户名称</label>
|
||||
<label class="layui-input-inline">
|
||||
<input name="nickname" value="{$get.nickname|default=''}" placeholder="请输入用户名称" class="layui-input">
|
||||
<input name="username" value="{$get.username|default=''}" placeholder="请输入账号或名称" class="layui-input">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user