2020-09-21 11:58:10 +08:00

84 lines
3.5 KiB
PHP

{extend name='main'}
{block name="button"}
<!--{if isset($isSupper) and $isSupper}-->
<div class="layui-form inline-block">
<!--{if intval(sysconf('base.oplog_state')) eq 1}-->
<input type="checkbox" title="数据变更日志" value="0" checked lay-filter="OplogState">
<!--{else}-->
<input type="checkbox" title="数据变更日志" value="1" lay-filter="OplogState">
<!--{/if}-->
<script>
form.render(), form.on('checkbox(OplogState)', function (elem) {
$.form.load('{:url("admin/api.plugs/oplog")}', {state: elem.value});
});
</script>
</div>
<!--{/if}-->
<!--{if auth("clear")}-->
<button data-load='{:url("clear")}' data-confirm="确定要消除所有日志吗?" class='layui-btn layui-btn-sm layui-btn-primary'>清理日志</button>
<!--{/if}-->
<!--{if auth("remove")}-->
<button data-action='{:url("remove")}' data-rule="id#{key}" data-csrf="{:systoken('remove')}" data-confirm="确定要删除日志吗?" class='layui-btn layui-btn-sm layui-btn-primary'>删除日志</button>
<!--{/if}-->
{/block}
{block name="content"}
<div class="think-box-shadow table-block">
{include file='oplog/index_search'}
<table class="layui-table margin-top-10" lay-skin="line">
{notempty name='list'}
<thead>
<tr>
<th class='list-table-check-td think-checkbox'>
<label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
</th>
<th class='text-left nowrap'>操作权限</th>
<th class='text-left nowrap'>操作行为</th>
<th class='text-left nowrap'>地理位置</th>
<th class='text-left nowrap'>操作时间</th>
<th></th>
</tr>
</thead>
<tbody>
{foreach $list as $key=>$vo}
<tr data-dbclick>
<td class='list-table-check-td think-checkbox'>
<label><input class="list-check-box" value='{$vo.id}' type='checkbox'></label>
</td>
<td class="text-left nowrap">
操作账号:<span class="font-w7">{$vo.username|default='-'}</span><br>
操作节点:<span class="color-desc">{$vo.node|default='-'}</span>
</td>
<td class='text-left nowrap padding-row-0 padding-right-0'>
<div style="overflow:auto;max-height:58px;padding:5px 0">
<p class="color-text layui-elip" style="max-width:550px">{$vo.action|default='-'}</p>
<div class="color-desc layui-elip" style="white-space:normal">{$vo.content|default='-'}</div>
</div>
</td>
<td class='text-left nowrap'>
<p class="color-text">{$vo.geoip|default='-'}</p>
<p class="color-desc">{$vo.isp|default='-'}</p>
</td>
<td class='text-left nowrap'>
日期:{$vo.create_at|format_datetime|str_replace=' ','<br><span class="color-desc">时间:',###|raw}</span>
</td>
<td class='text-left nowrap'>
{if auth("remove")}
<a data-dbclick class="layui-btn layui-btn-xs layui-btn-danger" data-confirm="确定要删除该日志吗?" data-action="{:url('remove')}" data-value="id#{$vo.id}" data-csrf="{:systoken('remove')}"> </a>
{/if}
</td>
</tr>
{/foreach}
</tbody>
{/notempty}
</table>
{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
</div>
{/block}