curriculum.vue 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <template>
  2. <el-card header="本月课程">
  3. <statistic class="statistic" :cols="0">
  4. <statistic-item>
  5. <span>乐团课</span>
  6. <span>
  7. <count-to :endVal="745"/>
  8. </span>
  9. </statistic-item>
  10. <statistic-item>
  11. <span>VIP课</span>
  12. <span>
  13. <count-to :endVal="1256"/>
  14. </span>
  15. </statistic-item>
  16. <statistic-item>
  17. <span>网管课</span>
  18. <span>
  19. <count-to :endVal="203"/>
  20. </span>
  21. </statistic-item>
  22. </statistic>
  23. <ve-line :data="chartData"/>
  24. </el-card>
  25. </template>
  26. <script>
  27. import countTo from 'vue-count-to'
  28. import veLine from 'v-charts/lib/line.common'
  29. export default {
  30. components: {
  31. 've-line': veLine,
  32. 'count-to': countTo
  33. },
  34. data () {
  35. let data = []
  36. return {
  37. chartData: {
  38. columns: ['日期', '访问用户', '下单用户', '下单率'],
  39. rows: [
  40. { '日期': '1/1', '访问用户': 1393, '下单用户': 1093, '下单率': 0.32 },
  41. { '日期': '1/2', '访问用户': 3530, '下单用户': 3230, '下单率': 0.26 },
  42. { '日期': '1/3', '访问用户': 2923, '下单用户': 2623, '下单率': 0.76 },
  43. { '日期': '1/4', '访问用户': 1723, '下单用户': 1423, '下单率': 0.49 },
  44. { '日期': '1/5', '访问用户': 3792, '下单用户': 3492, '下单率': 0.323 },
  45. { '日期': '1/6', '访问用户': 4593, '下单用户': 4293, '下单率': 0.78 }
  46. ]
  47. }
  48. }
  49. },
  50. }
  51. </script>
  52. <style lang="less" scoped>
  53. .statistic{
  54. /deep/ .statistic-content{
  55. cursor: pointer;
  56. }
  57. }
  58. </style>