<template>
  <div>
    <zj-table
      ref="tableEl"
      style="margin: 20px 0"
      :is-drop="true"
      :columns="columns"
      :table-data="tableData"
      :table-attributes="{
        border: true,
        maxHeight: '600px'
      }"
    />
    <!-- <div class="fr">
      <el-pagination
        :current-page="currentPage"
        :page-sizes="[10, 20, 30, 50]"
        :page-size="10"
        layout="total, sizes, prev, pager, next, jumper"
        :total="listTotal"
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
      />
    </div> -->
  </div>
</template>

<script>
import { getOperationRecord } from '@/api/frock'
export default {
  props: {
    detailId: {
      type: String,
      default: ''
    }
  },
  data() {
    return {
      target: 1,
      tableData: [],
      currentPage: 1,
      listTotal: 0
    }
  },
  computed: {
    columns() {
      return [
        {
          columnAttributes: {
            label: '操作类型',
            prop: 'operType'
          }
        },
        {
          columnAttributes: {
            label: '操作内容',
            prop: 'operContent',
            width: 400
          }
        },
        {
          columnAttributes: {
            label: '备注',
            prop: 'remark'
          }
        },
        {
          columnAttributes: {
            label: '操作人',
            prop: 'createBy'
          }
        },
        {
          columnAttributes: {
            label: '操作时间',
            prop: 'createTime'
          }
        }
      ]
    }
  },
  created() {
    this.getOperationRecord()
  },
  methods: {
    getOperationRecord() {
      getOperationRecord({ id: this.detailId }).then(res => {
        this.tableData = res.data
      })
    },
    handleSizeChange() {},
    handleCurrentChange() {}
  }
}
</script>

<style lang="scss" scoped></style>
