|
@@ -9,42 +9,90 @@ publishReady();
|
|
function build() {
|
|
function build() {
|
|
if (dataStatic.code && dataStatic.code === "500") {
|
|
if (dataStatic.code && dataStatic.code === "500") {
|
|
var hTmpl = $("#page-error").html();
|
|
var hTmpl = $("#page-error").html();
|
|
- var $dom = tmpl(hTmpl, { message: dataStatic.message });
|
|
|
|
|
|
+ var $dom = tmpl(hTmpl, {
|
|
|
|
+ message: dataStatic.message
|
|
|
|
+ });
|
|
$bodyMain.append(createNewBox($dom));
|
|
$bodyMain.append(createNewBox($dom));
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
var datas = dataParse(dataStatic);
|
|
var datas = dataParse(dataStatic);
|
|
|
|
|
|
createCover(datas.cover);
|
|
createCover(datas.cover);
|
|
|
|
+
|
|
|
|
+ // 客观题成绩分析
|
|
|
|
+ createTableList(
|
|
|
|
+ datas.basic_question_objective,
|
|
|
|
+ 32,
|
|
|
|
+ "客观题成绩分析",
|
|
|
|
+ "question-table"
|
|
|
|
+ );
|
|
createBarPointChart(
|
|
createBarPointChart(
|
|
datas.basic_question_objective,
|
|
datas.basic_question_objective,
|
|
26,
|
|
26,
|
|
"客观题成绩分析",
|
|
"客观题成绩分析",
|
|
"barPointTopic"
|
|
"barPointTopic"
|
|
);
|
|
);
|
|
|
|
+
|
|
|
|
+ // 主观题成绩分析
|
|
|
|
+ createTableList(
|
|
|
|
+ datas.basic_question_subjective,
|
|
|
|
+ 32,
|
|
|
|
+ "主观题成绩分析",
|
|
|
|
+ "question-table"
|
|
|
|
+ );
|
|
createBarPointChart(
|
|
createBarPointChart(
|
|
datas.basic_question_subjective,
|
|
datas.basic_question_subjective,
|
|
26,
|
|
26,
|
|
"主观题成绩分析",
|
|
"主观题成绩分析",
|
|
"barPointTopic"
|
|
"barPointTopic"
|
|
);
|
|
);
|
|
|
|
+
|
|
|
|
+ // 班级成绩分析
|
|
|
|
+ createTableList(datas.basic_class, 32, "班级成绩分析", "classes-table");
|
|
createBarPointChart(datas.basic_class, 22, "班级成绩分析", "barPointGrade");
|
|
createBarPointChart(datas.basic_class, 22, "班级成绩分析", "barPointGrade");
|
|
|
|
+
|
|
|
|
+ // 任课老师成绩分析
|
|
createTeacherScore(datas.basic_teacher);
|
|
createTeacherScore(datas.basic_teacher);
|
|
createTeacherGrade(datas.basic_teacher);
|
|
createTeacherGrade(datas.basic_teacher);
|
|
|
|
+
|
|
|
|
+ // 学院成绩分析;
|
|
|
|
+ createTableList(datas.basic_college, 32, "学院成绩分析", "college-table");
|
|
createBarPointChart(datas.basic_college, 22, "学院成绩分析", "barPointGrade");
|
|
createBarPointChart(datas.basic_college, 22, "学院成绩分析", "barPointGrade");
|
|
|
|
+
|
|
|
|
+ // 大题难度分析
|
|
createLineChart(datas.basic_main_question);
|
|
createLineChart(datas.basic_main_question);
|
|
|
|
+
|
|
|
|
+ // 小题难度分析
|
|
createLineReverseChart(datas.basic_question); // basic_sub_question
|
|
createLineReverseChart(datas.basic_question); // basic_sub_question
|
|
|
|
+
|
|
|
|
+ // 区分度分析
|
|
createDiscriminationDifficultyLevel(
|
|
createDiscriminationDifficultyLevel(
|
|
datas.discrimination_level,
|
|
datas.discrimination_level,
|
|
"discrimination"
|
|
"discrimination"
|
|
);
|
|
);
|
|
|
|
+
|
|
|
|
+ // 大题难度等级构成分析
|
|
createDiscriminationDifficultyLevel(datas.difficulty_level, "difficulty");
|
|
createDiscriminationDifficultyLevel(datas.difficulty_level, "difficulty");
|
|
- createBasicQuestion(datas.basic_question);
|
|
|
|
|
|
+
|
|
|
|
+ // 大题结构特征
|
|
createBasicMainQuestion(datas.basic_main_question);
|
|
createBasicMainQuestion(datas.basic_main_question);
|
|
|
|
+
|
|
|
|
+ // 题目统计特征
|
|
|
|
+ createBasicQuestion(datas.basic_question);
|
|
|
|
+
|
|
|
|
+ // 选项分析
|
|
createBasicQuestionOption(datas.basic_question_option);
|
|
createBasicQuestionOption(datas.basic_question_option);
|
|
|
|
+
|
|
|
|
+ // 考生分段比例;
|
|
createRangeLevel(datas.range_level);
|
|
createRangeLevel(datas.range_level);
|
|
|
|
+
|
|
|
|
+ // 频率分布分析
|
|
createRange10TotalScore(datas.range_10_totalScore);
|
|
createRange10TotalScore(datas.range_10_totalScore);
|
|
|
|
+
|
|
|
|
+ // 一分一段分析
|
|
createRangeTotalScore(datas.range_1_totalScore);
|
|
createRangeTotalScore(datas.range_1_totalScore);
|
|
|
|
+
|
|
|
|
+ // 六段频率
|
|
createRangeSegment(datas.range_segment_6);
|
|
createRangeSegment(datas.range_segment_6);
|
|
createEchart();
|
|
createEchart();
|
|
fillCatalogNum();
|
|
fillCatalogNum();
|
|
@@ -65,6 +113,20 @@ function createCover(cover) {
|
|
var $dom = $(tmpl(hTmpl, cover));
|
|
var $dom = $(tmpl(hTmpl, cover));
|
|
$bodyMain.append($dom);
|
|
$bodyMain.append($dom);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+// 题型成绩分析,班级成绩分析,学院成绩分析, 题目难度
|
|
|
|
+function createTableList(dataList, splitRange, title, tableType) {
|
|
|
|
+ var hTmpl = $("#" + tableType).html();
|
|
|
|
+ sectionArr(dataList, splitRange).forEach(function(item) {
|
|
|
|
+ var $dom = tmpl(hTmpl, {
|
|
|
|
+ title: title,
|
|
|
|
+ pageTableClass: tableType + " level-table",
|
|
|
|
+ dataList: item
|
|
|
|
+ });
|
|
|
|
+ $bodyMain.append(createNewBox($dom));
|
|
|
|
+ });
|
|
|
|
+}
|
|
|
|
+
|
|
// 题型成绩分析,班级成绩分析,学院成绩分析
|
|
// 题型成绩分析,班级成绩分析,学院成绩分析
|
|
function createBarPointChart(dataList, splitRange, title, chartType) {
|
|
function createBarPointChart(dataList, splitRange, title, chartType) {
|
|
var hTmpl = $("#page-chart").html();
|
|
var hTmpl = $("#page-chart").html();
|
|
@@ -131,7 +193,17 @@ function createTeacherGrade(dataList) {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
+ // class-table
|
|
|
|
+ var classHTmpl = $("#teacher-class-table").html();
|
|
|
|
+ groupSectionArrDynamic(dataList, 32, "classes").forEach(function(item) {
|
|
|
|
+ var $dom = tmpl(classHTmpl, {
|
|
|
|
+ dataList: item,
|
|
|
|
+ pageTableClass: "teacher-class-table level-table"
|
|
|
|
+ });
|
|
|
|
+ $bodyMain.append(createNewBox($dom));
|
|
|
|
+ });
|
|
|
|
|
|
|
|
+ // class-chart
|
|
sectionArr(sectionDataList, 3).forEach(function(item) {
|
|
sectionArr(sectionDataList, 3).forEach(function(item) {
|
|
var chartList = item.map(function(elem) {
|
|
var chartList = item.map(function(elem) {
|
|
var chartId = getEchartId();
|
|
var chartId = getEchartId();
|
|
@@ -152,6 +224,9 @@ function createTeacherGrade(dataList) {
|
|
// 大题难度分析
|
|
// 大题难度分析
|
|
function createLineChart(dataList) {
|
|
function createLineChart(dataList) {
|
|
if (!dataList.length) return;
|
|
if (!dataList.length) return;
|
|
|
|
+ // table-parse
|
|
|
|
+ createTableList(dataList, 32, "大题难度分析", "question-difficulty-table");
|
|
|
|
+
|
|
if (dataList.length > 6) {
|
|
if (dataList.length > 6) {
|
|
createLineReverseChart(dataList, "大题难度分析");
|
|
createLineReverseChart(dataList, "大题难度分析");
|
|
return;
|
|
return;
|
|
@@ -173,6 +248,9 @@ function createLineChart(dataList) {
|
|
}
|
|
}
|
|
// 小题难度分析
|
|
// 小题难度分析
|
|
function createLineReverseChart(dataList, tableName) {
|
|
function createLineReverseChart(dataList, tableName) {
|
|
|
|
+ // table-parse
|
|
|
|
+ createTableList(dataList, 32, "小题难度分析", "question-difficulty-table");
|
|
|
|
+
|
|
var hTmpl = $("#page-chart").html();
|
|
var hTmpl = $("#page-chart").html();
|
|
sectionArr(dataList, 46).forEach(function(item) {
|
|
sectionArr(dataList, 46).forEach(function(item) {
|
|
var chartId = getEchartId();
|
|
var chartId = getEchartId();
|
|
@@ -192,7 +270,7 @@ function createLineReverseChart(dataList, tableName) {
|
|
// 区分度等级分布,难度等级分布
|
|
// 区分度等级分布,难度等级分布
|
|
function createDiscriminationDifficultyLevel(dataList, type) {
|
|
function createDiscriminationDifficultyLevel(dataList, type) {
|
|
var hTmpl = $("#" + type + "-level-table").html();
|
|
var hTmpl = $("#" + type + "-level-table").html();
|
|
- groupSectionArrDynamic(dataList, 30).forEach(function(item) {
|
|
|
|
|
|
+ groupSectionArrDynamic(dataList, 30, "groups").forEach(function(item) {
|
|
var $dom = tmpl(hTmpl, {
|
|
var $dom = tmpl(hTmpl, {
|
|
dataList: item
|
|
dataList: item
|
|
});
|
|
});
|
|
@@ -273,14 +351,19 @@ function createRange10TotalScore(datas) {
|
|
dataList: item.dataList
|
|
dataList: item.dataList
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- var $dom = tmpl(hTmpl, {
|
|
|
|
- title: item.title,
|
|
|
|
- isOneStep: false,
|
|
|
|
- pageTableClass: "table-ave-5",
|
|
|
|
- dataList: item.dataList,
|
|
|
|
- chartId: chartId
|
|
|
|
|
|
+ sectionArrFirstPage(item.dataList, 32, 22).map(function(elem, index) {
|
|
|
|
+ var pageTableClass =
|
|
|
|
+ elem.length > 16 ? "table-ave-5 table-range-long" : "table-ave-5";
|
|
|
|
+ if (index > 0) pageTableClass += " page-table-pad";
|
|
|
|
+ var $dom = tmpl(hTmpl, {
|
|
|
|
+ title: item.title,
|
|
|
|
+ isOneStep: false,
|
|
|
|
+ pageTableClass: pageTableClass,
|
|
|
|
+ dataList: elem,
|
|
|
|
+ chartId: index === 0 ? chartId : ""
|
|
|
|
+ });
|
|
|
|
+ $bodyMain.append(createNewBox($dom));
|
|
});
|
|
});
|
|
- $bodyMain.append(createNewBox($dom));
|
|
|
|
});
|
|
});
|
|
}
|
|
}
|
|
// 总分一分一段表
|
|
// 总分一分一段表
|
|
@@ -450,21 +533,21 @@ function sectionArrDynamic(arrayList, sectionMaxItemLength, childrenName) {
|
|
* @param {*} sectionMaxItemLength
|
|
* @param {*} sectionMaxItemLength
|
|
* @param {*} childrenName
|
|
* @param {*} childrenName
|
|
*/
|
|
*/
|
|
-function groupSectionArrDynamic(arrayList, sectionMaxItemLength) {
|
|
|
|
|
|
+function groupSectionArrDynamic(arrayList, sectionMaxItemLength, childrenName) {
|
|
var splitArr = [];
|
|
var splitArr = [];
|
|
var splitSectionItemLen = 0;
|
|
var splitSectionItemLen = 0;
|
|
var splitSectionArr = [];
|
|
var splitSectionArr = [];
|
|
|
|
|
|
arrayList.map(function(item) {
|
|
arrayList.map(function(item) {
|
|
var groupsList = [];
|
|
var groupsList = [];
|
|
- item.groups.map(function(elem) {
|
|
|
|
|
|
+ item[childrenName].map(function(elem) {
|
|
splitSectionItemLen++;
|
|
splitSectionItemLen++;
|
|
groupsList.push(elem);
|
|
groupsList.push(elem);
|
|
|
|
|
|
if (splitSectionItemLen >= sectionMaxItemLength) {
|
|
if (splitSectionItemLen >= sectionMaxItemLength) {
|
|
splitSectionArr.push({
|
|
splitSectionArr.push({
|
|
name: item.name,
|
|
name: item.name,
|
|
- groups: groupsList
|
|
|
|
|
|
+ [childrenName]: groupsList
|
|
});
|
|
});
|
|
splitArr.push(splitSectionArr);
|
|
splitArr.push(splitSectionArr);
|
|
splitSectionItemLen = 0;
|
|
splitSectionItemLen = 0;
|
|
@@ -476,7 +559,7 @@ function groupSectionArrDynamic(arrayList, sectionMaxItemLength) {
|
|
if (groupsList.length)
|
|
if (groupsList.length)
|
|
splitSectionArr.push({
|
|
splitSectionArr.push({
|
|
name: item.name,
|
|
name: item.name,
|
|
- groups: groupsList
|
|
|
|
|
|
+ [childrenName]: groupsList
|
|
});
|
|
});
|
|
});
|
|
});
|
|
if (splitSectionArr.length) splitArr.push(splitSectionArr);
|
|
if (splitSectionArr.length) splitArr.push(splitSectionArr);
|