#
luxiaotao1123
2024-02-15 5eacf724e0b10c92a17db0fa4f3681082d0d97a1
#
2个文件已修改
41 ■■■■■ 已修改文件
zy-asrs-flow/src/components/TableSearch/index.jsx 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-flow/src/pages/system/role/index.jsx 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-flow/src/components/TableSearch/index.jsx
@@ -7,12 +7,21 @@
            <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 }}
                >
zy-asrs-flow/src/pages/system/role/index.jsx
@@ -1,14 +1,14 @@
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'
@@ -117,7 +117,7 @@
            title: '标识',
            dataIndex: 'code',
            valueType: 'text',
            filterDropdown: (props) => <Filter {...props} />,
            filterDropdown: (props) => <Filter name='code' {...props} actionRef={actionRef} setSearchParam={setSearchParam} />,
        },
        {
            title: '操作',
@@ -211,30 +211,8 @@
                            </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,