From 66e9f48f4a9b1494be32998434587c0d1fa3d06a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9A=E4=B8=B9ab?= <1421553879@qq.com> Date: Fri, 21 Jul 2023 14:13:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E6=A1=A3=E5=AD=98=E6=A1=A3-=E6=89=80?= =?UTF-8?q?=E6=9C=89=E4=BC=A0=E5=8F=82=EF=BC=8C=E5=AE=8C=E5=B7=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../index.js | 45 +++--- .../jlw/questionLogSummary/homeworkIndex.html | 8 +- .../jlw/questionLogSummary/index.html | 18 +-- .../jlw/questionLogSummary/indexInfo.html | 128 ++++++++++++++---- .../indexInfoStu.html | 14 +- .../teacherOpenCourseHandsOn/indexInfoP.html | 10 +- .../teacherOpenCourseHandsOn/indexInfoR.html | 7 + .../teacherOpenCourseHandsOn/indexInfoS.html | 10 +- .../teacherOpenCourseHandsOn/indexInfoT.html | 9 +- .../teacherOpenCourseHandsOn/indexInfoV.html | 10 +- 10 files changed, 190 insertions(+), 69 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 db3ee948..aecbd58c 100644 --- a/web/src/main/resources/static/js/jlw/teacherOpenCourseStudentSigninLog/index.js +++ b/web/src/main/resources/static/js/jlw/teacherOpenCourseStudentSigninLog/index.js @@ -48,7 +48,7 @@ layui.define([ 'form', 'laydate', 'table','laytpl'], function(exports) { cellMinWidth: 100, method : 'post', url : Common.ctxPath + '/jlw/teacherOpenCourseStudentSigninLog/list.json' // 数据接口 - ,where: {'teacherOpenCourseStudentSigninSettingId':teacherOpenCourseStudentSigninSettingId} + ,where: getParam() ,page : Lib.tablePage // 开启分页 /* ,toolbar: '#toolbar_teacherOpenCourseStudentSigninLog' //自定义头部左侧工具栏 ,defaultToolbar: ['filter', 'print', 'exports'] //头部右侧工具栏*/ @@ -152,7 +152,7 @@ layui.define([ 'form', 'laydate', 'table','laytpl'], function(exports) { $(obj.tr).attr({"style": "color:#5FB878"});//改变当前tr颜色 studentIdClick = data.studentId; teacherOpenCourseStudentSigninLogTable.reload({ - where: getParam(), + where: getParam(studentIdClick), page: { curr: 1 } @@ -166,34 +166,32 @@ layui.define([ 'form', 'laydate', 'table','laytpl'], function(exports) { var btn_s = $("#searchFormSearch"); btn_s.on('click', function () { - let param = getParam() + studentIdClick = ""; teacherOpenCourseStudentSigninLogTable.reload({ - where: param, + where: getParam(), page: { curr: 1 } }); - /*studentTable.reload({ + studentTable.reload({ where: getParam_s(), page: { curr: 1 } - });*/ + }); }); var btn = $("#studentFormSearch");//班级搜索 btn.on('click', function () { + studentIdClick = ""; studentTable.reload({ where: getParam_s(), page: { curr: 1 } }); - - let param = getParam(); - param.studentId = ""; teacherOpenCourseStudentSigninLogTable.reload({ - where: param, + where: getParam(), page: { curr: 1 } @@ -233,17 +231,22 @@ layui.define([ 'form', 'laydate', 'table','laytpl'], function(exports) { exportDocument: function () { layui.use([ 'teacherOpenCourseStudentSigninLogApi' ], function() { var teacherOpenCourseStudentSigninLogApi = layui.teacherOpenCourseStudentSigninLogApi - Common.openConfirm("确认要导出签到详情表?", function() { + Common.openConfirm("确认要导出-签到详情表?", function() { // teacherOpenCourseStudentSigninLogApi.exportExcel($("#searchForm"), function(fileId) { // // Lib.download(fileId); // }) - - var value ="?teacherOpenCourseId="+teacherOpenCourseId - +'&teacherOpenCourseStudentSigninSettingSessionTime='+$("select[name='teacherOpenCourseStudentSigninSettingSessionTime']").val() - + '&studentSnOrName=' +$("input[name='studentOrName']").val() - +"&studentId="+studentIdClick; - $.downFile(Common.ctxPath + "/api/teacherOpenCourseStudentSigninLog/export.do"+value, - "签到详情表"); + var url = "/api/teacherOpenCourseStudentSigninLog/export.do" + let value = ""; + let param = getParam(studentIdClick); + for(let k in param) { + if(!$.isEmpty(param[k])){ + value+='&'+k+"="+param[k]; + } + } + if(!$.isEmpty(value)){ + url = url +"?" + value.slice(1); + } + $.downFile(Common.ctxPath + url,"签到详情表"); }) }); }, @@ -288,12 +291,12 @@ layui.define([ 'form', 'laydate', 'table','laytpl'], function(exports) { }) }; //右侧表格 - function getParam() { + function getParam(studentId) { var data = $("#searchForm").serializeJson(); var param = { - "studentSnOrName":$("#studentForm input[name='studentOrName']").val(), + 'teacherOpenCourseStudentSigninSettingId':teacherOpenCourseStudentSigninSettingId, 'teacherOpenCourseId':teacherOpenCourseId, - "studentId":studentIdClick, + "studentId":studentId, }; param = Object.assign(data, param); return param; diff --git a/web/src/main/resources/templates/jlw/questionLogSummary/homeworkIndex.html b/web/src/main/resources/templates/jlw/questionLogSummary/homeworkIndex.html index 5172e900..b4b0f625 100644 --- a/web/src/main/resources/templates/jlw/questionLogSummary/homeworkIndex.html +++ b/web/src/main/resources/templates/jlw/questionLogSummary/homeworkIndex.html @@ -259,7 +259,13 @@ }); } else if (obj.event === 'details') { var url = "/jlw/questionLogSummary/indexInfo.do?teacherOpenCourseId=" + teacherOpenCourseId + "&questionSettingType=" + questionSettingType + "&questionSettingId=" + data.questionSettingId; - Common.openDlg(url, "详情"); + var title = ""; + if(questionSettingType == "HOMEWORK_QUESTION"){ + title = "题库作业详情" + }else if(questionSettingType == "HOMEWORK_FILE"){ + title = "附件作业详情" + } + Common.openDlg(url, title); } }) } diff --git a/web/src/main/resources/templates/jlw/questionLogSummary/index.html b/web/src/main/resources/templates/jlw/questionLogSummary/index.html index 38eeb54c..ac106a8f 100644 --- a/web/src/main/resources/templates/jlw/questionLogSummary/index.html +++ b/web/src/main/resources/templates/jlw/questionLogSummary/index.html @@ -11,21 +11,21 @@ diff --git a/web/src/main/resources/templates/jlw/questionLogSummary/indexInfo.html b/web/src/main/resources/templates/jlw/questionLogSummary/indexInfo.html index 388fc5db..ec5010df 100644 --- a/web/src/main/resources/templates/jlw/questionLogSummary/indexInfo.html +++ b/web/src/main/resources/templates/jlw/questionLogSummary/indexInfo.html @@ -61,8 +61,7 @@ @@ -124,6 +123,8 @@ layui.use(['form','laydate','table','laytpl'], function(){ var questionSettingId = $("input[name='questionSettingId']").val(); var teacherOpenCourseId=$("input[name='teacherOpenCourseId']").val(); var questionSettingType = $("input[name='questionSettingType']").val(); + var studentIdClick = ""; + laydate.render({ elem: '#test5' ,type: 'datetime' @@ -158,9 +159,18 @@ layui.use(['form','laydate','table','laytpl'], function(){ initTable:function(){ var sx_ = localStorage.getItem("teacherOpenCourseQuestionLogTable_field_" + Common.userInfoId); //筛选值显示、隐藏缓存 if($.isEmpty(sx_)){sx_ = {};}else {sx_ = JSON.parse(sx_);} - var url = '/api/teacherOpenCourseQuestionLog/list.do?questionLogAddType=FINALLY_SUBMIT';//"作业-题目类型 + var url = ""; if(questionSettingType == 'HOMEWORK_FILE'){//作业-附件类型 url = '/jlw/teacherOpenCourseQuestionLog/homeworkFileLogPageList.json'; + //url = "/api/teacherOpenCourseQuestionLog/getPageList.do“ + }else if(questionSettingType == 'HOMEWORK_QUESTION'){//作业-题库类型 + //api/teacherOpenCourseQuestionLog/list.do + url = '/api/teacherOpenCourseQuestionLog/list.do';//"作业-题目类型 + //url = "/api/questionLogSummary/getPageList.do"; + }else if(questionSettingType == 'CHAPTER_EXERCISE'){//章节 + url = "/api/teacherOpenCourseQuestionLog/getPageList.do"; + }else if(questionSettingType == 'EXAM'){//考试 + url ="/api/teacherOpenCourseQuestionLog/getPageList.do"; } teacherOpenCourseQuestionLogTable = table.render({ elem: '#teacherOpenCourseQuestionLogTable', @@ -171,7 +181,7 @@ layui.use(['form','laydate','table','laytpl'], function(){ ,page : Lib.tablePage // 开启分页 /* ,toolbar: '#toolbar_teacherOpenCourseQuestionLog' //自定义头部左侧工具栏 ,defaultToolbar: ['filter', 'print', 'exports'] //头部右侧工具栏*/ - ,where:{'teacherOpenCourseQuestionSettingId':questionSettingId} + ,where:getParam() ,limit : 10, cols : [ [ // 表头 { @@ -316,18 +326,14 @@ layui.use(['form','laydate','table','laytpl'], function(){ $(".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, - 'teacherOpenCourseQuestionSettingId':$.isEmpty(settingId)?questionSettingId:settingId, - }; - if(questionSettingType == 'HOMEWORK_FILE'){ + studentIdClick = obj.data.studentId; + /*if(questionSettingType == 'HOMEWORK_FILE'){ url = 'jlw/teacherOpenCourseQuestionLog/homeworkFileLogPageList.json'; param = {"questionSettingIdPlural":questionSettingId}; - } + }*/ teacherOpenCourseQuestionLogTable.reload({ - where: param, + where: getParam(studentIdClick), page: { curr: 1 } @@ -341,11 +347,15 @@ layui.use(['form','laydate','table','laytpl'], function(){ var btn_s = $("#searchFormSearch"); btn_s.on('click', function () { - var data = $("#searchForm").serializeJson(); - data.teacherOpenCourseQuestionSettingId =$.isEmpty(data.teacherOpenCourseQuestionSettingId)?questionSettingId:data.teacherOpenCourseQuestionSettingId - + studentIdClick = ""; teacherOpenCourseQuestionLogTable.reload({ - where: data, + where: getParam(), + page: { + curr: 1 + } + }); + studentTable.reload({ + where: getParam_s(), page: { curr: 1 } @@ -354,12 +364,19 @@ layui.use(['form','laydate','table','laytpl'], function(){ var btn = $("#studentFormSearch"); btn.on('click', function () { + studentIdClick = ""; studentTable.reload({ where: getParam_s(), page: { curr: 1 } }); + teacherOpenCourseQuestionLogTable.reload({ + where: getParam(), + page: { + curr: 1 + } + }); }); }, @@ -402,26 +419,35 @@ layui.use(['form','laydate','table','laytpl'], function(){ Common.openDlg(url, "teacherOpenCourseQuestionLog管理>上传"); },*/ exportDocument: function () { - var url,title; - var settingId = $("select[name='teacherOpenCourseQuestionSettingId']").val(); - settingId = $.isEmpty(settingId)?questionSettingId:settingId; - + var url = "",title = "",value = ""; + var param = getParam(studentIdClick); + param.questionSettingType = questionSettingType; if(questionSettingType == "CHAPTER_EXERCISE"){///jlw/questionLogSummary/homeworkFileAnalysisExport.json title = '章节详情表'; - url = "/api/teacherOpenCourseQuestionLog/zyDetailExport.do?teacherOpenCourseQuestionSettingId=" + settingId; + //url = "/api/teacherOpenCourseQuestionLog/zyDetailExport.do"; + url = "/api/teacherOpenCourseQuestionLog/exportInfo.do" }else if(questionSettingType == "EXAM"){ title = '考试详情表'; - url = "/api/teacherOpenCourseQuestionLog/zyDetailExport.do?teacherOpenCourseQuestionSettingId=" + settingId; + //url = "/api/teacherOpenCourseQuestionLog/zyDetailExport.do"; + url = "/api/teacherOpenCourseQuestionLog/exportInfo.do"; }else if(questionSettingType == "HOMEWORK_FILE"){ title = '附件作业详情表'; - url = '/jlw/questionLogSummary/homeworkFileAnalysisExport.json?teacherOpenCourseId'+ teacherOpenCourseId + '&questionSettingType=' + questionSettingType; + url = '/jlw/questionLogSummary/homeworkFileAnalysisExport.json'; }else if(questionSettingType == "HOMEWORK_QUESTION"){ title ="题库作业详情表"; - url = "/api/teacherOpenCourseQuestionLog/zyDetailExport.do?teacherOpenCourseQuestionSettingId=" + settingId; + //url = "/api/teacherOpenCourseQuestionLog/zyDetailExport.do"; + url = "/api/teacherOpenCourseQuestionLog/exportInfo.do"; } - - Common.openConfirm("确认要导出"+title+"?", function (index) { - $.downFile(Common.ctxPath + url); + for(let k in param) { + if(!$.isEmpty(param[k])){ + value+='&'+k+"="+param[k]; + } + } + if(!$.isEmpty(value)){ + url = url +"?" + value.slice(1); + } + Common.openConfirm("确认要导出-"+title+"?", function (index) { + $.downFile(Common.ctxPath + url,title); layer.close(index); }) }, @@ -459,13 +485,55 @@ layui.use(['form','laydate','table','laytpl'], function(){ } }) }; + function getParam(studentId) { + var param = $("#searchForm").serializeJson(); + param.studentId = studentId; + if(questionSettingType == "CHAPTER_EXERCISE"){//章节 + param.teacherOpenCourseMergeCourseInfoId = ""; + } + if(questionSettingType == "HOMEWORK_QUESTION"){//作业_题库 + param.questionSettingType = questionSettingType; + } + if($.isEmpty(param.teacherOpenCourseQuestionSettingId)){ + param.teacherOpenCourseQuestionSettingId = questionSettingId; + } + if(questionSettingType == "HOMEWORK_FILE"){ + param.questionSettingType = questionSettingType; + param.teacherOpenCourseQuestionLogStatus = 1; + } + if(questionSettingType == "EXAM"){ + param.teacherOpenCourseId = teacherOpenCourseId; + } + return param; + } function getParam_s(){ + var schoolClassId = $("#studentForm select[name='classId']").val(); + var teacherOpenCourseQuestionSettingId = $("#searchForm select[name='teacherOpenCourseQuestionSettingId']").val()||questionSettingId; var param = { - "schoolClassIdPlural":$("#studentForm select[name='classId']").val(), - "studentSnOrName":$("#studentForm input[name='studentOrName']").val(), - 'teacherOpenCourseId': teacherOpenCourseId + "studentOrName":$("#studentForm input[name='studentOrName']").val(), + "teacherOpenCourseQuestionSettingId":teacherOpenCourseQuestionSettingId, }; + if(questionSettingType == "CHAPTER_EXERCISE"){//章节 + param.schoolClassIdPlural = schoolClassId; + param.teacherOpenCourseId = teacherOpenCourseId; + param.teacherOpenCourseQuestionLogStatus = 2; + } + + if(questionSettingType == "HOMEWORK_QUESTION"){//作业_题库 + param.schoolClassId = schoolClassId; + param.teacherOpenCourseQuestionLogStatus = 2; + } + if(questionSettingType == "HOMEWORK_FILE"){//作业_附件 + param.schoolClassId = schoolClassId; + param.questionSettingType = questionSettingType; + param.teacherOpenCourseQuestionLogStatus = 1; + } + if(questionSettingType == "EXAM"){//考试 + param.teacherOpenCourseQuestionLogStatus = 2; + param.type = 1; + param.schoolClassId = schoolClassId; + } return param } diff --git a/web/src/main/resources/templates/jlw/teacherOpenCourseChatLog/indexInfoStu.html b/web/src/main/resources/templates/jlw/teacherOpenCourseChatLog/indexInfoStu.html index 286cf976..4d83dbf2 100644 --- a/web/src/main/resources/templates/jlw/teacherOpenCourseChatLog/indexInfoStu.html +++ b/web/src/main/resources/templates/jlw/teacherOpenCourseChatLog/indexInfoStu.html @@ -194,9 +194,17 @@ layui.use(['form','laydate','table','laytpl'], function(){ initToolBar:function(){ toolbar = { exportDocument: function () { - var param = '?teacherOpenCourseId='+teacherOpenCourseId+'&chatLogSendType=student_ask'; - var url = '/api/teacherOpenCourseChatLog/exportPageList.do'+param; - + var value = ""; + var param = getParam();//'?teacherOpenCourseId='+teacherOpenCourseId+'&chatLogSendType=student_ask'; + var url = '/api/teacherOpenCourseChatLog/exportPageList.do'; + for(let k in param) { + if(!$.isEmpty(param[k])){ + value+='&'+k+"="+param[k]; + } + } + if(!$.isEmpty(value)){ + url = url +"?" + value.slice(1); + } layer.confirm("确认要导出学生提问详情表?", function (index) { $.downFile(Common.ctxPath + url,'学生提问详情','post'); layer.close(index); diff --git a/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/indexInfoP.html b/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/indexInfoP.html index 69716851..d23f0fc7 100644 --- a/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/indexInfoP.html +++ b/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/indexInfoP.html @@ -213,10 +213,16 @@ var btn_s = $("#searchFormSearch"); btn_s.on('click', function () { /*var data = $("#searchForm").serializeJson();*/ - var param = getParam(studentIdClick); + studentIdClick = ""; + studentTable.reload({ + where: getParam_s(), + page: { + curr: 1 + } + }); studentHandsOnTaskPptTable.reload({ - where: param, + where: getParam(), page: { curr: 1 } diff --git a/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/indexInfoR.html b/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/indexInfoR.html index 7f8e61c8..5f45236d 100644 --- a/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/indexInfoR.html +++ b/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/indexInfoR.html @@ -220,6 +220,13 @@ var btn_s = $("#searchFormSearch"); btn_s.on('click', function () { + studentIdClick = ""; + studentTable.reload({ + where: getParam_s(), + page: { + curr: 1 + } + }); studentHandsOnTaskVideoTable.reload({ where: getParam(studentIdClick), page: { diff --git a/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/indexInfoS.html b/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/indexInfoS.html index 6a357e3b..b9f98890 100644 --- a/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/indexInfoS.html +++ b/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/indexInfoS.html @@ -226,12 +226,20 @@ var btn_s = $("#searchFormSearch"); btn_s.on('click', function () { + studentIdClick = ""; + studentTable.reload({ + where: getParam_s(), + page: { + curr: 1 + } + }); studentHandsOnTaskVideoTable.reload({ - where: getParam(studentIdClick), + where: getParam(), page: { curr: 1 } }); + }); var btn = $("#studentFormSearch"); diff --git a/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/indexInfoT.html b/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/indexInfoT.html index 201747a3..181faec0 100644 --- a/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/indexInfoT.html +++ b/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/indexInfoT.html @@ -239,13 +239,20 @@ var btn_s = $("#searchFormSearch"); btn_s.on('click', function () { - var param = getParam(studentIdClick); + studentIdClick = ""; + var param = getParam(); studentHandsOnTaskTheoryTable.reload({ where: param, page: { curr: 1 } }); + studentTable.reload({ + where: getParam_s(), + page: { + curr: 1 + } + }); }); var btn = $("#studentFormSearch"); diff --git a/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/indexInfoV.html b/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/indexInfoV.html index 34176cbd..f33490ea 100644 --- a/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/indexInfoV.html +++ b/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/indexInfoV.html @@ -216,8 +216,16 @@ var btn_s = $("#searchFormSearch"); btn_s.on('click', function () { + studentIdClick = ""; studentHandsOnTaskVideoTable.reload({ - where: getParam(studentIdClick), + where: getParam(), + page: { + curr: 1 + } + }); + + studentTable.reload({ + where: getParam_s(), page: { curr: 1 }