<template>
  <el-dialog title="审核详情" @close="$emit('close')" :visible="show">
    <el-table
      :data="table.data"
      height="55vh"
      class="collection-con"
      style="width: 100%"
    >
      <el-table-column
        v-for="(item, idx) in data"
        :key="idx"
        :prop="item.prop"
        :label="item.label"
      >
        <template slot-scope="scope">
          <span>{{ scope.row[item.prop] || "-" }}</span>
        </template>
      </el-table-column>
      <slot name="operate"></slot>
    </el-table>
  </el-dialog>
</template>

<script>
let data = [
    {
      prop: "updateTime",
      label: "审核时间",
    },
    {
      prop: "auditor",
      label: "审核人员",
    },
    {
      prop: "statusStr",
      label: "审核结果",
    },
    {
      prop: "reason",
      label: "反馈详情",
    },
]
export default {
  props:{
    tableData:{
      type:Object,
      default(){
        return {}
      }
    },
    show:{
      type:Boolean
    }
  },
  data() {
    return {
      data:data
    };
  },
  computed:{
    table(){
      this.tableData.data && this.tableData.data.forEach((item) => {
        item["statusStr"] = item.status?'审核通过':'审核不通过'
      });
      return this.tableData
    }
  },
};
</script>
