|
@@ -1,8 +1,8 @@
|
|
|
-import {FilterTool} from '@components';
|
|
|
+import {FilterButtonGroup, FilterField, FilterFieldWrapper} from '@components';
|
|
|
import {FC} from 'react';
|
|
|
import {useContextSection, useFilterField, useTableSearchToolEvents} from '@hooks';
|
|
|
import {context, searchContext} from '../context';
|
|
|
-import {sourceMap, fixedMap} from './state';
|
|
|
+import {Card} from 'antd';
|
|
|
|
|
|
const Filter: FC = function () {
|
|
|
const [fields, {onChange, resetState}] = useFilterField({roleName: '', roleCode: ''}, true);
|
|
@@ -13,16 +13,23 @@ const Filter: FC = function () {
|
|
|
const {isSearching} = useContextSection(searchContext, state => state[0]);
|
|
|
|
|
|
return (
|
|
|
- <FilterTool
|
|
|
- filterData=''
|
|
|
- sourceMap={sourceMap}
|
|
|
- onSearch={onSearch}
|
|
|
- isSearching={isSearching}
|
|
|
- onReset={onReset}
|
|
|
- fixedMap={fixedMap}
|
|
|
- fields={fields}
|
|
|
- onChange={onChange}
|
|
|
- />
|
|
|
+ <Card>
|
|
|
+ <FilterFieldWrapper>
|
|
|
+ <FilterField
|
|
|
+ label='角色编号'
|
|
|
+ name='roleCode'
|
|
|
+ value={fields.roleCode}
|
|
|
+ onChange={onChange('roleCode')}
|
|
|
+ />
|
|
|
+ <FilterField
|
|
|
+ label='角色名称'
|
|
|
+ name='roleName'
|
|
|
+ value={fields.roleName}
|
|
|
+ onChange={onChange('roleName')}
|
|
|
+ />
|
|
|
+ <FilterButtonGroup onSearch={onSearch} isSearching={isSearching} onReset={onReset} />
|
|
|
+ </FilterFieldWrapper>
|
|
|
+ </Card>
|
|
|
);
|
|
|
};
|
|
|
|