import { MyBetaModalFormProps, MyButtons, MyColumns, MyProTableProps, } from '@/common'; import { Apis } from '@/gen/Apis'; import { ProTable } from '@ant-design/pro-components'; import { Space } from 'antd'; import EmployeesCreate from '../modals/EmployeesCreate'; import EmployeesUpdate from '../modals/EmployeesUpdate'; export default function Index(props: MyBetaModalFormProps) { return ( MyProTableProps.request( { ...params, companies_id: props?.item?.id }, sort, Apis.Company.CompanyEmployees.List, ) } toolBarRender={(action) => [ , ]} options={false} columns={[ MyColumns.ID(), //to-do 按层级选择 { 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(), ) } /> ), }), ]} /> ); }