<template>
  <div>
    <el-table v-loading='loading' :tableData='tableData'>
      <el-table-column label="任务名称"></el-table-column>
      <el-table-column label="任务日期"></el-table-column>
      <el-table-column label="状态"></el-table-column>
      <el-table-column label="任务开始时间"></el-table-column>
      <el-table-column label="任务完成时间"></el-table-column>
      <el-table-column label="操作员"></el-table-column>
      <el-table-column label="操作时间"></el-table-column>
      <el-table-column label="备注"></el-table-column>
      <el-table-column label="操作"></el-table-column>
    </el-table>
    <el-pagination @current-change="handleCurrentChange" @size-change="handleSizeChange"
      layout="total, prev, pager, next, sizes" :page-size="pagination.pageSize" :page-sizes="[10, 20, 30, 50]"
      :current-page="pagination.pageNum" :total="pagination.total">
    </el-pagination>
  </div>
</template>
<script>
  export default {
    props: {
      loading: {
        type: Boolean,
        default: () => {},
      },
      tableData: {
        type: Array,
        default: () => [],
      },
      pagination: {
        type: Object,
        default: () => {},
      },
    },
    data() {
      return {

      }
    },
    methods: {
      handleCurrentChange(val) {
        this.pagination.pageNum = val;
        this.$emit("refreshTable");
      },
      handleSizeChange(val) {
        this.pagination.pageSize = val;
        this.pagination.pageNum = 1;
        this.$emit("refreshTable");
      },
    }
  }

</script>
<style lang='scss' scoped>

</style>
