<!-- 付款确认书变更履历 -->
<template>
  <div>
    <data-table :api="api" :loadPage="loadPage" :handleFlag.sync="handleFlag" :queryParas="queryParas" :columns="columns" ref="historyTable"
                :sourceData.sync="sourceData" :loadCount.sync="loadCount" operateBtnLayout="" :toolMenuFlag="false">
    </data-table>
  </div>
</template>
<script>
import BasePage from '@/pages/basePage.js'
import { DataTable } from 'newepoch-components'
import lawyerApi from '@/api/dataAudit/lawyerApi.js'
import * as format from '@/filters/index'
import cn from '@/i18n/langs/cn.js'

const { taskManage: { todoTask } } = cn
export default {
  extends: new BasePage(),
  components: {
    DataTable
  },
  prop: {
    form: {
      type: [Object],
      default: function () {
        return {}
      }
    }
  },
  methods: {
    // 获取数据
    loadData (params) {
      let _this = this
      _this.queryParas = Object.assign(_this.queryParas, params)
      _this.$refs.historyTable.loadTableData()
    }
  },
  computed: {
    api () {
      return lawyerApi.lawyer
    }
  },
  data () {
    return {
      loadPage: 'getResume',
      columns: [
        // 名称
        {
          prop: 'columnName',
          align: 'left',
          label: todoTask.name
        },
        // 修改节点
        {
          prop: 'modifyNode',
          align: 'center',
          label: todoTask.modifyNode
        },
        // 修改时间
        {
          prop: 'addTime',
          align: 'center',
          label: todoTask.modifyDate,
          format: (row) => { return format.formatDatetime(row.addTime) }
        },
        // 修改前
        {
          prop: 'preValue',
          align: 'left',
          label: todoTask.beforeModify
        },
        // 修改后
        {
          prop: 'modifiedValue',
          align: 'left',
          label: todoTask.afterModify
        }
      ],
      sourceData: [],
      queryParas: {
        pageIndex: 1,
        pageSize: 10
      }
    }
  }
}
</script>
