<template>
    <ProTable ref="proTableRef" :columns="columns" :tableData="pager.lists" :loading="pager.loading" :maxHeight="530" />
</template>

<script setup lang="ts">
import { postLists } from '@/api/org/post'
import { usePaging } from '@/hooks/usePaging'

const props = defineProps({
    queryParams: {
        type: Object,
        default: () => ({
            submitName: '',
            submitDate: ''
        })
    }
})

const { pager, getLists, resetPage, resetParams } = usePaging({
    fetchFun: postLists,
    params: props.queryParams
})
getLists()

const proTableRef = ref()
const columns = reactive([
    { prop: 'name', label: '提交人', width: 180 },
    { prop: 'type', label: '岗位', width: 180 },
    { prop: 'type', label: '提交时间', width: 180 },
    { prop: 'type', label: '总结情况', width: 180 }
])
defineExpose({
    resetPage,
    resetParams,
    getLists
})
</script>
<style scoped></style>
