|
@@ -151,6 +151,7 @@ export default {
|
|
|
userid: this.$route.query.userid,
|
|
|
org: this.$route.query.org,
|
|
|
oid: this.$route.query.oid,
|
|
|
+ cid: this.$route.query.classid,
|
|
|
reportVisible: false,
|
|
|
checkStudent: "",
|
|
|
checkCourse: [],
|
|
@@ -188,6 +189,7 @@ export default {
|
|
|
let params = {
|
|
|
uid: this.userid,
|
|
|
oid: this.oid,
|
|
|
+ cid: this.cid,
|
|
|
};
|
|
|
this.ajax
|
|
|
.get(this.$store.state.api + "selectMrEva", params)
|
|
@@ -199,6 +201,7 @@ export default {
|
|
|
var studyAllTime = res.data[4];
|
|
|
var loginAllTime = res.data[5];
|
|
|
var courseRateList = res.data[6];
|
|
|
+ var classSAllWorkList = res.data[7];
|
|
|
var sWorksCList = [];
|
|
|
var cList = [];
|
|
|
var cTypeList = [];
|
|
@@ -347,6 +350,40 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ var nameArray = [];
|
|
|
+ for (var i = 0; i < classSAllWorkList.length; i++) {
|
|
|
+ if (nameArray.length == 0) {
|
|
|
+ nameArray.push({ name: classSAllWorkList[i].userid, value: 0 });
|
|
|
+ } else {
|
|
|
+ if (nameArray.indexOf(classSAllWorkList[i].userid) == -1) {
|
|
|
+ nameArray.push({ name: classSAllWorkList[i].userid, value: 0 });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for (var i = 0; i < classSAllWorkList.length; i++) {
|
|
|
+ if (nameArray[i].name == classSAllWorkList[i].userid) {
|
|
|
+ var rateList = JSON.parse(classSAllWorkList[i].rate);
|
|
|
+ var a = Object.keys(rateList);
|
|
|
+ var courseCount = 0;
|
|
|
+ for (var k = 0; k < a.length; k++) {
|
|
|
+ if (a[k] == "content") {
|
|
|
+ continue;
|
|
|
+ } else {
|
|
|
+ courseCount += rateList[a[k]];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ nameArray[i].value = Math.round(courseCount / (a.length - 1));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ var c = xArray[0];
|
|
|
+ var d = nameArray.concat(c).filter((item) => item);
|
|
|
+ d.sort(function (x, y) {
|
|
|
+ return y.value - x.value;
|
|
|
+ });
|
|
|
+ var classIndex = d.findIndex(function (item) {
|
|
|
+ return item.name === c.name && item.value === c.value;
|
|
|
+ });
|
|
|
+ overPer.classIndex = classIndex + 1;
|
|
|
var yzArray = [];
|
|
|
for (var i = 0; i < scoreXarray.length; i++) {
|
|
|
var yCount = 0;
|
|
@@ -454,6 +491,11 @@ export default {
|
|
|
overPer.studyTime = `${sTime}秒`;
|
|
|
}
|
|
|
overPer.sName = this.stuMessage.name;
|
|
|
+ var courseNum = 0;
|
|
|
+ for (var i = 0; i < yzArray.length; i++) {
|
|
|
+ courseNum += yzArray[i].value;
|
|
|
+ }
|
|
|
+ overPer.courseaScore = Math.floor(courseNum / yzArray.length);
|
|
|
this.overPer = overPer;
|
|
|
this.$forceUpdate();
|
|
|
})
|