<template>
  <v-data-table
    :items="items"
    :headers="headers"
  > 
    <template #bottom>
      <CtPagination
        :total="total"
        :page="query.pageNo"
        :limit="query.pageSize"
        @handleChange="handleChangePage"
      ></CtPagination>
    </template>
  </v-data-table>
</template>

<script setup>
defineOptions({ name: 'daily-page'})
import { ref } from 'vue'

const total = ref(8)
const query = ref({
  pageSize: 10,
  pageNo: 1
})
const headers = [
  { title: '日期', key: 'date', sortable: false },
  { title: '有效职位', key: 'effectivePositions', sortable: false },
  { title: '刷新次数', key: 'refreshTimes', sortable: false },
  { title: '职位浏览', key: 'jobBrowse', sortable: false },
  { title: '简历投递', key: 'resumeDelivery', sortable: false},
  { title: '简历处理', key: 'resumeDeal', sortable: false },
  { title: '邀请面试', key: 'invite', sortable: false }
]
const items = ref([
  { date: '2024-07-01', effectivePositions: 0, refreshTimes: 0, jobBrowse: 0, resumeDelivery: 0, resumeDeal: 0, invite: 0 },
  { date: '2024-07-02', effectivePositions: 0, refreshTimes: 0, jobBrowse: 0, resumeDelivery: 0, resumeDeal: 0, invite: 0 },
  { date: '2024-07-03', effectivePositions: 0, refreshTimes: 0, jobBrowse: 0, resumeDelivery: 0, resumeDeal: 0, invite: 0 },
  { date: '2024-07-04', effectivePositions: 0, refreshTimes: 0, jobBrowse: 0, resumeDelivery: 0, resumeDeal: 0, invite: 0 },
  { date: '2024-07-05', effectivePositions: 0, refreshTimes: 0, jobBrowse: 0, resumeDelivery: 0, resumeDeal: 0, invite: 0 },
  { date: '2024-07-06', effectivePositions: 0, refreshTimes: 0, jobBrowse: 0, resumeDelivery: 0, resumeDeal: 0, invite: 0 },
  { date: '2024-07-07', effectivePositions: 0, refreshTimes: 0, jobBrowse: 0, resumeDelivery: 0, resumeDeal: 0, invite: 0 },
  { date: '2024-07-08', effectivePositions: 0, refreshTimes: 0, jobBrowse: 0, resumeDelivery: 0, resumeDeal: 0, invite: 0 }
])

const handleChangePage = (e) => {
  query.value.pageNo = e
}
</script>

<style scoped lang="scss">

</style>
