|
|
<!--#layout("/common/layout.html",{"jsBase":"/js/jlw/teacher/"}){ -->
|
|
|
<!--登录日志页面-->
|
|
|
<style>
|
|
|
.layui-laypage .layui-laypage-curr .layui-laypage-em,button{
|
|
|
background-color: #73a2f8 !important;
|
|
|
}
|
|
|
/* 分页确定按钮*/
|
|
|
.layui-laypage-btn{
|
|
|
color: white!important;
|
|
|
}
|
|
|
.xxmc{
|
|
|
white-space: nowrap;
|
|
|
text-overflow: ellipsis;
|
|
|
line-height: 37px;
|
|
|
font-size: 16px;
|
|
|
padding-left: 10px;
|
|
|
width: auto !important;
|
|
|
min-width: 200px;
|
|
|
max-width: 300px;
|
|
|
overflow: hidden;
|
|
|
height: 37px;
|
|
|
}
|
|
|
|
|
|
.layui-form-item .layui-input-inline, .layui-form-item .layui-inline {
|
|
|
margin-right: 0px;
|
|
|
}
|
|
|
</style>
|
|
|
<div class="layui-inline">
|
|
|
<form id="searchForm" class="layui-form" style="background-color: #fdfdfd;padding: 10px 0;margin-bottom: 10px;">
|
|
|
<div class="layui-form-item" style="margin-bottom: 0;">
|
|
|
<div class="layui-inline">
|
|
|
<label class="layui-form-label">用户名:</label>
|
|
|
<div class="layui-input-inline">
|
|
|
<input type="text" name="codeOrName" placeholder="请输入检索条件" autocomplete="off" class="layui-input">
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<!--isSignRole.get()!'' :1:admin+管理员 2:uniAdmin学院管理员 3:teacher 4student-->
|
|
|
<!--#if(isSignRole.get()!''== 2){ -->
|
|
|
<div class="layui-inline">
|
|
|
<label class="layui-form-label">所属班级:</label>
|
|
|
<div class="layui-input-inline">
|
|
|
<layui:simpleDictSelect style='layui-input-inline' type="school_class.class_name.class_status=1"
|
|
|
id="classId" name="classId"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!--#}else{ -->
|
|
|
<div class="layui-inline">
|
|
|
<label class="layui-form-label">所属院校</label>
|
|
|
<div class="layui-input-inline">
|
|
|
<layui:simpleDictSelect style='layui-input-inline'
|
|
|
type="universities_colleges.universities_colleges_name.universities_colleges_status=1"
|
|
|
id="universitiesCollegesId" name="universitiesCollegesId"
|
|
|
layFilter="select_universitiesColleges"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="layui-inline" style="float: right;margin-right: 30px;">
|
|
|
<label class="layui-form-label">是否在线</label>
|
|
|
<div class="layui-input-inline">
|
|
|
<select name="isOnLine" lay-verify="">
|
|
|
<option value="">全选</option>
|
|
|
<option value="true">是</option>
|
|
|
<option value="false">否</option>
|
|
|
</select>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!--#} -->
|
|
|
|
|
|
<div class="layui-inline">
|
|
|
<label class="layui-form-label">登录时间</label>
|
|
|
<div class="layui-input-inline">
|
|
|
<input type="text" class="layui-input" id="test5" name="timeZones"
|
|
|
placeholder="请输入登录时间">
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</form>
|
|
|
</div>
|
|
|
<div class="layui-btn-group" style="margin-bottom:16px;margin-left: 20px;">
|
|
|
<layui:accessButton function="teacher.query" id="searchFormSearch" action="search"><i
|
|
|
class="layui-icon"></i>搜索
|
|
|
</layui:accessButton>
|
|
|
<layui:accessButton function="teacher.add" action="export"><span class="iconfont"></span>导出</layui:accessButton>
|
|
|
<!--<layui:accessButton function="teacher.query" action="refresh"><i class="layui-icon"></i>刷新</layui:accessButton>-->
|
|
|
</div>
|
|
|
<table id="teacherTable" lay-filter="teacherTable"></table>
|
|
|
<!--#} -->
|
|
|
<script>
|
|
|
|
|
|
layui.use([ 'form', 'laydate', 'table' ], function(){
|
|
|
var form = layui.form;
|
|
|
var laydate = layui.laydate;
|
|
|
var table = layui.table;
|
|
|
var teacherTable = null;
|
|
|
|
|
|
laydate.render({
|
|
|
elem: '#test5'
|
|
|
, type: 'date'
|
|
|
, range: '~'
|
|
|
, value: [Common.getNowDate(-365 / 2) +' ~ '+Common.getNowDate(1)]
|
|
|
, trigger: 'click'
|
|
|
});
|
|
|
|
|
|
teacherTable = table.render({
|
|
|
elem : '#teacherTable',
|
|
|
height : Lib.getTableHeight(),
|
|
|
cellMinWidth: 100,
|
|
|
even:true,
|
|
|
// skin:'nob',
|
|
|
size:"lg",
|
|
|
method : 'get',
|
|
|
url: Common.ctxPath + '/jlw/student/studentLoginLogList.json' // 数据接口
|
|
|
,where:getParam()
|
|
|
//, where: {'loginStartTime': getDate(),'loginEndTime':Common.getNowDate()}
|
|
|
// , where: {'loginTime':getDate()}
|
|
|
,page : Lib.tablePage // 开启分页
|
|
|
,limit : 10,
|
|
|
cols : [ [ // 表头
|
|
|
{
|
|
|
field: 'code', title: '学号', align: "center",
|
|
|
hide: "${isSignRole.get()!''}" != 1 ? false : true
|
|
|
},
|
|
|
{
|
|
|
field: 'name', title: '姓名', align: "center",
|
|
|
hide: "${isSignRole.get()!''}" != 1 ? false : true
|
|
|
},
|
|
|
{
|
|
|
field: 'name', title: '用户名', align: "center",
|
|
|
hide: "${isSignRole.get()!''}" != 2 ? false : true
|
|
|
},
|
|
|
{
|
|
|
field: 'code', title: '用户编号', align: "center",
|
|
|
hide: "${isSignRole.get()!''}" != 2 ? false : true
|
|
|
},
|
|
|
{
|
|
|
field: 'universitiesCollegesName', title: '所属院校', align: "center",
|
|
|
hide: "${isSignRole.get()!''}" != 2 ? false : true
|
|
|
},
|
|
|
{
|
|
|
field: 'universitiesCollegesProvince', title: '所属省份', align: "center",
|
|
|
hide: "${isSignRole.get()!''}" != 2 ? false : true,
|
|
|
},
|
|
|
{
|
|
|
field: 'className', title: '所属班级', align: "center",
|
|
|
hide: "${isSignRole.get()!''}" != 2 ? true : false
|
|
|
},
|
|
|
{
|
|
|
field: 'loginTime', title: '登入时间', align: "center",
|
|
|
},
|
|
|
{
|
|
|
field: 'logoutTime', title: '登出时间', align: "center",
|
|
|
},
|
|
|
{
|
|
|
field: 'onlineDuration', title: '登录时长', align: "center",
|
|
|
},
|
|
|
{
|
|
|
field: 'isOnLine', title: '是否在线', align: "center",
|
|
|
templet: function (d) {
|
|
|
return d.isOnLine ? "是" : "否"
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
field : 'ip', title : '登录IP',align: "center"
|
|
|
},
|
|
|
{
|
|
|
field : 'ipAddress', title : 'IP归属地',align: "center"
|
|
|
}
|
|
|
] ]
|
|
|
});
|
|
|
|
|
|
toolbar = {
|
|
|
add : function() { // 获取选中数据
|
|
|
var url = "/jlw/teacher/add.do";
|
|
|
Common.openDlg(url,"教师管理/添加教师");
|
|
|
},
|
|
|
refresh: function () {//刷新
|
|
|
searchForm.reset();
|
|
|
Lib.doSearchForm($("#searchForm"), teacherTable, 1);
|
|
|
},
|
|
|
search:function () {
|
|
|
//Lib.doSearchForm($("#searchForm"), teacherTable, 1);
|
|
|
teacherTable.reload({
|
|
|
where: getParam(),
|
|
|
page: {
|
|
|
curr: 1
|
|
|
}
|
|
|
});
|
|
|
},import:function (){
|
|
|
var url = "/jlw/teacher/importPage.do";
|
|
|
Common.openDlg(url,"");
|
|
|
}, export: function () {//导出 /jlw/student/studentLogListExport.json
|
|
|
layer.confirm('是否确定导出登录日志吗?', function (index) {
|
|
|
$.downFile(Common.ctxPath + "/jlw/student/studentLoginLogListExport.json");
|
|
|
layer.close(index);
|
|
|
});
|
|
|
}
|
|
|
};
|
|
|
$('.ext-toolbar').on('click', function() {
|
|
|
var type = $(this).data('type');
|
|
|
toolbar[type] ? toolbar[type].call(this) : '';
|
|
|
});
|
|
|
|
|
|
//根据所选学校查询班级
|
|
|
form.on('select(select_universitiesColleges)', function (obj) {
|
|
|
Lib.getSchoolClass($("select[name='classId']"),obj.value);
|
|
|
});
|
|
|
});
|
|
|
|
|
|
//获取检索条件(确认/取消时使用:选择学生时,传学生IDS否则传检索条件)
|
|
|
function getParam(checkStatus) {
|
|
|
var codePlural = "";
|
|
|
var param = {};
|
|
|
if (!$.isEmpty(checkStatus)) {
|
|
|
codePlural = Common.concatBatchId(checkStatus.data, "code");
|
|
|
}
|
|
|
if ($.isEmpty(codePlural)) {
|
|
|
param = $("#searchForm").serializeJson();
|
|
|
param.loginStartTime = param.timeZones.split(' ~ ')[0];
|
|
|
param.loginEndTime = param.timeZones.split(' ~ ')[1];
|
|
|
delete param.timeZones;
|
|
|
} else {
|
|
|
param.codePlural = codePlural;
|
|
|
}
|
|
|
return param;
|
|
|
}
|
|
|
|
|
|
</script>
|