|
|
|
@ -1,15 +1,30 @@
|
|
|
|
|
layui.define([ 'form', 'laydate', 'table' ], function(exports) {
|
|
|
|
|
layui.define([ 'form', 'laydate', 'table','laytpl'], function(exports) {
|
|
|
|
|
var form = layui.form;
|
|
|
|
|
var laydate = layui.laydate;
|
|
|
|
|
var table = layui.table;
|
|
|
|
|
var laytpl = layui.laytpl;
|
|
|
|
|
var teacherOpenCourseStudentSigninLogTable = null;
|
|
|
|
|
var studentTable = null;
|
|
|
|
|
|
|
|
|
|
var teacherOpenCourseStudentSigninSettingId=$("input[name='teacherOpenCourseStudentSigninSettingId']").val();
|
|
|
|
|
var teacherOpenCourseId=$("input[name='teacherOpenCourseId']").val();
|
|
|
|
|
|
|
|
|
|
laydate.render({
|
|
|
|
|
elem: '#test5'
|
|
|
|
|
,type: 'datetime'
|
|
|
|
|
, trigger: 'click'
|
|
|
|
|
});
|
|
|
|
|
var data = [];
|
|
|
|
|
var ret = Common.postAjax("/jlw/teacherOpenCourseStudentSigninSetting/sessionDateList.json");
|
|
|
|
|
|
|
|
|
|
if(ret.code==0){
|
|
|
|
|
data = ret.data;
|
|
|
|
|
}
|
|
|
|
|
/*var getTpl = opTime_demo.innerHTML
|
|
|
|
|
,view = document.getElementById('opTime_view');
|
|
|
|
|
laytpl(getTpl).render(data, function(html){
|
|
|
|
|
view.innerHTML = html;
|
|
|
|
|
});*/
|
|
|
|
|
var view ={
|
|
|
|
|
init:function(){
|
|
|
|
|
var that = this
|
|
|
|
@ -31,6 +46,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
|
|
|
|
|
cellMinWidth: 100,
|
|
|
|
|
method : 'post',
|
|
|
|
|
url : Common.ctxPath + '/jlw/teacherOpenCourseStudentSigninLog/list.json' // 数据接口
|
|
|
|
|
,where: {'teacherOpenCourseStudentSigninSettingId':teacherOpenCourseStudentSigninSettingId}
|
|
|
|
|
,page : Lib.tablePage // 开启分页
|
|
|
|
|
/* ,toolbar: '#toolbar_teacherOpenCourseStudentSigninLog' //自定义头部左侧工具栏
|
|
|
|
|
,defaultToolbar: ['filter', 'print', 'exports'] //头部右侧工具栏*/
|
|
|
|
@ -88,8 +104,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
|
|
|
|
|
hideField: false,
|
|
|
|
|
hide: $.isEmpty(sx_['teacherOpenCourseStudentSigninLogAddTime']) ? false : sx_['teacherOpenCourseStudentSigninLogAddTime'],
|
|
|
|
|
}
|
|
|
|
|
] ]
|
|
|
|
|
|
|
|
|
|
] ]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
studentTable = table.render({
|
|
|
|
@ -99,18 +114,21 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
|
|
|
|
|
method: 'post',
|
|
|
|
|
even: true,
|
|
|
|
|
// skin:'nob',
|
|
|
|
|
where:getParam_s(),
|
|
|
|
|
size: "lg",
|
|
|
|
|
where: {studentStatus: 1},
|
|
|
|
|
url: Common.ctxPath + '/jlw/teacherOpenCourseMergeStudent/list.json' // 数据接口
|
|
|
|
|
, page: Lib.tablePage // 开启分页
|
|
|
|
|
, limit: 10,
|
|
|
|
|
cols: [[ // 表头//isSignRole.get()!'' :1:admin+管理员 2:uniAdmin学院管理员 3:teacher 4student
|
|
|
|
|
cols: [[
|
|
|
|
|
{
|
|
|
|
|
field: 'studentSn',
|
|
|
|
|
title: '学号', align: "center"
|
|
|
|
|
title: '学号', align: "center",
|
|
|
|
|
templet:function (d) {
|
|
|
|
|
return $.isEmpty(d.studentInfo)?"":d.studentInfo.studentSn
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'studentName',
|
|
|
|
|
field: 'studentIdText',
|
|
|
|
|
title: '姓名', align: "center"
|
|
|
|
|
}
|
|
|
|
|
]]
|
|
|
|
@ -124,10 +142,53 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
//触发行单击事件
|
|
|
|
|
table.on('row(studentTable)', function(obj){
|
|
|
|
|
var param={
|
|
|
|
|
'teacherOpenCourseStudentSigninSettingId': teacherOpenCourseStudentSigninSettingId,
|
|
|
|
|
'teacherOpenCourseStudentSigninSettingSessionTime':$("select[name='teacherOpenCourseStudentSigninSettingSessionTime']").val(),
|
|
|
|
|
'studentSn':obj.data.studentInfo.studentSn
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
teacherOpenCourseStudentSigninLogTable.reload({
|
|
|
|
|
where: param,
|
|
|
|
|
page: {
|
|
|
|
|
curr: 1
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
initSearchForm:function(){
|
|
|
|
|
Lib.initSearchForm( $("#searchForm"),teacherOpenCourseStudentSigninLogTable,form);
|
|
|
|
|
//Lib.initSearchForm( $("#searchForm"),teacherOpenCourseStudentSigninLogTable,form);
|
|
|
|
|
//Lib.initSearchForm( $("#studentForm"),studentTable,form);
|
|
|
|
|
|
|
|
|
|
var btn_s = $("#searchFormSearch");
|
|
|
|
|
btn_s.on('click', function () {
|
|
|
|
|
var data = $("#searchForm").serializeJson();
|
|
|
|
|
teacherOpenCourseStudentSigninLogTable.reload({
|
|
|
|
|
where: data,
|
|
|
|
|
page: {
|
|
|
|
|
curr: 1
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
studentTable.reload({
|
|
|
|
|
where: getParam_s(),
|
|
|
|
|
page: {
|
|
|
|
|
curr: 1
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
var btn = $("#studentFormSearch");
|
|
|
|
|
btn.on('click', function () {
|
|
|
|
|
studentTable.reload({
|
|
|
|
|
where: getParam_s(),
|
|
|
|
|
page: {
|
|
|
|
|
curr: 1
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
initToolBar:function(){
|
|
|
|
@ -208,6 +269,15 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
function getParam_s(){
|
|
|
|
|
var param = {
|
|
|
|
|
"teacherOpenCourseStudentSigninSettingSessionTime":$("select[name='teacherOpenCourseStudentSigninSettingSessionTime']").val(),
|
|
|
|
|
"classId":$("#studentForm select[name='classId']").val(),
|
|
|
|
|
"studentOrName":$("#studentForm input[name='studentOrName']").val(),
|
|
|
|
|
'teacherOpenCourseId':teacherOpenCourseId
|
|
|
|
|
};
|
|
|
|
|
return param
|
|
|
|
|
}
|
|
|
|
|
exports('index',view);
|
|
|
|
|
|
|
|
|
|