<template>
  <div class="chart">
    <CircleNumberChart title="学员人数" unit="人" :value="total" />
  </div>
</template>

<script>
import { findStatisticDataApi } from '@/api/statistic'
import CircleNumberChart from '@/views/statistic/components/CircleNumberChart.vue'

export default {
  components: { CircleNumberChart },
  data: () => ({ total: 0 }),

  created () {
    this.fetch()
  },

  methods: {
    async fetch () {
      this.total = await findStatisticDataApi('basic-trainee-number')
    }
  }
}
</script>
