<template>
  <div class="app-container detail-container">
    <head-form
      title="高管信息"
      :form-data="formData"
      :query-params="queryParams"
      :total="tableDataTotal"
    />

    <tables
      :tableLoading="tableLoading"
      :tableData="tableData"
      :forData="forData"
      :queryParams="queryParams"
      :paging="false"
    />
  </div>
</template>

<script>
import mixin from '../mixins/mixin'
import {keymembers} from '@/api/detail/party-a/overview'
export default {
  name: 'Execuinfo',
  props: ['companyId'],
  mixins: [mixin],
  data() {
    return {
      queryParams: {
        cid: this.companyId,
        pageNum: 1,
        pageSize: 100
      },
      forData: [
        {label: '姓名', prop: 'name'},
        {label: '职位', prop: 'jobTitle'}
      ],
      formData: [],
      //列表
      tableLoading:false,
      tableData:[],
      tableDataTotal:0,
    }
  },
  created() {
    this.handleQuery()
  },
  methods: {
    async handleQuery(params) {
      this.tableLoading = true
      let param = params?params:this.queryParams
      let res = await keymembers(param)
      this.tableLoading = false
      if(res.code==200){
        this.tableData = res.rows
      }
      this.tableDataTotal = res.total
    }
  }
}
</script>

<style lang="scss" scoped>
.detail-container{
  margin: 0;
  padding: 16px;
  background: #FFFFFF;
  border-radius: 4px;
}
</style>
