|
@@ -1,57 +1,73 @@
|
|
|
<template>
|
|
|
- <div class="Statistics">
|
|
|
- <el-row class="rows" :gutter="20">
|
|
|
- <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
|
|
|
- <sleep :data="statistic" />
|
|
|
- </el-col>
|
|
|
- <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
|
|
|
- <studyStudent :data="statistic" :groupType="groupType"/>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
|
|
|
- <remainder :data="statistic" />
|
|
|
- </el-col>
|
|
|
- <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
|
|
|
- <studentChange :groupType="groupType" />
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
+ <div class="statistics">
|
|
|
+ <el-collapse v-model="activeNames" class="statisticsCollapse">
|
|
|
+ <el-collapse-item name="1" >
|
|
|
+ <template slot="title">
|
|
|
+ <div class="titleWrap"> 数据总览
|
|
|
+ <!-- <el-button type="primary">
|
|
|
+
|
|
|
+ </el-button> -->
|
|
|
+
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </template>
|
|
|
+ <el-row class="rows" :gutter="20">
|
|
|
+ <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
|
|
|
+ <sleep :data="statistic" />
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
|
|
|
+ <studyStudent :data="statistic" :groupType="groupType" />
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
|
|
|
+ <remainder :data="statistic" />
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
|
|
|
+ <studentChange :groupType="groupType" />
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-collapse-item>
|
|
|
+ </el-collapse>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import sleep from './sleep';
|
|
|
-import studyStudent from './studyStudent';
|
|
|
-import remainder from './remainder';
|
|
|
-import studentChange from './studentChange';
|
|
|
-import { studentSmallClassStatisticsSum } from '../api'
|
|
|
+import sleep from "./sleep";
|
|
|
+import studyStudent from "./studyStudent";
|
|
|
+import remainder from "./remainder";
|
|
|
+import studentChange from "./studentChange";
|
|
|
+import { studentSmallClassStatisticsSum } from "../api";
|
|
|
export default {
|
|
|
- name: 'Statistics',
|
|
|
- props: ['groupType'],
|
|
|
+ name: "Statistics",
|
|
|
+ props: ["groupType"],
|
|
|
components: {
|
|
|
sleep,
|
|
|
studyStudent,
|
|
|
remainder,
|
|
|
- studentChange
|
|
|
+ studentChange,
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- statistic: {}
|
|
|
- }
|
|
|
+ statistic: {},
|
|
|
+ activeNames: "",
|
|
|
+ };
|
|
|
},
|
|
|
async mounted() {
|
|
|
try {
|
|
|
- let res = await studentSmallClassStatisticsSum({ groupType: this.groupType })
|
|
|
- this.statistic = res.data || {}
|
|
|
+ let res = await studentSmallClassStatisticsSum({
|
|
|
+ groupType: this.groupType,
|
|
|
+ });
|
|
|
+ this.statistic = res.data || {};
|
|
|
} catch {}
|
|
|
},
|
|
|
-}
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
.rows {
|
|
|
- > div {
|
|
|
- margin-bottom: 20px;
|
|
|
- }
|
|
|
+ > div {
|
|
|
+ margin-bottom: 20px;
|
|
|
}
|
|
|
+}
|
|
|
/deep/ .el-card__body .statistic {
|
|
|
margin-bottom: 15px;
|
|
|
padding: 0;
|
|
@@ -63,5 +79,26 @@ export default {
|
|
|
font-size: 14px !important;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
+ .statisticsCollapse {
|
|
|
+ margin-bottom: 20px;
|
|
|
+ }
|
|
|
+ /deep/.el-collapse-item__header {
|
|
|
+ background: rgb(237, 238, 240);
|
|
|
+ border-bottom:none!important;
|
|
|
+ }
|
|
|
+
|
|
|
+ // /deep/.el-collapse {
|
|
|
+ // border-top:none!important;
|
|
|
+ // border-bottom:none!important
|
|
|
+ // }
|
|
|
+
|
|
|
+ // /deep/.el-collapse-item__arrow {
|
|
|
+ // display: none!important;
|
|
|
+ // }
|
|
|
+ .titleWrap {
|
|
|
+ padding-left: 20px;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
</style>
|