Commit 432b1688 authored by 黄奎's avatar 黄奎

页面修改

parent 9355289b
......@@ -648,10 +648,37 @@
subScore = gItem.GScore;
}
if (gItem.DetailsList && gItem.DetailsList.length > 0) {
var avgScore = Number(subScore / gItem.DetailsList.length).toFixed(2);
gItem.DetailsList.forEach(sItem => {
sItem.Score = avgScore;
})
//阅读理解和听力
if (gItem.QuestionTypeKey == "reading-comprehensio" || gItem.QuestionTypeKey == "listening") {
var subCount = 0;
gItem.DetailsList.forEach(dItem => {
subCount += dItem.QuestionContentObj.length;
});
var avgScore = Number(subScore / subCount).toFixed(2);
gItem.DetailsList.forEach(dItem => {
dItem.QuestionContentObj.forEach(qItem => {
qItem.SubScore = avgScore;
});
});
}
//完型填空
else if (gItem.QuestionTypeKey == "cloze") {
var subCount = 0;
gItem.DetailsList.forEach(dItem => {
subCount += dItem.QuestionContentObj.length;
});
var avgScore = Number(subScore / subCount).toFixed(2);
gItem.DetailsList.forEach(dItem => {
dItem.QuestionContentObj.forEach(qItem => {
qItem.SubScore = avgScore;
});
});
} else {
var avgScore = Number(subScore / gItem.DetailsList.length).toFixed(2);
gItem.DetailsList.forEach(sItem => {
sItem.Score = avgScore;
})
}
}
},
//上移下移(IsUp:0上移,1下移)
......@@ -909,7 +936,7 @@
this.DataObj.CreateNum = tempData.CreateNum;
this.DataObj.PaperType = tempData.PaperType;
this.DataObj.ParentId = tempData.ParentId;
this.DataObj.IsOpen=tempData.IsOpen;
this.DataObj.IsOpen = tempData.IsOpen;
if (tempData.GroupList && tempData.GroupList.length > 0) {
this.DataObj.GroupList = tempData.GroupList;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment