<template>
  <div>
    <card-container>
      <vxe-toolbar print custom export>
        <template #buttons>
          <el-date-picker
            :value="select.month"
            type="month"
            size="small"
            value-format="yyyy-MM-dd"
            style="width: 160px;">
          </el-date-picker>
          <el-button icon="el-icon-search" type="primary" plain size="small" style="margin-left: 6px;" @click="getList">搜索</el-button>
        </template>
      </vxe-toolbar>
      <vxe-table
        ref="table"
        stripe
        style="margin-top: 10px;"
        :loading="loading"
        keep-source
        show-overflow
        :max-height="1400"
        :min-height="400"
        :export-config="{}"
        :print-config="{}"
        :column-config="{ resizable: true }"
        :data="tableData"
      >
      </vxe-table>
    </card-container>
  </div>
</template>

<script>
import { index } from '@/api/attendance'
export default {
  data() {
    return {
      select: {
        month: this.$moment().format('YYYY-MM')
      },
      loading: false,
      tableData: [],

    }
  },
  methods: {
    async getList () {
      this.loading = true
      try {
        const res = await index(this.select,false)
        console.log(res)
        this.loading = false
      } catch (err) {
        console.error(err)
        this.loading = false
      }
    }
  },
  computed: {},
  created() {
    this.getList()
  }
}
</script>

<style scoped lang="scss">
</style>
