#
luxiaotao1123
2024-02-28 7f03c1bdaff805ad29f773058b3a93845f86952f
#
2个文件已修改
39 ■■■■■ 已修改文件
zy-asrs-flow/src/components/TableSearch/index.jsx 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-flow/src/locales/en-US.ts 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-flow/src/components/TableSearch/index.jsx
@@ -1,5 +1,6 @@
import React from 'react';
import { Input, Button, Space, Select, DatePicker } from 'antd';
import { FormattedMessage, useIntl } from '@umijs/max';
import Http from '@/utils/http';
import moment from 'moment';
@@ -7,13 +8,14 @@
const DATE_FORMAT = 'YYYY-MM-DD HH:mm:ss';
const TextFilter = (props) => {
    const intl = useIntl();
    const [condition, setCondition] = React.useState('');
    return (
        <div style={{ padding: 8 }}>
            <Input
                style={{ width: 188, marginBottom: 8, display: 'block' }}
                placeholder="请输入"
                placeholder={intl.formatMessage({ id: 'commont.enter', defaultMessage: '请输入' })}
                value={condition}
                onChange={e => {
                    props.setSelectedKeys(e.target.value ? [e.target.value] : []);
@@ -42,7 +44,7 @@
                    size="small"
                    style={{ width: 90 }}
                >
                    确定
                    <FormattedMessage id='common.submit' defaultMessage='确定' />
                </Button>
                <Button
                    onClick={() => {
@@ -61,7 +63,7 @@
                    size="small"
                    style={{ width: 90 }}
                >
                    重置
                    <FormattedMessage id='common.reset' defaultMessage='重置' />
                </Button>
            </Space>
        </div>
@@ -69,6 +71,7 @@
}
const SelectFilter = (props) => {
    const intl = useIntl();
    const [currentOption, setCurrentOption] = React.useState();
    return (
@@ -76,7 +79,7 @@
            <div>
                <Select
                    style={{ width: 188, marginBottom: 8, display: 'block' }}
                    placeholder="请选择"
                    placeholder={intl.formatMessage({ id: 'commont.select', defaultMessage: '请选择' })}
                    value={currentOption === NONE_OPTION ? undefined : currentOption}
                    onChange={value => {
                        setCurrentOption(value)
@@ -112,7 +115,7 @@
                    size="small"
                    style={{ width: 90 }}
                >
                    确定
                    <FormattedMessage id='common.submit' defaultMessage='确定' />
                </Button>
                <Button
                    onClick={() => {
@@ -131,7 +134,7 @@
                    size="small"
                    style={{ width: 90 }}
                >
                    重置
                    <FormattedMessage id='common.reset' defaultMessage='重置' />
                </Button>
            </Space>
        </div>
@@ -139,6 +142,7 @@
}
const DatetimeRangeFilter = (props) => {
    const intl = useIntl();
    const [dates, setDates] = React.useState([null, null]);
    const [startDate, setStartDate] = React.useState(null);
    const [endDate, setEndDate] = React.useState(null);
@@ -182,7 +186,7 @@
                            }}
                            size="small"
                        >
                            确定
                            <FormattedMessage id='common.submit' defaultMessage='确定' />
                        </Button>
                        <Button
                            onClick={() => {
@@ -202,7 +206,7 @@
                            }}
                            size="small"
                        >
                            重置
                            <FormattedMessage id='common.reset' defaultMessage='重置' />
                        </Button>
                    </Space>
                </Space>
@@ -212,9 +216,10 @@
}
const LinkFilter = (props) => {
    const intl = useIntl();
    const [currentOption, setCurrentOption] = React.useState();
    const [options, setOptions] = React.useState([]);
    const fetchData = async (value) => {
        return await Http.doPostForm(`api/${props.major}/query`, { condition: value });
    }
@@ -237,7 +242,7 @@
            <div>
                <Select
                    style={{ width: 188, marginBottom: 8, display: 'block' }}
                    placeholder="请选择"
                    placeholder={intl.formatMessage({ id: 'commont.select', defaultMessage: '请选择' })}
                    value={currentOption === NONE_OPTION ? undefined : currentOption}
                    onChange={value => {
                        setCurrentOption(value)
@@ -272,7 +277,7 @@
                    size="small"
                    style={{ width: 90 }}
                >
                    确定
                    <FormattedMessage id='common.submit' defaultMessage='确定' />
                </Button>
                <Button
                    onClick={() => {
@@ -292,7 +297,7 @@
                    size="small"
                    style={{ width: 90 }}
                >
                    重置
                    <FormattedMessage id='common.reset' defaultMessage='重置' />
                </Button>
            </Space>
        </div>
zy-asrs-flow/src/locales/en-US.ts
@@ -1,4 +1,14 @@
export default {
  'commont.enter':'Please enter',
  'commont.select':'Please select',
  'common.submit':'Submit',
  'common.cancel':'Cancel',
  'common.reset':'Reset',
  '':'',
  '':'',
  '':'',
  '':'',
  '':'',
  'page.table.no': 'No',
  'page.add': 'Add New',
  'page.adding':'In process of adding',