|
@@ -25,26 +25,27 @@ function build() {
|
|
|
createTeacherGrade(basic_teacher);
|
|
|
createBarPointChart(basic_college, 22, "学院成绩分析", "barPointGrade");
|
|
|
createLineChart(basic_main_question);
|
|
|
- createLineReverseChart(basic_sub_question);
|
|
|
+ createLineReverseChart(basic_question); // basic_sub_question
|
|
|
createDiscriminationDifficultyLevel(discrimination_level, "discrimination");
|
|
|
createDiscriminationDifficultyLevel(difficulty_level, "difficulty");
|
|
|
createBasicQuestion(basic_question);
|
|
|
createBasicMainQuestion(basic_main_question);
|
|
|
createBasicQuestionOption(basic_question_option);
|
|
|
createRangeLevel(range_level);
|
|
|
- createRange10TotalScore(range_10_totalScore);
|
|
|
- createRangeTotalScore(range_1_totalScore);
|
|
|
- createRangeSegment(range_segment_6);
|
|
|
+
|
|
|
+ createRange10TotalScore(range_10_totalScore);
|
|
|
+ createRangeTotalScore(range_1_totalScore);
|
|
|
+ createRangeSegment(range_segment_6);
|
|
|
createEchart();
|
|
|
fillCatalogNum();
|
|
|
}
|
|
|
|
|
|
function publishReady() {
|
|
|
- var eventEmitInterval = setInterval(function() {
|
|
|
+ var eventEmitInterval = setInterval(function () {
|
|
|
document.body.dispatchEvent(new Event("view-ready"));
|
|
|
}, 25);
|
|
|
|
|
|
- document.body.addEventListener("view-ready-acknowledged", function() {
|
|
|
+ document.body.addEventListener("view-ready-acknowledged", function () {
|
|
|
clearInterval(eventEmitInterval);
|
|
|
});
|
|
|
}
|
|
@@ -58,7 +59,7 @@ function createCover() {
|
|
|
function createBarPointChart(dataList, splitRange, title, chartType) {
|
|
|
var hTmpl = $("#page-chart").html();
|
|
|
var labelHeight = Math.round(1170 / splitRange);
|
|
|
- sectionArr(dataList, splitRange).forEach(function(item) {
|
|
|
+ sectionArr(dataList, splitRange).forEach(function (item) {
|
|
|
var chartId = getEchartId();
|
|
|
var $dom = tmpl(hTmpl, {
|
|
|
title: title,
|
|
@@ -78,7 +79,7 @@ function createBarPointChart(dataList, splitRange, title, chartType) {
|
|
|
function createTeacherScore(dataList) {
|
|
|
var hTmpl = $("#teacher-score").html();
|
|
|
var splitList = sectionArr(dataList, 6);
|
|
|
- splitList.forEach(function(item) {
|
|
|
+ splitList.forEach(function (item) {
|
|
|
var chartId = getEchartId();
|
|
|
var $dom = tmpl(hTmpl, {
|
|
|
chartId: chartId,
|
|
@@ -95,7 +96,7 @@ function createTeacherScore(dataList) {
|
|
|
// 总明细表
|
|
|
if (splitList.length > 1) {
|
|
|
var hTmpl2 = $("#teacher-score-table").html();
|
|
|
- sectionArr(dataList, 26).forEach(function(item) {
|
|
|
+ sectionArr(dataList, 26).forEach(function (item) {
|
|
|
var $dom = tmpl(hTmpl2, {
|
|
|
dataList: item,
|
|
|
pageTableClass: "teacher-table"
|
|
@@ -107,8 +108,8 @@ function createTeacherScore(dataList) {
|
|
|
// 任课老师班级成绩分析
|
|
|
function createTeacherGrade(dataList) {
|
|
|
var hTmpl = $("#teacher-grade").html();
|
|
|
- sectionArr(dataList, 3).forEach(function(item) {
|
|
|
- var chartList = item.map(function(elem) {
|
|
|
+ sectionArr(dataList, 3).forEach(function (item) {
|
|
|
+ var chartList = item.map(function (elem) {
|
|
|
var chartId = getEchartId();
|
|
|
addEchart({
|
|
|
chartId: chartId,
|
|
@@ -143,7 +144,7 @@ function createLineChart(dataList) {
|
|
|
// 小题难度分析
|
|
|
function createLineReverseChart(dataList) {
|
|
|
var hTmpl = $("#page-chart").html();
|
|
|
- sectionArr(dataList, 46).forEach(function(item) {
|
|
|
+ sectionArr(dataList, 46).forEach(function (item) {
|
|
|
var chartId = getEchartId();
|
|
|
var $dom = tmpl(hTmpl, {
|
|
|
title: "小题难度分析",
|
|
@@ -161,7 +162,7 @@ function createLineReverseChart(dataList) {
|
|
|
// 区分度等级分布,难度等级分布
|
|
|
function createDiscriminationDifficultyLevel(dataList, type) {
|
|
|
var hTmpl = $("#" + type + "-level-table").html();
|
|
|
- sectionArr(dataList, 4).forEach(function(item) {
|
|
|
+ sectionArr(dataList, 4).forEach(function (item) {
|
|
|
var $dom = tmpl(hTmpl, {
|
|
|
dataList: item
|
|
|
});
|
|
@@ -171,7 +172,7 @@ function createDiscriminationDifficultyLevel(dataList, type) {
|
|
|
// 题目统计特征
|
|
|
function createBasicQuestion(dataList) {
|
|
|
var hTmpl = $("#basic-question-table").html();
|
|
|
- sectionArr(dataList, 33).forEach(function(item) {
|
|
|
+ sectionArr(dataList, 33).forEach(function (item) {
|
|
|
var $dom = tmpl(hTmpl, {
|
|
|
dataList: item
|
|
|
});
|
|
@@ -189,7 +190,7 @@ function createBasicMainQuestion(dataList) {
|
|
|
// 选项分析
|
|
|
function createBasicQuestionOption(data) {
|
|
|
var hTmpl = $("#basic-question-option-table").html();
|
|
|
- sectionArr(data.questions, 32).forEach(function(item) {
|
|
|
+ sectionArr(data.questions, 32).forEach(function (item) {
|
|
|
var $dom = tmpl(hTmpl, {
|
|
|
options: data.options,
|
|
|
questions: item
|
|
@@ -200,7 +201,7 @@ function createBasicQuestionOption(data) {
|
|
|
// 考生分段比例
|
|
|
function createRangeLevel(dataList) {
|
|
|
var hTmpl = $("#range-level-table").html();
|
|
|
- sectionArr(dataList, 31).forEach(function(item) {
|
|
|
+ sectionArr(dataList, 31).forEach(function (item) {
|
|
|
var $dom = tmpl(hTmpl, {
|
|
|
dataList: item
|
|
|
});
|
|
@@ -216,7 +217,7 @@ function createRange10TotalScore(datas) {
|
|
|
}
|
|
|
];
|
|
|
pageList = pageList.concat(
|
|
|
- datas.classes.map(function(item) {
|
|
|
+ datas.classes.map(function (item) {
|
|
|
return {
|
|
|
title: item.name + " 总分频率分布",
|
|
|
dataList: item.ranges
|
|
@@ -224,7 +225,7 @@ function createRange10TotalScore(datas) {
|
|
|
})
|
|
|
);
|
|
|
var hTmpl = $("#range-totalScore").html();
|
|
|
- pageList.forEach(function(item, index) {
|
|
|
+ pageList.forEach(function (item, index) {
|
|
|
var chartId = getEchartId();
|
|
|
addEchart({
|
|
|
chartId: chartId,
|
|
@@ -252,7 +253,7 @@ function createRangeTotalScore(datas) {
|
|
|
}
|
|
|
];
|
|
|
pageList = pageList.concat(
|
|
|
- datas.classes.map(function(item) {
|
|
|
+ datas.classes.map(function (item) {
|
|
|
return {
|
|
|
title: item.name + " 总分一分一段表",
|
|
|
dataList: item.ranges
|
|
@@ -260,8 +261,8 @@ function createRangeTotalScore(datas) {
|
|
|
})
|
|
|
);
|
|
|
var hTmpl = $("#range-totalScore").html();
|
|
|
- pageList.forEach(function(item, index) {
|
|
|
- sectionArr(item.dataList, 28).forEach(function(elem) {
|
|
|
+ pageList.forEach(function (item, index) {
|
|
|
+ sectionArr(item.dataList, 28).forEach(function (elem) {
|
|
|
var $dom = tmpl(hTmpl, {
|
|
|
title: item.title,
|
|
|
pageTableClass: "table-ave-5 page-table-pad",
|
|
@@ -275,8 +276,8 @@ function createRangeTotalScore(datas) {
|
|
|
// 六段频率统计
|
|
|
function createRangeSegment(dataList) {
|
|
|
var hTmpl = $("#range-segment-table").html();
|
|
|
- dataList.map(function(item) {
|
|
|
- sectionArr(item.groups, 4).map(function(elem) {
|
|
|
+ dataList.map(function (item) {
|
|
|
+ sectionArr(item.groups, 4).map(function (elem) {
|
|
|
var $dom = tmpl(hTmpl, {
|
|
|
title: item.name + " 六段频率统计",
|
|
|
dataList: elem
|
|
@@ -316,7 +317,7 @@ function createNewBox(bodyDom, boxType) {
|
|
|
*
|
|
|
*/
|
|
|
function createEchart() {
|
|
|
- echartList.forEach(function(elem) {
|
|
|
+ echartList.forEach(function (elem) {
|
|
|
var charts = new Charts(
|
|
|
document.getElementById(elem.chartId),
|
|
|
elem.datas,
|
|
@@ -331,7 +332,7 @@ function createEchart() {
|
|
|
*/
|
|
|
function fillCatalogNum() {
|
|
|
var hTmpl = $("#page-foot").html();
|
|
|
- $(".report-box").each(function(index) {
|
|
|
+ $(".report-box").each(function (index) {
|
|
|
var page = index + 1;
|
|
|
var dom = tmpl(hTmpl, {
|
|
|
name: cover.name,
|