|
@@ -10,47 +10,43 @@
|
|
|
<div class="info_box">
|
|
|
<div class="info blueBG">
|
|
|
<span>学生总数</span>
|
|
|
- <!-- <span>{{ count }}</span> -->
|
|
|
- <span>{{ 18 }}</span>
|
|
|
+ <span>{{ studentCount }}</span>
|
|
|
</div>
|
|
|
<div class="info blueBG">
|
|
|
<span>本月登录学生用户环比</span>
|
|
|
- <!-- <span>{{ weekCount }}</span> -->
|
|
|
- <span>{{ "80%" }}</span>
|
|
|
+ <span v-if="loginCountMonthArray.length">{{ (loginCountMonthArray[loginCountMonthArray.length - 1].user -
|
|
|
+ loginCountMonthArray[loginCountMonthArray.length - 2].user) < 0 ? 0 :
|
|
|
+ ((loginCountMonthArray[loginCountMonthArray.length - 1].user -
|
|
|
+ loginCountMonthArray[loginCountMonthArray.length - 2].user) /
|
|
|
+ loginCountMonthArray[loginCountMonthArray.length - 2].user * 100) + '%' }}</span>
|
|
|
</div>
|
|
|
<div class="info blueBG">
|
|
|
<span>本月登录学生用户总数</span>
|
|
|
- <!-- <span>{{ weekCount }}</span> -->
|
|
|
- <span>{{ 18 }}</span>
|
|
|
+ <span v-if="loginCountMonthArray.length">{{ loginCountMonthArray[loginCountMonthArray.length - 1].user
|
|
|
+ }}</span>
|
|
|
</div>
|
|
|
<div class="info blueBG">
|
|
|
<span>本月新增登录学生用户</span>
|
|
|
- <!-- <span>{{ weekCount }}</span> -->
|
|
|
- <span>{{ 18 }}</span>
|
|
|
+ <span v-if="loginCountMonthArray.length">{{ (loginCountMonthArray[loginCountMonthArray.length - 1].user -
|
|
|
+ loginCountMonthArray[loginCountMonthArray.length - 2].user) < 0 ? 0 :
|
|
|
+ loginCountMonthArray[loginCountMonthArray.length - 1].user -
|
|
|
+ loginCountMonthArray[loginCountMonthArray.length - 2].user }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <loginCount style="height: calc(100% - 140px)"></loginCount>
|
|
|
+ <loginCount style="height: calc(100% - 140px)" :monthArray="loginCountMonthArray"></loginCount>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="bottom">
|
|
|
<div class="titleBox">
|
|
|
- <div
|
|
|
- class="title"
|
|
|
- :class="{ isClick: skType == 0 }"
|
|
|
- @click="skType = 0"
|
|
|
- style="cursor: pointer; padding: 0 0 5px 0"
|
|
|
- >
|
|
|
+ <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 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-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>
|
|
@@ -60,82 +56,67 @@
|
|
|
<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>
|
|
|
- <div class="info_box" v-if="!oType">
|
|
|
+ <div class="info_box" v-if="skType == 1">
|
|
|
<div class="info blueBG">
|
|
|
- <span>开展频次</span>
|
|
|
+ <span>登录频次</span>
|
|
|
<!-- <span>{{ count }}</span> -->
|
|
|
- <span>{{ 18 }}</span>
|
|
|
+ <span>{{ countLogin }}</span>
|
|
|
</div>
|
|
|
<div class="info blueBG">
|
|
|
<span>人均频次</span>
|
|
|
<!-- <span>{{ weekCount }}</span> -->
|
|
|
- <span>{{ "80%" }}</span>
|
|
|
+ <span>{{ countLogin && studentCount ? (countLogin / studentCount).toFixed(0) : 0 }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="info_box" v-if="oType">
|
|
|
+ <div class="info_box" v-if="skType == 0">
|
|
|
<div class="info blueBG">
|
|
|
<span>累计时长</span>
|
|
|
- <!-- <span>{{ count }}</span> -->
|
|
|
- <span>{{ 18 }}</span>
|
|
|
+ <span>{{ loginTime.toFixed(0) }}</span>
|
|
|
</div>
|
|
|
<div class="info blueBG">
|
|
|
<span>人均在线时长</span>
|
|
|
- <!-- <span>{{ weekCount }}</span> -->
|
|
|
- <span>{{ "80%" }}</span>
|
|
|
+ <span>{{ loginTime && studentCount ? (loginTime / studentCount).toFixed(0) : 0 }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="dataBox">
|
|
|
- <toolUser style="height: calc(100% - 120px)" v-if="!oType"></toolUser>
|
|
|
- <bar style="height: calc(100% - 120px)" v-if="oType"></bar>
|
|
|
- <div class="otherCss">
|
|
|
+ <div class="dataBox" style="height: calc(100% - 110px)">
|
|
|
+ <toolUser style="height: calc(100%)" v-if="skType == 1" :yearArray="loginCountYearArray"></toolUser>
|
|
|
+ <bar style="height: calc(100%)" v-if="skType == 0" :EloginTimeArray="EloginTimeArray"></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>
|
|
|
<div class="center">
|
|
|
<div class="top">
|
|
|
<div class="titleBox" style="justify-content: space-between">
|
|
|
- <div
|
|
|
- style="
|
|
|
+ <div style="
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
flex-wrap: nowrap;
|
|
|
align-items: center;
|
|
|
- "
|
|
|
- >
|
|
|
- <div
|
|
|
- class="title"
|
|
|
- :class="{ isClick: courseType == 0 }"
|
|
|
- @click="courseType = 0"
|
|
|
- style="cursor: pointer; padding: 0 0 5px 0"
|
|
|
- >
|
|
|
+ ">
|
|
|
+ <div class="title" :class="{ isClick: courseType == 0 }" @click="courseType = 0"
|
|
|
+ style="cursor: pointer; padding: 0 0 5px 0">
|
|
|
学生行为分布
|
|
|
</div>
|
|
|
- <div
|
|
|
- class="title"
|
|
|
- :class="{ isClick: courseType == 1 }"
|
|
|
- @click="courseType = 1"
|
|
|
- style="cursor: pointer; padding: 0 0 5px 0"
|
|
|
- >
|
|
|
+ <div class="title" :class="{ isClick: courseType == 1 }" @click="courseType = 1"
|
|
|
+ style="cursor: pointer; padding: 0 0 5px 0">
|
|
|
学生协同情况
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div
|
|
|
- style="
|
|
|
+ <div style="
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
flex-wrap: nowrap;
|
|
|
align-items: center;
|
|
|
- "
|
|
|
- v-if="courseType == 0"
|
|
|
- >
|
|
|
+ " v-if="courseType == 0">
|
|
|
<el-select v-model="cType1" class="selectBox" style="width: 110px">
|
|
|
<el-option label="全部" value="全部"></el-option>
|
|
|
</el-select>
|
|
@@ -143,15 +124,12 @@
|
|
|
<el-option label="在线时长" value="在线时长"></el-option>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
- <div
|
|
|
- style="
|
|
|
+ <div style="
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
flex-wrap: nowrap;
|
|
|
align-items: center;
|
|
|
- "
|
|
|
- v-if="courseType == 1"
|
|
|
- >
|
|
|
+ " v-if="courseType == 1">
|
|
|
<el-select v-model="cType3" class="selectBox" style="width: 110px">
|
|
|
<el-option label="全部" value="全部"></el-option>
|
|
|
</el-select>
|
|
@@ -171,105 +149,106 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="dataBox">
|
|
|
- <studentInfo
|
|
|
- v-if="courseType == 0"
|
|
|
- style="height: calc(100%)"
|
|
|
- ></studentInfo>
|
|
|
- <courseNum
|
|
|
- v-if="courseType == 1"
|
|
|
- style="height: calc(100%)"
|
|
|
- ></courseNum>
|
|
|
+ <studentInfo v-if="courseType == 0" style="height: calc(100%)"></studentInfo>
|
|
|
+ <courseNum v-if="courseType == 1" style="height: calc(100%)"></courseNum>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="bottom">
|
|
|
<div class="titleBox" style="justify-content: space-between">
|
|
|
- <div
|
|
|
- style="
|
|
|
+ <div style="
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
flex-wrap: nowrap;
|
|
|
align-items: center;
|
|
|
- "
|
|
|
- >
|
|
|
- <div
|
|
|
- class="title"
|
|
|
- :class="{ isClick: bType == 0 }"
|
|
|
- @click="bType = 0"
|
|
|
- style="cursor: pointer; padding: 0 0 5px 0"
|
|
|
- >
|
|
|
+ ">
|
|
|
+ <div class="title" :class="{ isClick: bType == 0 }" @click="bType = 0"
|
|
|
+ style="cursor: pointer; padding: 0 0 5px 0">
|
|
|
课程参与情况
|
|
|
</div>
|
|
|
- <div
|
|
|
- class="title"
|
|
|
- :class="{ isClick: bType == 1 }"
|
|
|
- @click="bType = 1"
|
|
|
- style="cursor: pointer; padding: 0 0 5px 0"
|
|
|
- >
|
|
|
+ <div class="title" :class="{ isClick: bType == 1 }" @click="bType = 1"
|
|
|
+ style="cursor: pointer; padding: 0 0 5px 0">
|
|
|
项目参与情况
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="timeDiv">
|
|
|
+ <!-- <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" style="height: calc(100% - 30px)">
|
|
|
+ <div class="allBox" style="height: calc(100% - 30px)" v-if="bType == 0">
|
|
|
+ <div class="allBox_left">
|
|
|
+ <stuAct :pusaDep="courseArray"></stuAct>
|
|
|
+ </div>
|
|
|
+ <div class="allBox_right">
|
|
|
+ <div class="depth">
|
|
|
+ <span>参与课程</span>
|
|
|
+ <div>
|
|
|
+ <el-progress :width="80" type="circle"
|
|
|
+ :percentage="(courseJson.courseNum && studentCount) ? parseInt((courseJson.courseNum / studentCount * 100).toFixed(0)) : 0"
|
|
|
+ :stroke-width="5" :format="format" color="#106BFF"></el-progress>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="depth">
|
|
|
+ <span>使用工具</span>
|
|
|
+ <div>
|
|
|
+ <el-progress :width="80" type="circle"
|
|
|
+ :percentage="(courseJson.toolNum && studentCount) ? parseInt((courseJson.toolNum / studentCount * 100).toFixed(0)) : 0"
|
|
|
+ :stroke-width="5" :format="format" color="#106BFF"></el-progress>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="depth">
|
|
|
+ <span>协同合作</span>
|
|
|
+ <div>
|
|
|
+ <el-progress :width="80" type="circle" :percentage="0" :stroke-width="5" :format="format"
|
|
|
+ color="#106BFF"></el-progress>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="depth">
|
|
|
+ <span>互动交流</span>
|
|
|
+ <div>
|
|
|
+ <el-progress :width="80" type="circle"
|
|
|
+ :percentage="(courseJson.exchangeNum && studentCount) ? parseInt((courseJson.exchangeNum / studentCount * 100).toFixed(0)) : 0"
|
|
|
+ :stroke-width="5" :format="format" color="#106BFF"></el-progress>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="allBox" style="height: calc(100% - 30px)" v-if="bType == 1">
|
|
|
<div class="allBox_left">
|
|
|
- <stuAct></stuAct>
|
|
|
+ <stuAct2 :pusaDep="scourseArray"></stuAct2>
|
|
|
</div>
|
|
|
<div class="allBox_right">
|
|
|
<div class="depth">
|
|
|
<span>参与项目</span>
|
|
|
<div>
|
|
|
- <el-progress
|
|
|
- :width="80"
|
|
|
- type="circle"
|
|
|
- :percentage="80"
|
|
|
- :stroke-width="5"
|
|
|
- :format="format"
|
|
|
- color="#106BFF"
|
|
|
- ></el-progress>
|
|
|
+ <el-progress :width="80" type="circle"
|
|
|
+ :percentage="(scourseJson.courseNum && studentCount) ? parseInt((scourseJson.courseNum / studentCount * 100).toFixed(0)) : 0"
|
|
|
+ :stroke-width="5" :format="format" color="#106BFF"></el-progress>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="depth">
|
|
|
<span>使用工具</span>
|
|
|
<div>
|
|
|
- <el-progress
|
|
|
- :width="80"
|
|
|
- type="circle"
|
|
|
- :percentage="80"
|
|
|
- :stroke-width="5"
|
|
|
- :format="format"
|
|
|
- color="#106BFF"
|
|
|
- ></el-progress>
|
|
|
+ <el-progress :width="80" type="circle"
|
|
|
+ :percentage="(scourseJson.toolNum && studentCount) ? parseInt((scourseJson.toolNum / studentCount * 100).toFixed(0)) : 0"
|
|
|
+ :stroke-width="5" :format="format" color="#106BFF"></el-progress>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="depth">
|
|
|
<span>协同合作</span>
|
|
|
<div>
|
|
|
- <el-progress
|
|
|
- :width="80"
|
|
|
- type="circle"
|
|
|
- :percentage="80"
|
|
|
- :stroke-width="5"
|
|
|
- :format="format"
|
|
|
- color="#106BFF"
|
|
|
- ></el-progress>
|
|
|
+ <el-progress :width="80" type="circle"
|
|
|
+ :percentage="(scourseJson.gcourseNum && studentCount) ? parseInt((scourseJson.gcourseNum / studentCount * 100).toFixed(0)) : 0"
|
|
|
+ :stroke-width="5" :format="format" color="#106BFF"></el-progress>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="depth">
|
|
|
<span>互动交流</span>
|
|
|
<div>
|
|
|
- <el-progress
|
|
|
- :width="80"
|
|
|
- type="circle"
|
|
|
- :percentage="80"
|
|
|
- :stroke-width="5"
|
|
|
- :format="format"
|
|
|
- color="#106BFF"
|
|
|
- ></el-progress>
|
|
|
+ <el-progress :width="80" type="circle" :percentage="0" :stroke-width="5" :format="format"
|
|
|
+ color="#106BFF"></el-progress>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -281,14 +260,12 @@
|
|
|
<div class="top" style="border-radius: 5px">
|
|
|
<div class="titleBox" style="justify-content: space-between">
|
|
|
<div class="title">整体分布</div>
|
|
|
- <div
|
|
|
- style="
|
|
|
+ <div style="
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
flex-wrap: nowrap;
|
|
|
align-items: center;
|
|
|
- "
|
|
|
- >
|
|
|
+ ">
|
|
|
<el-select v-model="cType6" class="selectBox" style="width: 110px">
|
|
|
<el-option label="全部" value="全部"></el-option>
|
|
|
</el-select>
|
|
@@ -304,19 +281,18 @@
|
|
|
<div class="bottom">
|
|
|
<div class="titleBox" style="justify-content: space-between">
|
|
|
<div class="title">活动参与</div>
|
|
|
- <div
|
|
|
- style="
|
|
|
+ <div style="
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
flex-wrap: nowrap;
|
|
|
align-items: center;
|
|
|
- "
|
|
|
- >
|
|
|
- <el-select v-model="cType8" class="selectBox" style="width: 110px">
|
|
|
+ ">
|
|
|
+ <!-- <el-select v-model="cType8" class="selectBox" style="width: 110px">
|
|
|
<el-option label="全部年级" value="全部年级"></el-option>
|
|
|
- </el-select>
|
|
|
- <el-select v-model="cType9" class="selectBox" style="width: 110px">
|
|
|
- <el-option label="全部班级" value="全部班级"></el-option>
|
|
|
+ </el-select> -->
|
|
|
+ <el-select v-model="cType9" class="selectBox" style="width: 110px" @change="classChange">
|
|
|
+ <el-option label="全部班级" value=""></el-option>
|
|
|
+ <el-option :label="item.name" :value="item.id" v-for="item in classList" :key="item.id"></el-option>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -324,16 +300,14 @@
|
|
|
<div class="info_box">
|
|
|
<div class="info blueBG">
|
|
|
<span>人均参与课程数</span>
|
|
|
- <!-- <span>{{ count }}</span> -->
|
|
|
- <span>{{ 18 }}</span>
|
|
|
+ <span>{{ courseNum && uArray.length ? (courseNum / uArray.length).toFixed(0) : 0 }}</span>
|
|
|
</div>
|
|
|
<div class="info blueBG">
|
|
|
<span>人均参与项目数</span>
|
|
|
- <!-- <span>{{ weekCount }}</span> -->
|
|
|
- <span>{{ 18 }}</span>
|
|
|
+ <span>{{ scourseNum && uArray.length ? (scourseNum / uArray.length).toFixed(0) : 0 }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <loginTime style="height: calc(100% - 72px)"></loginTime>
|
|
|
+ <loginTime style="height: calc(100% - 72px)" :uArray="uArray"></loginTime>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -346,6 +320,7 @@ import studentInfo from "./studentInfo";
|
|
|
import studentInfo2 from "./studentInfo2";
|
|
|
import loginTime from "./loginTime";
|
|
|
import stuAct from "./stuAct";
|
|
|
+import stuAct2 from "./stuAct2";
|
|
|
import toolUser from "./toolUser";
|
|
|
import bar from "./bar";
|
|
|
import courseNum from "./courseNum";
|
|
@@ -364,6 +339,7 @@ export default {
|
|
|
studentInfo2,
|
|
|
loginTime,
|
|
|
stuAct,
|
|
|
+ stuAct2,
|
|
|
toolUser,
|
|
|
bar,
|
|
|
courseNum,
|
|
@@ -386,14 +362,42 @@ export default {
|
|
|
cType6: "全部",
|
|
|
cType7: "在线时长",
|
|
|
cType8: "全部年级",
|
|
|
- cType9: "全部班级",
|
|
|
+ cType9: "",
|
|
|
oType: false,
|
|
|
+ studentCount: 0,
|
|
|
+ loginCountMonthArray: [],
|
|
|
+ countLogin: 0,
|
|
|
+ loginCountYearArray: [],
|
|
|
+ loginTime: 0,
|
|
|
+ EloginTimeArray: [],
|
|
|
+ classList: [],
|
|
|
+ courseNum: 0,
|
|
|
+ scourseNum: 0,
|
|
|
+ uArray: [],
|
|
|
+ courseNumArray: [],
|
|
|
+ scourseNumArray: [],
|
|
|
+ userArray: [],
|
|
|
+ courseJson: {
|
|
|
+ courseNum: 0,
|
|
|
+ toolNum: 0,
|
|
|
+ exchangeNum: 0,
|
|
|
+ },
|
|
|
+ scourseJson: {
|
|
|
+ courseNum: 0,
|
|
|
+ toolNum: 0,
|
|
|
+ gcourseNum: 0,
|
|
|
+ },
|
|
|
+ courseArray: [],
|
|
|
+ scourseArray: []
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
this.getData();
|
|
|
},
|
|
|
methods: {
|
|
|
+ format(percentage) {
|
|
|
+ return percentage + '%';
|
|
|
+ },
|
|
|
otherEchart() {
|
|
|
this.oType = !this.oType;
|
|
|
},
|
|
@@ -412,7 +416,137 @@ export default {
|
|
|
let _grade = res.data[0]; //年级
|
|
|
let _subject = res.data[1]; //学科
|
|
|
let _course = res.data[2]; //课程
|
|
|
-
|
|
|
+ this.studentCount = res.data[3][0].count //学生总数
|
|
|
+
|
|
|
+ let _loginCount = res.data[4]; //统计半年的登录学生
|
|
|
+
|
|
|
+ let loginCountMonthArray = []
|
|
|
+ const date = new Date()
|
|
|
+ var Month = date.getMonth() + 1
|
|
|
+ var Year = date.getFullYear()
|
|
|
+ for (var i = Month; i > Month - 6; i--) {
|
|
|
+ if (i <= 0) {
|
|
|
+ loginCountMonthArray.push({
|
|
|
+ Year: Year - 1,
|
|
|
+ Month: 12 + i,
|
|
|
+ user: 0,
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ loginCountMonthArray.push({
|
|
|
+ Month: i,
|
|
|
+ Year: Year,
|
|
|
+ user: 0,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ loginCountMonthArray = loginCountMonthArray.reverse()
|
|
|
+ for (var i = 0; i < _loginCount.length; i++) {
|
|
|
+ let _date = new Date(_loginCount[i].create_at)
|
|
|
+ var _month = _date.getMonth() + 1
|
|
|
+ var _year = _date.getFullYear()
|
|
|
+ for (var j = 0; j < loginCountMonthArray.length; j++) {
|
|
|
+ if (_month == loginCountMonthArray[j].Month && _year == loginCountMonthArray[j].Year) {
|
|
|
+ loginCountMonthArray[j].user++
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.loginCountMonthArray = loginCountMonthArray
|
|
|
+
|
|
|
+ this.countLogin = res.data[5][0].count; //登录频次
|
|
|
+
|
|
|
+ let loginCountYear = res.data[6];//一年的登录频次
|
|
|
+ let loginCountYearArray = []
|
|
|
+ for (var i = Month; i > Month - 12; i--) {
|
|
|
+ if (i <= 0) {
|
|
|
+ loginCountYearArray.push({
|
|
|
+ Year: Year - 1,
|
|
|
+ Month: 12 + i,
|
|
|
+ mon: 0,
|
|
|
+ tue: 0,
|
|
|
+ wed: 0,
|
|
|
+ thur: 0,
|
|
|
+ fri: 0,
|
|
|
+ sat: 0,
|
|
|
+ sun: 0,
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ loginCountYearArray.push({
|
|
|
+ Month: i,
|
|
|
+ Year: Year,
|
|
|
+ mon: 0,
|
|
|
+ tue: 0,
|
|
|
+ wed: 0,
|
|
|
+ thur: 0,
|
|
|
+ fri: 0,
|
|
|
+ sat: 0,
|
|
|
+ sun: 0,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ loginCountYearArray = loginCountYearArray.reverse()
|
|
|
+ for (var i = 0; i < loginCountYear.length; i++) {
|
|
|
+ let _date = new Date(loginCountYear[i].create_at)
|
|
|
+ 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 < loginCountYearArray.length; j++) {
|
|
|
+ if (_month == loginCountYearArray[j].Month && _year == loginCountYearArray[j].Year) {
|
|
|
+ loginCountYearArray[j][dayArray[_day]]++
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ console.log(loginCountYearArray);
|
|
|
+ this.loginCountYearArray = loginCountYearArray
|
|
|
+
|
|
|
+ this.loginTime = parseInt(res.data[7][0].time) / 60 / 60;
|
|
|
+ let _loginTimeArray = res.data[9] //在线时间
|
|
|
+ let _classList = res.data[8] //班级
|
|
|
+ this.classList = _classList
|
|
|
+
|
|
|
+ let _EloginTimeArray = []
|
|
|
+ for (let i = 0; i < _classList.length; i++) {
|
|
|
+ _EloginTimeArray.push({
|
|
|
+ id: _classList[i].id,
|
|
|
+ name: _classList[i].name,
|
|
|
+ loginTime: 0
|
|
|
+ })
|
|
|
+ for (let j = 0; j < _loginTimeArray.length; j++) {
|
|
|
+ const _user = _loginTimeArray[j];
|
|
|
+ if (_user.classid.indexOf(_classList[i].id) != -1) {
|
|
|
+ _EloginTimeArray[i].loginTime += Number(_user.time)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ _EloginTimeArray[i].loginTime = (_EloginTimeArray[i].loginTime / 60 / 60).toFixed(2) //换算成小时
|
|
|
+ }
|
|
|
+ this.EloginTimeArray = _EloginTimeArray
|
|
|
+
|
|
|
+ this.courseNumArray = res.data[10] //参与课程数
|
|
|
+ this.scourseNumArray = res.data[11] //参与项目数
|
|
|
+ this.userArray = res.data[12] //参与项目数
|
|
|
+ this.classChange();
|
|
|
+ this.courseJson.courseNum = res.data[13][0].count //参与课程
|
|
|
+ this.courseJson.toolNum = res.data[14][0].count //使用工具
|
|
|
+ this.courseJson.exchangeNum = res.data[15][0].count //互动交流
|
|
|
+
|
|
|
+ this.scourseJson.courseNum = res.data[16][0].count //参与项目
|
|
|
+ this.scourseJson.toolNum = res.data[17][0].count //使用工具
|
|
|
+ this.scourseJson.gcourseNum = res.data[18][0].count //协同
|
|
|
+
|
|
|
+ this.courseArray = [
|
|
|
+ { value: (this.studentCount / this.studentCount * 100).toFixed(0), name: "学生总数" },
|
|
|
+ { value: this.courseJson.courseNum ? (this.courseJson.courseNum / this.studentCount * 100).toFixed(0) : 0, name: "参与课程" },
|
|
|
+ { value: this.courseJson.toolNum ? (this.courseJson.toolNum / this.studentCount * 100).toFixed(0) : 0, name: "使用工具" },
|
|
|
+ { value: this.courseJson.exchangeNum ? (this.courseJson.exchangeNum / this.studentCount * 100).toFixed(0) : 0, name: "互动交流" },
|
|
|
+ ]
|
|
|
+ this.scourseArray = [
|
|
|
+ { value: (this.studentCount / this.studentCount * 100).toFixed(0), name: "学生总数" },
|
|
|
+ { value: this.scourseJson.courseNum ? (this.scourseJson.courseNum / this.studentCount * 100).toFixed(0) : 0, name: "参与项目" },
|
|
|
+ { value: this.scourseJson.toolNum ? (this.scourseJson.toolNum / this.studentCount * 100).toFixed(0) : 0, name: "使用工具" },
|
|
|
+ { value: this.scourseJson.gcourseNum ? (this.scourseJson.gcourseNum / this.studentCount * 100).toFixed(0) : 0, name: "协同" },
|
|
|
+ ]
|
|
|
this.$forceUpdate();
|
|
|
})
|
|
|
.catch((err) => {
|
|
@@ -420,6 +554,44 @@ export default {
|
|
|
console.error(err);
|
|
|
});
|
|
|
},
|
|
|
+ classChange() {
|
|
|
+ let _courseNumArray = this.courseNumArray //参与课程数
|
|
|
+ let _scourseNumArray = this.scourseNumArray //参与项目数
|
|
|
+ let _userArray = this.userArray //参与项目数
|
|
|
+ let _courseNum = 0;
|
|
|
+ let _scourseNum = 0;
|
|
|
+ let uArray = []
|
|
|
+ for (var i = 0; i < _userArray.length; i++) {
|
|
|
+ if (_userArray[i].classid.indexOf(this.cType9) != -1 || !this.cType9) {
|
|
|
+ uArray.push(
|
|
|
+ { userid: _userArray[i].userid, name: _userArray[i].name, courseNum: 0, scourseNum: 0 }
|
|
|
+ )
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ 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++
|
|
|
+ _courseNum++
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ 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++
|
|
|
+ _scourseNum++
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.courseNum = _courseNum
|
|
|
+ this.scourseNum = _scourseNum
|
|
|
+ this.uArray = uArray
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
@@ -440,7 +612,7 @@ export default {
|
|
|
height: 100%;
|
|
|
}
|
|
|
|
|
|
-.left > .top {
|
|
|
+.left>.top {
|
|
|
width: 100%;
|
|
|
height: calc(100% / 2 - 10px);
|
|
|
background: #fff;
|
|
@@ -448,7 +620,7 @@ export default {
|
|
|
margin: 0 0 20px 0;
|
|
|
}
|
|
|
|
|
|
-.left > .bottom {
|
|
|
+.left>.bottom {
|
|
|
width: 100%;
|
|
|
height: calc(100% / 2 - 10px);
|
|
|
background: #fff;
|
|
@@ -461,7 +633,7 @@ export default {
|
|
|
margin: 0 20px;
|
|
|
}
|
|
|
|
|
|
-.center > .top {
|
|
|
+.center>.top {
|
|
|
width: 100%;
|
|
|
height: calc(100% / 6 * 4 - 10px);
|
|
|
background: #fff;
|
|
@@ -469,7 +641,7 @@ export default {
|
|
|
margin: 0 0 20px 0;
|
|
|
}
|
|
|
|
|
|
-.center > .bottom {
|
|
|
+.center>.bottom {
|
|
|
width: 100%;
|
|
|
height: calc(100% / 6 * 2 - 10px);
|
|
|
background: #fff;
|
|
@@ -481,7 +653,7 @@ export default {
|
|
|
height: 100%;
|
|
|
}
|
|
|
|
|
|
-.right > .top {
|
|
|
+.right>.top {
|
|
|
width: 100%;
|
|
|
height: calc(100% / 2 - 10px);
|
|
|
background: #fff;
|
|
@@ -489,7 +661,7 @@ export default {
|
|
|
margin: 0 0 20px 0;
|
|
|
}
|
|
|
|
|
|
-.right > .bottom {
|
|
|
+.right>.bottom {
|
|
|
width: 100%;
|
|
|
height: calc(100% / 2 - 10px);
|
|
|
background: #fff;
|
|
@@ -521,11 +693,9 @@ export default {
|
|
|
}
|
|
|
|
|
|
.greenBG {
|
|
|
- background: linear-gradient(
|
|
|
- 180deg,
|
|
|
- rgb(211, 246, 228, 0.2) 0%,
|
|
|
- rgb(23, 196, 105, 0.3) 100%
|
|
|
- );
|
|
|
+ background: linear-gradient(180deg,
|
|
|
+ rgb(211, 246, 228, 0.2) 0%,
|
|
|
+ rgb(23, 196, 105, 0.3) 100%);
|
|
|
}
|
|
|
|
|
|
.depth_box {
|
|
@@ -546,25 +716,25 @@ export default {
|
|
|
justify-content: center;
|
|
|
}
|
|
|
|
|
|
-.depth > span:nth-child(1) {
|
|
|
+.depth>span:nth-child(1) {
|
|
|
font-size: 14px;
|
|
|
font-weight: 700;
|
|
|
margin: 0 0 10px;
|
|
|
}
|
|
|
-.depth > div:nth-child(1) {
|
|
|
-}
|
|
|
+
|
|
|
+.depth>div:nth-child(1) {}
|
|
|
|
|
|
.selectBox {
|
|
|
width: 80px;
|
|
|
margin-left: 10px;
|
|
|
}
|
|
|
|
|
|
-.selectBox >>> .el-input__inner {
|
|
|
+.selectBox>>>.el-input__inner {
|
|
|
height: 30px;
|
|
|
line-height: 30px;
|
|
|
}
|
|
|
|
|
|
-.selectBox >>> .el-input__icon {
|
|
|
+.selectBox>>>.el-input__icon {
|
|
|
line-height: 30px;
|
|
|
}
|
|
|
|
|
@@ -580,6 +750,7 @@ export default {
|
|
|
padding: 0 10px;
|
|
|
margin: 0 10px;
|
|
|
}
|
|
|
+
|
|
|
.teaMiddle {
|
|
|
width: calc(100% / 3 - 10px);
|
|
|
}
|
|
@@ -592,7 +763,7 @@ export default {
|
|
|
margin: 0 0 0 15px;
|
|
|
}
|
|
|
|
|
|
-.timeDiv > div {
|
|
|
+.timeDiv>div {
|
|
|
margin-right: 10px;
|
|
|
cursor: pointer;
|
|
|
}
|
|
@@ -602,6 +773,7 @@ export default {
|
|
|
border-bottom: 2px solid #1684fc;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
+
|
|
|
.otherCss {
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
@@ -609,16 +781,19 @@ export default {
|
|
|
align-items: center;
|
|
|
justify-content: flex-end;
|
|
|
}
|
|
|
+
|
|
|
.otherImg {
|
|
|
width: 20px;
|
|
|
height: 20px;
|
|
|
margin: 0 10px;
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
-.otherImg > img {
|
|
|
+
|
|
|
+.otherImg>img {
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
}
|
|
|
+
|
|
|
.allBox {
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
@@ -627,10 +802,12 @@ export default {
|
|
|
flex-wrap: nowrap;
|
|
|
align-items: center;
|
|
|
}
|
|
|
+
|
|
|
.allBox_left {
|
|
|
width: 30%;
|
|
|
height: 100%;
|
|
|
}
|
|
|
+
|
|
|
.allBox_right {
|
|
|
display: flex;
|
|
|
flex-wrap: wrap;
|
|
@@ -649,13 +826,13 @@ export default {
|
|
|
justify-content: center;
|
|
|
}
|
|
|
|
|
|
-.depth > span:nth-child(1) {
|
|
|
+.depth>span:nth-child(1) {
|
|
|
font-size: 14px;
|
|
|
font-weight: 700;
|
|
|
margin: 0 0 10px;
|
|
|
}
|
|
|
-.depth > div:nth-child(1) {
|
|
|
-}
|
|
|
+
|
|
|
+.depth>div:nth-child(1) {}
|
|
|
|
|
|
.info_box {
|
|
|
display: flex;
|
|
@@ -666,9 +843,9 @@ export default {
|
|
|
margin: 0 auto;
|
|
|
}
|
|
|
|
|
|
-.info_box > .info2,
|
|
|
-.info_box > .info3,
|
|
|
-.info_box > .info {
|
|
|
+.info_box>.info2,
|
|
|
+.info_box>.info3,
|
|
|
+.info_box>.info {
|
|
|
width: calc(50% - 10px);
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
@@ -682,19 +859,19 @@ export default {
|
|
|
border-radius: 5px;
|
|
|
}
|
|
|
|
|
|
-.info_box > .info2 {
|
|
|
+.info_box>.info2 {
|
|
|
width: calc(100% / 4 - 10px);
|
|
|
/* align-items: flex-end; */
|
|
|
}
|
|
|
|
|
|
-.info_box > .info3 {
|
|
|
+.info_box>.info3 {
|
|
|
width: 100%;
|
|
|
margin-bottom: 5px;
|
|
|
}
|
|
|
|
|
|
-.info_box > .info2 > span:nth-child(1),
|
|
|
-.info_box > .info3 > span:nth-child(1),
|
|
|
-.info_box > .info > span:nth-child(1) {
|
|
|
+.info_box>.info2>span:nth-child(1),
|
|
|
+.info_box>.info3>span:nth-child(1),
|
|
|
+.info_box>.info>span:nth-child(1) {
|
|
|
font-size: 14px;
|
|
|
/* margin: 0 0 0 20px; */
|
|
|
color: #565e6a;
|
|
@@ -703,9 +880,9 @@ export default {
|
|
|
word-break: break-all;
|
|
|
}
|
|
|
|
|
|
-.info_box > .info2 > span:nth-child(2),
|
|
|
-.info_box > .info3 > span:nth-child(2),
|
|
|
-.info_box > .info > span:nth-child(2) {
|
|
|
+.info_box>.info2>span:nth-child(2),
|
|
|
+.info_box>.info3>span:nth-child(2),
|
|
|
+.info_box>.info>span:nth-child(2) {
|
|
|
font-size: 24px;
|
|
|
/* font-weight: 700; */
|
|
|
}
|