import { MyBetaModalFormProps, MyButtons, MyColumns, MyProTableProps, } from '@/common'; import { Apis } from '@/gen/Apis'; import { ProTable } from '@ant-design/pro-components'; import { Space } from 'antd'; import EmployeeCreate from '../../employees/modals/EmployeeCreate'; import EmployeeUpdate from '../../employees/modals/EmployeeUpdate'; 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_path', search: { transform: (value) => { return { organization_name: value }; }, }, }, { 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(), ) } /> ), }), ]} /> ); }