index.vue 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <template>
  2. <div class="Statistics">
  3. <el-row class="rows" :gutter="20">
  4. <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
  5. <sleep :data="statistic" />
  6. </el-col>
  7. <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
  8. <studyStudent :data="statistic" :groupType="groupType"/>
  9. </el-col>
  10. <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
  11. <remainder :data="statistic" />
  12. </el-col>
  13. <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
  14. <studentChange :groupType="groupType" />
  15. </el-col>
  16. </el-row>
  17. </div>
  18. </template>
  19. <script>
  20. import sleep from './sleep';
  21. import studyStudent from './studyStudent';
  22. import remainder from './remainder';
  23. import studentChange from './studentChange';
  24. import { studentSmallClassStatisticsSum } from '../api'
  25. export default {
  26. name: 'Statistics',
  27. props: ['groupType'],
  28. components: {
  29. sleep,
  30. studyStudent,
  31. remainder,
  32. studentChange
  33. },
  34. data() {
  35. return {
  36. statistic: {}
  37. }
  38. },
  39. async mounted() {
  40. try {
  41. let res = await studentSmallClassStatisticsSum({ groupType: this.groupType })
  42. this.statistic = res.data || {}
  43. } catch {}
  44. },
  45. }
  46. </script>
  47. <style lang="scss" scoped>
  48. .rows {
  49. > div {
  50. margin-bottom: 20px;
  51. }
  52. }
  53. /deep/ .el-card__body .statistic {
  54. margin-bottom: 15px;
  55. padding: 0;
  56. }
  57. .statistic {
  58. .statistic-content > span {
  59. font-size: 22px !important;
  60. &:first-child {
  61. font-size: 14px !important;
  62. }
  63. }
  64. }
  65. </style>