<template>
  <div id="tableWrap">
    <a-table
      :data-source="tableData"
      :columns="journalDate"
      :bordered="true"
      position="both"
      :pagination="{
        'hideOnSinglePage':true
      }"
    >
      <span slot="processStatus" slot-scope="text,record">
        {{ statusFormat(record) }}
      </span>
      <span slot="operationType" slot-scope="text,record">
        {{ operationFormat(record) }}
      </span>

    </a-table>
    <div class="footer-btn">
      <a-button class="closeBtn" type="stop" @click="onClose">
        取消
      </a-button>
      <a-button class="submitBtn" type="add" @click="onClose">
        确定
      </a-button>
    </div>
  </div>
</template>

<script>
export default {
  date() {
    return {
      showdate: '',
      showJournal: true
    }
  },
 props: {
   tableData: {
      type: Array,
      required: true
    },
    journalDate: {
      type: Array,
      required: true
    },
    statusFormat: {
        type: Function,
        default: null
    },
    operationFormat: {
        type: Function,
        default: null
    }
  },
  created() {
    console.log(`tableData`, this.tableData)
    console.log(`journalDate`, this.journalDate)
  },
  methods: {
    onClose() {
      this.showState = false
      this.$emit('getShowJournal', this.showState)
    }
  }

}
</script>

<style  lang="less" scoped>
#tableWrap{
  box-sizing: border-box;
  padding: 25px 30px;
  .footer-btn{
    margin-top: 30px;
    text-align: center;
    .ant-btn{
      margin: 0 20px;
    }
  }

}

</style>
