|
@@ -19,7 +19,7 @@
|
|
|
<div class="info blueBG">
|
|
|
<span>本月新增课程环比</span>
|
|
|
<!-- <span>{{ weekCount }}</span> -->
|
|
|
- <span>{{
|
|
|
+ <span v-if="loginCountMonthArray.length">{{
|
|
|
loginCountMonthArray[loginCountMonthArray.length - 1].course -
|
|
|
loginCountMonthArray[loginCountMonthArray.length - 2].course <
|
|
|
0
|
|
@@ -45,7 +45,7 @@
|
|
|
<div class="info blueBG">
|
|
|
<span>本月新增课程总数</span>
|
|
|
<!-- <span>{{ weekCount }}</span> -->
|
|
|
- <span>{{
|
|
|
+ <span v-if="loginCountMonthArray.length">{{
|
|
|
loginCountMonthArray[loginCountMonthArray.length - 1].course
|
|
|
}}</span>
|
|
|
</div>
|
|
@@ -72,14 +72,28 @@
|
|
|
@click="skType = 1"
|
|
|
style="cursor: pointer; padding: 0 0 5px 0"
|
|
|
>
|
|
|
- 授课频次
|
|
|
+ 作业数量
|
|
|
</div>
|
|
|
<el-select
|
|
|
+ v-if="skType == 0"
|
|
|
v-model="lType"
|
|
|
@change="typeChange1"
|
|
|
class="selectBox"
|
|
|
style="margin-left: auto"
|
|
|
>
|
|
|
+ <el-option label="全部" value="all"></el-option>
|
|
|
+ <el-option label="年级" value="grade"></el-option>
|
|
|
+ <el-option label="主题" value="theme"></el-option>
|
|
|
+ <el-option label="学科" value="subject"></el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-select
|
|
|
+ v-if="skType == 1"
|
|
|
+ v-model="lType1"
|
|
|
+ @change="typeChange2"
|
|
|
+ class="selectBox"
|
|
|
+ style="margin-left: auto"
|
|
|
+ >
|
|
|
+ <el-option label="全部" value="all"></el-option>
|
|
|
<el-option label="年级" value="grade"></el-option>
|
|
|
<el-option label="主题" value="theme"></el-option>
|
|
|
<el-option label="学科" value="subject"></el-option>
|
|
@@ -119,19 +133,21 @@
|
|
|
</div>
|
|
|
<div class="info_box" style="width: 96%" v-if="skType == 1">
|
|
|
<div class="info blueBG" style="width: calc(100% / 3 - 10px)">
|
|
|
- <span>授课频次</span>
|
|
|
+ <span>作业数量</span>
|
|
|
<!-- <span>{{ count }}</span> -->
|
|
|
- <span>{{ 153 }}</span>
|
|
|
+ <span>{{ worksCount }}</span>
|
|
|
</div>
|
|
|
<div class="info blueBG" style="width: calc(100% / 3 - 10px)">
|
|
|
<span>课程开展总数</span>
|
|
|
<!-- <span>{{ weekCount }}</span> -->
|
|
|
- <span>{{ 4 }}</span>
|
|
|
+ <span>{{ haveWorksCourse }}</span>
|
|
|
</div>
|
|
|
<div class="info blueBG" style="width: calc(100% / 3 - 10px)">
|
|
|
- <span>课程平均授课次数</span>
|
|
|
+ <span>课程平均作业数量</span>
|
|
|
<!-- <span>{{ weekCount }}</span> -->
|
|
|
- <span>{{ 4 }}</span>
|
|
|
+ <span>{{
|
|
|
+ worksCount == 0 ? 0 : (worksCount / haveWorksCourse).toFixed(0)
|
|
|
+ }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<Bar
|
|
@@ -142,6 +158,7 @@
|
|
|
<ToolUse
|
|
|
style="height: calc(100% - 70px)"
|
|
|
v-if="skType == 1"
|
|
|
+ :yearArray="courseWorksCountYearArray"
|
|
|
></ToolUse>
|
|
|
<!-- <div class="otherCss">
|
|
|
<div v-if="!oType">切换为柱状图</div>
|
|
@@ -177,69 +194,23 @@
|
|
|
<CateRank
|
|
|
v-if="courseType == 0"
|
|
|
style="height: calc(100%)"
|
|
|
+ :courseArray="courseArray"
|
|
|
></CateRank>
|
|
|
<CourseNum
|
|
|
v-if="courseType == 1"
|
|
|
style="height: calc(100%)"
|
|
|
+ :weekCourse2="weekCourse2"
|
|
|
></CourseNum>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="bottom">
|
|
|
<div class="titleBox" style="justify-content: space-between">
|
|
|
<div class="title">课程实施程度</div>
|
|
|
- <div
|
|
|
- style="
|
|
|
- display: flex;
|
|
|
- flex-direction: row;
|
|
|
- flex-wrap: nowrap;
|
|
|
- align-items: center;
|
|
|
- "
|
|
|
- >
|
|
|
- <div v-if="shType">
|
|
|
- <el-select
|
|
|
- v-model="cType1"
|
|
|
- class="selectBox"
|
|
|
- style="width: 110px"
|
|
|
- >
|
|
|
- <el-option label="全部年级" value="全部年级"></el-option>
|
|
|
- <el-option label="一年级" value="一年级"></el-option>
|
|
|
- <el-option label="二年级" value="二年级"></el-option>
|
|
|
- <el-option label="三年级" value="三年级"></el-option>
|
|
|
- </el-select>
|
|
|
- <el-select
|
|
|
- v-model="cType2"
|
|
|
- class="selectBox"
|
|
|
- style="width: 110px"
|
|
|
- >
|
|
|
- <el-option label="全部学科" value="全部学科"></el-option>
|
|
|
- <el-option label="语文" value="语文"></el-option>
|
|
|
- <el-option label="数学" value="数学"></el-option>
|
|
|
- <el-option label="英语" value="英语"></el-option>
|
|
|
- </el-select>
|
|
|
- <el-select
|
|
|
- v-model="cType3"
|
|
|
- class="selectBox"
|
|
|
- style="width: 110px"
|
|
|
- >
|
|
|
- <el-option label="全部主题" value="全部主题"></el-option>
|
|
|
- <el-option label="社会" value="社会"></el-option>
|
|
|
- <el-option label="人文" value="人文"></el-option>
|
|
|
- <el-option label="自然" value="自然"></el-option>
|
|
|
- </el-select>
|
|
|
- </div>
|
|
|
- <div class="timeDiv">
|
|
|
- <div @click="sType = 0" :class="{ isClick: sType == 0 }">周</div>
|
|
|
- <div @click="sType = 1" :class="{ isClick: sType == 1 }">月</div>
|
|
|
- <div @click="sType = 2" :class="{ isClick: sType == 2 }">
|
|
|
- 学期
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
</div>
|
|
|
<div class="dataBox">
|
|
|
<div class="allBox" v-if="!shType" style="height: calc(100% - 30px)">
|
|
|
<div class="allBox_left">
|
|
|
- <CourseTime v-if="!shType"></CourseTime>
|
|
|
+ <CourseTime v-if="!shType" :pusaDep="pusaDep"></CourseTime>
|
|
|
</div>
|
|
|
<div class="allBox_right">
|
|
|
<div class="depth">
|
|
@@ -248,7 +219,7 @@
|
|
|
<el-progress
|
|
|
:width="80"
|
|
|
type="circle"
|
|
|
- :percentage="80"
|
|
|
+ :percentage="allCourse ? parseInt((evaCount / allCourse * 100).toFixed(0)) : 0"
|
|
|
:stroke-width="5"
|
|
|
:format="format"
|
|
|
color="#106BFF"
|
|
@@ -261,7 +232,7 @@
|
|
|
<el-progress
|
|
|
:width="80"
|
|
|
type="circle"
|
|
|
- :percentage="80"
|
|
|
+ :percentage="allCourse ? parseInt((haveWorksCourse / allCourse * 100).toFixed(0)) : 0"
|
|
|
:stroke-width="5"
|
|
|
:format="format"
|
|
|
color="#106BFF"
|
|
@@ -274,7 +245,7 @@
|
|
|
<el-progress
|
|
|
:width="80"
|
|
|
type="circle"
|
|
|
- :percentage="80"
|
|
|
+ :percentage="allCourse ? parseInt((evaWorksCount / allCourse * 100).toFixed(0)) : 0"
|
|
|
:stroke-width="5"
|
|
|
:format="format"
|
|
|
color="#106BFF"
|
|
@@ -287,7 +258,7 @@
|
|
|
<el-progress
|
|
|
:width="80"
|
|
|
type="circle"
|
|
|
- :percentage="80"
|
|
|
+ :percentage="allCourse ? parseInt((evaWorksCount / allCourse * 100).toFixed(0)) : 0"
|
|
|
:stroke-width="5"
|
|
|
:format="format"
|
|
|
color="#106BFF"
|
|
@@ -297,28 +268,28 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="info_box" v-if="shType">
|
|
|
- <div class="info blueBG">
|
|
|
+ <div class="info blueBG" style="width:calc(100% / 4 - 10px)">
|
|
|
<span>平台实施课程总数</span>
|
|
|
<!-- <span>{{ count }}</span> -->
|
|
|
- <span>{{ 18 }}</span>
|
|
|
+ <span>{{ isCourseCount }}</span>
|
|
|
</div>
|
|
|
- <div class="info blueBG">
|
|
|
+ <div class="info blueBG" style="width:calc(100% / 4 - 10px)">
|
|
|
<span>平台实施课程占比</span>
|
|
|
<!-- <span>{{ weekCount }}</span> -->
|
|
|
- <span>{{ "80%" }}</span>
|
|
|
+ <span>{{ isCourseCount ? (isCourseCount / allCourseCount * 100).toFixed(0) + '%' : '0%' }}</span>
|
|
|
</div>
|
|
|
- <div class="info blueBG">
|
|
|
+ <div class="info blueBG" style="width:calc(100% / 4 - 10px)">
|
|
|
<span>课程平均任务数量</span>
|
|
|
<!-- <span>{{ weekCount }}</span> -->
|
|
|
- <span>{{ 18 }}</span>
|
|
|
+ <span>{{ isCourseCount ? (taskCount / isCourseCount).toFixed(0) : 0 }}</span>
|
|
|
</div>
|
|
|
- <div class="info blueBG">
|
|
|
+ <div class="info blueBG" style="width:calc(100% / 4 - 10px)">
|
|
|
<span>课程平均作业数量</span>
|
|
|
<!-- <span>{{ weekCount }}</span> -->
|
|
|
- <span>{{ 18 }}</span>
|
|
|
+ <span>{{ isCourseCount ? (workCount / isCourseCount).toFixed(0) : 0 }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <WorkNum v-if="shType"></WorkNum>
|
|
|
+ <WorkNum style="height:calc(100% - 95px)" :workNumList="workNumList" v-if="shType"></WorkNum>
|
|
|
<div class="otherCss">
|
|
|
<div v-if="!shType">转换为散点图</div>
|
|
|
<div v-if="shType">转换为漏斗图</div>
|
|
@@ -359,42 +330,25 @@
|
|
|
</div>
|
|
|
<el-select
|
|
|
v-model="cType4"
|
|
|
+ @change="typeChange"
|
|
|
class="selectBox"
|
|
|
- style="width: 110px"
|
|
|
v-if="toolType == 0"
|
|
|
>
|
|
|
- <el-option label="按年级" value="按年级"></el-option>
|
|
|
- <el-option label="按学科" value="按学科"></el-option>
|
|
|
- <el-option label="按主题" value="按主题"></el-option>
|
|
|
+ <el-option label="全部" value=""></el-option>
|
|
|
+ <el-option label="年级" value="grade"></el-option>
|
|
|
+ <el-option label="主题" value="theme"></el-option>
|
|
|
+ <el-option label="学科" value="subject"></el-option>
|
|
|
</el-select>
|
|
|
- <div
|
|
|
- v-if="toolType == 1"
|
|
|
- style="
|
|
|
- display: flex;
|
|
|
- flex-direction: row;
|
|
|
- flex-wrap: nowrap;
|
|
|
- align-items: center;
|
|
|
- "
|
|
|
- >
|
|
|
- <el-select v-model="cType5" class="selectBox" style="width: 110px">
|
|
|
- <el-option label="全部学科" value="全部学科"></el-option>
|
|
|
- <el-option label="语文" value="语文"></el-option>
|
|
|
- <el-option label="数学" value="数学"></el-option>
|
|
|
- </el-select>
|
|
|
- <el-select v-model="cType6" class="selectBox" style="width: 110px">
|
|
|
- <el-option label="全部年级" value="全部年级"></el-option>
|
|
|
- <el-option label="一年级" value="一年级"></el-option>
|
|
|
- <el-option label="二年级" value="二年级"></el-option>
|
|
|
- </el-select>
|
|
|
- </div>
|
|
|
</div>
|
|
|
<div class="dataBox">
|
|
|
<CourseAna
|
|
|
- style="height: calc(100% - 40px)"
|
|
|
+ style="height: calc(100%)"
|
|
|
+ :courseNumberArray="courseNumberArray"
|
|
|
v-if="toolType == 0"
|
|
|
></CourseAna>
|
|
|
<ToolChart
|
|
|
- style="height: calc(100% - 40px)"
|
|
|
+ style="height: calc(100%)"
|
|
|
+ :toolArray="toolList"
|
|
|
v-if="toolType == 1"
|
|
|
></ToolChart>
|
|
|
</div>
|
|
@@ -404,7 +358,8 @@
|
|
|
<div class="title">课程协同情况</div>
|
|
|
</div>
|
|
|
<div class="dataBox">
|
|
|
- <WorkTime style="height: calc(100% - 72px)" v-if="xtType"></WorkTime>
|
|
|
+ <WorkTime style="height: calc(100% - 25px)" :personArray="personList" v-if="xtType"></WorkTime>
|
|
|
+ <Subjuect style="height: calc(100% - 25px)" v-if="!xtType"></Subjuect>
|
|
|
<div class="otherCss">
|
|
|
<div v-if="!xtType">转换为人员协同</div>
|
|
|
<div v-if="xtType">转换为学科协同</div>
|
|
@@ -429,6 +384,7 @@ import WorkTime from "./chartList/workTime.vue";
|
|
|
import Bar from "./chartList/bar.vue";
|
|
|
import CourseNum from "./chartList/courseNum.vue";
|
|
|
import ToolChart from "./chartList/toolChart.vue";
|
|
|
+import Subjuect from "./chartList/subjuect.vue";
|
|
|
export default {
|
|
|
components: {
|
|
|
TeaFre,
|
|
@@ -441,6 +397,7 @@ export default {
|
|
|
Bar,
|
|
|
CourseNum,
|
|
|
ToolChart,
|
|
|
+ Subjuect,
|
|
|
},
|
|
|
props: {
|
|
|
oid: {
|
|
@@ -454,12 +411,7 @@ export default {
|
|
|
return {
|
|
|
isLoading: false,
|
|
|
cType: "全部年级",
|
|
|
- cType1: "全部年级",
|
|
|
- cType2: "全部学科",
|
|
|
- cType3: "全部主题",
|
|
|
- cType4: "按年级",
|
|
|
- cType5: "全部学科",
|
|
|
- cType6: "全部年级",
|
|
|
+ cType4: "",
|
|
|
cType7: "全部课程",
|
|
|
toolType: 0,
|
|
|
tType: 0,
|
|
@@ -472,18 +424,49 @@ export default {
|
|
|
allCourse: 0,
|
|
|
courseTemplate: 0,
|
|
|
loginCountMonthArray: [],
|
|
|
- lType: "grade",
|
|
|
+ lType: "all",
|
|
|
+ lType1: "all",
|
|
|
tedurArray: [],
|
|
|
+ tedurArray1: [],
|
|
|
classList: [],
|
|
|
subjectList: [],
|
|
|
themeList: [],
|
|
|
allTime: 0,
|
|
|
- sumTime: 0,
|
|
|
gradeLength: 0,
|
|
|
subjectLength: 0,
|
|
|
themeLength: 0,
|
|
|
courseTList: [],
|
|
|
courseLength: 0,
|
|
|
+ courseWorksCountYearArray: [],
|
|
|
+ allCourseWorks: [],
|
|
|
+ gradeList: [],
|
|
|
+ subjectList: [],
|
|
|
+ thList: [],
|
|
|
+ worksCount: 0,
|
|
|
+ haveWorksCourse: 0,
|
|
|
+ courseNumberArray: [],
|
|
|
+ gradeArray: [],
|
|
|
+ subjectArray: [],
|
|
|
+ themeArray: [],
|
|
|
+ allArray: [],
|
|
|
+ toolList: [],
|
|
|
+ personList: [],
|
|
|
+ workNumList: [],
|
|
|
+ taskCount: 0,
|
|
|
+ workCount: 0,
|
|
|
+ isCourseCount: 0,
|
|
|
+ allCourseCount: 0,
|
|
|
+ courseArray: [],
|
|
|
+ evaCount: 0,
|
|
|
+ evaWorksCount: 0,
|
|
|
+ pusaDep: [
|
|
|
+ { value: 0, name: "课程总数" },
|
|
|
+ { value: 0, name: "设置评价课程" },
|
|
|
+ { value: 0, name: "已提交作业课程" },
|
|
|
+ { value: 0, name: "已评价课程" },
|
|
|
+ { value: 0, name: "教学评一体化课程" },
|
|
|
+ ],
|
|
|
+ weekCourse2: [],
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -499,9 +482,16 @@ export default {
|
|
|
xtEchart() {
|
|
|
this.xtType = !this.xtType;
|
|
|
},
|
|
|
+ format(percentage) {
|
|
|
+ return percentage + '%';
|
|
|
+ },
|
|
|
typeChange1() {
|
|
|
var a = [];
|
|
|
- if (this.lType == "grade") {
|
|
|
+ if (this.lType == "all") {
|
|
|
+ a = this.classList.concat(this.subjectList, this.themeList);
|
|
|
+ this.courseLength =
|
|
|
+ this.gradeLength + this.subjectLength + this.themeLength;
|
|
|
+ } else if (this.lType == "grade") {
|
|
|
a = this.classList;
|
|
|
this.courseLength = this.gradeLength;
|
|
|
} else if (this.lType == "subject") {
|
|
@@ -520,7 +510,167 @@ export default {
|
|
|
}
|
|
|
this.allTime = time;
|
|
|
|
|
|
- // this.sumTime = Math.ceil(time / this.studentNum);
|
|
|
+ this.$forceUpdate();
|
|
|
+ },
|
|
|
+ typeChange2() {
|
|
|
+ const date = new Date();
|
|
|
+ var Month = date.getMonth() + 1;
|
|
|
+ var Year = date.getFullYear();
|
|
|
+ let courseWorksCountYearArray = [];
|
|
|
+ for (var i = Month; i > Month - 12; i--) {
|
|
|
+ if (i <= 0) {
|
|
|
+ courseWorksCountYearArray.push({
|
|
|
+ Year: Year - 1,
|
|
|
+ Month: 12 + i,
|
|
|
+ mon: 0,
|
|
|
+ tue: 0,
|
|
|
+ wed: 0,
|
|
|
+ thur: 0,
|
|
|
+ fri: 0,
|
|
|
+ sat: 0,
|
|
|
+ sun: 0,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ courseWorksCountYearArray.push({
|
|
|
+ Month: i,
|
|
|
+ Year: Year,
|
|
|
+ mon: 0,
|
|
|
+ tue: 0,
|
|
|
+ wed: 0,
|
|
|
+ thur: 0,
|
|
|
+ fri: 0,
|
|
|
+ sat: 0,
|
|
|
+ sun: 0,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ courseWorksCountYearArray = courseWorksCountYearArray.reverse();
|
|
|
+ for (var i = 0; i < this.allCourseWorks.length; i++) {
|
|
|
+ let _date = new Date(this.allCourseWorks[i].create_at);
|
|
|
+ let _type = this.allCourseWorks[i].typeid;
|
|
|
+ var _month = _date.getMonth() + 1;
|
|
|
+ var _year = _date.getFullYear();
|
|
|
+ var _day = _date.getDay();
|
|
|
+ let dayArray = ["sun", "mon", "tue", "wed", "thur", "fri", "sat"];
|
|
|
+ for (var j = 0; j < courseWorksCountYearArray.length; j++) {
|
|
|
+ if (this.lType1 == "all") {
|
|
|
+ if (
|
|
|
+ _month == courseWorksCountYearArray[j].Month &&
|
|
|
+ _year == courseWorksCountYearArray[j].Year
|
|
|
+ ) {
|
|
|
+ courseWorksCountYearArray[j][dayArray[_day]]++;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ } else if (this.lType1 == "grade") {
|
|
|
+ if (
|
|
|
+ _month == courseWorksCountYearArray[j].Month &&
|
|
|
+ _year == courseWorksCountYearArray[j].Year &&
|
|
|
+ this.gradeList.indexOf(_type) != -1
|
|
|
+ ) {
|
|
|
+ courseWorksCountYearArray[j][dayArray[_day]]++;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ } else if (this.lType1 == "subject") {
|
|
|
+ if (
|
|
|
+ _month == courseWorksCountYearArray[j].Month &&
|
|
|
+ _year == courseWorksCountYearArray[j].Year &&
|
|
|
+ this.subjectList.indexOf(_type) != -1
|
|
|
+ ) {
|
|
|
+ courseWorksCountYearArray[j][dayArray[_day]]++;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (
|
|
|
+ _month == courseWorksCountYearArray[j].Month &&
|
|
|
+ _year == courseWorksCountYearArray[j].Year &&
|
|
|
+ this.thList.indexOf(_type) != -1
|
|
|
+ ) {
|
|
|
+ courseWorksCountYearArray[j][dayArray[_day]]++;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ var worksCount = 0,
|
|
|
+ haveWorksCourse = [];
|
|
|
+ for (var i = 0; i < this.allCourseWorks.length; i++) {
|
|
|
+ if (this.lType1 == "all") {
|
|
|
+ if (this.allCourseWorks[i].id) {
|
|
|
+ worksCount++;
|
|
|
+ }
|
|
|
+ if (haveWorksCourse.length == 0) {
|
|
|
+ haveWorksCourse.push(this.allCourseWorks[i].courseid);
|
|
|
+ } else {
|
|
|
+ if (
|
|
|
+ haveWorksCourse.indexOf(this.allCourseWorks[i].courseid) == -1
|
|
|
+ ) {
|
|
|
+ haveWorksCourse.push(this.allCourseWorks[i].courseid);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (this.lType1 == "grade") {
|
|
|
+ if (this.gradeList.indexOf(this.allCourseWorks[i].typeid)) {
|
|
|
+ if (this.allCourseWorks[i].id) {
|
|
|
+ worksCount++;
|
|
|
+ }
|
|
|
+ if (haveWorksCourse.length == 0) {
|
|
|
+ haveWorksCourse.push(this.allCourseWorks[i].courseid);
|
|
|
+ } else {
|
|
|
+ if (
|
|
|
+ haveWorksCourse.indexOf(this.allCourseWorks[i].courseid) == -1
|
|
|
+ ) {
|
|
|
+ haveWorksCourse.push(this.allCourseWorks[i].courseid);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (this.lType1 == "subject") {
|
|
|
+ if (this.subjectList.indexOf(this.allCourseWorks[i].typeid)) {
|
|
|
+ if (this.allCourseWorks[i].id) {
|
|
|
+ worksCount++;
|
|
|
+ }
|
|
|
+ if (haveWorksCourse.length == 0) {
|
|
|
+ haveWorksCourse.push(this.allCourseWorks[i].courseid);
|
|
|
+ } else {
|
|
|
+ if (
|
|
|
+ haveWorksCourse.indexOf(this.allCourseWorks[i].courseid) == -1
|
|
|
+ ) {
|
|
|
+ haveWorksCourse.push(this.allCourseWorks[i].courseid);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (this.thList.indexOf(this.allCourseWorks[i].typeid)) {
|
|
|
+ if (this.allCourseWorks[i].id) {
|
|
|
+ worksCount++;
|
|
|
+ }
|
|
|
+ if (haveWorksCourse.length == 0) {
|
|
|
+ haveWorksCourse.push(this.allCourseWorks[i].courseid);
|
|
|
+ } else {
|
|
|
+ if (
|
|
|
+ haveWorksCourse.indexOf(this.allCourseWorks[i].courseid) == -1
|
|
|
+ ) {
|
|
|
+ haveWorksCourse.push(this.allCourseWorks[i].courseid);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.courseWorksCountYearArray = courseWorksCountYearArray;
|
|
|
+ this.worksCount = worksCount;
|
|
|
+ this.haveWorksCourse = haveWorksCourse.length;
|
|
|
+
|
|
|
+ this.$forceUpdate();
|
|
|
+ },
|
|
|
+ typeChange() {
|
|
|
+ if (this.cType4 === "") {
|
|
|
+ this.courseNumberArray = this.allArray;
|
|
|
+ } else if (this.cType4 === "grade") {
|
|
|
+ this.courseNumberArray = this.gradeArray;
|
|
|
+ } else if (this.cType4 === "theme") {
|
|
|
+ this.courseNumberArray = this.themeArray;
|
|
|
+ } else if (this.cType4 === "subject") {
|
|
|
+ this.courseNumberArray = this.subjectArray;
|
|
|
+ }
|
|
|
this.$forceUpdate();
|
|
|
},
|
|
|
getData() {
|
|
@@ -542,6 +692,7 @@ export default {
|
|
|
let _timeCourse = res.data[4]; //查询半年内全部课程
|
|
|
this.courseTemplate = res.data[5][0].count; //查询模板课程总数
|
|
|
let tList = res.data[6]; //授课时长
|
|
|
+ // let countCourseWorks = res.data[8][0].count; //获取有作业的课程
|
|
|
this.courseTList = tList;
|
|
|
|
|
|
//将数据根据time里面的月份分成多个数组
|
|
@@ -687,7 +838,10 @@ export default {
|
|
|
this.themeLength = _tList.length;
|
|
|
|
|
|
var a = [];
|
|
|
- if (this.lType == "grade") {
|
|
|
+ if (this.lType == "all") {
|
|
|
+ this.tedurArray = _grade.concat(_subject, _themeList);
|
|
|
+ this.courseLength = _gList.length + _sList.length + _tList.length;
|
|
|
+ } else if (this.lType == "grade") {
|
|
|
this.tedurArray = _grade;
|
|
|
this.courseLength = _gList.length;
|
|
|
} else if (this.lType == "subject") {
|
|
@@ -705,7 +859,342 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
this.allTime = time;
|
|
|
- // this.sumTime = Math.ceil(time / this.studentNum);
|
|
|
+
|
|
|
+ let allCourseWorks = res.data[7]; //作业总数量
|
|
|
+ this.allCourseWorks = allCourseWorks;
|
|
|
+ this.gradeList = _gradeList;
|
|
|
+ this.subjectList = _subjectList;
|
|
|
+ this.thList = _thList;
|
|
|
+ this.typeChange2();
|
|
|
+
|
|
|
+ let _course = res.data[8]; //课程
|
|
|
+ let _gradeArray = [];
|
|
|
+ let _subjectArray = [];
|
|
|
+ let _themeArray = [];
|
|
|
+
|
|
|
+ for (var i = 0; i < _grade.length; i++) {
|
|
|
+ _gradeArray.push({
|
|
|
+ name: _grade[i].name,
|
|
|
+ typeid: _grade[i].id,
|
|
|
+ course: 0,
|
|
|
+ array: [],
|
|
|
+ });
|
|
|
+ for (var z = 0; z < _course.length; z++) {
|
|
|
+ if (_course[z].typeid == _grade[i].id) {
|
|
|
+ _gradeArray[i].course++;
|
|
|
+ _gradeArray[i].array.push(_course[z].courseid);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ for (var i = 0; i < _subject.length; i++) {
|
|
|
+ _subjectArray.push({
|
|
|
+ name: _subject[i].name,
|
|
|
+ typeid: _subject[i].id,
|
|
|
+ course: 0,
|
|
|
+ array: [],
|
|
|
+ });
|
|
|
+ for (var z = 0; z < _course.length; z++) {
|
|
|
+ if (_course[z].typeid == _subject[i].id) {
|
|
|
+ _subjectArray[i].course++;
|
|
|
+ _subjectArray[i].array.push(_course[z].courseid);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ for (var i = 0; i < _themeList.length; i++) {
|
|
|
+ _themeArray.push({
|
|
|
+ name: _themeList[i].name,
|
|
|
+ typeid: _themeList[i].id,
|
|
|
+ course: 0,
|
|
|
+ array: [],
|
|
|
+ });
|
|
|
+ for (var z = 0; z < _course.length; z++) {
|
|
|
+ if (_course[z].typeid == _themeList[i].id) {
|
|
|
+ _themeArray[i].course++;
|
|
|
+ _themeArray[i].array.push(_course[z].courseid);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.gradeArray = _gradeArray;
|
|
|
+ this.subjectArray = _subjectArray;
|
|
|
+ this.themeArray = _themeArray;
|
|
|
+ this.allArray = [..._gradeArray, ..._subjectArray, ..._themeArray];
|
|
|
+ this.typeChange();
|
|
|
+
|
|
|
+ var courseList = res.data[9];
|
|
|
+ var cList = [];
|
|
|
+ for (var i = 0; i < courseList.length; i++) {
|
|
|
+ cList.push(JSON.parse(courseList[i].chapters));
|
|
|
+ }
|
|
|
+
|
|
|
+ var toolList = [
|
|
|
+ [10, 65], //互动类
|
|
|
+ [7, 1, 52, 3, 48], //思维类
|
|
|
+ [49], //协作类
|
|
|
+ [4, 45, 15, 16, 50, 41, 47], //测评类
|
|
|
+ [40], //评价类
|
|
|
+ [18, 21, 22, 23, 24, 32, 57, 63], //编程类
|
|
|
+ [28, 31, 39, 66, 67, 68], //学科类
|
|
|
+ ];
|
|
|
+ var toolAllArray = [
|
|
|
+ { name: "互动类", value: 0 },
|
|
|
+ { name: "思维类", value: 0 },
|
|
|
+ { name: "协作类", value: 0 },
|
|
|
+ { name: "测评类", value: 0 },
|
|
|
+ { name: "评价类", value: 0 },
|
|
|
+ { name: "编程类", value: 0 },
|
|
|
+ { name: "学科类", value: 0 },
|
|
|
+ ];
|
|
|
+ for (var p = 0; p < toolList.length; p++) {
|
|
|
+ for (var i = 0; i < cList.length; i++) {
|
|
|
+ for (var j = 0; j < cList[i].length; j++) {
|
|
|
+ for (
|
|
|
+ var k = 0;
|
|
|
+ k < cList[i][j].chapterInfo[0].taskJson.length;
|
|
|
+ k++
|
|
|
+ ) {
|
|
|
+ for (
|
|
|
+ var q = 0;
|
|
|
+ q <
|
|
|
+ cList[i][j].chapterInfo[0].taskJson[k].toolChoose.length;
|
|
|
+ q++
|
|
|
+ ) {
|
|
|
+ if (
|
|
|
+ toolList[p].indexOf(
|
|
|
+ cList[i][j].chapterInfo[0].taskJson[k].toolChoose[q]
|
|
|
+ .tool[0]
|
|
|
+ ) != -1
|
|
|
+ ) {
|
|
|
+ toolAllArray[p].value++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for(var i = 0;i<toolAllArray.length;i++){
|
|
|
+ if(toolAllArray[i].value == 0){
|
|
|
+ toolAllArray.splice(i,1)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.toolList = toolAllArray;
|
|
|
+
|
|
|
+ var twoPerson = 0,threePerson = 0,fivePerson = 0,sevenPerson = 0;
|
|
|
+ var personList = []
|
|
|
+ for(var i = 0;i<courseList.length;i++){
|
|
|
+ if(courseList[i].course_teacher != ""){
|
|
|
+ if(courseList[i].course_teacher.split(',').length <= 2){
|
|
|
+ twoPerson++
|
|
|
+ }else if(4 >= courseList[i].course_teacher.split(',').length && courseList[i].course_teacher.split(',').length > 2){
|
|
|
+ threePerson++;
|
|
|
+ }else if(6 >= courseList[i].course_teacher.split(',').length && courseList[i].course_teacher.split(',').length > 4){
|
|
|
+ fivePerson++;
|
|
|
+ }else if(courseList[i].course_teacher.split(',').length > 7){
|
|
|
+ sevenPerson++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ personList.push({ name:"2人以下",value: twoPerson },{ name:"3-4人",value: threePerson },{ name:"5-6人",value: fivePerson },{ name:"7人以上",value: sevenPerson });
|
|
|
+ this.personList = personList;
|
|
|
+
|
|
|
+ let _workCourse = res.data[10]; //带作业的课程
|
|
|
+ let _taskCount = 0 //任务数量
|
|
|
+
|
|
|
+ var wList = [];
|
|
|
+ for (var i = 0; i < _workCourse.length; i++) {
|
|
|
+ if (!wList[_workCourse[i].courseId]) {
|
|
|
+ wList[_workCourse[i].courseId] = {
|
|
|
+ cid: _workCourse[i].courseId,
|
|
|
+ title: _workCourse[i].title,
|
|
|
+ task: 0,
|
|
|
+ work: 0,
|
|
|
+ };
|
|
|
+ let chapters = JSON.parse(_workCourse[i].chapters);
|
|
|
+ for (var j = 0; j < chapters.length; j++) {
|
|
|
+ if (wList[_workCourse[i].courseId].task == 0) {
|
|
|
+ wList[_workCourse[i].courseId].task =
|
|
|
+ chapters[j].chapterInfo[0].taskJson.length;
|
|
|
+ } else {
|
|
|
+ wList[_workCourse[i].courseId].task +=
|
|
|
+ chapters[j].chapterInfo[0].taskJson.length;
|
|
|
+ }
|
|
|
+ _taskCount += chapters[j].chapterInfo[0].taskJson.length;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for (var i = 0; i < _workCourse.length; i++) {
|
|
|
+ let a = Object.keys(wList);
|
|
|
+ for (var j = 0; j < Object.keys(wList).length; j++) {
|
|
|
+ if (_workCourse[i].courseId == wList[a[j]].cid && _workCourse[i].id) {
|
|
|
+ wList[a[j]].work++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ var workNumList = Object.values(wList).map((item) => [
|
|
|
+ item.task,
|
|
|
+ item.work,
|
|
|
+ item.title,
|
|
|
+ item.cid,
|
|
|
+ ]);
|
|
|
+ this.workNumList = workNumList;
|
|
|
+ this.taskCount = _taskCount
|
|
|
+ this.workCount = _workCourse.length
|
|
|
+ this.isCourseCount = res.data[11][0].count; //课程开展总数
|
|
|
+ this.allCourseCount = res.data[9].length; //课程总数
|
|
|
+
|
|
|
+ let _gradeCourse = 0 //各年级上传课程
|
|
|
+ let _subjectCourse = 0 //各学科上传课程
|
|
|
+ let _courseArray = []
|
|
|
+ _subject.push({ name: '其他' })
|
|
|
+
|
|
|
+ for (var i = 0; i < _grade.length; i++) {
|
|
|
+ _courseArray.push({
|
|
|
+ name: _grade[i].name,
|
|
|
+ id: _grade[i].id,
|
|
|
+ courseid: [],
|
|
|
+ subject: [],
|
|
|
+ })
|
|
|
+ for (var z = 0; z < _course.length; z++) {
|
|
|
+ if (_course[z].typeid == _grade[i].id) {
|
|
|
+ _gradeCourse++
|
|
|
+ if (_courseArray[i].courseid.indexOf(_course[z].courseid) === -1) {
|
|
|
+ _courseArray[i].courseid.push(_course[z].courseid)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ for (var j = 0; j < _subject.length; j++) {
|
|
|
+ _courseArray[i].subject.push({
|
|
|
+ name: _subject[j].name,
|
|
|
+ id: _subject[j].id,
|
|
|
+ course: 0
|
|
|
+ })
|
|
|
+ for (var z = 0; z < _course.length; z++) {
|
|
|
+ if (_course[z].typeid == _subject[j].id && _courseArray[i].courseid.indexOf(_course[z].courseid) !== -1) {
|
|
|
+ _courseArray[i].subject[j].course++
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ let sum = 0
|
|
|
+ for (var j = 0; j < _courseArray[i].subject.length - 1; j++) {
|
|
|
+ sum += _courseArray[i].subject[j].course
|
|
|
+ }
|
|
|
+ _courseArray[i].subject[_courseArray[i].subject.length - 1].course = (_courseArray[i].courseid.length - sum) < 0 ? 0 : _courseArray[i].courseid.length - sum
|
|
|
+ }
|
|
|
+ for (var j = 0; j < _subject.length; j++) {
|
|
|
+ for (var z = 0; z < _course.length; z++) {
|
|
|
+ if (_course[z].typeid == _subject[j].id) {
|
|
|
+ _subjectCourse++
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.courseArray = _courseArray
|
|
|
+
|
|
|
+ this.evaCount = res.data[12][0].count; //设置评价
|
|
|
+
|
|
|
+ this.evaWorksCount = res.data[13][0].count; //查询有目标并且有评价的作业
|
|
|
+
|
|
|
+ for (var i = 0; i < this.pusaDep.length; i++) {
|
|
|
+ if (this.pusaDep[i].name == "课程总数") {
|
|
|
+ this.pusaDep[i].value = ((this.allCourse / this.allCourse) * 100).toFixed(
|
|
|
+ 0
|
|
|
+ );
|
|
|
+ } else if (this.pusaDep[i].name == "设置评价课程") {
|
|
|
+ this.pusaDep[i].value = (
|
|
|
+ (this.evaCount / this.allCourse) *
|
|
|
+ 100
|
|
|
+ ).toFixed(0);
|
|
|
+ } else if (this.pusaDep[i].name == "已提交作业课程") {
|
|
|
+ this.pusaDep[i].value = (
|
|
|
+ (this.haveWorksCourse / this.allCourse) *
|
|
|
+ 100
|
|
|
+ ).toFixed(0);
|
|
|
+ } else if (this.pusaDep[i].name == "已评价课程") {
|
|
|
+ this.pusaDep[i].value = (
|
|
|
+ (this.evaWorksCount / this.allCourse) *
|
|
|
+ 100
|
|
|
+ ).toFixed(0);
|
|
|
+ } else if (this.pusaDep[i].name == "教学评一体化课程") {
|
|
|
+ this.pusaDep[i].value = (
|
|
|
+ (this.evaWorksCount / this.allCourse) *
|
|
|
+ 100
|
|
|
+ ).toFixed(0);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ var today = new Date();
|
|
|
+ var lastDayOfWeek = new Date(today.setDate(today.getDate() - today.getDay() + 7));;//本周周日
|
|
|
+
|
|
|
+ let weekArray = {
|
|
|
+ lastWeek: [],//上周
|
|
|
+ toWeek: [] //本周
|
|
|
+ }
|
|
|
+ for (var i = 0; i < 14; i++) {
|
|
|
+ let time = JSON.parse(JSON.stringify(lastDayOfWeek))
|
|
|
+ let time2 = new Date(time)
|
|
|
+ var a = new Date(time2.setDate(time2.getDate() - i));
|
|
|
+ if (i > 6) {
|
|
|
+ weekArray.lastWeek.push(a.getFullYear() + '-' + (a.getMonth() + 1) + '-' + a.getDate());
|
|
|
+ } else {
|
|
|
+ weekArray.toWeek.push(a.getFullYear() + '-' + (a.getMonth() + 1) + '-' + a.getDate());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ let weekCourse = [];
|
|
|
+ let weekCourse2 = [];
|
|
|
+ let lastWeekCouseCount = 0
|
|
|
+ let toWeekCouseCount = 0
|
|
|
+ for (var z = 0; z < _course.length; z++) {
|
|
|
+ let _date = new Date(weekArray.lastWeek[weekArray.lastWeek.length - 1])
|
|
|
+ if (new Date(_course[z].create_at) > _date && _course[z].pid == '34628934-d02f-11ec-8c78-005056b86db5') {
|
|
|
+ weekCourse.push(_course[z])
|
|
|
+ var a = new Date(_course[z].create_at)
|
|
|
+ var string = a.getFullYear() + '-' + (a.getMonth() + 1) + '-' + a.getDate()
|
|
|
+ if (weekArray.lastWeek.indexOf(string) != -1) {
|
|
|
+ lastWeekCouseCount++
|
|
|
+ } else {
|
|
|
+ toWeekCouseCount++
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ let lastCourseidWeek = []
|
|
|
+ let toCourseidWeek = []
|
|
|
+ for (var i = 0; i < _grade.length; i++) {
|
|
|
+ weekCourse2.push({
|
|
|
+ name: _grade[i].name,
|
|
|
+ id: _grade[i].id,
|
|
|
+ lastCourse: 0,
|
|
|
+ toCourse: 0,
|
|
|
+ })
|
|
|
+ for (var z = 0; z < weekCourse.length; z++) {
|
|
|
+ if (weekCourse[z].typeid == _grade[i].id) {
|
|
|
+ var a = new Date(weekCourse[z].create_at)
|
|
|
+ var string = a.getFullYear() + '-' + (a.getMonth() + 1) + '-' + a.getDate()
|
|
|
+ if (weekArray.lastWeek.indexOf(string) != -1) {
|
|
|
+ weekCourse2[i].lastCourse++
|
|
|
+ if (lastCourseidWeek.indexOf(weekCourse[z].courseid) === -1) {
|
|
|
+ lastCourseidWeek.push(weekCourse[z].courseid)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ weekCourse2[i].toCourse++
|
|
|
+ if (toCourseidWeek.indexOf(weekCourse[z].courseid) === -1) {
|
|
|
+ toCourseidWeek.push(weekCourse[z].courseid)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ weekCourse2.push({
|
|
|
+ name: '其他',
|
|
|
+ id: '',
|
|
|
+ lastCourse: (lastWeekCouseCount - lastCourseidWeek.length) > 0 ? (lastWeekCouseCount - lastCourseidWeek.length) : 0,
|
|
|
+ toCourse: (toWeekCouseCount - toCourseidWeek.length) > 0 ? (toWeekCouseCount - toCourseidWeek.length) : 0,
|
|
|
+ })
|
|
|
+
|
|
|
+ this.weekCourse2 = weekCourse2
|
|
|
|
|
|
this.$forceUpdate();
|
|
|
})
|