mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-05 19:41:44 +08:00
45 lines
1.8 KiB
PHP
45 lines
1.8 KiB
PHP
{extend name='table'}
|
|
|
|
{block name="button"}
|
|
<!--{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#{id}" data-table-id="oplog" data-confirm="确定要删除这些记录吗?" class='layui-btn layui-btn-sm layui-btn-primary'>批量删除日志</button>
|
|
<!--{/if}-->
|
|
{/block}
|
|
|
|
{block name="content"}
|
|
<div class="think-box-shadow">
|
|
{include file='oplog/index_search'}
|
|
<table id="oplog" data-url="{:sysuri()}" data-target-search="form.form-search"></table>
|
|
</div>
|
|
{/block}
|
|
|
|
{block name='script'}
|
|
<script>
|
|
$(function () {
|
|
$('#oplog').layTable({
|
|
sort: {field: 'id', type: 'desc'},
|
|
cols: [[
|
|
{checkbox: true},
|
|
{field: 'id', title: 'ID', width: 80, sort: true, align: 'center'},
|
|
{field: 'username', title: '操作账号', sort: true, align: 'center'},
|
|
{field: 'node', title: '操作节点', sort: true},
|
|
{field: 'action', title: '操作行为', sort: true},
|
|
{field: 'content', title: '操作描述', sort: false},
|
|
{field: 'geoip', title: '访问地址', sort: true},
|
|
{field: 'geoisp', title: '网络服务商', sort: false},
|
|
{field: 'create_at', title: '操作时间', sort: true},
|
|
{toolbar: '#toolbar', align: 'center'}
|
|
]]
|
|
}).trigger('setFullHeight');
|
|
});
|
|
</script>
|
|
|
|
<script type="text/html" id="toolbar">
|
|
<!--{if auth('remove')}-->
|
|
<a data-action='{:url("remove")}' data-value="id#{{d.id}}" data-confirm="确认要删除这条记录吗?" class="layui-btn layui-btn-danger layui-btn-sm">删 除</a>
|
|
<!--{/if}-->
|
|
</script>
|
|
{/block} |