<template>
  <BasicTable @register="registerTable">
  </BasicTable>
</template>

<script setup lang="ts">
import {} from "vue"
import { BasicTable, useTable, TableAction } from '@/components/Table';
import { getColums, searchFormSchema } from './utils';
import { getPointCountApi } from '@/api/illegalconstruction/statistical'

const props = defineProps(['title','id','type','timeParams'])
const [registerTable, { setTableData, reload, clearSelectedRowKeys, setPagination, setLoading }] =useTable({
  title: props.title,
  api: (params) => getPointCountApi(props.type, { ...params, pointid: props.id }),
  columns: getColums(props.type),
  formConfig: {
    labelWidth: 120,
    schemas: searchFormSchema,
  },
  rowKey: 'id',
  useSearchForm: false,
  showTableSetting: true,
  bordered: true,
  // 搜索
  handleSearchInfoFn(info) {
    return info;
  },
  beforeFetch(params) {
    return { ...params, ...props.timeParams };
  },
});
</script>

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