<template>
  <el-dialog
    title="历史审批"
    :visible.sync="visible"
    width="60%"
    v-dialogDrag
    :before-close="cancel"
  >
    <el-table border v-loading="loading" :data="tableData" max-height="500px">
      <el-table-column prop="approveNodeName" label="审批节点" align="center">
      </el-table-column>
      <el-table-column prop="userName" label="审批人" align="center">
      </el-table-column>
      <el-table-column prop="approveTime" label="审批时间" align="center">
      </el-table-column>
      <el-table-column
        prop="approveIdea"
        label="审批意见"
        align="center"
        show-overflow-tooltip
      >
      </el-table-column>
      <el-table-column prop="archive_file_num" label="状态" align="center">
        <template slot-scope="scope">
          <el-link :underline="false" type="success" v-if="scope.row.status === 1">已通过</el-link>
          <el-link :underline="false" type="danger" v-if="scope.row.status === 2">未通过</el-link>
        </template>
      </el-table-column>
    </el-table>
  </el-dialog>
</template>

<script>
export default {
  props: {
    visible: {
      type: Boolean,
      default: () => false
    },
  },
  data() {
    return {
      tableData: [],
      loading: false,
    };
  },
  methods: {
    cancel() {
      this.$emit("cancel");
    }
  }
};
</script>

<style></style>
