<!-- 线上历史审核意见 -->
<template>
  <div class="onlineAuditOpinionHistory">
    <data-table :api="api" :queryParas="queryParas" :sourceData.sync="sourceData" ref="onlineTable"
                :loadCount.sync="loadCount" operateBtnLayout="" :columns="columns" :loadPage="loadPage">
    </data-table>
  </div>
</template>
<script>
import BasePage from '@/pages/basePage.js'
import { DataTable } from 'newepoch-components'
import * as format from '@/filters/index'
import taskManageApi from '@/api/dataAudit/taskManageApi.js'
export default {
  extends: new BasePage(),
  components: {
    DataTable
  },
  prop: {
    form: {
      type: [Object],
      default: function () {
        return {}
      }
    }
  },
  data () {
    return {
      loadPage: 'getOnlineAudit',
      queryParas: {
        pageIndex: 1,
        pageSize: 10,
        assetInfoId: ''
      },
      sourceData: [],
      columns: [
        // 审核项目
        {
          prop: 'fileName',
          align: 'left',
          label: this.$i18n.messages[this.$i18n.locale].taskManage.todoTask.auditProject
        },
        // 审核人
        {
          prop: 'examineUserName',
          align: 'center',
          label: this.$i18n.messages[this.$i18n.locale].taskManage.todoTask.auditPerson
        },
        // 审核时间
        {
          prop: 'examineDate',
          align: 'center',
          label: this.$i18n.messages[this.$i18n.locale].taskManage.todoTask.auditDate,
          format: (row) => { return format.formatDatetime(row.examineDate) }
        },
        // 审核意见
        {
          prop: 'checkResult',
          align: 'left',
          label: this.$i18n.messages[this.$i18n.locale].taskManage.todoTask.auditOpinion
        }
      ]
    }
  },
  computed: {
    api () {
      return taskManageApi.onlineAudit
    }
  },
  methods: {
    loadData (assetInfoId) {
      let _this = this
      _this.queryParas.assetInfoId = assetInfoId
      _this.$refs.onlineTable.loadTableData()
    }
  }
}
</script>
