import { MyButtons, MyColumns, MyPageContainer, MyProTableProps, usePageTabs, } from '@/common'; import { Apis } from '@/gen/Apis'; import { ProTable } from '@ant-design/pro-components'; import { Space } from 'antd'; import EmployeeUpdate from '../company/components/modals/EmployeeUpdate'; export default function Index({ title = '员工管理' }) { // 使用多标签页功能 usePageTabs({ tabKey: 'employees-list', tabLabel: title, closable: true, }); return ( MyProTableProps.request( params, sort, Apis.Company.CompanyEmployees.List, ) } // toolBarRender={(action) => [ // , // ]} columns={[ MyColumns.ID(), { title: '机构', dataIndex: ['company', 'name'], search: false, }, { title: '组织', dataIndex: ['organization', 'name'], search: false, }, { title: '姓名', dataIndex: 'name', }, { title: '手机号', dataIndex: 'phone', }, { title: '岗位', dataIndex: ['position', 'name'], search: false, }, MyColumns.UpdatedAt(), // MyColumns.CreatedAt(), MyColumns.Option({ render: (_, item: any, index, action) => ( Apis.Common.Admins.Delete({ id: item.id }).then(() => action?.reload(), ) } /> ), }), ]} /> ); }