Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
田翔
xform
Commits
fb513653
Commit
fb513653
authored
Apr 19, 2023
by
涂伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 'tableRender条件筛选组件优化'
parent
6b1e72aa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
9 deletions
+23
-9
index.js
src/core/TableRender/components/SearchGroup/index.js
+22
-8
index.js
src/core/TableRender/index.js
+1
-1
No files found.
src/core/TableRender/components/SearchGroup/index.js
View file @
fb513653
...
...
@@ -49,6 +49,7 @@ const SearchGroup = forwardRef((props, ref) => {
useImperativeHandle
(
ref
,
()
=>
({
getQueryInfo
}));
const
[
form
]
=
Form
.
useForm
();
// const {
// fieldSearch
...
...
@@ -180,19 +181,32 @@ const SearchGroup = forwardRef((props, ref) => {
// getAccountData();
// }
setQueryInfo
({...
queryInfo
,
info
:
e
})
getQueryInfo
(
form
.
getFieldsValue
())
};
const
getQueryInfo
=
()
=>
{
return
queryInfo
const
onValuesChange
=
(
values
)
=>
{
let
keys
=
Object
.
keys
(
values
)
if
(
keys
.
includes
(
'info'
))
return
getQueryInfo
(
form
.
getFieldsValue
())
}
const
getQueryInfo
=
(
data
)
=>
{
let
params
=
{}
params
.
timeFrom
=
data
.
time
&&
data
.
time
[
0
].
format
(
'YYYY-MM-DD HH:mm:ss'
)
||
''
params
.
timeTo
=
data
.
time
&&
data
.
time
[
1
].
format
(
'YYYY-MM-DD HH:mm:ss'
)
||
''
params
.
info
=
data
.
info
console
.
log
(
params
,
'666666666666666'
);
props
&&
props
.
onChange
(
params
)
return
params
}
return
(
<
div
className
=
{
styles
.
accountFlexWrapper
}
>
<
Row
className
=
{
styles
.
controlRow
}
>
<
Form
layout
=
{
'horizontal'
}
>
<
Form
layout
=
{
'horizontal'
}
form
=
{
form
}
onValuesChange
=
{
onValuesChange
}
>
<
Space
className
=
{
styles
.
controlRowLeft
}
wrap
>
{
showPicker
?
(
<
Form
.
Item
label
=
{
`录入时间`
}
className
=
{
styles
.
noMarginBottom
}
>
<
Form
.
Item
label
=
{
`录入时间`
}
name
=
'time'
className
=
{
styles
.
noMarginBottom
}
>
<
RangePicker
size
=
'middle'
value
=
{[...
dateArray
]}
...
...
@@ -202,7 +216,7 @@ const SearchGroup = forwardRef((props, ref) => {
ranges
=
{{
...
rangerOptions
}}
format
=
{
formatterStr
}
style
=
{{
width
:
300
}}
onChange
=
{
dateChange
}
//
onChange={dateChange}
/
>
<
/Form.Item
>
)
:
(
...
...
@@ -224,7 +238,7 @@ const SearchGroup = forwardRef((props, ref) => {
</Select>
</Form.Item>
))} */
}
<
Form
.
Item
label
=
{
'快捷搜索'
}
className
=
{
styles
.
noMarginBottom
}
>
<
Form
.
Item
label
=
{
'快捷搜索'
}
name
=
'info'
className
=
{
styles
.
noMarginBottom
}
>
{
/* {searchKey && fieldSearch ? <Select
style={{ maxWidth: '112px' }}
placeholder='请选择字段'
...
...
@@ -255,8 +269,8 @@ const SearchGroup = forwardRef((props, ref) => {
marginLeft
:
'10px'
}}
placeholder
=
'请输入值'
value
=
{
searchValues
}
onChange
=
{
e
=>
setSearchValues
(
e
.
target
.
value
)}
//
value={searchValues}
//
onChange={e => setSearchValues(e.target.value)}
onSearch
=
{
onSearch
}
/
>
<
/Form.Item
>
...
...
src/core/TableRender/index.js
View file @
fb513653
...
...
@@ -96,7 +96,7 @@ const TableRender = (props) => {
return
(
<
div
className
=
{
styles
.
tableRender
}
>
<
div
className
=
{
styles
.
top
}
>
{
/* <SearchGroup /> */
}
<
SearchGroup
/>
<
/div
>
<
div
className
=
{
styles
.
bottom
}
>
<
Table
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment