|
@@ -206,16 +206,16 @@
|
|
|
flex-wrap: nowrap;
|
|
|
align-items: center;
|
|
|
">
|
|
|
- <div class="title" :class="{ isClick: toolType == 0 }" @click="toolType = 0"
|
|
|
- style="cursor: pointer; padding: 0 0 5px 0">
|
|
|
- 项目占比
|
|
|
- </div>
|
|
|
<div class="title" :class="{ isClick: toolType == 1 }" @click="toolType = 1"
|
|
|
style="cursor: pointer; padding: 0 0 5px 0">
|
|
|
工具使用
|
|
|
</div>
|
|
|
+ <div class="title" :class="{ isClick: toolType == 0 }" @click="toolType = 0"
|
|
|
+ style="cursor: pointer; padding: 0 0 5px 0">
|
|
|
+ 项目占比
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <el-select v-model="cType4" class="selectBox" style="width: 110px" v-if="toolType == 0 && courseNumberArray.length" @change="typeChange">
|
|
|
+ <el-select v-model="cType4" class="selectBox" style="width: 110px" v-if="toolType == 0 && (gradeCourseList.length || subjectCourseList.length)" @change="typeChange">
|
|
|
<el-option label="赛道" value="box"></el-option>
|
|
|
<el-option label="主题" value="theme"></el-option>
|
|
|
</el-select>
|
|
@@ -317,7 +317,7 @@ export default {
|
|
|
cType7: "全部课程",
|
|
|
cType8: "全部年级",
|
|
|
cType9: "全部学科",
|
|
|
- toolType: 0,
|
|
|
+ toolType: 1,
|
|
|
tType: 0,
|
|
|
skType: 1,
|
|
|
courseType: 0,
|
|
@@ -339,6 +339,7 @@ export default {
|
|
|
gradeCourseList:[],
|
|
|
subjectCourseList:[],
|
|
|
courseNumberArray:[],
|
|
|
+ pCourseList:[],
|
|
|
courseArray: []
|
|
|
};
|
|
|
},
|
|
@@ -534,7 +535,13 @@ export default {
|
|
|
let weekCourse = [{
|
|
|
name: '项目数量',
|
|
|
lastWeekCouseCount: 0,
|
|
|
- toWeekCouseCount: 0
|
|
|
+ toWeekCouseCount: 0,
|
|
|
+ ttlastWeekCouseCount: 0,
|
|
|
+ tttoWeekCouseCount: 0,
|
|
|
+ tslastWeekCouseCount: 0,
|
|
|
+ tstoWeekCouseCount: 0,
|
|
|
+ sslastWeekCouseCount: 0,
|
|
|
+ sstoWeekCouseCount: 0,
|
|
|
}]
|
|
|
// for (var i = 0; i < 14; i++) {
|
|
|
// let time = JSON.parse(JSON.stringify(lastDayOfWeek))
|
|
@@ -548,9 +555,9 @@ export default {
|
|
|
// }
|
|
|
weekArray = this.getMonth()
|
|
|
var _tsArray = {
|
|
|
- tt: 0,
|
|
|
- ts: 0,
|
|
|
- ss: 0,
|
|
|
+ tt: 0, // 老师
|
|
|
+ ts: 0, //师生
|
|
|
+ ss: 0,//学生
|
|
|
} //记录项目的师生分工
|
|
|
|
|
|
for (var i = 0; i < _workCourse.length; i++) {
|
|
@@ -565,15 +572,53 @@ export default {
|
|
|
weekCourse[0].toWeekCouseCount++
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
if ((_workCourse[i].type == _workCourse[i].type2 == 1) || (!_workCourse[i].type2 && _workCourse[i].type == 1)) {
|
|
|
_tsArray.tt++
|
|
|
+ if (new Date(_workCourse[i].create_at) > _date) {
|
|
|
+ var a = new Date(_workCourse[i].create_at)
|
|
|
+ var string = a.getFullYear() + '-' + (a.getMonth() + 1) + '-' + a.getDate()
|
|
|
+ if (weekArray.lastWeek.indexOf(string) != -1) {
|
|
|
+ weekCourse[0].ttlastWeekCouseCount++
|
|
|
+ } else {
|
|
|
+ weekCourse[0].tttoWeekCouseCount++
|
|
|
+ }
|
|
|
+ }
|
|
|
} else if ((_workCourse[i].type == 2 && _workCourse[i].type2 == 1) || (_workCourse[i].type == 1 && _workCourse[i].type2 == 2)) {
|
|
|
_tsArray.ts++
|
|
|
+ if (new Date(_workCourse[i].create_at) > _date) {
|
|
|
+ var a = new Date(_workCourse[i].create_at)
|
|
|
+ var string = a.getFullYear() + '-' + (a.getMonth() + 1) + '-' + a.getDate()
|
|
|
+ if (weekArray.lastWeek.indexOf(string) != -1) {
|
|
|
+ weekCourse[0].tslastWeekCouseCount++
|
|
|
+ } else {
|
|
|
+ weekCourse[0].tstoWeekCouseCount++
|
|
|
+ }
|
|
|
+ }
|
|
|
} else if ((_workCourse[i].type == _workCourse[i].type2 == 2) || (!_workCourse[i].type2 && _workCourse[i].type == 2)) {
|
|
|
_tsArray.ss++
|
|
|
+ if (new Date(_workCourse[i].create_at) > _date) {
|
|
|
+ var a = new Date(_workCourse[i].create_at)
|
|
|
+ var string = a.getFullYear() + '-' + (a.getMonth() + 1) + '-' + a.getDate()
|
|
|
+ if (weekArray.lastWeek.indexOf(string) != -1) {
|
|
|
+ weekCourse[0].sslastWeekCouseCount++
|
|
|
+ } else {
|
|
|
+ weekCourse[0].sstoWeekCouseCount++
|
|
|
+ }
|
|
|
+ }
|
|
|
} else {
|
|
|
_tsArray.ts++
|
|
|
+ if (new Date(_workCourse[i].create_at) > _date) {
|
|
|
+ var a = new Date(_workCourse[i].create_at)
|
|
|
+ var string = a.getFullYear() + '-' + (a.getMonth() + 1) + '-' + a.getDate()
|
|
|
+ if (weekArray.lastWeek.indexOf(string) != -1) {
|
|
|
+ weekCourse[0].tslastWeekCouseCount++
|
|
|
+ } else {
|
|
|
+ weekCourse[0].tstoWeekCouseCount++
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
wList[_workCourse[i].courseId] = {
|
|
|
cid: _workCourse[i].courseId,
|
|
|
title: _workCourse[i].title,
|
|
@@ -695,6 +740,7 @@ export default {
|
|
|
}
|
|
|
this.gradeCourseList = _gradeCourseList
|
|
|
this.subjectCourseList = _subjectCourseList
|
|
|
+ this.pCourseList = [{name:'未分类',typeid:0,course:res.data[2][0].count}]
|
|
|
this.typeChange()
|
|
|
|
|
|
|
|
@@ -760,6 +806,9 @@ export default {
|
|
|
} else if (this.cType4 === 'theme') {
|
|
|
this.courseNumberArray = this.subjectCourseList
|
|
|
}
|
|
|
+ if(!this.gradeCourseList.length && !this.subjectCourseList.length){
|
|
|
+ this.courseNumberArray = this.pCourseList
|
|
|
+ }
|
|
|
this.$forceUpdate();
|
|
|
},
|
|
|
},
|