From f5c591f48d00eb6fb4ea8896211b775ffb30a948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9A=E4=B8=B9ab?= <1421553879@qq.com> Date: Wed, 28 Dec 2022 11:50:25 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=AD=98=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../index.js | 30 +++++++++++++++---- .../index.js | 3 +- .../index.html | 30 ++++++++++--------- 3 files changed, 42 insertions(+), 21 deletions(-) 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 0f98e08d..6a094f7b 100644 --- a/web/src/main/resources/static/js/jlw/teacherOpenCourseStudentSigninLog/index.js +++ b/web/src/main/resources/static/js/jlw/teacherOpenCourseStudentSigninLog/index.js @@ -90,17 +90,19 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) { even: true, // skin:'nob', 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" } ]] @@ -118,6 +120,24 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) { initSearchForm:function(){ Lib.initSearchForm( $("#searchForm"),teacherOpenCourseStudentSigninLogTable,form); + //Lib.initSearchForm( $("#studentForm"),studentTable,form); + + var btn = $("#studentFormSearch"); + + + btn.on('click', function () { + var data = { + "classId":$("#studentForm select[name='classId']").val(), + "studentOrName":$("#studentForm input[name='studentOrName']").val(), + }; + studentTable.reload({ + where: data, + page: { + curr: 1 + } + + }); + }); }, initToolBar:function(){ @@ -198,7 +218,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) { }); } }) - } + }; 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..5a8bea34 100644 --- a/web/src/main/resources/static/js/jlw/teacherOpenCourseStudentSigninSetting/index.js +++ b/web/src/main/resources/static/js/jlw/teacherOpenCourseStudentSigninSetting/index.js @@ -10,7 +10,6 @@ layui.define([ 'form', 'laydate', 'table' ,'laytpl'], function(exports) { 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) } @@ -49,7 +48,7 @@ layui.define([ 'form', 'laydate', 'table' ,'laytpl'], function(exports) { title : '序号', }, { - field : 'teacherOpenCourseStudentSigninSettingStartTime', + field : 'teacherOpenCourseStudentSigninSettingSessionTime', title : '签到日期', align:"center", hideField :false, diff --git a/web/src/main/resources/templates/jlw/teacherOpenCourseStudentSigninLog/index.html b/web/src/main/resources/templates/jlw/teacherOpenCourseStudentSigninLog/index.html index 8ae32c91..5698774f 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,7 +29,7 @@
-
From b28e5a9ed987a7caac2fe149c6d2c4cc2ce21f65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9A=E4=B8=B9ab?= <1421553879@qq.com> Date: Thu, 29 Dec 2022 02:07:51 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=AD=98=E6=A1=A3-?= =?UTF-8?q?=E7=AD=BE=E5=88=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...rOpenCourseStudentSigninLogController.java | 4 +- .../index.js | 74 ++++++++++++++++--- .../index.js | 17 +++-- .../index.html | 20 ++++- 4 files changed, 90 insertions(+), 25 deletions(-) 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 6a2852cc..26655c9a 100644 --- a/web/src/main/java/com/ibeetl/jlw/web/TeacherOpenCourseStudentSigninLogController.java +++ b/web/src/main/java/com/ibeetl/jlw/web/TeacherOpenCourseStudentSigninLogController.java @@ -190,9 +190,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 61d2478d..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,6 +114,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) { method: 'post', even: true, // skin:'nob', + where:getParam_s(), size: "lg", url: Common.ctxPath + '/jlw/teacherOpenCourseMergeStudent/list.json' // 数据接口 , page: Lib.tablePage // 开启分页 @@ -126,26 +142,51 @@ 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 = $("#studentFormSearch"); - + 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 () { - var data = { - "classId":$("#studentForm select[name='classId']").val(), - "studentOrName":$("#studentForm input[name='studentOrName']").val(), - }; studentTable.reload({ - where: data, + where: getParam_s(), page: { curr: 1 } - }); }); }, @@ -229,6 +270,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 5a8bea34..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,11 +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; - }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){ @@ -38,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'] //头部右侧工具栏*/ @@ -161,7 +162,7 @@ layui.define([ 'form', 'laydate', 'table' ,'laytpl'], function(exports) { var htm = ''; /*htm += ''; htm += '';*/ - htm += ''; + htm += ''; return htm; } } @@ -235,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 5698774f..f704f6b6 100644 --- a/web/src/main/resources/templates/jlw/teacherOpenCourseStudentSigninLog/index.html +++ b/web/src/main/resources/templates/jlw/teacherOpenCourseStudentSigninLog/index.html @@ -29,8 +29,21 @@
- + + +
+
+ @@ -48,8 +61,7 @@ lay-filter="teacherOpenCourseStudentSigninLogTable">
- - +