Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
submodule
Project
Project
Details
Activity
Releases
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
web_component
submodule
Commits
cd141e06
Commit
cd141e06
authored
Feb 10, 2020
by
caichuanming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
7b4bc017
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
index.js
components/DataView/index.js
+4
-4
index.js
components/SearchView/index.js
+4
-2
No files found.
components/DataView/index.js
View file @
cd141e06
...
@@ -569,14 +569,14 @@ export default class DataView extends React.Component {
...
@@ -569,14 +569,14 @@ export default class DataView extends React.Component {
// 渲染搜索栏
// 渲染搜索栏
_renderSearchForm
=
()
=>
{
_renderSearchForm
=
()
=>
{
const
{
searchCols
,
advancedCols
}
=
this
.
props
;
const
{
searchCols
,
advanced
Search
Cols
}
=
this
.
props
;
const
{
searchForm
}
=
this
.
state
;
const
{
searchForm
}
=
this
.
state
;
if
(
searchCols
===
null
||
searchCols
.
length
<=
0
)
return
null
;
if
(
searchCols
===
null
||
searchCols
.
length
<=
0
)
return
null
;
return
(
return
(
<
SearchView
<
SearchView
searchForm
=
{
searchForm
}
searchForm
=
{
searchForm
}
searchCols
=
{
searchCols
}
searchCols
=
{
searchCols
}
advanced
Cols
=
{
advanced
Cols
}
advanced
SearchCols
=
{
advancedSearch
Cols
}
search
=
{
this
.
search
}
search
=
{
this
.
search
}
onChangeParams
=
{
this
.
_changeSearchForm
}
onChangeParams
=
{
this
.
_changeSearchForm
}
/
>
/
>
...
@@ -617,8 +617,8 @@ export default class DataView extends React.Component {
...
@@ -617,8 +617,8 @@ export default class DataView extends React.Component {
// 渲染查询条件按钮组件
// 渲染查询条件按钮组件
_renderFilterBtn
=
()
=>
{
_renderFilterBtn
=
()
=>
{
let
{
searchCols
,
advancedCols
}
=
this
.
props
;
let
{
searchCols
,
advanced
Search
Cols
}
=
this
.
props
;
searchCols
=
[...
searchCols
,
...
advancedCols
];
searchCols
=
[...
searchCols
,
...
advanced
Search
Cols
];
const
{
searchForm
,
siftDataArr
,
currentSiftNum
}
=
this
.
state
;
const
{
searchForm
,
siftDataArr
,
currentSiftNum
}
=
this
.
state
;
if
(
searchCols
===
null
||
searchCols
.
length
<=
0
)
return
null
;
if
(
searchCols
===
null
||
searchCols
.
length
<=
0
)
return
null
;
const
chooseItems
=
formatForm
(
searchForm
,
searchCols
);
const
chooseItems
=
formatForm
(
searchForm
,
searchCols
);
...
...
components/SearchView/index.js
View file @
cd141e06
...
@@ -353,14 +353,16 @@ class SearchView extends React.Component {
...
@@ -353,14 +353,16 @@ class SearchView extends React.Component {
};
};
render
()
{
render
()
{
const
{
style
,
searchCols
=
[],
advancedCols
=
[]
}
=
this
.
props
;
const
{
style
,
searchCols
=
[],
advanced
Search
Cols
=
[]
}
=
this
.
props
;
return
(
return
(
<
BIForm
className
=
{
styles
.
view
}
style
=
{
style
}
>
<
BIForm
className
=
{
styles
.
view
}
style
=
{
style
}
>
{
/* 基础搜索 */
}
{
searchCols
.
map
((
arr
,
index
)
=>
{
{
searchCols
.
map
((
arr
,
index
)
=>
{
return
this
.
_renderRow
(
arr
,
index
);
return
this
.
_renderRow
(
arr
,
index
);
})}
})}
{
/* 高级搜索 */
}
<
SearchViewAdvanced
>
<
SearchViewAdvanced
>
{
advancedCols
.
map
((
arr
,
index
)
=>
{
{
advanced
Search
Cols
.
map
((
arr
,
index
)
=>
{
return
this
.
_renderRow
(
arr
,
index
);
return
this
.
_renderRow
(
arr
,
index
);
})}
})}
<
/SearchViewAdvanced
>
<
/SearchViewAdvanced
>
...
...
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