You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

267 lines
9.0 KiB
HTML

<extend name="Public/base"/>
<block name="body">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<script type="text/javascript" src="__STATIC__/layer3/layer.js"></script>
<style>
.select2-container--default .select2-selection--single {
color: #000;
resize: none;
border-width: 1px;
border-style: solid;
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
box-shadow: 0px 3px 3px #F7F8F9 inset;height:35px;
height:28px;border-radius:3px;font-size:12px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
line-height:35px;
line-height:28px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
height:26px;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
height:26px;line-height:26px;font-size:12px;
}
.select2-results__option[aria-selected] {font-size:12px;}
</style>
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">操作日志</h3>
<p class="description_text"></p>
</div>
<div class="cf top_nav_list">
<!-- 高级搜索 -->
<div class="jssearch fl cf search_list">
<!--游戏类型搜索END-->
<div class="input-list">
<input type="text" id="time-start" name="time_start" class="" value="{:I('time_end')}" placeholder="操作开始时间" autocomplete="off"/>
-
<div class="input-append date" id="datetimepicker" style="display:inline-block">
<input type="text" id="time-end" name="time_end" class="" value="{:I('time_end')}" placeholder="操作结束时间" autocomplete="off"/>
<span class="add-on"><i class="icon-th"></i></span>
</div>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="op_type" name="op_type" class="select_gallery" >
<option value="">请选择类型</option>
<option value="0" <if condition="$_GET['op_type'] eq '0'">selected</if> >新增</option>
<option value="1" <if condition="$_GET['op_type'] eq 1">selected</if> >修改</option>
<option value="2" <if condition="$_GET['op_type'] eq 2">selected</if> >删除</option>
<option value="3" <if condition="$_GET['op_type'] eq 3">selected</if> >导出</option>
</select>
</div>
<!-- <div class="input-list">-->
<!-- <input type="text" name="adminname" placeholder="操作人" class="" value="{:I('adminname')}" style="width: 180px"/>&nbsp;-->
<!-- </div>get_admin_list-->
<div class="input-list input-list-game search_label_rehab">
<select id="adminname" name="adminname" class="select_gallery" >
<option value="">操作人</option>
<volist name=":get_admin_list()" id="vo">
<option value="{$vo.nickname}" <if condition="$vo.nickname eq I('adminname')">selected</if> >{$vo.nickname}</option>
</volist>
</select>
</div>
<div class="input-list input-list-game search_label_rehab">
<input style="width: 200px" type="text" id="menu" name="menu" class="" value="{:I('menu')}" placeholder="请输入位置" autocomplete="off"/>
</div>
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="search" url="{:U('UserActionLog/operateLog','model='.$model['name'].'&row='.I('row'),false)}" style="">搜索</a>
</div>
</div>
</div>
<!-- 数据列表 -->
<div class="data_list">
<div class="">
<table>
<!-- 表头 -->
<thead>
<tr>
<th >编号</th>
<th >位置</th>
<th >类型</th>
<th>操作人</th>
<th >操作时间</th>
<th >操作IP地址</th>
<!-- <th >操作</th>-->
</tr>
</thead>
<!-- 列表 -->
<tbody>
<style>
.data-table thead th, .data-table tbody td{text-align:center}
.data-table tbody td{border-right:1px solid #DDDDDD;}
.d_list .drop-down ul {z-index:999;}
</style>
<if condition = "empty($data)">
<tr>
<td colspan="14" class="text-center">aOh! 暂时还没有内容!</td>
</tr>
</if>
<notemtpy name = "data">
<volist name="data" id="data" key="$key">
<tr>
<td >{$data.id}</td>
<td >
<a href="{$data.url}" target="_blank">{$data.menu}-{$data.key}</a>
</td>
<td >{$data.op_name}</td>
<td >{$data.admin_account}</td>
<td >{$data.create_time|date='Y-m-d H:i:s',###}</td>
<td >{$data.op_ip}</td>
<!-- <td ><a class="confirm del" data-id="{$data.id}">删除</a></td>-->
</tr>
</volist>
</notemtpy>
</tbody>
</table>
</div>
</div>
<div class="page">
<if condition="$role_export_check eq true ">
<a class="sch-btn export-btn" href="{:U('UserActionLog/operateLoExport',array_merge(['xlsname'=>'操作日志'],I('get.')))}" target="_blank">导出</a>
</if>
{$_page|default=''}
</div>
</block>
<block name="script">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
<script type="text/javascript">
//导航高亮
highlight_subnav('{:U("UserActionLog/operateLog")}');
$(function () {
<volist name=":I('get.')" id="vo">
Think.setValue('{$key}',"{$vo}");
</volist>
});
</script>
<script type="text/javascript">
$(".select_gallery").select2();
function reload() {
window.location.reload();
}
$(function(){
$('#time-start').datetimepicker({
format: 'yyyy-mm-dd',
language: "zh-CN",
showMeridian:true,
pickDate:true,
minView: 2,
autoclose: true,
pickTime:true,
todayBtn:true,
}).on('change',function(ev){
var val = new Date($.trim($(this).val())).getTime();
var end = new Date($.trim($('#time-end').val())).getTime();
if (val>end) {
layer.msg('开始时间大于结束时间!');$(this).val('');
}
return false;
});
$("#time-end").datetimepicker({
format:"yyyy-mm-dd",
language: "zh-CN",
showMeridian:true,
minView:2,
autoclose:true,
todayBtn:true,
}).on('change',function(ev){
var val = new Date($.trim($(this).val())).getTime();
var start = new Date($.trim($('#time-start').val())).getTime();
if (val<start) {
layer.msg('开始时间大于结束时间!');$(this).val('');
}
return false;
});
//搜索功能
$("#search").click(function(){
var starttime = $.trim($('#time-start').val());
var endtime = $.trim($('#time-end').val());
if (starttime && endtime && starttime > endtime) {layer.msg('开始时间必须小于等于结束时间');return false;}
var url = $(this).attr('url');
var query = $('.jssearch').find('input').serialize();
query += "&" + $('.jssearch').find('select').serialize();
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
query = query.replace(/^&/g,'');
if( url.indexOf('?')>0 ){
url += '&' + query;
}else{
url += '?' + query;
}
window.location.replace(url);
});
//回车自动提交
$('.jssearch').find('input').keyup(function(event){
if(event.keyCode===13){
$("#search").click();
}
});
})
$(".del").click(function () {
var del = $(this).data();
layer.confirm('【警告】撤销后将不可回退,如需继续请点击确认', {
btn: ['确认','取消'],
title:false
}, function(){
var url = "/admin.php?s=/UserActionLog/operateLogDel/id/"+del.id;
layer.load(2);
$.ajax({
url: url,
type: "get",
dataType: "json",
success: function (data) {
if(data.status == 1){
layer.closeAll('loading');
layer.msg("<font style='color: red'>删除成功</font>");
setTimeout(function(){
window.location.reload();
},350);
}else{
alert("删除失败")
}
}
})
}, function(){
});
});
</script>
</block>