<template>
  <div class="corePersonnel">
    <head-form
      title="被执行人"
      :form-data="formData"
      :query-params="queryParams"
      :total="tableDataTotal"
      :isExcel="false"
      @handle-search="handleSearch"
    />

    <tables
      :tableLoading="tableLoading"
      :tableData="tableData"
      :forData="forData"
      :tableDataTotal="tableDataTotal"
      :queryParams="queryParams"
      @handle-current-change="handleCurrentChange"
    />

  </div>
</template>

<script>
import {
  executedPersonsPage
} from '@/api/detail/party-a/riskInformation'
import mixin from '../mixins/mixin'
export default {
  name: 'IfThePerson',
  mixins: [mixin],
  components: {

  },
  props: ['companyId'],
  data() {
    return {
      queryParams: {
        cid: this.companyId,//194738907
        pageNum: 1,
        pageSize: 10
      },
      forData: [
        {label: '执行标的（元）', prop: 'amount', width: '140'},
        {label: '案号', prop: 'caseNumber', width: '320'},
        {label: '执行法院', prop: 'court'},
        {label: '立案日期', prop: 'caseDate', width: '95'}
      ],
      formData: [
        { type: 2, fieldName: 'time', value: '', placeholder: '执行时间',startTime: 'dateFrom',endTime: 'dateTo', options: []}
      ],
      //列表
      tableLoading:false,
      tableData:[],
      tableDataTotal:0,
    }
  },
  created() {
    this.handleQuery()
  },
  computed: {

  },
  methods: {
    handleQuery(params) {
      let data = params ? params : this.queryParams
      this.tableLoading = true
      executedPersonsPage(data).then(res => {
        this.tableData = res.rows
        this.tableDataTotal = res.total
        this.tableLoading = false
      })
    }
  }
}
</script>
<style lang="scss" scoped>
.corePersonnel{
  background: #ffffff;
  border-radius: 4px;
  padding: 16px;
  .query-box{
    margin: 10px 0 20px;
  }
}
</style>
