7e47ce238b
添加了管理后台所需的图片资源、Excel文件、安装程序以及设计相关的图片文件
186 lines
6.3 KiB
HTML
186 lines
6.3 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="renderer" content="webkit">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
|
<title>在线客户-e订通后台</title>
|
|
<link rel="stylesheet" href="layuiadmin/layui/css/layui.css">
|
|
<link rel="stylesheet" href="index.css">
|
|
<script src="layuiadmin/layui/layui.js"></script>
|
|
<script src="js/function.js"></script>
|
|
<style type="text/css">
|
|
.layui-table-cell {
|
|
height: auto;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div>
|
|
<blockquote class="layui-elem-quote" style="line-height:44px;padding:8px;">
|
|
<div class="layui-inline"><a class="layui-btn layui-btn-danger btn_del">清空</a></div>
|
|
<div class="layui-inline"><a class="layui-btn layui-btn-danger btn_check">批量踢出</a></div>
|
|
<form class="layui-form" id="form1_search" action="session.htm">
|
|
<div class="layui-input-inline" style="width:60px;" id="search_keyword"></div>
|
|
<div class="layui-input-inline" style="width:100px;" id="search_ip"></div>
|
|
<span id="search_dz_select"></span>
|
|
<button id="form1_submit" class="layui-btn layui-btn-normal" lay-submit lay-filter="form1_submit"> 搜 索 </button>
|
|
</form>
|
|
</blockquote>
|
|
<form class="layui-form">
|
|
<table id="layui_table" lay-filter="layui_table" style="">
|
|
</table>
|
|
</form>
|
|
</div>
|
|
<!--操作-->
|
|
<script type="text/html" id="caozuo">
|
|
<a class="layui-btn layui-btn-xs" lay-event="kickout">踢出</a>
|
|
</script>
|
|
<script>
|
|
var tableIns={};
|
|
layui.use(['form','layer','laydate','table','laytpl'],function(){
|
|
var form = layui.form,
|
|
layer = layui.layer,
|
|
$=layui.jquery,
|
|
laydate = layui.laydate,
|
|
laytpl = layui.laytpl,
|
|
table = layui.table;
|
|
//取得url传递参数
|
|
var query_str=location.search.substring(1);
|
|
if(query_str)
|
|
query_str="&"+query_str;
|
|
//---------------------------------------------数据表格
|
|
var url='./?_m=session'+query_str;
|
|
//alert(url);
|
|
//var cols=[];
|
|
//cols[0]={type: "checkbox", fixed:"left",width:50,style:"height:150px;"};
|
|
//cols[1]={field: 'xh', title: '圆牌号', width:90,align:"center",templet:'#tpl_xh',sort: true};
|
|
//cols[2]={field: 'detail', title: '款式明细',align:'left',templet:'#tpl_detail'};
|
|
tableIns = table.render({
|
|
even:false,
|
|
elem: '#layui_table',
|
|
url : url,
|
|
cellMinWidth:80,
|
|
page : true,
|
|
height : "full-140",
|
|
limit : 50,
|
|
limits : [10,20,30,50,100],
|
|
id : "ListTable",
|
|
cols : [[
|
|
{type: "checkbox", fixed:"left",width:50},
|
|
{field: 'xh', title: '编号', width:90,align:"center"},
|
|
{field: 'face', title: '角色', align:"center"},
|
|
{field: 'user', title: '用户', align:"center"},
|
|
{field: 'server_ip', title: '服务器', align:"center"},
|
|
{field: 'khd', title: '客户端', align:"center"},
|
|
{field: 'ip', title: 'IP地址', align:"center"},
|
|
{field: 'fwmk', title: '访问模块', align:"center"},
|
|
{field: 'zhcz', title: '最后操作', align:"center",sort: true},
|
|
{title: '操作', width:170, templet:'#caozuo',fixed:"right",align:"center"}
|
|
]],
|
|
done: function(res, curr, count){
|
|
//---------------------------------------------设置搜索框
|
|
//alert(res.count);
|
|
//var lang_spk=res.lang_spk;
|
|
//var lang_xh=res.lang_xh;
|
|
//根据url取得搜索条件的默认值
|
|
var s_keyword=s_ip=s_face=s_khd=s_server_ip="";
|
|
/*for(var i=0;i<res.select_dz.length;i++){
|
|
eval("var s_"+res.select_dz[i].no+"='';");
|
|
}
|
|
var pairs=query_str.split("&");//在逗号处断开
|
|
for(var i=0;i<pairs.length;i++){
|
|
var pos=pairs[i].indexOf('=');//查找name=value
|
|
if(pos>=0){
|
|
var argname=pairs[i].substring(0,pos);
|
|
var value=pairs[i].substring(pos+1);
|
|
//alert(argname+"|"+unescape(value));
|
|
if(argname && value)
|
|
eval("var "+argname+"=\""+unescape(value)+"\";");
|
|
}
|
|
}*/
|
|
//用户
|
|
html1='<input id="s_keyword" name="s_keyword" type="text" class="layui-input searchVal" placeholder="用户" value="'+s_keyword+'" />';
|
|
$("#search_keyword").html(html1);
|
|
|
|
//IP
|
|
html1='<input id="s_ip" name="s_ip" type="text" class="layui-input searchVal" placeholder="IP" value="'+s_ip+'" />';
|
|
$("#search_ip").html(html1);
|
|
|
|
//alert(html_search_username);
|
|
//自定义选项
|
|
var html1="";
|
|
for(var i=0;i<res.select_dz.length;i++){
|
|
html1+='<div class="layui-inline" style="width:80px;"><select name="s_'+res.select_dz[i].no+'"><option value="">-'+res.select_dz[i].title+'-</option>';
|
|
var op=res.select_dz[i].op;
|
|
for(var j=0;j<op.length;j++){
|
|
html1+='<option value="'+op[j].no+'"';
|
|
if(op[j].no==res.select_dz[i].value)
|
|
html1+='selected';
|
|
html1+='>'+op[j].title+'</option>';
|
|
}
|
|
html1+='</select></div>';
|
|
}
|
|
//alert(html1);
|
|
$("#search_dz_select").html(html1);
|
|
form.render();
|
|
}
|
|
});
|
|
//清空
|
|
$(".btn_del").click(function(){
|
|
layer.confirm('确认清空数据吗?', {icon: 3, title: '提示信息'}, function (index) {
|
|
$.get("./?_m=session&_a=kickout_all",function(data){
|
|
if(data.code=="1"){
|
|
tableIns.reload();
|
|
layer.close(index);
|
|
}else{
|
|
layer.msg(data.msg);
|
|
}
|
|
},"json")
|
|
})
|
|
})
|
|
//批量提出
|
|
$(".btn_check").click(function(){
|
|
var checkStatus = table.checkStatus('ListTable'),
|
|
data = checkStatus.data,
|
|
check_id = [];
|
|
if(data.length>0) {
|
|
for (var i in data) {
|
|
check_id.push(data[i].id);
|
|
}
|
|
layer.confirm('确定踢出吗?', {icon: 3, title: '提示信息'}, function (index) {
|
|
$.get("./?_m=session&_a=delete",{id:check_id},function(data){
|
|
if(data.code=="1"){
|
|
tableIns.reload();
|
|
layer.close(index);
|
|
}else{
|
|
layer.msg(data.msg);
|
|
}
|
|
},"json")
|
|
})
|
|
}else{
|
|
layer.msg("请选择需要删除的记录");
|
|
}
|
|
})
|
|
//列表操作
|
|
table.on('tool(layui_table)', function(obj){
|
|
var layEvent = obj.event,
|
|
data = obj.data;
|
|
if(layEvent === 'edit'){
|
|
//清空
|
|
add(data.id);
|
|
} else if(layEvent === 'kickout'){
|
|
//提出
|
|
layer.confirm('确定踢出吗?',{icon:3, title:'提示信息'},function(index){
|
|
$.get("./?_m=session&_a=kickout",{id:data.id},function(data){
|
|
tableIns.reload();
|
|
layer.close(index);
|
|
})
|
|
});
|
|
}
|
|
});
|
|
//
|
|
})
|
|
</script>
|
|
</body>
|
|
</html> |