<template>
  <div>
    <el-table v-loading="loading" border :data="tableData" max-height="550px">
      <el-table-column prop="modifyValues.applicant" align="center" label="申请人">
      </el-table-column>
      <el-table-column prop="modifyValues.applicant_date" label="申请日期" align="center">
      </el-table-column>
      <el-table-column prop="modifyValues.application_number" align="center" label="申请档案数量">
      </el-table-column>
      <el-table-column prop="modifyValues.file_number" align="center" label="申请原文数量">
      </el-table-column>
      <el-table-column prop="modifyValues.application_reason" align="center" label="申请理由">

      </el-table-column>
      <el-table-column prop="unitname" align="center" label="状态">
        <template slot-scope="scope">
          <el-tag effect="dark" v-if="scope.row.status === 1" type="warning" size="mini">申请中</el-tag>
          <el-tag effect="dark" v-if="scope.row.status === 2" type="success" size="mini">流程结束</el-tag>
        </template>
      </el-table-column>
      <el-table-column label="操作" align="center">
        <template slot-scope="scope">
          <el-button type="text" style="color: #409eff" @click="look(scope.row)">查看
          </el-button>
        </template>
      </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");
      },
    },
    created() {

    }
  }

</script>
