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(), MyColumns.Companies({ title: '选择机构', }), { title: '机构', dataIndex: ['company', 'name'], search: false, width: 220, }, { title: '组织', dataIndex: ['organization', 'name'], search: false, width: 150, }, { title: '姓名', dataIndex: 'name', width: 150, }, { title: '手机号', dataIndex: 'phone', width: 150, }, { title: '岗位', dataIndex: ['position', 'name'], width: 150, }, MyColumns.UpdatedAt(), // MyColumns.CreatedAt(), MyColumns.Option({ render: (_, item: any, index, action) => ( Apis.Common.Admins.Delete({ id: item.id }).then(() => action?.reload(), ) } /> ), }), ]} /> ); }