<template>
  <div id="leaveList">
    <el-row>
      <el-col
        :span="24"
        class="list"
        v-for="(item, index) in leaveList"
        :key="index"
        @click.native="$router.push({ path: '/user/leaveReason', query: { id: item.id } })"
      >
        <el-col :span="14" class="time">
          <p>退出时间:{{ item.starttime }}</p>
        </el-col>
        <el-col :span="10" class="time">
          <p>结果：{{ item.status === '0' ? '审核中' : item.status === '1' ? '通过' : item.status === '2' ? '未通过' : '' }}</p></el-col
        >
        <!-- <el-col :span="10" @click="deleteBtn(item.id)">删除</el-col> -->
      </el-col>
    </el-row>
  </div>
</template>

<script>
import { createNamespacedHelpers, mapGetters } from 'vuex';
const { mapActions: mapLeave } = createNamespacedHelpers('leave');
export default {
  name: 'leaveList',
  props: {
    leaveList: null,
  },
  components: {},
  data: () => ({}),
  created() {},
  computed: {},
  methods: {
    // ...mapLeave(['delete']),
    // async deleteBtn(id) {
    //   const res = await this.delete(id);
    //   this.$checkRes(res, '删除成功', '删除失败');
    // },
  },
};
</script>

<style lang="less" scoped>
p {
  padding: 0;
  margin: 0;
}
.list {
  width: 97%;
  padding: 15px;
  background-color: #fff;
  border-radius: 15px;
  margin: 0 5px 5px 5px;
}
.list .time p {
  padding: 5px 0;
}
.list .ispass {
  padding: 20px 0;
}
</style>
