mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
优化系统日志搜索
This commit is contained in:
parent
02772bd410
commit
0e41a67984
@ -44,6 +44,7 @@ class Oplog extends Controller
|
||||
{
|
||||
$this->title = '系统日志管理';
|
||||
$this->isSupper = AdminService::instance()->isSuper();
|
||||
$this->actions = $this->app->db->name($this->table)->distinct(true)->column('action');
|
||||
$query = $this->_query($this->table)->order('id desc');
|
||||
$query->like('action,node,content,username,geoip')->dateBetween('create_at');
|
||||
if (input('output') === 'json') {
|
||||
|
@ -38,8 +38,8 @@
|
||||
操作节点:<span class="color-desc">{$vo.node|default='-'}</span>
|
||||
</td>
|
||||
<td class='text-left nowrap padding-row-0 padding-right-0'>
|
||||
<p class="color-text layui-elip" style="max-width:550px">{$vo.action|default='-'}</p>
|
||||
<span class="color-desc" style="white-space:normal">{$vo.content|default='-'}</span>
|
||||
<p class="color-text layui-elip">{$vo.action|default='-'}</p>
|
||||
<span class="color-desc">{$vo.content|default='-'}</span>
|
||||
</td>
|
||||
<td class='text-left nowrap'>
|
||||
<p class="color-text">{$vo.geoip|default='-'}</p>
|
||||
|
@ -3,39 +3,46 @@
|
||||
<form class="layui-form layui-form-pane form-search" action="{:request()->url()}" onsubmit="return false" method="get" autocomplete="off">
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">操作账号</label>
|
||||
<div class="layui-input-inline">
|
||||
<label class="layui-input-inline">
|
||||
<input name="username" value="{:input('get.username')}" placeholder="请输入操作账号" class="layui-input">
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">操作节点</label>
|
||||
<div class="layui-input-inline">
|
||||
<label class="layui-input-inline">
|
||||
<input name="node" value="{:input('get.node')}" placeholder="请输入操作节点" class="layui-input">
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">操作行为</label>
|
||||
<div class="layui-input-inline">
|
||||
<input name="action" value="{:input('get.action')}" placeholder="请输入操作行为" class="layui-input">
|
||||
<select name="action" class="layui-select">
|
||||
<option value="">--全部--</option>
|
||||
{foreach $actions as $action}{if $action eq input('action')}
|
||||
<option selected value="{$action}">{$action}</option>
|
||||
{else}
|
||||
<option value="{$action}">{$action}</option>
|
||||
{/if}{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">操作描述</label>
|
||||
<div class="layui-input-inline">
|
||||
<label class="layui-input-inline">
|
||||
<input name="content" value="{:input('get.content')}" placeholder="请输入操作内容" class="layui-input">
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">位置地址</label>
|
||||
<div class="layui-input-inline">
|
||||
<label class="layui-input-inline">
|
||||
<input name="geoip" value="{:input('get.geoip')}" placeholder="请输入位置地址" class="layui-input">
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">操作时间</label>
|
||||
<div class="layui-input-inline">
|
||||
<label class="layui-input-inline">
|
||||
<input data-date-range name="create_at" value="{:input('get.create_at')}" placeholder="请选择操作时间" class="layui-input">
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<button type="submit" class="layui-btn layui-btn-primary"><i class="layui-icon"></i> 搜 索</button>
|
||||
|
Loading…
x
Reference in New Issue
Block a user