文件存档-统计保留两位小数

beetlsql3-dev
姚丹ab 2 years ago
parent cd657bff90
commit 6b007f1f8f

@ -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);
}

@ -16,7 +16,7 @@
<div class="layui-row" id="view">
<h2 style="float: left">作业汇总:【
合计平均得分:<span id="avgStudentScore"></span>
合计及格率:<span id="avgQuestionLogSummaryIsPass"></span>
;合计及格率:<span id="avgQuestionLogSummaryIsPass"></span>%
</h2>
<div class="layui-inline" style="float: right">
@ -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);
}
}

@ -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"}}
</h2>
</script>
@ -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"}}
</h2>
</script>

@ -10,11 +10,11 @@
</div>
<script type="text/html" id="demo">
<h2 style="float: left">课程实操汇总:【
观看视频平均得分: {{!$.isEmpty(d)?d.videoAvgScore:"0"}};
观看ppt平均得分{{!$.isEmpty(d)?d.pptAvgScore:"0"}};
理论测评平均得分:{{!$.isEmpty(d)?d.theoryAvgScore:"0"}};
实训操作步骤平均得分:{{!$.isEmpty(d)?d.stepAvgScore:"0"}}
报告撰写平均得分:{{!$.isEmpty(d)?d.reportAvgScore:"0"}}
观看视频平均得分: {{!$.isEmpty(d)?d.videoAvgScore:"0.00"}};
观看ppt平均得分{{!$.isEmpty(d)?d.pptAvgScore:"0.00"}};
理论测评平均得分:{{!$.isEmpty(d)?d.theoryAvgScore:"0.00"}};
实训操作步骤平均得分:{{!$.isEmpty(d)?d.stepAvgScore:"0.00"}};
报告撰写平均得分:{{!$.isEmpty(d)?d.reportAvgScore:"0.00"}}
</h2>
</script>

@ -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"}}%
</h2>
</script>

Loading…
Cancel
Save