|
@@ -1,131 +1,350 @@
|
|
|
<template>
|
|
|
- <div class="body1" v-loading="isLoading">
|
|
|
+ <div class="body1">
|
|
|
<!-- 课程数据 -->
|
|
|
<div class="left">
|
|
|
<div class="top">
|
|
|
- <div class="titleBox">
|
|
|
- <div class="title">授课频次</div>
|
|
|
+ <div class="titleBox" style="justify-content: space-between">
|
|
|
+ <div class="title">基础概况</div>
|
|
|
+ <el-select v-model="cType7" class="selectBox" style="width: 110px">
|
|
|
+ <el-option label="全部课程" value="全部课程"></el-option>
|
|
|
+ </el-select>
|
|
|
</div>
|
|
|
<div class="dataBox">
|
|
|
<div class="teafre">
|
|
|
<div class="teaLeft">
|
|
|
- <div>累计授课次数</div>
|
|
|
- <div>{{ wCount }}</div>
|
|
|
+ <div>课程总数</div>
|
|
|
+ <div>15310</div>
|
|
|
+ </div>
|
|
|
+ <div class="teaLeft teaRigth">
|
|
|
+ <div>本月新增课程环比</div>
|
|
|
+ <div>0.9%</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="teafre">
|
|
|
+ <div class="teaLeft">
|
|
|
+ <div>模板课程总数</div>
|
|
|
+ <div>1138</div>
|
|
|
</div>
|
|
|
<div class="teaLeft teaRigth">
|
|
|
- <div>相对增幅百分比</div>
|
|
|
- <div>{{ reInc }}%</div>
|
|
|
+ <div>本月新增课程总数</div>
|
|
|
+ <div>18</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <TeaFre
|
|
|
- style="height: calc(100% - 62px)"
|
|
|
- :monthArray="groupedArrayByMonth"
|
|
|
- ></TeaFre>
|
|
|
+ <TeaFre style="height: calc(100% - 140px)"></TeaFre>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="bottom">
|
|
|
<div class="titleBox">
|
|
|
- <div class="title">工具使用</div>
|
|
|
+ <div
|
|
|
+ class="title"
|
|
|
+ :class="{ isClick: skType == 0 }"
|
|
|
+ @click="skType = 0"
|
|
|
+ style="cursor: pointer; padding: 0 0 5px 0"
|
|
|
+ >
|
|
|
+ 授课时长
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="title"
|
|
|
+ :class="{ isClick: skType == 1 }"
|
|
|
+ @click="skType = 1"
|
|
|
+ style="cursor: pointer; padding: 0 0 5px 0"
|
|
|
+ >
|
|
|
+ 授课频次
|
|
|
+ </div>
|
|
|
+ <el-select v-model="cType" 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 class="timeDiv">
|
|
|
+ <div @click="tType = 0" :class="{ isClick: tType == 0 }">周</div>
|
|
|
+ <div @click="tType = 1" :class="{ isClick: tType == 1 }">月</div>
|
|
|
+ <div @click="tType = 2" :class="{ isClick: tType == 2 }">学期</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="teafre" v-if="!oType">
|
|
|
+ <div class="teaLeft">
|
|
|
+ <div>授课频次</div>
|
|
|
+ <div>153</div>
|
|
|
+ </div>
|
|
|
+ <div class="teaLeft">
|
|
|
+ <div>课程开展总数</div>
|
|
|
+ <div>4</div>
|
|
|
+ </div>
|
|
|
+ <div class="teaLeft teaRigth">
|
|
|
+ <div>课程评价授课次数</div>
|
|
|
+ <div>4</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="teafre" v-if="oType">
|
|
|
+ <div class="teaLeft">
|
|
|
+ <div>累计时长</div>
|
|
|
+ <div>110</div>
|
|
|
+ </div>
|
|
|
+ <div class="teaLeft">
|
|
|
+ <div>课程实施总数</div>
|
|
|
+ <div>4</div>
|
|
|
+ </div>
|
|
|
+ <div class="teaLeft teaRigth">
|
|
|
+ <div>课程评价时长</div>
|
|
|
+ <div>4</div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="dataBox">
|
|
|
- <ToolUse
|
|
|
- style="height: calc(100% - 40px)"
|
|
|
- :toolArray="toolList"
|
|
|
- ></ToolUse>
|
|
|
+ <ToolUse style="height: calc(100% - 120px)" v-if="!oType"></ToolUse>
|
|
|
+ <Bar style="height: calc(100% - 120px)" v-if="oType"></Bar>
|
|
|
+ <div class="otherCss">
|
|
|
+ <div v-if="!oType">切换为柱状图</div>
|
|
|
+ <div v-if="oType">切换为热力图</div>
|
|
|
+ <div class="otherImg" @click="otherEchart">
|
|
|
+ <img src="../../../../assets/icon/other.png" alt="" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="center">
|
|
|
<div class="top">
|
|
|
<div class="titleBox">
|
|
|
- <div class="title">课程数量</div>
|
|
|
- </div>
|
|
|
- <div class="dataBox middleBox">
|
|
|
- <div class="halfBox">
|
|
|
- <div class="teafre">
|
|
|
- <div class="teaMiddle cNum">
|
|
|
- <div>课程总数</div>
|
|
|
- <div>{{ typeCourseCount }}</div>
|
|
|
- </div>
|
|
|
- <div class="teaMiddle tNum">
|
|
|
- <div>类别总数</div>
|
|
|
- <div>{{ typeCount }}</div>
|
|
|
- </div>
|
|
|
- <div class="teaMiddle tSum">
|
|
|
- <div>类别平均</div>
|
|
|
- <div>{{ (typeCourseCount / typeCount).toFixed(0) }}</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <CateRank
|
|
|
- style="
|
|
|
- height: calc(100% - 72px);
|
|
|
- margin-top: 10px;
|
|
|
- overflow: auto;
|
|
|
- "
|
|
|
- :courseNumberArray="courseNumberArray2"
|
|
|
- ></CateRank>
|
|
|
+ <div
|
|
|
+ class="title"
|
|
|
+ :class="{ isClick: courseType == 0 }"
|
|
|
+ @click="courseType = 0"
|
|
|
+ style="cursor: pointer; padding: 0 0 5px 0"
|
|
|
+ >
|
|
|
+ 课程分布
|
|
|
</div>
|
|
|
- <div class="halfBox middleBox" style="align-items: flex-start">
|
|
|
- <WorkNum
|
|
|
- style="height: calc(100% - 40px)"
|
|
|
- :workNumList="workNumList"
|
|
|
- @openCourse="openCourse"
|
|
|
- ></WorkNum>
|
|
|
+ <div
|
|
|
+ class="title"
|
|
|
+ :class="{ isClick: courseType == 1 }"
|
|
|
+ @click="courseType = 1"
|
|
|
+ style="cursor: pointer; padding: 0 0 5px 0"
|
|
|
+ >
|
|
|
+ 课程总数变化
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="dataBox">
|
|
|
+ <CateRank
|
|
|
+ v-if="courseType == 0"
|
|
|
+ style="height: calc(100%)"
|
|
|
+ ></CateRank>
|
|
|
+ <CourseNum
|
|
|
+ v-if="courseType == 1"
|
|
|
+ style="height: calc(100%)"
|
|
|
+ ></CourseNum>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="bottom">
|
|
|
- <div class="titleBox">
|
|
|
- <div class="title">课程时间分布</div>
|
|
|
+ <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">
|
|
|
- <CourseTime style="height: calc(100% - 40px)"></CourseTime>
|
|
|
+ <div class="allBox" v-if="!shType" style="height: calc(100% - 30px)">
|
|
|
+ <div class="allBox_left">
|
|
|
+ <CourseTime v-if="!shType"></CourseTime>
|
|
|
+ </div>
|
|
|
+ <div class="allBox_right">
|
|
|
+ <div class="depth">
|
|
|
+ <span>设置评价</span>
|
|
|
+ <div>
|
|
|
+ <el-progress
|
|
|
+ :width="80"
|
|
|
+ type="circle"
|
|
|
+ :percentage="80"
|
|
|
+ :stroke-width="15"
|
|
|
+ :format="format"
|
|
|
+ color="#106BFF"
|
|
|
+ ></el-progress>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="depth">
|
|
|
+ <span>已提交作业</span>
|
|
|
+ <div>
|
|
|
+ <el-progress
|
|
|
+ :width="80"
|
|
|
+ type="circle"
|
|
|
+ :percentage="80"
|
|
|
+ :stroke-width="15"
|
|
|
+ :format="format"
|
|
|
+ color="#106BFF"
|
|
|
+ ></el-progress>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="depth">
|
|
|
+ <span>已评价课程</span>
|
|
|
+ <div>
|
|
|
+ <el-progress
|
|
|
+ :width="80"
|
|
|
+ type="circle"
|
|
|
+ :percentage="80"
|
|
|
+ :stroke-width="15"
|
|
|
+ :format="format"
|
|
|
+ color="#106BFF"
|
|
|
+ ></el-progress>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="depth">
|
|
|
+ <span>教学评一体化</span>
|
|
|
+ <div>
|
|
|
+ <el-progress
|
|
|
+ :width="80"
|
|
|
+ type="circle"
|
|
|
+ :percentage="80"
|
|
|
+ :stroke-width="15"
|
|
|
+ :format="format"
|
|
|
+ color="#106BFF"
|
|
|
+ ></el-progress>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="teafre" v-if="shType">
|
|
|
+ <div class="teaLeft">
|
|
|
+ <div>平台实施课程总数</div>
|
|
|
+ <div>18</div>
|
|
|
+ </div>
|
|
|
+ <div class="teaLeft">
|
|
|
+ <div>平台实施课程占比</div>
|
|
|
+ <div>80%</div>
|
|
|
+ </div>
|
|
|
+ <div class="teaLeft">
|
|
|
+ <div>课程平均任务数量</div>
|
|
|
+ <div>18</div>
|
|
|
+ </div>
|
|
|
+ <div class="teaLeft teaRigth">
|
|
|
+ <div>课程平均作业数量</div>
|
|
|
+ <div>18</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <WorkNum v-if="shType"></WorkNum>
|
|
|
+ <div class="otherCss">
|
|
|
+ <div v-if="!shType">转换为散点图</div>
|
|
|
+ <div v-if="shType">转换为漏斗图</div>
|
|
|
+ <div class="otherImg" @click="shEchart">
|
|
|
+ <img src="../../../../assets/icon/other.png" alt="" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="right">
|
|
|
<div class="top" style="border-radius: 5px">
|
|
|
- <div class="titleBox">
|
|
|
- <div class="title">课程分析</div>
|
|
|
- <el-select v-model="cType" @change="typeChange" class="selectBox">
|
|
|
- <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>
|
|
|
+ <div class="titleBox" style="justify-content: space-between">
|
|
|
+ <div
|
|
|
+ style="
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ 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>
|
|
|
+ <el-select v-model="cType4" 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-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)"
|
|
|
- :courseNumberArray="courseNumberArray"
|
|
|
- @openCourse="openCourse2"
|
|
|
- ></CourseAna>
|
|
|
+ <CourseAna style="height: calc(100% - 40px)" v-if="toolType == 0"></CourseAna>
|
|
|
+ <ToolChart style="height: calc(100% - 40px)" v-if="toolType == 1"></ToolChart>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="bottom">
|
|
|
<div class="titleBox">
|
|
|
- <div class="title">授课时长</div>
|
|
|
- <el-select v-model="lType" @change="typeChange1" class="selectBox">
|
|
|
- <el-option label="年级" value="grade"></el-option>
|
|
|
- <el-option label="主题" value="theme"></el-option>
|
|
|
- <el-option label="学科" value="subject"></el-option>
|
|
|
- </el-select>
|
|
|
+ <div class="title">课程协同情况</div>
|
|
|
</div>
|
|
|
<div class="dataBox">
|
|
|
- <div class="teafre" style="margin: 10px 0 0 0">
|
|
|
- <div class="teaLeft">
|
|
|
- <div>累计时长</div>
|
|
|
- <div>{{ allTime }}小时</div>
|
|
|
- </div>
|
|
|
- <div class="teaLeft teaRigth">
|
|
|
- <div>学生在线平均时长</div>
|
|
|
- <div>{{ sumTime }}小时</div>
|
|
|
+ <WorkTime style="height: calc(100% - 72px)" v-if="xtType"></WorkTime>
|
|
|
+ <div class="otherCss">
|
|
|
+ <div v-if="!xtType">转换为人员协同</div>
|
|
|
+ <div v-if="xtType">转换为学科协同</div>
|
|
|
+ <div class="otherImg" @click="xtEchart">
|
|
|
+ <img src="../../../../assets/icon/other.png" alt="" />
|
|
|
</div>
|
|
|
</div>
|
|
|
- <WorkTime
|
|
|
- style="height: calc(100% - 72px)"
|
|
|
- :workList="tedurArray"
|
|
|
- ></WorkTime>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -140,6 +359,9 @@ import WorkNum from "./chartList/workNum.vue";
|
|
|
import CourseTime from "./chartList/courseTime.vue";
|
|
|
import CourseAna from "./chartList/courseAna.vue";
|
|
|
import WorkTime from "./chartList/workTime.vue";
|
|
|
+import Bar from "./chartList/bar.vue";
|
|
|
+import CourseNum from "./chartList/courseNum.vue";
|
|
|
+import ToolChart from "./chartList/toolChart.vue";
|
|
|
export default {
|
|
|
components: {
|
|
|
TeaFre,
|
|
@@ -149,6 +371,9 @@ export default {
|
|
|
CourseTime,
|
|
|
CourseAna,
|
|
|
WorkTime,
|
|
|
+ Bar,
|
|
|
+ CourseNum,
|
|
|
+ ToolChart,
|
|
|
},
|
|
|
props: {
|
|
|
oid: {
|
|
@@ -160,432 +385,35 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- isLoading: false,
|
|
|
- wCount: 0,
|
|
|
- cCount: 0,
|
|
|
- groupedArrayByMonth: [],
|
|
|
- toolList: [],
|
|
|
- reInc: 0,
|
|
|
- cType: "",
|
|
|
- lType: "grade",
|
|
|
- tedurArray: [],
|
|
|
- classList: [],
|
|
|
- subjectList: [],
|
|
|
- themeList: [],
|
|
|
- typeCount: 0,
|
|
|
- typeCourseCount: 0,
|
|
|
- courseNumberArray: [],
|
|
|
- courseNumberArray2: [],
|
|
|
- gradeArray: [],
|
|
|
- subjectArray: [],
|
|
|
- themeArray: [],
|
|
|
- allArray: [],
|
|
|
- workNumList: [],
|
|
|
- allTime: 0,
|
|
|
- sumTime: 0,
|
|
|
- studentNum: 0,
|
|
|
+ cType: "全部年级",
|
|
|
+ cType1: "全部年级",
|
|
|
+ cType2: "全部学科",
|
|
|
+ cType3: "全部主题",
|
|
|
+ cType4: "按年级",
|
|
|
+ cType5: "全部学科",
|
|
|
+ cType6: "全部年级",
|
|
|
+ cType7: "全部课程",
|
|
|
+ toolType: 0,
|
|
|
+ tType: 0,
|
|
|
+ skType: 0,
|
|
|
+ courseType: 0,
|
|
|
+ sType: 0,
|
|
|
+ oType: false,
|
|
|
+ shType: false,
|
|
|
+ xtType: false,
|
|
|
};
|
|
|
},
|
|
|
- mounted() {
|
|
|
- this.getData();
|
|
|
- },
|
|
|
+ mounted() {},
|
|
|
methods: {
|
|
|
- openCourse(cid) {
|
|
|
- window.parent.postMessage({ cid: cid, screenType: "3" }, "*");
|
|
|
- },
|
|
|
- openCourse2(index) {
|
|
|
- console.log(index);
|
|
|
- // console.log(this.courseNumberArray);
|
|
|
- let id = this.courseNumberArray[index].typeid;
|
|
|
- let typea = "";
|
|
|
- let typeb = "";
|
|
|
- let typed = "";
|
|
|
- // console.log(this.gradeArray);
|
|
|
- // console.log(this.subjectArray);
|
|
|
- // console.log(this.themeArray);
|
|
|
- let key = 0;
|
|
|
- for (key in this.gradeArray) {
|
|
|
- if (this.gradeArray.hasOwnProperty.call(this.gradeArray, key)) {
|
|
|
- const element = this.gradeArray[key];
|
|
|
- if (element.typeid == id) {
|
|
|
- typea = id;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- for (key in this.subjectArray) {
|
|
|
- if (this.subjectArray.hasOwnProperty.call(this.subjectArray, key)) {
|
|
|
- const element = this.subjectArray[key];
|
|
|
- if (element.typeid == id) {
|
|
|
- typed = id;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- for (key in this.themeArray) {
|
|
|
- if (this.themeArray.hasOwnProperty.call(this.themeArray, key)) {
|
|
|
- const element = this.themeArray[key];
|
|
|
- if (element.typeid == id) {
|
|
|
- typeb = id;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- window.parent.postMessage(
|
|
|
- {
|
|
|
- tools: "openCourse",
|
|
|
- typea: typea || "",
|
|
|
- typeb: typeb || "",
|
|
|
- typed: typed || "",
|
|
|
- },
|
|
|
- "*"
|
|
|
- );
|
|
|
- },
|
|
|
- typeCourseCountCalu() {
|
|
|
- this.courseNumberArray2 = this.allArray;
|
|
|
- this.typeCount = this.courseNumberArray2.length;
|
|
|
- let course = [];
|
|
|
- for (var i = 0; i < this.courseNumberArray2.length; i++) {
|
|
|
- let _array = this.courseNumberArray2[i].array;
|
|
|
- for (var j = 0; j < _array.length; j++) {
|
|
|
- console.log(_array[j]);
|
|
|
- if (course.indexOf(_array[j]) == -1) {
|
|
|
- course.push(_array[j]);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- this.typeCourseCount = course.length;
|
|
|
- },
|
|
|
- typeChange() {
|
|
|
- if (this.cType === "") {
|
|
|
- this.courseNumberArray = this.allArray;
|
|
|
- } else if (this.cType === "grade") {
|
|
|
- this.courseNumberArray = this.gradeArray;
|
|
|
- } else if (this.cType === "theme") {
|
|
|
- this.courseNumberArray = this.themeArray;
|
|
|
- } else if (this.cType === "subject") {
|
|
|
- this.courseNumberArray = this.subjectArray;
|
|
|
- }
|
|
|
- this.$forceUpdate();
|
|
|
+ otherEchart() {
|
|
|
+ this.oType = !this.oType;
|
|
|
},
|
|
|
- typeChange1() {
|
|
|
- var a = []
|
|
|
- if (this.lType == "grade") {
|
|
|
- a = this.classList;
|
|
|
- } else if (this.lType == "subject") {
|
|
|
- a = this.subjectList;
|
|
|
- } else {
|
|
|
- a = this.themeList;
|
|
|
- }
|
|
|
- this.tedurArray = a;
|
|
|
- var time = 0;
|
|
|
- for(var i =0;i<a.length;i++){
|
|
|
- if(a[i].time){
|
|
|
- time += a[i].time;
|
|
|
- }
|
|
|
- }
|
|
|
- this.allTime = time;
|
|
|
- this.sumTime = Math.ceil(time / this.studentNum);
|
|
|
- this.$forceUpdate();
|
|
|
+ shEchart() {
|
|
|
+ this.shType = !this.shType;
|
|
|
},
|
|
|
- getData() {
|
|
|
- this.isLoading = true;
|
|
|
- let params = [
|
|
|
- {
|
|
|
- oid: this.oid,
|
|
|
- org: this.org,
|
|
|
- },
|
|
|
- ];
|
|
|
- this.ajax
|
|
|
- .post(this.$store.state.api + "selectDataBoardCourse", params)
|
|
|
- .then((res) => {
|
|
|
- this.isLoading = false;
|
|
|
- this.wCount = res.data[0].length;
|
|
|
- this.cCount = res.data[1].length;
|
|
|
- var workArray = res.data[0];
|
|
|
- var courseList = res.data[1];
|
|
|
- var tList = res.data[2];
|
|
|
- var classList = res.data[3]; //年级数组
|
|
|
- var subjectList = res.data[4]; //学科数组
|
|
|
- var themeList = res.data[5]; //主题数组
|
|
|
- let _course = res.data[6]; //课程
|
|
|
- let _grade = res.data[3]; //年级
|
|
|
- let _subject = res.data[4]; //学科
|
|
|
- var _workCourse = res.data[7]; //带作业的课程
|
|
|
- this.studentNum = res.data[8].length; //学生总数
|
|
|
- _subject.push({ name: "其他" });
|
|
|
- var cList = [];
|
|
|
- //将数据根据time里面的月份分成多个数组
|
|
|
- var groupedArrayByMonth = [];
|
|
|
- const date = new Date();
|
|
|
- var Month = date.getMonth() + 1;
|
|
|
- var Year = date.getFullYear();
|
|
|
- for (var i = Month; i > Month - 6; i--) {
|
|
|
- if (i <= 0) {
|
|
|
- groupedArrayByMonth.push({
|
|
|
- Year: Year - 1,
|
|
|
- Month: 12 + i,
|
|
|
- course: 0,
|
|
|
- });
|
|
|
- } else {
|
|
|
- groupedArrayByMonth.push({
|
|
|
- Month: i,
|
|
|
- Year: Year,
|
|
|
- course: 0,
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- groupedArrayByMonth = groupedArrayByMonth.reverse();
|
|
|
-
|
|
|
- for (var i = 0; i < workArray.length; i++) {
|
|
|
- let _date = new Date(workArray[i].time);
|
|
|
- var _month = _date.getMonth() + 1;
|
|
|
- var _year = _date.getFullYear();
|
|
|
- for (var j = 0; j < groupedArrayByMonth.length; j++) {
|
|
|
- if (
|
|
|
- _month == groupedArrayByMonth[j].Month &&
|
|
|
- _year == groupedArrayByMonth[j].Year
|
|
|
- ) {
|
|
|
- groupedArrayByMonth[j].course++;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- if (
|
|
|
- groupedArrayByMonth[groupedArrayByMonth.length - 1].course == 0 ||
|
|
|
- groupedArrayByMonth[groupedArrayByMonth.length - 2].course == 0
|
|
|
- ) {
|
|
|
- this.reInc = 0;
|
|
|
- } else {
|
|
|
- this.reInc = (
|
|
|
- (groupedArrayByMonth[groupedArrayByMonth.length - 1].course /
|
|
|
- groupedArrayByMonth[groupedArrayByMonth.length - 2].course) *
|
|
|
- 100
|
|
|
- ).toFixed(1);
|
|
|
- }
|
|
|
- this.groupedArrayByMonth = groupedArrayByMonth;
|
|
|
- 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 courseJson = Object.values(
|
|
|
- tList.reduce(function (acc, obj) {
|
|
|
- if (!acc[obj.courseid]) {
|
|
|
- acc[obj.courseid] = { ...obj };
|
|
|
- acc[obj.courseid].typeid = [acc[obj.courseid].typeid];
|
|
|
- } else {
|
|
|
- if (!acc[obj.courseid].typeid.includes(obj.typeid)) {
|
|
|
- acc[obj.courseid].typeid.push(obj.typeid);
|
|
|
- }
|
|
|
- acc[obj.courseid].text =
|
|
|
- parseInt(acc[obj.courseid].text) + parseInt(obj.text);
|
|
|
- }
|
|
|
- return acc;
|
|
|
- }, {})
|
|
|
- ).map(function (obj) {
|
|
|
- var totalTime = parseInt(obj.text);
|
|
|
- obj.text = (totalTime / (60 * 60)).toFixed(2);
|
|
|
- return obj;
|
|
|
- });
|
|
|
-
|
|
|
- for (var i = 0; i < courseJson.length; i++) {
|
|
|
- for (var j = 0; j < classList.length; j++) {
|
|
|
- if (courseJson[i].typeid.indexOf(classList[j].id) != -1) {
|
|
|
- if (classList[j].time && courseJson[i].text) {
|
|
|
- classList[j].time += parseInt(courseJson[i].text);
|
|
|
- } else if (courseJson[i].text) {
|
|
|
- classList[j].time = parseInt(courseJson[i].text);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- for (var k = 0; k < subjectList.length; k++) {
|
|
|
- if (courseJson[i].typeid.indexOf(subjectList[k].id) != -1) {
|
|
|
- if (subjectList[k].time && courseJson[i].text) {
|
|
|
- subjectList[k].time += parseInt(courseJson[i].text);
|
|
|
- } else if (courseJson[i].text) {
|
|
|
- subjectList[k].time = parseInt(courseJson[i].text);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- for (var l = 0; l < themeList.length; l++) {
|
|
|
- if (courseJson[i].typeid.indexOf(themeList[l].id) != -1) {
|
|
|
- if (themeList[l].time && courseJson[i].text) {
|
|
|
- themeList[l].time += parseInt(courseJson[i].text);
|
|
|
- } else if (courseJson[i].text) {
|
|
|
- themeList[l].time = parseInt(courseJson[i].text);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- this.classList = classList;
|
|
|
- this.subjectList = subjectList;
|
|
|
- this.themeList = themeList;
|
|
|
- var a = [];
|
|
|
- if (this.lType == "grade") {
|
|
|
- this.tedurArray = classList;
|
|
|
- } else if (this.lType == "subject") {
|
|
|
- this.tedurArray = subjectList;
|
|
|
- } else {
|
|
|
- this.tedurArray = themeList;
|
|
|
- }
|
|
|
- var time = 0;
|
|
|
- a = this.tedurArray;
|
|
|
- for(var i =0;i<a.length;i++){
|
|
|
- if(a[i].time){
|
|
|
- time += a[i].time;
|
|
|
- }
|
|
|
- }
|
|
|
- this.allTime = time;
|
|
|
- this.sumTime = Math.ceil(time / this.studentNum);
|
|
|
-
|
|
|
- this.typeCount =
|
|
|
- classList.length + subjectList.length + themeList.length;
|
|
|
- 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.typeCourseCountCalu();
|
|
|
- this.typeChange();
|
|
|
- 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;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- 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) {
|
|
|
- wList[a[j]].work++;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- var workNumList = Object.values(wList).map((item) => [
|
|
|
- item.task,
|
|
|
- item.work,
|
|
|
- item.title,
|
|
|
- item.cid,
|
|
|
- ]);
|
|
|
- this.workNumList = workNumList;
|
|
|
- })
|
|
|
- .catch((err) => {
|
|
|
- this.isLoading = false;
|
|
|
- console.error(err);
|
|
|
- });
|
|
|
+ xtEchart(){
|
|
|
+ this.xtType = !this.xtType;
|
|
|
},
|
|
|
- // format(percentage) {
|
|
|
- // return percentage;
|
|
|
- // },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
@@ -666,6 +494,7 @@ export default {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
padding: 0 15px;
|
|
|
+ box-sizing: border-box;
|
|
|
width: 100%;
|
|
|
}
|
|
|
|
|
@@ -682,12 +511,12 @@ export default {
|
|
|
}
|
|
|
|
|
|
.title {
|
|
|
- font-weight: bold;
|
|
|
color: #060e17;
|
|
|
- font-size: 18px;
|
|
|
+ margin-right: 10px;
|
|
|
}
|
|
|
|
|
|
.teafre {
|
|
|
+ margin: 5px 0;
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
flex-wrap: nowrap;
|
|
@@ -714,18 +543,10 @@ export default {
|
|
|
}
|
|
|
.teaLeft {
|
|
|
width: 95%;
|
|
|
- background: linear-gradient(
|
|
|
- 180deg,
|
|
|
- rgba(224, 234, 251, 0.2) 0%,
|
|
|
- rgba(54, 130, 252, 0.3) 100%
|
|
|
- );
|
|
|
+ background: #f3f8fd;
|
|
|
}
|
|
|
.teaRigth {
|
|
|
- background: linear-gradient(
|
|
|
- 180deg,
|
|
|
- rgb(211, 246, 228, 0.2) 0%,
|
|
|
- rgb(23, 196, 105, 0.3) 100%
|
|
|
- ) !important;
|
|
|
+ background: #f3f8fd;
|
|
|
}
|
|
|
|
|
|
.cNum {
|
|
@@ -783,4 +604,78 @@ export default {
|
|
|
.selectBox >>> .el-input__icon {
|
|
|
line-height: 30px;
|
|
|
}
|
|
|
+
|
|
|
+.timeDiv {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ flex-wrap: nowrap;
|
|
|
+ align-items: center;
|
|
|
+ margin: 0 0 0 15px;
|
|
|
+}
|
|
|
+
|
|
|
+.timeDiv > div {
|
|
|
+ margin-right: 10px;
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+
|
|
|
+.isClick {
|
|
|
+ color: #1684fc;
|
|
|
+ border-bottom: 2px solid #1684fc;
|
|
|
+ box-sizing: border-box;
|
|
|
+}
|
|
|
+
|
|
|
+.otherCss {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ flex-wrap: nowrap;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: flex-end;
|
|
|
+}
|
|
|
+.otherImg {
|
|
|
+ width: 20px;
|
|
|
+ height: 20px;
|
|
|
+ margin: 0 10px;
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+.otherImg > img {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+}
|
|
|
+.allBox {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ flex-wrap: nowrap;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
+.allBox_left {
|
|
|
+ width: 30%;
|
|
|
+ height: 100%;
|
|
|
+}
|
|
|
+.allBox_right {
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ height: 100%;
|
|
|
+ width: 70%;
|
|
|
+ margin: 0 auto;
|
|
|
+ overflow: hidden;
|
|
|
+ justify-content: space-between;
|
|
|
+}
|
|
|
+
|
|
|
+.depth {
|
|
|
+ width: calc(100% / 4 - 10px);
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+}
|
|
|
+
|
|
|
+.depth > span:nth-child(1) {
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: 700;
|
|
|
+ margin: 0 0 10px;
|
|
|
+}
|
|
|
+.depth > div:nth-child(1) {
|
|
|
+}
|
|
|
</style>
|