From 6b007f1f8ff254498ef59b0536f845ae36abbeaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9A=E4=B8=B9ab?= <1421553879@qq.com> Date: Mon, 31 Jul 2023 01:11:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=AD=98=E6=A1=A3-=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E4=BF=9D=E7=95=99=E4=B8=A4=E4=BD=8D=E5=B0=8F=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../js/jlw/teacherOpenCourseHandsOn/index.js | 3 +++ .../jlw/questionLogSummary/homeworkIndex.html | 17 ++++++++++------- .../templates/jlw/questionLogSummary/index.html | 6 +++--- .../jlw/teacherOpenCourseHandsOn/index.html | 10 +++++----- .../index.html | 2 +- 5 files changed, 22 insertions(+), 16 deletions(-) diff --git a/web/src/main/resources/static/js/jlw/teacherOpenCourseHandsOn/index.js b/web/src/main/resources/static/js/jlw/teacherOpenCourseHandsOn/index.js index 8cff1506..619ee948 100644 --- a/web/src/main/resources/static/js/jlw/teacherOpenCourseHandsOn/index.js +++ b/web/src/main/resources/static/js/jlw/teacherOpenCourseHandsOn/index.js @@ -11,6 +11,9 @@ layui.define([ 'form', 'laydate', 'table','laytpl' ], function(exports) { var ret = Common.getAjax("/jlw/teacherOpenCourseHandsOn/getHandsOnListCount.do?teacherOpenCourseId="+teacherOpenCourseId); if(ret.code==0){ data = ret.data; + for(var i in data){ + data[i] = (parseInt(data[i] * 100) / 100).toFixed(2); // 输出结果为 15.77 + } }else { Common.info(ret.msg); } diff --git a/web/src/main/resources/templates/jlw/questionLogSummary/homeworkIndex.html b/web/src/main/resources/templates/jlw/questionLogSummary/homeworkIndex.html index e3f0da16..0f8333ea 100644 --- a/web/src/main/resources/templates/jlw/questionLogSummary/homeworkIndex.html +++ b/web/src/main/resources/templates/jlw/questionLogSummary/homeworkIndex.html @@ -16,7 +16,7 @@

作业汇总:【 合计平均得分: - 合计及格率: + ;合计及格率:% 】

@@ -77,23 +77,26 @@ teacherOpenCourseId: teacherOpenCourseId, questionSettingType: questionSettingType }; - if(questionSettingType == "HOMEWORK_QUESTION"){//"作业-题目类型 + url = '/jlw/teacherOpenCourseQuestionSetting/analysis.json'; + /*if(questionSettingType == "HOMEWORK_QUESTION"){//"作业-题目类型 url = '/jlw/teacherOpenCourseQuestionSetting/analysis.json'; }else if(questionSettingType == "HOMEWORK_FILE"){//作业-附件类型 url = '/jlw/teacherOpenCourseQuestionSetting/analysis.json' - } + }*/ var ret = Common.postAjax(url, param); if (ret.code == 0) { var data = ret.data; if($.isEmpty(data)){ data = { - avgStudentScore:'0', - avgQuestionLogSummaryIsPass:'0' + avgStudentScore:'0.00', + avgQuestionLogSummaryIsPass:'0.00' } } - $("#avgStudentScore").html(data.avgStudentScore); - $("#avgQuestionLogSummaryIsPass").html(data.avgQuestionLogSummaryIsPass); + let avgStudentScore = data.avgStudentScore || 0.00; + let avgQuestionLogSummaryIsPass = data.avgQuestionLogSummaryIsPass || 0.00; + $("#avgStudentScore").html(avgStudentScore); + $("#avgQuestionLogSummaryIsPass").html(avgQuestionLogSummaryIsPass); } } diff --git a/web/src/main/resources/templates/jlw/questionLogSummary/index.html b/web/src/main/resources/templates/jlw/questionLogSummary/index.html index 182e83f3..73d3a32e 100644 --- a/web/src/main/resources/templates/jlw/questionLogSummary/index.html +++ b/web/src/main/resources/templates/jlw/questionLogSummary/index.html @@ -14,7 +14,7 @@ 合计练习题目数量: {{!$.isEmpty(d.questionTotalCount)?d.questionTotalCount:"0"}}; 合计平均答对数量:{{!$.isEmpty(d.avgCorrectCount)?d.avgCorrectCount:"0"}}; 合计平均答错数量:{{!$.isEmpty(d.avgWrongCount)?d.avgWrongCount:"0"}}; - 合计平均得分:{{!$.isEmpty(d.avgStudentScore)?d.avgStudentScore:"0"}} + 合计平均得分:{{!$.isEmpty(d.avgStudentScore)?d.avgStudentScore:"0.00"}} 】 @@ -24,8 +24,8 @@ 合计考试题目数量: {{!$.isEmpty(d.questionTotalCount)?d.questionTotalCount:"0"}}; 合计平均答对数量:{{!$.isEmpty(d.avgCorrectCount)?d.avgCorrectCount:"0"}}; 合计平均答错数量:{{!$.isEmpty(d.avgWrongCount)?d.avgWrongCount:"0"}}; - 合计平均准确率:{{!$.isEmpty(d.avgQuestionLogSummarySuccessRate)?d.avgQuestionLogSummarySuccessRate:"0"}}; - 合计平均得分:{{!$.isEmpty(d.avgStudentScore)?d.avgStudentScore:"0"}} + 合计平均准确率:{{!$.isEmpty(d.avgQuestionLogSummarySuccessRate)?d.avgQuestionLogSummarySuccessRate:"0.00"}}%; + 合计平均得分:{{!$.isEmpty(d.avgStudentScore)?d.avgStudentScore:"0.00"}} 】 diff --git a/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/index.html b/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/index.html index 237bab4c..d1b0d367 100644 --- a/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/index.html +++ b/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/index.html @@ -10,11 +10,11 @@
diff --git a/web/src/main/resources/templates/jlw/teacherOpenCourseStudentSigninSetting/index.html b/web/src/main/resources/templates/jlw/teacherOpenCourseStudentSigninSetting/index.html index 231e2250..a9395ca7 100644 --- a/web/src/main/resources/templates/jlw/teacherOpenCourseStudentSigninSetting/index.html +++ b/web/src/main/resources/templates/jlw/teacherOpenCourseStudentSigninSetting/index.html @@ -13,7 +13,7 @@ 合计签到次数: {{!$.isEmpty(d.totalSigninCount)?d.totalSigninCount:"0"}}次; 合计签到人数:{{!$.isEmpty(d.totalSigninNumber)?d.totalSigninNumber:"0"}}人; 合计缺勤:{{!$.isEmpty(d.totalUnSigninNumber)?d.totalUnSigninNumber:"0"}}人; - 合计到课率:{{!$.isEmpty(d.totalAttendanceRate)?d.totalAttendanceRate:"0"}}% + 合计到课率:{{!$.isEmpty(d.TotalAttendanceRate)?d.TotalAttendanceRate:"0"}}% 】