|
@@ -685,7 +685,7 @@ export default {
|
|
|
}
|
|
|
loginCountMonthArray = loginCountMonthArray.reverse();
|
|
|
for (var i = 0; i < _loginCount.length; i++) {
|
|
|
- let _date = new Date(_loginCount[i].create_at);
|
|
|
+ let _date = new Date(_loginCount[i].time);
|
|
|
var _month = _date.getMonth() + 1;
|
|
|
var _year = _date.getFullYear();
|
|
|
for (var j = 0; j < loginCountMonthArray.length; j++) {
|
|
@@ -693,7 +693,7 @@ export default {
|
|
|
_month == loginCountMonthArray[j].Month &&
|
|
|
_year == loginCountMonthArray[j].Year
|
|
|
) {
|
|
|
- loginCountMonthArray[j].user++;
|
|
|
+ loginCountMonthArray[j].user+=_loginCount[i].usernum;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
@@ -733,7 +733,7 @@ export default {
|
|
|
}
|
|
|
loginCountYearArray = loginCountYearArray.reverse();
|
|
|
for (var i = 0; i < loginCountYear.length; i++) {
|
|
|
- let _date = new Date(loginCountYear[i].create_at);
|
|
|
+ let _date = new Date(loginCountYear[i].time);
|
|
|
var _month = _date.getMonth() + 1;
|
|
|
var _year = _date.getFullYear();
|
|
|
var _day = _date.getDay();
|
|
@@ -743,7 +743,7 @@ export default {
|
|
|
_month == loginCountYearArray[j].Month &&
|
|
|
_year == loginCountYearArray[j].Year
|
|
|
) {
|
|
|
- loginCountYearArray[j][dayArray[_day]]++;
|
|
|
+ loginCountYearArray[j][dayArray[_day]]+=loginCountYear[i].usernum;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
@@ -754,7 +754,7 @@ export default {
|
|
|
this.loginTime = parseInt(res.data[7][0].time) / 60 / 60;
|
|
|
let _loginTimeArray = res.data[9]; //在线时间
|
|
|
let _classList = res.data[8]; //班级
|
|
|
- this.classList = _classList.filter(el => {return el.studentCount > 0});
|
|
|
+ this.classList = _classList.filter(el => {return el.count > 0});
|
|
|
this.cTypeRank = _classList[0].id
|
|
|
let _EloginTimeArray = [];
|
|
|
for (let i = 0; i < _classList.length; i++) {
|
|
@@ -765,7 +765,7 @@ export default {
|
|
|
});
|
|
|
for (let j = 0; j < _loginTimeArray.length; j++) {
|
|
|
const _user = _loginTimeArray[j];
|
|
|
- if (_user.classid.indexOf(_classList[i].id) != -1) {
|
|
|
+ if (_user.id.indexOf(_classList[i].id) != -1) {
|
|
|
_EloginTimeArray[i].loginTime += Number(_user.time);
|
|
|
}
|
|
|
}
|
|
@@ -791,7 +791,7 @@ export default {
|
|
|
this.scourseJson.toolNum = res.data[17][0].count; //使用工具
|
|
|
this.scourseJson.gcourseNum = res.data[18][0].count; //协同
|
|
|
|
|
|
- let loginUser = res.data[20].length; //登录
|
|
|
+ let loginUser = res.data[20][0].count; //登录
|
|
|
let worksEva = res.data[21][0].count; //评价
|
|
|
|
|
|
this.courseArray = [
|
|
@@ -872,19 +872,23 @@ export default {
|
|
|
});
|
|
|
for (let j = 0; j < _studentWorksArray.length; j++) {
|
|
|
const _user = _studentWorksArray[j];
|
|
|
- if (_courseIdArray.length == 0) {
|
|
|
- if (_user.classid.indexOf(_classList[i].id) != -1) {
|
|
|
- _EworksNumArray[i].works++;
|
|
|
- _courseIdArray.push(_user.courseid);
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (
|
|
|
- _user.classid.indexOf(_classList[i].id) != -1 &&
|
|
|
- _courseIdArray.indexOf(_user.courseid) == -1
|
|
|
- ) {
|
|
|
- _EworksNumArray[i].works++;
|
|
|
- }
|
|
|
+ if (_user.id.indexOf(_classList[i].id) != -1) {
|
|
|
+ _EworksNumArray[i].works+=_user.count;
|
|
|
+ // _courseIdArray.push(_user.courseid);
|
|
|
}
|
|
|
+ // if (_courseIdArray.length == 0) {
|
|
|
+ // if (_user.classid.indexOf(_classList[i].id) != -1) {
|
|
|
+ // _EworksNumArray[i].works++;
|
|
|
+ // _courseIdArray.push(_user.courseid);
|
|
|
+ // }
|
|
|
+ // } else {
|
|
|
+ // if (
|
|
|
+ // _user.classid.indexOf(_classList[i].id) != -1 &&
|
|
|
+ // _courseIdArray.indexOf(_user.courseid) == -1
|
|
|
+ // ) {
|
|
|
+ // _EworksNumArray[i].works++;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -930,7 +934,7 @@ export default {
|
|
|
var _day = _date.getDay();
|
|
|
let dayArray = ["sun", "mon", "tue", "wed", "thur", "fri", "sat"];
|
|
|
for (var j = 0; j < loginCountYearArray2.length; j++) {
|
|
|
- let time = (loginCountYear2[i].text / 3600).toFixed(0)
|
|
|
+ let time = (loginCountYear2[i].time / 3600).toFixed(0)
|
|
|
time = parseInt(time) ? parseInt(time) : 0
|
|
|
if (
|
|
|
_month == loginCountYearArray2[j].Month &&
|
|
@@ -954,8 +958,8 @@ export default {
|
|
|
});
|
|
|
for (let j = 0; j < _loginTimeArray2.length; j++) {
|
|
|
const _user = _loginTimeArray2[j];
|
|
|
- if (_user.classid.indexOf(_classList[i].id) != -1) {
|
|
|
- _EloginTimeArray2[i].loginTime++;
|
|
|
+ if (_user.id.indexOf(_classList[i].id) != -1) {
|
|
|
+ _EloginTimeArray2[i].loginTime+=_user.count;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1059,6 +1063,7 @@ export default {
|
|
|
let _courseNumArray = this.courseNumArray; //参与课程数
|
|
|
let _scourseNumArray = this.scourseNumArray; //参与项目数
|
|
|
let _userArray = this.userArray; //参与项目数
|
|
|
+
|
|
|
let _courseNum = 0;
|
|
|
let _scourseNum = 0;
|
|
|
let uArray = [];
|
|
@@ -1076,7 +1081,7 @@ export default {
|
|
|
for (let i = 0; i < _courseNumArray.length; i++) {
|
|
|
for (let j = 0; j < uArray.length; j++) {
|
|
|
if (_courseNumArray[i].userid == uArray[j].userid) {
|
|
|
- uArray[j].courseNum++;
|
|
|
+ uArray[j].courseNum+=_courseNumArray[i].count;
|
|
|
_courseNum++;
|
|
|
break;
|
|
|
}
|
|
@@ -1086,7 +1091,7 @@ export default {
|
|
|
for (let i = 0; i < _scourseNumArray.length; i++) {
|
|
|
for (let j = 0; j < uArray.length; j++) {
|
|
|
if (_scourseNumArray[i].userid == uArray[j].userid) {
|
|
|
- uArray[j].scourseNum++;
|
|
|
+ uArray[j].scourseNum+=_scourseNumArray[i].count;
|
|
|
_scourseNum++;
|
|
|
break;
|
|
|
}
|