From 7cdd7505f9bb473f0efd1986a0c7df47f48d28c0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=A7=9A=E4=B8=B9ab?= <1421553879@qq.com>
Date: Fri, 13 Jan 2023 06:48:22 +0800
Subject: [PATCH] =?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
---
.../jlw/web/QuestionLogSummaryController.java | 20 +-
.../static/js/jlw/questionLogSummary/index.js | 60 ++--
.../teacherOpenCourseMergeCourseInfo/index.js | 17 +-
.../jlw/questionLogSummary/examIndex.html | 31 --
.../jlw/questionLogSummary/homeworkIndex.html | 261 ++++++++++++++--
.../jlw/questionLogSummary/index.html | 12 +
.../jlw/questionLogSummary/indexInfo.html | 290 ++++++++++++------
7 files changed, 492 insertions(+), 199 deletions(-)
delete mode 100644 web/src/main/resources/templates/jlw/questionLogSummary/examIndex.html
diff --git a/web/src/main/java/com/ibeetl/jlw/web/QuestionLogSummaryController.java b/web/src/main/java/com/ibeetl/jlw/web/QuestionLogSummaryController.java
index b09cc72d..0a517cee 100644
--- a/web/src/main/java/com/ibeetl/jlw/web/QuestionLogSummaryController.java
+++ b/web/src/main/java/com/ibeetl/jlw/web/QuestionLogSummaryController.java
@@ -176,10 +176,11 @@ public class QuestionLogSummaryController extends BaseController {
*/
@GetMapping(MODEL + "/index.do")
@Function("questionLogSummary.query")
- public ModelAndView index(Long teacherOpenCourseId) {
+ public ModelAndView index(Long teacherOpenCourseId, @RequestParam(required = false) ResourcesQuestionSnapshotFromTypeEnum questionSettingType) {
ModelAndView view = new ModelAndView("/jlw/questionLogSummary/index.html") ;
view.addObject("search", QuestionLogSummaryQuery.class.getName());
view.addObject("teacherOpenCourseId", teacherOpenCourseId);
+ view.addObject("questionSettingType", questionSettingType);
return view;
}
/**
@@ -189,19 +190,7 @@ public class QuestionLogSummaryController extends BaseController {
@GetMapping(MODEL + "/homeworkIndex.do")
@Function("questionLogSummary.query")
public ModelAndView homeworkIndex(Long teacherOpenCourseId) {
- ModelAndView view = new ModelAndView("/jlw/questionLogSummary/index.html") ;
- view.addObject("search", QuestionLogSummaryQuery.class.getName());
- view.addObject("teacherOpenCourseId", teacherOpenCourseId);
- return view;
- }
- /**
- *@author 姚丹
- *@data 2023/01/10
- */
- @GetMapping(MODEL + "/examIndex.do")
- @Function("questionLogSummary.query")
- public ModelAndView examIndex(Long teacherOpenCourseId) {
- ModelAndView view = new ModelAndView("/jlw/questionLogSummary/index.html") ;
+ ModelAndView view = new ModelAndView("/jlw/questionLogSummary/homeworkIndex.html") ;
view.addObject("search", QuestionLogSummaryQuery.class.getName());
view.addObject("teacherOpenCourseId", teacherOpenCourseId);
return view;
@@ -236,10 +225,11 @@ public class QuestionLogSummaryController extends BaseController {
*/
@GetMapping(MODEL + "/indexInfo.do")
@Function("questionLogSummary.query")
- public ModelAndView indexInfo(Long teacherOpenCourseId) {
+ public ModelAndView indexInfo(Long teacherOpenCourseId, @RequestParam(required = false) ResourcesQuestionSnapshotFromTypeEnum questionSettingType) {
ModelAndView view = new ModelAndView("/jlw/questionLogSummary/indexInfo.html") ;
view.addObject("search", QuestionLogSummaryQuery.class.getName());
view.addObject("teacherOpenCourseId", teacherOpenCourseId);
+ view.addObject("questionSettingType", questionSettingType);
return view;
}
diff --git a/web/src/main/resources/static/js/jlw/questionLogSummary/index.js b/web/src/main/resources/static/js/jlw/questionLogSummary/index.js
index 7b086e23..a8d5225b 100644
--- a/web/src/main/resources/static/js/jlw/questionLogSummary/index.js
+++ b/web/src/main/resources/static/js/jlw/questionLogSummary/index.js
@@ -7,27 +7,36 @@ layui.define([ 'form', 'laydate', 'table' ,'laytpl'], function(exports) {
var data = {};
var teacherOpenCourseId = $("input[name='teacherOpenCourseId']").val();
+ var questionSettingType = $("input[name='questionSettingType']").val();
+
var ret = Common.postAjax("/jlw/teacherOpenCourseQuestionSetting/analysis.json",
- {'teacherOpenCourseId':teacherOpenCourseId,'questionSettingType':'CHAPTER_EXERCISE'});
+ {'teacherOpenCourseId': teacherOpenCourseId, 'questionSettingType': questionSettingType});
if(ret.code==0){
data = ret.data;
- if($.isEmpty(data)){
- data = {
- questionTotalCount:'',
- avgCorrectCount:'',
- avgWrongCount:'',
- avgStudentScore:'',
- };
- }
- var getTpl = demo.innerHTML
- ,view = document.getElementById('view');
- laytpl(getTpl).render(data, function(html){
- view.innerHTML = html;
- });
}else {
Common.info(ret.msg);
}
+ if ($.isEmpty(data)) {
+ data = {
+ questionTotalCount: '',
+ avgCorrectCount: '',
+ avgWrongCount: '',
+ avgStudentScore: '',
+ avgQuestionLogSummarySuccessRate: ''
+ };
+ }
+ var getTpl, view;
+ if (questionSettingType == "CHAPTER_EXERCISE") {
+ getTpl = demo.innerHTML
+ , view = document.getElementById('view');
+ } else if (questionSettingType == "EXAM") {
+ getTpl = EXAM_demo.innerHTML
+ , view = document.getElementById('view');
+ }
+ laytpl(getTpl).render(data, function (html) {
+ view.innerHTML = html;
+ });
var view ={
init:function(){
var that = this
@@ -48,15 +57,16 @@ layui.define([ 'form', 'laydate', 'table' ,'laytpl'], function(exports) {
cellMinWidth: 100,
method : 'post',
url : Common.ctxPath + '/jlw/questionLogSummary/analysisPageList.json' // 数据接口
- ,where:{'teacherOpenCourseId':teacherOpenCourseId,'questionSettingType':'CHAPTER_EXERCISE'}
+ , where: {'teacherOpenCourseId': teacherOpenCourseId, 'questionSettingType': questionSettingType}
,page : Lib.tablePage // 开启分页
/* ,toolbar: '#toolbar_questionLogSummary' //自定义头部左侧工具栏
,defaultToolbar: ['filter', 'print', 'exports'] //头部右侧工具栏*/
,limit : 10,
cols : [ [ // 表头
+ {type: "numbers", title: "序号"},
{
field : 'questionSettingName',
- title : '章节名称',
+ title: questionSettingType == "CHAPTER_EXERCISE" ? '章节名称' : '考试名称',
align:"center",
hideField :false,
hide:$.isEmpty(sx_['questionSettingName'])?false:sx_['questionSettingName'],
@@ -67,6 +77,15 @@ layui.define([ 'form', 'laydate', 'table' ,'laytpl'], function(exports) {
align:"center",
hideField :false,
hide:$.isEmpty(sx_['questionTotalCount'])?false:sx_['questionTotalCount'],
+ hide: questionSettingType == "CHAPTER_EXERCISE" ? false : true,
+ },
+ {
+ field: 'avgFinishTime',
+ title: '考试时间',
+ align: "center",
+ hideField: false,
+ hide: $.isEmpty(sx_['avgFinishTime']) ? false : sx_['avgFinishTime'],
+ hide: questionSettingType == "EXAM" ? false : true,
},
{
field : 'avgCorrectCount',
@@ -84,7 +103,7 @@ layui.define([ 'form', 'laydate', 'table' ,'laytpl'], function(exports) {
},
{
field : 'avgStudentScore',
- title : '合计得分',
+ title: '平均得分',
align:"center",
hideField :false,
hide:$.isEmpty(sx_['avgStudentScore'])?false:sx_['avgStudentScore'],
@@ -158,7 +177,7 @@ layui.define([ 'form', 'laydate', 'table' ,'laytpl'], function(exports) {
})
});*/
layer.confirm('是否确定导出章节练习表吗?', function (index) {
- var url =Common.ctxPath + "/jlw/questionLogSummary/exportAnalysis.json?teacherOpenCourseId="+teacherOpenCourseId+'&questionSettingType=CHAPTER_EXERCISE';
+ var url = Common.ctxPath + "/jlw/questionLogSummary/exportAnalysis.json?teacherOpenCourseId=" + teacherOpenCourseId + '&questionSettingType=' + questionSettingType;
$.downFile(url);
layer.close(index);
});
@@ -197,9 +216,8 @@ layui.define([ 'form', 'laydate', 'table' ,'laytpl'], function(exports) {
});
});
}else if (obj.event === 'details') {
- console.log(teacherOpenCourseId)
- var url = "/jlw/questionLogSummary/indexInfo.do?teacherOpenCourseId="+teacherOpenCourseId;//,where:{'teacherOpenCourseId':teacherOpenCourseId,'questionSettingType':'CHAPTER_EXERCISE'}
- Common.openDlg(url,"/详情");
+ var url = "/jlw/questionLogSummary/indexInfo.do?teacherOpenCourseId=" + teacherOpenCourseId + "&questionSettingType=" + questionSettingType;
+ Common.openDlg(url, "详情");
}
})
}
diff --git a/web/src/main/resources/static/js/jlw/teacherOpenCourseMergeCourseInfo/index.js b/web/src/main/resources/static/js/jlw/teacherOpenCourseMergeCourseInfo/index.js
index 3edbaf48..3e817cc7 100644
--- a/web/src/main/resources/static/js/jlw/teacherOpenCourseMergeCourseInfo/index.js
+++ b/web/src/main/resources/static/js/jlw/teacherOpenCourseMergeCourseInfo/index.js
@@ -63,8 +63,8 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
var htm = '签到';
htm += '章节';
htm += '课程实操';
- htm += '作业';
- htm += '考试';
+ htm += '作业';
+ htm += '考试';
htm += '互动';
return htm;
}
@@ -165,22 +165,19 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
var url = "/jlw/teacherOpenCourseStudentSigninSetting/index.do?teacherOpenCourseId="+data.teacherOpenCourseId;
Common.openDlg(url,"《"+title+"》/ 签到数据存档");
}else if(obj.event === "chapter"){
- var url = "/jlw/questionLogSummary/index.do?teacherOpenCourseId="+data.teacherOpenCourseId;
+ var url = "/jlw/questionLogSummary/index.do?teacherOpenCourseId=" + data.teacherOpenCourseId + "&questionSettingType=CHAPTER_EXERCISE";
Common.openDlg(url,"《"+title+"》/ 章节练习存档");
}else if(obj.event === "kcsc"){
var url = "/jlw/questionLogSummary/index.do?teacherOpenCourseId="+data.teacherOpenCourseId;
Common.openDlg(url,"《"+title+"》/ 课程实操存档");
- }else if(obj.event === "zy"){
-
- var url = "/jlw/questionLogSummary/homeworkIndex.do?teacherOpenCourseId="+data.teacherOpenCourseId;
+ } else if (obj.event === "homework") {
+ var url = "/jlw/questionLogSummary/homeworkIndex.do?teacherOpenCourseId=" + data.teacherOpenCourseId;
Common.openDlg(url,"《"+title+"》/ 作业存档");
- }else if(obj.event === "ks"){
-
- var url = "/jlw/questionLogSummary/examIndex.do?teacherOpenCourseId="+data.teacherOpenCourseId;
+ } else if (obj.event === "exam") {
+ var url = "/jlw/questionLogSummary/index.do?teacherOpenCourseId=" + data.teacherOpenCourseId + "&questionSettingType=EXAM";
Common.openDlg(url,"《"+title+"》/ 考试存档");
}else if(obj.event === "hd"){
-
var url = "/jlw/teacherOpenCourseChatLog/index.do?teacherOpenCourseId="+data.teacherOpenCourseId;
Common.openDlg(url,"《"+title+"》/ 互动存档");
}
diff --git a/web/src/main/resources/templates/jlw/questionLogSummary/examIndex.html b/web/src/main/resources/templates/jlw/questionLogSummary/examIndex.html
deleted file mode 100644
index b92840fa..00000000
--- a/web/src/main/resources/templates/jlw/questionLogSummary/examIndex.html
+++ /dev/null
@@ -1,31 +0,0 @@
-
-