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
b6ccbba4
Commit
b6ccbba4
authored
Feb 06, 2020
by
caichuanming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
将searchview移动到submodule
parent
55e511f0
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
498 additions
and
21 deletions
+498
-21
index.js
components/DataView/index.js
+21
-21
index.js
components/SearchView/index.js
+386
-0
index.less
components/SearchView/index.less
+91
-0
No files found.
components/DataView/index.js
View file @
b6ccbba4
/* eslint-disable */
// 库/框架
import
React
,
{
Component
}
from
'react'
;
//
组件
import
React
from
'react'
;
//
第三方库
import
{
Modal
,
message
}
from
'antd'
;
import
_
from
'lodash'
;
import
moment
from
'moment'
;
import
SearchView
from
'@/components/SearchView'
;
import
FormFilterBtn
from
'@/components/form-FilterButton2'
;
import
SelfPagination
from
'@/components/SelfPagination'
;
import
_
from
'lodash'
;
// ant_components 组件
import
BITable
from
'@/ant_components/BITable'
;
import
BIButton
from
'@/ant_components/BIButton'
;
// 自定义组件
import
SearchView
from
'@/submodule/components/SearchView'
;
import
FormFilterBtn
from
'@/components/form-FilterButton2'
;
import
SelfPagination
from
'@/components/SelfPagination'
;
import
ButtonAuth
from
'@/components/AuthButton'
;
import
IconFont
from
'@/components/CustomIcon/IconFont'
;
// 样式
import
s
from
'./index.less'
;
import
s
tyles
from
'./index.less'
;
// 工具
import
antiAssign
from
'@/utils/anti-assign'
;
import
{
DATE_FORMAT
,
PAGINATION
}
from
'@/utils/constants'
;
...
...
@@ -254,7 +254,7 @@ function removeItem(formData, removedItem) {
}
// 基础数据视图
export
default
class
DataView
extends
Component
{
export
default
class
DataView
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
);
const
{
...
...
@@ -640,7 +640,7 @@ export default class DataView extends Component {
const
{
tips
}
=
this
.
props
;
if
(
tips
)
{
return
(
<
div
className
=
{
s
.
tips
}
>
<
div
className
=
{
s
tyles
.
tips
}
>
{
tips
}
{
this
.
_renderBtns
()}
<
/div
>
...
...
@@ -658,7 +658,7 @@ export default class DataView extends Component {
btns
=
btns
.
concat
([{
label
:
'删除'
,
onClick
:
this
.
del
.
bind
(
this
)
}]);
}
return
(
<
div
className
=
{
s
.
row
}
>
<
div
className
=
{
s
tyles
.
row
}
>
{
btns
.
map
((
item
,
i
)
=>
{
const
{
label
,
onClick
,
authority
,
download
,
iconBtnSrc
,
type
}
=
item
;
const
style
=
{
...
...
@@ -675,16 +675,16 @@ export default class DataView extends Component {
<
BIButton
style
=
{
style
}
key
=
{
i
}
className
=
{
s
.
btn
}
className
=
{
s
tyles
.
btn
}
onClick
=
{
item
.
type
===
'del'
?
this
.
del
.
bind
(
this
,
label
,
onClick
)
:
onClick
}
{...
antiAssign
(
item
,
'label,onClick,type,iconBtnSrc'
)}
>
{
iconBtnSrc
&&
iconBtnSrc
!==
''
?
(
<
IconFont
className
=
{
s
.
iconCls
}
type
=
{
iconBtnSrc
}
/
>
<
IconFont
className
=
{
s
tyles
.
iconCls
}
type
=
{
iconBtnSrc
}
/
>
)
:
(
<
IconFont
className
=
{
s
.
iconCls
}
type
=
"iconxinzeng"
/>
<
IconFont
className
=
{
s
tyles
.
iconCls
}
type
=
"iconxinzeng"
/>
)}
<
span
className
=
{
s
.
titleCls
}
>
{
label
}
<
/span
>
<
span
className
=
{
s
tyles
.
titleCls
}
>
{
label
}
<
/span
>
<
/BIButton
>
)}
<
/ButtonAuth
>
...
...
@@ -723,7 +723,7 @@ export default class DataView extends Component {
rowSelection
=
rowSelectionConfig
;
}
const
commonProps
=
{
className
:
s
.
table
,
className
:
s
tyles
.
table
,
rowKey
,
rowSelection
,
columns
:
cols
,
...
...
@@ -776,11 +776,11 @@ export default class DataView extends Component {
const
{
style
,
hideForm
,
tips
}
=
this
.
props
;
const
{
loading
}
=
this
.
state
;
return
(
<
div
className
=
{
s
.
view
}
style
=
{
style
}
>
<
div
className
=
{
s
tyles
.
view
}
style
=
{
style
}
>
<
BISpin
spinning
=
{
loading
}
>
{
hideForm
?
null
:
(
<>
<
div
className
=
{
s
.
formWrap
}
>
<
div
className
=
{
s
tyles
.
formWrap
}
>
{
/* 筛选条件 */
}
{
this
.
_renderSearchForm
()}
{
/* 高级搜索 */
}
...
...
@@ -788,10 +788,10 @@ export default class DataView extends Component {
{
/* 已选条件、搜索按钮 */
}
{
this
.
_renderFilterBtn
()}
<
/div
>
<
div
className
=
{
s
.
split
}
/
>
<
div
className
=
{
s
tyles
.
split
}
/
>
<
/
>
)}
<
div
className
=
{
s
.
tableWrap
}
>
<
div
className
=
{
s
tyles
.
tableWrap
}
>
{
tips
?
this
.
_renderTips
()
:
this
.
_renderBtns
()}
{
this
.
_renderData
()}
{
this
.
_renderPagination
()}
...
...
components/SearchView/index.js
0 → 100644
View file @
b6ccbba4
This diff is collapsed.
Click to expand it.
components/SearchView/index.less
0 → 100644
View file @
b6ccbba4
@import '~@/theme/common';
@smallSpace: 4px;
@normalSpace: 16px;
.view {
:global(.ant-checkbox-wrapper) {
min-width: 116px;
margin-right: 10px;
color: @textSupplyColor;
}
:global(.ant-select-selection) {
height: 32px;
overflow-y: auto;
}
.rowWrap {
margin-bottom: 20px;
&:last-child {
margin-bottom: 0;
}
.colWrap {
display: inline-block;
vertical-align: middle;
&._2 {
width: 50%;
}
&._3 {
width: 33.33%;
}
&._4 {
width: 25%;
}
&._5 {
width: 20%;
}
.colInner {
display: flex;
justify-content: flex-start;
align-items: flex-start;
.label {
color: @textPrimaryColor;
margin-right: 25px;
width: 66px;
text-align: right;
}
.itemWrap {
flex: 1;
.itemContent {
//min-width: 230px;
//display: inline-block;
width: 100%;
margin-right: 20px;
}
.checkboxContainer {
display: flex;
flex-wrap: wrap;
margin-bottom: -20px;
}
.checkbox {
margin-bottom: 20px;
}
.searchBtnWrap {
display: inline-block;
.searchBtn {
background: @primaryColor;
}
}
}
}
}
}
}
.chooseAll {
//padding: 5px 0;
//display: block;
//background-color: blue;
//border-top: 1px solid red;
}
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