From ac4341ea6b66ae02427d39d35f41d42d78b2eb2e Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期五, 14 二月 2025 10:08:32 +0800
Subject: [PATCH] #
---
zy-asrs-flow/src/components/TableSearch/index.jsx | 29 +++++++++++++++++------------
1 files changed, 17 insertions(+), 12 deletions(-)
diff --git a/zy-asrs-flow/src/components/TableSearch/index.jsx b/zy-asrs-flow/src/components/TableSearch/index.jsx
index 22c9019..2da0dcf 100644
--- a/zy-asrs-flow/src/components/TableSearch/index.jsx
+++ b/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>
--
Gitblit v1.9.1