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
7b4bc017
Commit
7b4bc017
authored
Feb 09, 2020
by
caichuanming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
高级搜索 - 业务
parent
c55d6a03
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
99 additions
and
4 deletions
+99
-4
index.js
components/DataView/index.js
+4
-2
index.js
components/SearchView/index.js
+7
-2
index.js
components/SearchViewAdvanced/index.js
+63
-0
index.less
components/SearchViewAdvanced/index.less
+25
-0
No files found.
components/DataView/index.js
View file @
7b4bc017
...
@@ -569,13 +569,14 @@ export default class DataView extends React.Component {
...
@@ -569,13 +569,14 @@ export default class DataView extends React.Component {
// 渲染搜索栏
// 渲染搜索栏
_renderSearchForm
=
()
=>
{
_renderSearchForm
=
()
=>
{
const
{
searchCols
}
=
this
.
props
;
const
{
searchCols
,
advancedCols
}
=
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
}
advancedCols
=
{
advancedCols
}
search
=
{
this
.
search
}
search
=
{
this
.
search
}
onChangeParams
=
{
this
.
_changeSearchForm
}
onChangeParams
=
{
this
.
_changeSearchForm
}
/
>
/
>
...
@@ -616,7 +617,8 @@ export default class DataView extends React.Component {
...
@@ -616,7 +617,8 @@ export default class DataView extends React.Component {
// 渲染查询条件按钮组件
// 渲染查询条件按钮组件
_renderFilterBtn
=
()
=>
{
_renderFilterBtn
=
()
=>
{
const
{
searchCols
}
=
this
.
props
;
let
{
searchCols
,
advancedCols
}
=
this
.
props
;
searchCols
=
[...
searchCols
,
...
advancedCols
];
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 @
7b4bc017
...
@@ -15,6 +15,7 @@ import OrgTreeSelect from '@/components/orgTreeSelect/index.tsx';
...
@@ -15,6 +15,7 @@ import OrgTreeSelect from '@/components/orgTreeSelect/index.tsx';
import
AssociationSearch
from
'@/components/associationSearch/index.tsx'
;
import
AssociationSearch
from
'@/components/associationSearch/index.tsx'
;
import
AssociationSearchFilter
from
'@/components/associationSearchFilter/index.tsx'
;
import
AssociationSearchFilter
from
'@/components/associationSearchFilter/index.tsx'
;
import
NumberRange
from
'@/components/numberRange'
;
import
NumberRange
from
'@/components/numberRange'
;
import
SearchViewAdvanced
from
'@/submodule/components/SearchViewAdvanced'
;
// 样式
// 样式
import
styles
from
'./index.less'
;
import
styles
from
'./index.less'
;
// 工具
// 工具
...
@@ -352,13 +353,17 @@ class SearchView extends React.Component {
...
@@ -352,13 +353,17 @@ class SearchView extends React.Component {
};
};
render
()
{
render
()
{
const
{
style
,
searchCols
=
[]
}
=
this
.
props
;
const
{
style
,
searchCols
=
[]
,
advancedCols
=
[]
}
=
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
);
})}
})}
<
p
>
高级搜索
<
/p
>
<
SearchViewAdvanced
>
{
advancedCols
.
map
((
arr
,
index
)
=>
{
return
this
.
_renderRow
(
arr
,
index
);
})}
<
/SearchViewAdvanced
>
<
/BIForm
>
<
/BIForm
>
);
);
}
}
...
...
components/SearchViewAdvanced/index.js
0 → 100644
View file @
7b4bc017
/*
* @Author: CaiChuanming
* @Date: 2020-02-09 21:38:05
* @LastEditTime : 2020-02-09 23:00:29
* @LastEditors : Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /admin_web/src/submodule/components/SearchViewAdvanced/index.js
*/
/* eslint-disable */
import
React
from
'react'
;
import
{
Collapse
}
from
'antd'
;
import
styles
from
'./index.less'
;
import
IconFont
from
'@/components/CustomIcon/IconFont'
;
class
SearchViewAdvanced
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
advancedItem
=
React
.
createRef
();
this
.
state
=
{
collapseStatus
:
false
,
};
}
// 隐藏区显隐
changeCollapse
()
{
const
{
collapseStatus
}
=
this
.
state
;
this
.
setState
({
collapseStatus
:
!
collapseStatus
,
});
}
render
()
{
const
{
approval
}
=
this
.
props
;
const
{
collapseStatus
,
advancedForm
}
=
this
.
state
;
return
(
<
Collapse
bordered
=
{
false
}
>
<
Collapse
.
Panel
key
=
"1"
style
=
{{
border
:
'none'
}}
showArrow
=
{
false
}
header
=
{
<
div
className
=
{
styles
.
collapseTitle
}
onClick
=
{()
=>
{
return
this
.
changeCollapse
();
}}
>
高级搜索
<
IconFont
type
=
"iconzhankaiicon"
className
=
{
`
${
styles
.
collapseIcon
}
${
collapseStatus
?
styles
.
show
:
null
}
`
}
/
>
<
/div
>
}
>
{
this
.
props
.
children
}
<
/Collapse.Panel
>
<
/Collapse
>
);
}
}
export
default
SearchViewAdvanced
;
components/SearchViewAdvanced/index.less
0 → 100644
View file @
7b4bc017
.collapseTitle {
color: #04b4ad;
font-size: 14px;
cursor: pointer;
padding-bottom: 20px;
}
.collapseIcon {
font-size: 9px;
transform: rotate(0);
transition: transform 0.3s ease-in-out;
margin-left: 5px;
vertical-align: middle;
&.show {
transform: rotate(180deg);
}
}
:global .ant-collapse > .ant-collapse-item.ant-collapse-no-arrow > .ant-collapse-header {
padding: 0;
}
:global .ant-collapse-borderless > .ant-collapse-item > .ant-collapse-content > .ant-collapse-content-box {
padding: 0;
}
:global .ant-collapse-header {
display: inline-block;
}
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