|  |  |  | 
|---|
|  |  |  | <Input | 
|---|
|  |  |  | style={{ width: 188, marginBottom: 8, display: 'block' }} | 
|---|
|  |  |  | value={props.selectedKeys[0]} | 
|---|
|  |  |  | onChange={e => props.setSelectedKeys(e.target.value ? [e.target.value] : [])} | 
|---|
|  |  |  | onChange={e => { | 
|---|
|  |  |  | props.setSelectedKeys(e.target.value ? [e.target.value] : []) | 
|---|
|  |  |  | }} | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | <Space> | 
|---|
|  |  |  | <Button | 
|---|
|  |  |  | type="primary" | 
|---|
|  |  |  | onClick={() => props.confirm()} | 
|---|
|  |  |  | onClick={() => { | 
|---|
|  |  |  | props.confirm(); | 
|---|
|  |  |  | props.setSearchParam(prevState => ({ | 
|---|
|  |  |  | ...prevState, | 
|---|
|  |  |  | [props.name]: props.selectedKeys[0] | 
|---|
|  |  |  | })); | 
|---|
|  |  |  | props.actionRef.current?.reload(); | 
|---|
|  |  |  | }} | 
|---|
|  |  |  | size="small" | 
|---|
|  |  |  | style={{ width: 90 }} | 
|---|
|  |  |  | > | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import React, { useState, useRef, useEffect } from 'react'; | 
|---|
|  |  |  | import { useIntl, FormattedMessage } from '@umijs/max'; | 
|---|
|  |  |  | import { Button, message, Modal, Input, Space } from 'antd'; | 
|---|
|  |  |  | import { Button, message, Modal } from 'antd'; | 
|---|
|  |  |  | import { | 
|---|
|  |  |  | FooterToolbar, | 
|---|
|  |  |  | PageContainer, | 
|---|
|  |  |  | ProTable, | 
|---|
|  |  |  | LightFilter, | 
|---|
|  |  |  | } from '@ant-design/pro-components'; | 
|---|
|  |  |  | import { PlusOutlined, ExportOutlined, SearchOutlined } from '@ant-design/icons'; | 
|---|
|  |  |  | import { PlusOutlined, ExportOutlined } from '@ant-design/icons'; | 
|---|
|  |  |  | import Http from '@/utils/http'; | 
|---|
|  |  |  | import Edit from './components/edit' | 
|---|
|  |  |  | import Filter from '@/components/TableSearch' | 
|---|
|  |  |  | 
|---|
|  |  |  | title: '标识', | 
|---|
|  |  |  | dataIndex: 'code', | 
|---|
|  |  |  | valueType: 'text', | 
|---|
|  |  |  | filterDropdown: (props) => <Filter {...props} />, | 
|---|
|  |  |  | filterDropdown: (props) => <Filter name='code' {...props} actionRef={actionRef} setSearchParam={setSearchParam} />, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | title: '操作', | 
|---|
|  |  |  | 
|---|
|  |  |  | </Button>, | 
|---|
|  |  |  | ], | 
|---|
|  |  |  | }} | 
|---|
|  |  |  | // toolBarRender={() => [ | 
|---|
|  |  |  | //     <Button | 
|---|
|  |  |  | //         type="primary" | 
|---|
|  |  |  | //         key="save" | 
|---|
|  |  |  | //         onClick={async () => { | 
|---|
|  |  |  | //             setModalVisible(true) | 
|---|
|  |  |  | //         }} | 
|---|
|  |  |  | //     > | 
|---|
|  |  |  | //         <PlusOutlined /> | 
|---|
|  |  |  | //         添加 | 
|---|
|  |  |  | //     </Button>, | 
|---|
|  |  |  | //     <Button | 
|---|
|  |  |  | //         key="export" | 
|---|
|  |  |  | //         onClick={async () => { | 
|---|
|  |  |  | //             handleExport(); | 
|---|
|  |  |  | //         }} | 
|---|
|  |  |  | //     > | 
|---|
|  |  |  | //         <ExportOutlined /> | 
|---|
|  |  |  | //         导出 | 
|---|
|  |  |  | //     </Button>, | 
|---|
|  |  |  | // ]} | 
|---|
|  |  |  | request={(params, sorter, filter) => | 
|---|
|  |  |  | Http.doPostPromise('/api/role/page', { ...params, ...searchParam }, (res) => { | 
|---|
|  |  |  | console.log(filter); | 
|---|
|  |  |  | return { | 
|---|
|  |  |  | data: res.data.records, | 
|---|
|  |  |  | total: res.data.total, | 
|---|