|
@@ -722,7 +722,7 @@ export default {
|
|
|
subject: [],
|
|
|
});
|
|
|
for (var z = 0; z < _course.length; z++) {
|
|
|
- if (_course[z].typeid == _grade[i].id) {
|
|
|
+ if (_course[z].typeid && _course[z].typeid.indexOf(_grade[i].id) !== -1) {
|
|
|
_gradeCourse++;
|
|
|
if (
|
|
|
_courseArray[i].courseid.indexOf(_course[z].courseid) === -1
|
|
@@ -739,7 +739,7 @@ export default {
|
|
|
});
|
|
|
for (var z = 0; z < _course.length; z++) {
|
|
|
if (
|
|
|
- _course[z].typeid == _subject[j].id &&
|
|
|
+ _course[z].typeid && _course[z].typeid.indexOf(_subject[j].id) !== -1 &&
|
|
|
_courseArray[i].courseid.indexOf(_course[z].courseid) !== -1
|
|
|
) {
|
|
|
_courseArray[i].subject[j].course++;
|
|
@@ -764,7 +764,7 @@ export default {
|
|
|
subject: [],
|
|
|
});
|
|
|
for (var z = 0; z < _course2.length; z++) {
|
|
|
- if (_course2[z].typeid == _grade[i].id) {
|
|
|
+ if (_course2[z].typeid && _course2[z].typeid.indexOf(_grade[i].id) !== -1) {
|
|
|
if (
|
|
|
_courseArray[i].courseid.indexOf(_course2[z].courseid) === -1
|
|
|
) {
|
|
@@ -780,7 +780,7 @@ export default {
|
|
|
});
|
|
|
for (var z = 0; z < _course2.length; z++) {
|
|
|
if (
|
|
|
- _course[z].typeid == _subject[j].id &&
|
|
|
+ _course2[z].typeid && _course2[z].typeid.indexOf(_subject[j].id) !== -1 &&
|
|
|
_courseArray[i].courseid.indexOf(_course2[z].courseid) !== -1
|
|
|
) {
|
|
|
if (this.cType == "0") {
|
|
@@ -835,7 +835,7 @@ export default {
|
|
|
this.teacherNum = res.data[3][0].count; //教师总数
|
|
|
let _teacherNumYear = res.data[4]; //半年内教师数量
|
|
|
let _teacherLoginYear = res.data[5]; //半年内登录教师
|
|
|
- let _classList1 = res.data[26]; //班级
|
|
|
+ let _classList1 = res.data[21]; //班级
|
|
|
this.classList = _classList1.filter((el) => {
|
|
|
return el.count > 0;
|
|
|
});
|
|
@@ -883,7 +883,7 @@ export default {
|
|
|
_month == teacherNumCountMonthArray[j].Month &&
|
|
|
_year == teacherNumCountMonthArray[j].Year
|
|
|
) {
|
|
|
- teacherNumCountMonthArray[j].num++;
|
|
|
+ teacherNumCountMonthArray[j].num+=_teacherNumYear[i].usernum;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
@@ -897,7 +897,7 @@ export default {
|
|
|
_month == teacherLoginCountMonthArray[j].Month &&
|
|
|
_year == teacherLoginCountMonthArray[j].Year
|
|
|
) {
|
|
|
- teacherLoginCountMonthArray[j].login++;
|
|
|
+ teacherLoginCountMonthArray[j].login+=_teacherLoginYear[i].usernum;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
@@ -911,7 +911,7 @@ export default {
|
|
|
this.teacherNumCountMonthArray = teacherNumCountMonthArray;
|
|
|
this.teacherLoginCountMonthArray = teacherLoginCountMonthArray;
|
|
|
|
|
|
- let _classList = res.data[24]; //查询学校教研室
|
|
|
+ let _classList = res.data[21]; //查询学校教研室
|
|
|
let _workTime = res.data[6]; //查询教研室在线时长
|
|
|
var mergedArray = [];
|
|
|
|
|
@@ -923,8 +923,8 @@ export default {
|
|
|
});
|
|
|
for (let j = 0; j < _workTime.length; j++) {
|
|
|
const _user = _workTime[j];
|
|
|
- if (_classList[i].id == _user.cclassid) {
|
|
|
- mergedArray[i].text += Number(_user.text);
|
|
|
+ if (_classList[i].id == _user.id) {
|
|
|
+ mergedArray[i].text += Number(_user.time);
|
|
|
}
|
|
|
}
|
|
|
mergedArray[i].text = (mergedArray[i].text / 60 / 60).toFixed(0); //换算成小时
|
|
@@ -944,10 +944,10 @@ export default {
|
|
|
let loginCountYearArray = {};
|
|
|
let timeArray = [];
|
|
|
for(var i = 0;i<allLoginCount.length;i++){
|
|
|
- timeArray.push(allLoginCount[i].vtime);
|
|
|
+ timeArray.push({time:allLoginCount[i].time, num:allLoginCount[i].usernum});
|
|
|
}
|
|
|
timeArray.forEach((item) => {
|
|
|
- loginCountYearArray[item] = loginCountYearArray[item] + 1 || 1;
|
|
|
+ loginCountYearArray[item.time] = loginCountYearArray[item.time] + item.num || item.num;
|
|
|
});
|
|
|
// for (var i = Month; i > Month - 12; i--) {
|
|
|
// if (i <= 0) {
|
|
@@ -1000,7 +1000,8 @@ export default {
|
|
|
|
|
|
let _course = res.data[10]; //课程
|
|
|
this._courseArray = JSON.parse(JSON.stringify(_course));
|
|
|
- this._course2 = res.data[25]; //查询课程
|
|
|
+
|
|
|
+ this._course2 = res.data[22]; //查询课程
|
|
|
this.typeChange2();
|
|
|
|
|
|
let _gradeArray = [];
|
|
@@ -1015,7 +1016,7 @@ export default {
|
|
|
array: [],
|
|
|
});
|
|
|
for (var z = 0; z < _course.length; z++) {
|
|
|
- if (_course[z].typeid == _grade[i].id) {
|
|
|
+ if (_course[z].typeid && _course[z].typeid.indexOf(_grade[i].id) != -1) {
|
|
|
_gradeArray[i].course++;
|
|
|
_gradeArray[i].array.push(_course[z].courseid);
|
|
|
}
|
|
@@ -1030,7 +1031,7 @@ export default {
|
|
|
array: [],
|
|
|
});
|
|
|
for (var z = 0; z < _course.length; z++) {
|
|
|
- if (_course[z].typeid == _subject[i].id) {
|
|
|
+ if (_course[z].typeid && _course[z].typeid.indexOf(_subject[i].id) != -1) {
|
|
|
_subjectArray[i].course++;
|
|
|
_subjectArray[i].array.push(_course[z].courseid);
|
|
|
}
|
|
@@ -1045,7 +1046,7 @@ export default {
|
|
|
array: [],
|
|
|
});
|
|
|
for (var z = 0; z < _course.length; z++) {
|
|
|
- if (_course[z].typeid == _themeList[i].id) {
|
|
|
+ if (_course[z].typeid && _course[z].typeid.indexOf(_themeList[i].id) != -1) {
|
|
|
_themeArray[i].course++;
|
|
|
_themeArray[i].array.push(_course[z].courseid);
|
|
|
}
|
|
@@ -1058,9 +1059,25 @@ export default {
|
|
|
this.typeChange();
|
|
|
|
|
|
let _teacherCourse = res.data[11]; //老师创建的课程
|
|
|
- this.allCourse = res.data[11].length;
|
|
|
+ let cNum = 0
|
|
|
+ let cNum3 = 0
|
|
|
+ for(var i = 1; i < _teacherCourse.length; i++){
|
|
|
+ cNum += _teacherCourse[i].coursecount;
|
|
|
+ if(_teacherCourse[i].coursecount > 0){
|
|
|
+ cNum3++
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.allCourse = cNum; //得按上面计算
|
|
|
let _teacherProject = res.data[12]; //老师创建的项目
|
|
|
- this.allProject = res.data[12].length;
|
|
|
+ let cNum2 = 0
|
|
|
+ let cNum4 = 0
|
|
|
+ for(var i = 1; i < _teacherProject.length; i++){
|
|
|
+ cNum2 += _teacherProject[i].count;
|
|
|
+ if(_teacherProject[i].count > 0){
|
|
|
+ cNum4++
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.allProject = cNum2;//得按上面计算
|
|
|
|
|
|
var _workNumList = [];
|
|
|
// 创建一个对象来存储结果
|
|
@@ -1070,6 +1087,7 @@ export default {
|
|
|
_teacherCourse.forEach((item) => {
|
|
|
var userid = item.userid;
|
|
|
var username = item.username;
|
|
|
+ var count = item.coursecount;
|
|
|
if (!result[username]) {
|
|
|
result[username] = {
|
|
|
username: username,
|
|
@@ -1078,12 +1096,13 @@ export default {
|
|
|
project: 0,
|
|
|
};
|
|
|
}
|
|
|
- result[username].course++;
|
|
|
+ result[username].course = count;
|
|
|
});
|
|
|
|
|
|
_teacherProject.forEach((item) => {
|
|
|
var userid = item.userid;
|
|
|
var username = item.username;
|
|
|
+ var count = item.count;
|
|
|
if (!result[username]) {
|
|
|
result[username] = {
|
|
|
username: username,
|
|
@@ -1092,7 +1111,7 @@ export default {
|
|
|
project: 0,
|
|
|
};
|
|
|
}
|
|
|
- result[username].project++;
|
|
|
+ result[username].project = count;
|
|
|
});
|
|
|
|
|
|
for (var username in result) {
|
|
@@ -1109,15 +1128,15 @@ export default {
|
|
|
|
|
|
this.lightJson.teachers = res.data[3][0].count; //教师总数
|
|
|
this.lightJson1.teachers = res.data[3][0].count; //教师总数
|
|
|
- this.lightJson.createCourse = res.data[13].length; //创建了课程的老师
|
|
|
- this.lightJson.gCourseTeachers = res.data[14][0].count; //参与协同课程的老师
|
|
|
- this.lightJson.commentTeachers = res.data[15][0].count; //参与互动交流的老师
|
|
|
- this.lightJson.useTool = res.data[16][0].count; //使用工具
|
|
|
- this.lightJson.useEvalution = res.data[17].length; //实施评价
|
|
|
- this.lightJson.evaWorksCount = res.data[18][0].count; //教学评一体化
|
|
|
+ this.lightJson.createCourse = cNum3; //创建了课程的老师 --计算
|
|
|
+ this.lightJson.gCourseTeachers = res.data[13][0].count; //参与协同课程的老师
|
|
|
+ this.lightJson.commentTeachers = res.data[14][0].count; //参与互动交流的老师
|
|
|
+ this.lightJson.useTool = res.data[15][0].count; //使用工具
|
|
|
+ this.lightJson.useEvalution = res.data[16].length; //实施评价
|
|
|
+ this.lightJson.evaWorksCount = res.data[17][0].count; //教学评一体化
|
|
|
|
|
|
- let _isLoginTeacher = res.data[19].length; //登录过的教师
|
|
|
- let _isCourseTeacher = res.data[20].length; //授课了的教师
|
|
|
+ let _isLoginTeacher = res.data[18][0].usercount; //登录过的教师
|
|
|
+ let _isCourseTeacher = res.data[15][0].count; //授课了的教师
|
|
|
|
|
|
for (var i = 0; i < this.pusaDep.length; i++) {
|
|
|
if (this.pusaDep[i].name == "登录") {
|
|
@@ -1143,9 +1162,10 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- this.lightJson1.createProject = res.data[21].length; //创建项目
|
|
|
- let _teacherAndStudent = res.data[22]; //师生协作
|
|
|
- this.lightJson1.useTool = res.data[23][0].count; //项目使用工具
|
|
|
+ this.lightJson1.createProject = cNum4; //创建项目
|
|
|
+
|
|
|
+ let _teacherAndStudent = res.data[19]; //师生协作
|
|
|
+ this.lightJson1.useTool = res.data[20][0].count; //项目使用工具
|
|
|
let _tsCount = 0;
|
|
|
|
|
|
for (var i = 0; i < _teacherAndStudent.length; i++) {
|