|
|
@@ -4,21 +4,28 @@ import {useHandle, useList} from './hooks';
|
|
|
import Modal from './modal';
|
|
|
import {Table, TableTools} from '@components';
|
|
|
import {pageContext, searchContext} from '../context';
|
|
|
+import {DepartmentListData} from '@models';
|
|
|
+import {ColumnsType} from 'antd/es/table';
|
|
|
+
|
|
|
+const columns: ColumnsType<DepartmentListData> = [
|
|
|
+ {title: '部门编号', dataIndex: 'code', key: 'code'},
|
|
|
+ {title: '部门名称', dataIndex: 'name', key: 'name', width: '45%'},
|
|
|
+ {title: '创建时间', dataIndex: 'createTime', key: 'createTime'},
|
|
|
+];
|
|
|
|
|
|
const TableList: FC = function() {
|
|
|
const [
|
|
|
{count, data},
|
|
|
- {refetch},
|
|
|
] = useList();
|
|
|
- const [
|
|
|
- {modalVisible, columns, editState},
|
|
|
- {onAdd, setFalse},
|
|
|
- ] = useHandle(refetch);
|
|
|
+ // const [
|
|
|
+ // {modalVisible, columns, editState},
|
|
|
+ // {onAdd, setFalse},
|
|
|
+ // ] = useHandle(refetch);
|
|
|
|
|
|
return (
|
|
|
<>
|
|
|
<Card className='table-wrapper'>
|
|
|
- <TableTools onClick={onAdd} />
|
|
|
+ {/* <TableTools onClick={onAdd} /> */}
|
|
|
|
|
|
<Table
|
|
|
data-testid='department_table'
|
|
|
@@ -30,7 +37,7 @@ const TableList: FC = function() {
|
|
|
/>
|
|
|
</Card>
|
|
|
|
|
|
- <Modal visible={modalVisible} onClose={setFalse} onFetch={refetch} id={editState} />
|
|
|
+ {/* <Modal visible={modalVisible} onClose={setFalse} onFetch={refetch} id={editState} /> */}
|
|
|
</>
|
|
|
);
|
|
|
};
|