import { MyButtons, MyColumns, MyPageContainer, MyProTableProps, } from '@/common'; import { Apis } from '@/gen/Apis'; import { ProTable } from '@ant-design/pro-components'; import { Space } from 'antd'; import Create from './modals/Create'; import Update from './modals/Update'; export default function Index({ title = '管理员' }) { return ( MyProTableProps.request( params, sort, Apis.Company.CompanyEmployees.List, ) } toolBarRender={(action) => [ , ]} columns={[ MyColumns.ID(), { title: '姓名', dataIndex: 'name', }, { title: '手机号', dataIndex: 'phone', }, { title: '机构', dataIndex: ['company', 'name'], }, { title: '组织', dataIndex: ['organization', 'name'], }, MyColumns.UpdatedAt(), MyColumns.CreatedAt(), MyColumns.Option({ render: (_, item: any, index, action) => ( Apis.Common.Admins.Delete({ id: item.id }).then(() => action?.reload(), ) } /> ), }), ]} /> ); }