diff --git a/web/src/main/java/com/ibeetl/jlw/web/TeacherOpenCourseStudentSigninLogController.java b/web/src/main/java/com/ibeetl/jlw/web/TeacherOpenCourseStudentSigninLogController.java index 16cc4704..69cee1cd 100644 --- a/web/src/main/java/com/ibeetl/jlw/web/TeacherOpenCourseStudentSigninLogController.java +++ b/web/src/main/java/com/ibeetl/jlw/web/TeacherOpenCourseStudentSigninLogController.java @@ -181,9 +181,11 @@ public class TeacherOpenCourseStudentSigninLogController{ @GetMapping(MODEL + "/index.do") @Function("teacherOpenCourseStudentSigninLog.query") - public ModelAndView index() { + public ModelAndView index(Long signinSettingId,Long tOCId) { ModelAndView view = new ModelAndView("/jlw/teacherOpenCourseStudentSigninLog/index.html") ; view.addObject("search", TeacherOpenCourseStudentSigninLogQuery.class.getName()); + view.addObject("teacherOpenCourseStudentSigninSettingId", signinSettingId); + view.addObject("teacherOpenCourseId", tOCId); return view; } diff --git a/web/src/main/resources/static/js/jlw/teacherOpenCourseStudentSigninLog/index.js b/web/src/main/resources/static/js/jlw/teacherOpenCourseStudentSigninLog/index.js index 523ef4c2..35689252 100644 --- a/web/src/main/resources/static/js/jlw/teacherOpenCourseStudentSigninLog/index.js +++ b/web/src/main/resources/static/js/jlw/teacherOpenCourseStudentSigninLog/index.js @@ -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); diff --git a/web/src/main/resources/static/js/jlw/teacherOpenCourseStudentSigninSetting/index.js b/web/src/main/resources/static/js/jlw/teacherOpenCourseStudentSigninSetting/index.js index 74f84f8e..c9fc5fe6 100644 --- a/web/src/main/resources/static/js/jlw/teacherOpenCourseStudentSigninSetting/index.js +++ b/web/src/main/resources/static/js/jlw/teacherOpenCourseStudentSigninSetting/index.js @@ -8,12 +8,11 @@ layui.define([ 'form', 'laydate', 'table' ,'laytpl'], function(exports) { var data = []; var teacherOpenCourseId = $("input[name='teacherOpenCourseId']").val(); var ret = Common.postAjax("/jlw/teacherOpenCourseStudentSigninLog/summary.json",{'teacherOpenCourseId':teacherOpenCourseId}); - if(ret.code==0){ - data = ret.data; - console.log(data) - }else { - Common.info(ret.msg) - } + if(ret.code==0){ + data = ret.data; + }else { + Common.info(ret.msg) + } var getTpl = demo.innerHTML ,view = document.getElementById('view'); laytpl(getTpl).render(data, function(html){ @@ -39,6 +38,7 @@ layui.define([ 'form', 'laydate', 'table' ,'laytpl'], function(exports) { cellMinWidth: 100, method : 'post', url : Common.ctxPath + '/jlw/teacherOpenCourseStudentSigninSetting/list.json' // 数据接口 + , where: {"teacherOpenCourseId": teacherOpenCourseId} ,page : Lib.tablePage // 开启分页 /*,toolbar: '#toolbar_teacherOpenCourseStudentSigninSetting' //自定义头部左侧工具栏 ,defaultToolbar: ['filter', 'print', 'exports'] //头部右侧工具栏*/ @@ -49,7 +49,7 @@ layui.define([ 'form', 'laydate', 'table' ,'laytpl'], function(exports) { title : '序号', }, { - field : 'teacherOpenCourseStudentSigninSettingStartTime', + field : 'teacherOpenCourseStudentSigninSettingSessionTime', title : '签到日期', align:"center", hideField :false, @@ -162,7 +162,7 @@ layui.define([ 'form', 'laydate', 'table' ,'laytpl'], function(exports) { var htm = ''; /*htm += ''; htm += '';*/ - htm += ''; + htm += ''; return htm; } } @@ -236,8 +236,8 @@ layui.define([ 'form', 'laydate', 'table' ,'laytpl'], function(exports) { }, initTableTool: table.on('tool(teacherOpenCourseStudentSigninSettingTable)', function (obj) { var data = obj.data; - if (obj.event === 'edit') { - var url = "/jlw/teacherOpenCourseStudentSigninLog/index.do"; + if (obj.event === 'details') { + var url = "/jlw/teacherOpenCourseStudentSigninLog/index.do?signinSettingId=" + data.teacherOpenCourseStudentSigninSettingId + "&tOCId=" + teacherOpenCourseId; Common.openDlg(url,"/详情"); }else if(obj.event === "del"){ layer.confirm('是否确定删除该信息?', function (index) { diff --git a/web/src/main/resources/templates/jlw/teacherOpenCourseStudentSigninLog/index.html b/web/src/main/resources/templates/jlw/teacherOpenCourseStudentSigninLog/index.html index 8ae32c91..f704f6b6 100644 --- a/web/src/main/resources/templates/jlw/teacherOpenCourseStudentSigninLog/index.html +++ b/web/src/main/resources/templates/jlw/teacherOpenCourseStudentSigninLog/index.html @@ -3,19 +3,21 @@
-
- - -
-
- -
-
- +
+
+ + +
+
+ +
+
+ +
@@ -27,8 +29,21 @@
- + + +
+
+ @@ -46,8 +61,7 @@ lay-filter="teacherOpenCourseStudentSigninLogTable">
- - +