From a56493bf94f43b0852bc82a9c2ad7f900cad0233 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9A=E4=B8=B9ab?= <1421553879@qq.com> Date: Tue, 18 Jul 2023 00:36:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E6=A1=A3=E5=AD=98=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../index.js | 46 +++++++++++++------ .../jlw/questionLogSummary/indexInfo.html | 4 ++ .../teacherOpenCourseHandsOn/indexInfoP.html | 4 ++ .../teacherOpenCourseHandsOn/indexInfoR.html | 4 ++ .../teacherOpenCourseHandsOn/indexInfoS.html | 4 ++ .../teacherOpenCourseHandsOn/indexInfoT.html | 4 ++ .../teacherOpenCourseHandsOn/indexInfoV.html | 4 ++ 7 files changed, 56 insertions(+), 14 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 92bdf352..9708a5e5 100644 --- a/web/src/main/resources/static/js/jlw/teacherOpenCourseStudentSigninLog/index.js +++ b/web/src/main/resources/static/js/jlw/teacherOpenCourseStudentSigninLog/index.js @@ -146,14 +146,13 @@ layui.define([ 'form', 'laydate', 'table','laytpl'], function(exports) { }); //触发行单击事件 table.on('row(studentTable)', function(obj){ - var param={ - 'teacherOpenCourseStudentSigninSettingId': teacherOpenCourseStudentSigninSettingId, - 'teacherOpenCourseStudentSigninSettingSessionTime':$("select[name='teacherOpenCourseStudentSigninSettingSessionTime']").val(), - 'studentId':obj.data.studentId - } - studentIdClick = obj.data.studentId; + var data = obj.data; + $(".layui-table-body tr ").attr({"style": "color:#666"});//其他tr恢复原样 + // console.log(obj.tr) //得到当前点击的tr + $(obj.tr).attr({"style": "color:#5FB878"});//改变当前tr颜色 + studentIdClick = data.studentId; teacherOpenCourseStudentSigninLogTable.reload({ - where: param, + where: getParam(), page: { curr: 1 } @@ -167,23 +166,22 @@ layui.define([ 'form', 'laydate', 'table','laytpl'], function(exports) { var btn_s = $("#searchFormSearch"); btn_s.on('click', function () { - console.log($("select[name='teacherOpenCourseStudentSigninSettingSessionTime']").val()) - var data = $("#searchForm").serializeJson(); + let param = getParam() teacherOpenCourseStudentSigninLogTable.reload({ - where: data, + where: param, page: { curr: 1 } }); - studentTable.reload({ + /*studentTable.reload({ where: getParam_s(), page: { curr: 1 } - }); + });*/ }); - var btn = $("#studentFormSearch"); + var btn = $("#studentFormSearch");//班级搜索 btn.on('click', function () { studentTable.reload({ where: getParam_s(), @@ -191,6 +189,15 @@ layui.define([ 'form', 'laydate', 'table','laytpl'], function(exports) { curr: 1 } }); + + let param = getParam(); + param.studentId = ""; + teacherOpenCourseStudentSigninLogTable.reload({ + where: param, + page: { + curr: 1 + } + }); }); }, @@ -279,9 +286,20 @@ layui.define([ 'form', 'laydate', 'table','laytpl'], function(exports) { } }) }; + //右侧表格 + function getParam() { + var data = $("#searchForm").serializeJson(); + var param = { + "studentSnOrName":$("#studentForm input[name='studentOrName']").val(), + 'teacherOpenCourseId':teacherOpenCourseId, + "studentId":studentIdClick, + }; + param = Object.assign(data, param); + return param; + } + //学生table搜索条件 function getParam_s(){ var param = { - "teacherOpenCourseStudentSigninSettingSessionTime":$("select[name='teacherOpenCourseStudentSigninSettingSessionTime']").val(), "schoolClassIdPlural":$("#studentForm select[name='classId']").val(), "studentSnOrName":$("#studentForm input[name='studentOrName']").val(), 'teacherOpenCourseId':teacherOpenCourseId diff --git a/web/src/main/resources/templates/jlw/questionLogSummary/indexInfo.html b/web/src/main/resources/templates/jlw/questionLogSummary/indexInfo.html index e15dcccf..388fc5db 100644 --- a/web/src/main/resources/templates/jlw/questionLogSummary/indexInfo.html +++ b/web/src/main/resources/templates/jlw/questionLogSummary/indexInfo.html @@ -312,6 +312,10 @@ layui.use(['form','laydate','table','laytpl'], function(){ }); //触发行单击事件 table.on('row(studentTable)', function(obj){ + var data = obj.data; + $(".layui-table-body tr ").attr({"style": "color:#666"});//其他tr恢复原样 + // console.log(obj.tr) //得到当前点击的tr + $(obj.tr).attr({"style": "color:#5FB878"});//改变当前tr颜色 var settingId = $("select[name='teacherOpenCourseQuestionSettingId']").val(); var param={ 'studentId':obj.data.studentId, diff --git a/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/indexInfoP.html b/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/indexInfoP.html index 48d22934..1400d3e7 100644 --- a/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/indexInfoP.html +++ b/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/indexInfoP.html @@ -192,6 +192,10 @@ }); //触发行单击事件 table.on('row(studentTable)', function(obj){ + var data = obj.data; + $(".layui-table-body tr ").attr({"style": "color:#666"});//其他tr恢复原样 + // console.log(obj.tr) //得到当前点击的tr + $(obj.tr).attr({"style": "color:#5FB878"});//改变当前tr颜色 var handsOnIdNew = $("select[name='handsOnId']").val(); var param={ 'studentId':obj.data.studentId, diff --git a/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/indexInfoR.html b/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/indexInfoR.html index 159b5832..4929ddb5 100644 --- a/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/indexInfoR.html +++ b/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/indexInfoR.html @@ -200,6 +200,10 @@ }); //触发行单击事件 table.on('row(studentTable)', function(obj){ + var data = obj.data; + $(".layui-table-body tr ").attr({"style": "color:#666"});//其他tr恢复原样 + // console.log(obj.tr) //得到当前点击的tr + $(obj.tr).attr({"style": "color:#5FB878"});//改变当前tr颜色 var handsOnIdNew = $("select[name='handsOnId']").val(); var param={ 'studentId':obj.data.studentId, diff --git a/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/indexInfoS.html b/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/indexInfoS.html index 64bdf802..faac6f35 100644 --- a/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/indexInfoS.html +++ b/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/indexInfoS.html @@ -206,6 +206,10 @@ }); //触发行单击事件 table.on('row(studentTable)', function(obj){ + var data = obj.data; + $(".layui-table-body tr ").attr({"style": "color:#666"});//其他tr恢复原样 + // console.log(obj.tr) //得到当前点击的tr + $(obj.tr).attr({"style": "color:#5FB878"});//改变当前tr颜色 var handsOnIdNew = $("select[name='handsOnId']").val(); var param={ 'studentId':obj.data.studentId, diff --git a/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/indexInfoT.html b/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/indexInfoT.html index 11be6a68..0b252408 100644 --- a/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/indexInfoT.html +++ b/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/indexInfoT.html @@ -220,6 +220,10 @@ }); //触发行单击事件 table.on('row(studentTable)', function(obj){ + var data = obj.data; + $(".layui-table-body tr ").attr({"style": "color:#666"});//其他tr恢复原样 + // console.log(obj.tr) //得到当前点击的tr + $(obj.tr).attr({"style": "color:#5FB878"});//改变当前tr颜色 var handsOnIdNew = $("select[name='handsOnId']").val(); var param={ 'studentId':obj.data.studentId, diff --git a/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/indexInfoV.html b/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/indexInfoV.html index 20f2b9fe..5bb6c79e 100644 --- a/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/indexInfoV.html +++ b/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/indexInfoV.html @@ -194,6 +194,10 @@ }); //触发行单击事件 table.on('row(studentTable)', function(obj){ + var data = obj.data; + $(".layui-table-body tr ").attr({"style": "color:#666"});//其他tr恢复原样 + // console.log(obj.tr) //得到当前点击的tr + $(obj.tr).attr({"style": "color:#5FB878"});//改变当前tr颜色 var handsOnIdNew = $("select[name='handsOnId']").val(); var param={ 'studentId':obj.data.studentId,