Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
ant-design-pro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanledexianxianxian
ant-design-pro
Commits
8e75fc92
Commit
8e75fc92
authored
Aug 30, 2017
by
niko
Committed by
GitHub
Aug 30, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2 from ant-design/List_Dashboard-optimize-again
修复二次List 和 Dashboard 的二次确认优化
parents
26910430
abca36bd
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
151 additions
and
78 deletions
+151
-78
src/components/Charts/index.less
src/components/Charts/index.less
+1
-0
src/routes/Dashboard/Analysis.less
src/routes/Dashboard/Analysis.less
+3
-0
src/routes/Dashboard/Monitor.js
src/routes/Dashboard/Monitor.js
+17
-11
src/routes/List/BasicList.js
src/routes/List/BasicList.js
+2
-1
src/routes/List/CardList.js
src/routes/List/CardList.js
+31
-33
src/routes/List/CardList.less
src/routes/List/CardList.less
+4
-0
src/routes/List/CoverCardList.js
src/routes/List/CoverCardList.js
+33
-17
src/routes/List/CoverCardList.less
src/routes/List/CoverCardList.less
+3
-0
src/routes/List/FilterCardList.js
src/routes/List/FilterCardList.js
+23
-3
src/routes/List/SearchList.js
src/routes/List/SearchList.js
+22
-3
src/routes/List/TableList.js
src/routes/List/TableList.js
+12
-10
No files found.
src/components/Charts/index.less
View file @
8e75fc92
.miniChart {
.miniChart {
overflow: hidden;
position: relative;
position: relative;
width: 100%;
width: 100%;
& > div {
& > div {
...
...
src/routes/Dashboard/Analysis.less
View file @
8e75fc92
...
@@ -72,6 +72,9 @@
...
@@ -72,6 +72,9 @@
}
}
@media screen and (max-width: @screen-lg) {
@media screen and (max-width: @screen-lg) {
.salesExtra {
display: none;
}
.rankingList {
.rankingList {
li {
li {
span:first-child {
span:first-child {
...
...
src/routes/Dashboard/Monitor.js
View file @
8e75fc92
...
@@ -3,7 +3,6 @@ import { connect } from 'dva';
...
@@ -3,7 +3,6 @@ import { connect } from 'dva';
import
{
Row
,
Col
,
Card
}
from
'
antd
'
;
import
{
Row
,
Col
,
Card
}
from
'
antd
'
;
import
numeral
from
'
numeral
'
;
import
numeral
from
'
numeral
'
;
import
PageHeaderLayout
from
'
../../layouts/PageHeaderLayout
'
;
import
{
NumberInfo
,
MiniArea
,
Pie
,
WaterWave
,
Gauge
}
from
'
../../components/Charts
'
;
import
{
NumberInfo
,
MiniArea
,
Pie
,
WaterWave
,
Gauge
}
from
'
../../components/Charts
'
;
import
MapChart
from
'
../../components/MapChart
'
;
import
MapChart
from
'
../../components/MapChart
'
;
import
TagCloud
from
'
../../components/TagCloud
'
;
import
TagCloud
from
'
../../components/TagCloud
'
;
...
@@ -45,12 +44,10 @@ export default class Monitor extends PureComponent {
...
@@ -45,12 +44,10 @@ export default class Monitor extends PureComponent {
const
{
tags
}
=
monitor
;
const
{
tags
}
=
monitor
;
return
(
return
(
<
PageHeaderLayout
<
div
>
title
=
"
大盘监控
"
>
<
Row
gutter
=
{
24
}
>
<
Row
gutter
=
{
24
}
>
<
Col
lg
=
{
16
}
md
=
{
24
}
sm
=
{
24
}
xs
=
{
24
}
style
=
{{
marginBottom
:
24
}}
>
<
Col
lg
=
{
16
}
md
=
{
24
}
sm
=
{
24
}
xs
=
{
24
}
style
=
{{
marginBottom
:
24
}}
>
<
Card
title
=
"
活动实时交易情况
"
>
<
Card
title
=
"
活动实时交易情况
"
bordered
=
{
false
}
>
<
Row
>
<
Row
>
<
Col
sm
=
{
6
}
xs
=
{
12
}
>
<
Col
sm
=
{
6
}
xs
=
{
12
}
>
<
NumberInfo
<
NumberInfo
...
@@ -85,7 +82,7 @@ export default class Monitor extends PureComponent {
...
@@ -85,7 +82,7 @@ export default class Monitor extends PureComponent {
<
/Card
>
<
/Card
>
<
/Col
>
<
/Col
>
<
Col
lg
=
{
8
}
md
=
{
24
}
sm
=
{
24
}
xs
=
{
24
}
>
<
Col
lg
=
{
8
}
md
=
{
24
}
sm
=
{
24
}
xs
=
{
24
}
>
<
Card
title
=
"
活动情况预测
"
style
=
{{
marginBottom
:
24
}}
>
<
Card
title
=
"
活动情况预测
"
style
=
{{
marginBottom
:
24
}}
bordered
=
{
false
}
>
<
div
className
=
{
styles
.
activeChart
}
>
<
div
className
=
{
styles
.
activeChart
}
>
<
NumberInfo
<
NumberInfo
subTitle
=
"
目标评估
"
subTitle
=
"
目标评估
"
...
@@ -125,7 +122,12 @@ export default class Monitor extends PureComponent {
...
@@ -125,7 +122,12 @@ export default class Monitor extends PureComponent {
}
}
<
/div
>
<
/div
>
<
/Card
>
<
/Card
>
<
Card
title
=
"
券核效率
"
style
=
{{
marginBottom
:
24
}}
bodyStyle
=
{{
textAlign
:
'
center
'
}}
>
<
Card
title
=
"
券核效率
"
style
=
{{
marginBottom
:
24
}}
bodyStyle
=
{{
textAlign
:
'
center
'
}}
bordered
=
{
false
}
>
<
Gauge
<
Gauge
title
=
"
跳出率
"
title
=
"
跳出率
"
height
=
{
164
}
height
=
{
164
}
...
@@ -136,7 +138,11 @@ export default class Monitor extends PureComponent {
...
@@ -136,7 +138,11 @@ export default class Monitor extends PureComponent {
<
/Row
>
<
/Row
>
<
Row
gutter
=
{
24
}
>
<
Row
gutter
=
{
24
}
>
<
Col
sm
=
{
8
}
xs
=
{
24
}
>
<
Col
sm
=
{
8
}
xs
=
{
24
}
>
<
Card
title
=
"
各品类占比
"
style
=
{{
marginBottom
:
24
}}
>
<
Card
title
=
"
各品类占比
"
style
=
{{
marginBottom
:
24
}}
bordered
=
{
false
}
>
<
Row
style
=
{{
padding
:
'
18px 0 19px 0
'
}}
>
<
Row
style
=
{{
padding
:
'
18px 0 19px 0
'
}}
>
<
Col
span
=
{
8
}
>
<
Col
span
=
{
8
}
>
<
Pie
<
Pie
...
@@ -168,7 +174,7 @@ export default class Monitor extends PureComponent {
...
@@ -168,7 +174,7 @@ export default class Monitor extends PureComponent {
<
/Card
>
<
/Card
>
<
/Col
>
<
/Col
>
<
Col
sm
=
{
8
}
xs
=
{
24
}
style
=
{{
marginBottom
:
24
}}
>
<
Col
sm
=
{
8
}
xs
=
{
24
}
style
=
{{
marginBottom
:
24
}}
>
<
Card
title
=
"
热门搜索
"
>
<
Card
title
=
"
热门搜索
"
bordered
=
{
false
}
>
<
TagCloud
<
TagCloud
data
=
{
tags
}
data
=
{
tags
}
height
=
{
161
}
height
=
{
161
}
...
@@ -176,7 +182,7 @@ export default class Monitor extends PureComponent {
...
@@ -176,7 +182,7 @@ export default class Monitor extends PureComponent {
<
/Card
>
<
/Card
>
<
/Col
>
<
/Col
>
<
Col
sm
=
{
8
}
xs
=
{
24
}
style
=
{{
marginBottom
:
24
}}
>
<
Col
sm
=
{
8
}
xs
=
{
24
}
style
=
{{
marginBottom
:
24
}}
>
<
Card
title
=
"
资源剩余
"
bodyStyle
=
{{
textAlign
:
'
center
'
}}
>
<
Card
title
=
"
资源剩余
"
bodyStyle
=
{{
textAlign
:
'
center
'
}}
bordered
=
{
false
}
>
<
WaterWave
<
WaterWave
height
=
{
161
}
height
=
{
161
}
title
=
"
补贴资金剩余
"
title
=
"
补贴资金剩余
"
...
@@ -185,7 +191,7 @@ export default class Monitor extends PureComponent {
...
@@ -185,7 +191,7 @@ export default class Monitor extends PureComponent {
<
/Card
>
<
/Card
>
<
/Col
>
<
/Col
>
<
/Row
>
<
/Row
>
<
/
PageHeaderLayout
>
<
/
div
>
);
);
}
}
}
}
src/routes/List/BasicList.js
View file @
8e75fc92
...
@@ -95,7 +95,7 @@ export default class BasicList extends PureComponent {
...
@@ -95,7 +95,7 @@ export default class BasicList extends PureComponent {
return
(
return
(
<
PageHeaderLayout
>
<
PageHeaderLayout
>
<
div
className
=
{
styles
.
standardList
}
>
<
div
className
=
{
styles
.
standardList
}
>
<
Card
>
<
Card
bordered
=
{
false
}
>
<
Row
>
<
Row
>
<
Col
sm
=
{
8
}
xs
=
{
24
}
>
<
Col
sm
=
{
8
}
xs
=
{
24
}
>
<
Info
title
=
"
我的代办
"
value
=
"
8个任务
"
bordered
/>
<
Info
title
=
"
我的代办
"
value
=
"
8个任务
"
bordered
/>
...
@@ -110,6 +110,7 @@ export default class BasicList extends PureComponent {
...
@@ -110,6 +110,7 @@ export default class BasicList extends PureComponent {
<
/Card
>
<
/Card
>
<
Card
<
Card
bordered
=
{
false
}
title
=
"
基础列表
"
title
=
"
基础列表
"
style
=
{{
marginTop
:
16
}}
style
=
{{
marginTop
:
16
}}
extra
=
{
extraContent
}
extra
=
{
extraContent
}
...
...
src/routes/List/CardList.js
View file @
8e75fc92
import
React
,
{
PureComponent
}
from
'
react
'
;
import
React
,
{
PureComponent
}
from
'
react
'
;
import
{
connect
}
from
'
dva
'
;
import
{
connect
}
from
'
dva
'
;
import
{
Row
,
Col
,
Card
,
Avatar
,
Spin
,
Button
,
Icon
}
from
'
antd
'
;
import
{
Card
,
Avatar
,
Button
,
Icon
,
List
}
from
'
antd
'
;
import
PageHeaderLayout
from
'
../../layouts/PageHeaderLayout
'
;
import
PageHeaderLayout
from
'
../../layouts/PageHeaderLayout
'
;
...
@@ -42,7 +42,7 @@ export default class CardList extends PureComponent {
...
@@ -42,7 +42,7 @@ export default class CardList extends PureComponent {
const
extraContent
=
(
const
extraContent
=
(
<
div
className
=
{
styles
.
extraImg
}
>
<
div
className
=
{
styles
.
extraImg
}
>
<
img
alt
=
"
这是一个标题
"
src
=
"
https://gw.alipayobjects.com/zos/rmsportal/
tTIFdlIcZFvvmCROhyBg
.png
"
/>
<
img
alt
=
"
这是一个标题
"
src
=
"
https://gw.alipayobjects.com/zos/rmsportal/
QfpzdhbrqRtdSyZHKhjp
.png
"
/>
<
/div
>
<
/div
>
);
);
...
@@ -53,19 +53,18 @@ export default class CardList extends PureComponent {
...
@@ -53,19 +53,18 @@ export default class CardList extends PureComponent {
extraContent
=
{
extraContent
}
extraContent
=
{
extraContent
}
>
>
<
div
className
=
{
styles
.
cardList
}
>
<
div
className
=
{
styles
.
cardList
}
>
{
<
List
loading
?
loading
=
{
loading
}
<
Spin
/>
grid
=
{{
gutter
:
16
,
lg
:
3
,
md
:
2
,
sm
:
1
,
xs
:
1
}}
:
>
<
Row
gutter
=
{
16
}
>
<
List
.
Item
>
<
Col
lg
=
{
8
}
md
=
{
12
}
sm
=
{
12
}
xs
=
{
24
}
style
=
{{
marginBottom
:
16
}}
>
<
Button
type
=
"
dashed
"
className
=
{
styles
.
newButton
}
>
<
Button
type
=
"
dashed
"
className
=
{
styles
.
newButton
}
>
<
Icon
type
=
"
plus
"
/>
新增产品
<
Icon
type
=
"
plus
"
/>
新增产品
<
/Button
>
<
/Button
>
<
/Col
>
<
/List.Item
>
{
{
list
&&
list
.
map
(
item
=>
(
list
&&
list
.
map
(
item
=>
(
<
Col
lg
=
{
8
}
md
=
{
12
}
sm
=
{
12
}
xs
=
{
24
}
key
=
{
item
.
id
}
style
=
{{
marginBottom
:
16
}
}
>
<
List
.
Item
key
=
{
item
.
id
}
>
<
Card
<
Card
actions
=
{[
<
a
>
操作一
<
/a>, <a>操作二</
a
>
]}
actions
=
{[
<
a
>
操作一
<
/a>, <a>操作二</
a
>
]}
>
>
...
@@ -79,11 +78,10 @@ export default class CardList extends PureComponent {
...
@@ -79,11 +78,10 @@ export default class CardList extends PureComponent {
)}
)}
/
>
/
>
<
/Card
>
<
/Card
>
<
/Col
>
<
/List.Item
>
))
))
}
}
<
/Row
>
<
/List
>
}
<
/div
>
<
/div
>
<
/PageHeaderLayout
>
<
/PageHeaderLayout
>
);
);
...
...
src/routes/List/CardList.less
View file @
8e75fc92
...
@@ -12,6 +12,10 @@
...
@@ -12,6 +12,10 @@
.extraImg {
.extraImg {
margin-top: -60px;
margin-top: -60px;
text-align: center;
text-align: center;
width: 195px;
img {
width: 100%;
}
}
}
.newButton {
.newButton {
...
...
src/routes/List/CoverCardList.js
View file @
8e75fc92
import
React
,
{
PureComponent
}
from
'
react
'
;
import
React
,
{
PureComponent
}
from
'
react
'
;
import
moment
from
'
moment
'
;
import
moment
from
'
moment
'
;
import
{
connect
}
from
'
dva
'
;
import
{
connect
}
from
'
dva
'
;
import
{
Row
,
Col
,
Form
,
Card
,
Select
,
Spin
}
from
'
antd
'
;
import
{
routerRedux
}
from
'
dva/router
'
;
import
{
Row
,
Col
,
Form
,
Card
,
Select
,
List
}
from
'
antd
'
;
import
PageHeaderLayout
from
'
../../layouts/PageHeaderLayout
'
;
import
PageHeaderLayout
from
'
../../layouts/PageHeaderLayout
'
;
import
StandardFormRow
from
'
../../components/StandardFormRow
'
;
import
StandardFormRow
from
'
../../components/StandardFormRow
'
;
...
@@ -49,15 +50,35 @@ export default class CoverCardList extends PureComponent {
...
@@ -49,15 +50,35 @@ export default class CoverCardList extends PureComponent {
},
0
);
},
0
);
}
}
handleTabChange
=
(
key
)
=>
{
const
{
dispatch
}
=
this
.
props
;
switch
(
key
)
{
case
'
doc
'
:
dispatch
(
routerRedux
.
push
(
'
/list/search
'
));
break
;
case
'
app
'
:
dispatch
(
routerRedux
.
push
(
'
/list/filter-card-list
'
));
break
;
case
'
project
'
:
dispatch
(
routerRedux
.
push
(
'
/list/cover-card-list
'
));
break
;
default
:
break
;
}
}
render
()
{
render
()
{
const
{
list
:
{
list
=
[],
loading
},
form
}
=
this
.
props
;
const
{
list
:
{
list
=
[],
loading
},
form
}
=
this
.
props
;
const
{
getFieldDecorator
}
=
form
;
const
{
getFieldDecorator
}
=
form
;
const
cardList
=
list
?
(
const
cardList
=
list
?
(
<
Row
gutter
=
{
16
}
style
=
{{
marginTop
:
16
}}
>
<
List
loading
=
{
loading
}
grid
=
{{
gutter
:
16
,
lg
:
4
,
md
:
3
,
sm
:
2
,
xs
:
1
}}
>
{
{
list
.
map
(
item
=>
(
list
.
map
(
item
=>
(
<
Col
lg
=
{
6
}
md
=
{
8
}
sm
=
{
12
}
xs
=
{
24
}
style
=
{{
marginBottom
:
16
}}
key
=
{
item
.
id
}
>
<
List
.
Item
key
=
{
item
.
id
}
>
<
Card
<
Card
cover
=
{
<
img
alt
=
{
item
.
title
}
src
=
{
item
.
cover
}
/>
}
cover
=
{
<
img
alt
=
{
item
.
title
}
src
=
{
item
.
cover
}
/>
}
>
>
...
@@ -82,15 +103,15 @@ export default class CoverCardList extends PureComponent {
...
@@ -82,15 +103,15 @@ export default class CoverCardList extends PureComponent {
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/Card
>
<
/Card
>
<
/
Col
>
<
/
List.Item
>
))
))
}
}
<
/
Row
>
<
/
List
>
)
:
null
;
)
:
null
;
const
tabList
=
[
const
tabList
=
[
{
{
key
:
'
doc
s
'
,
key
:
'
doc
'
,
tab
:
'
文章
'
,
tab
:
'
文章
'
,
},
},
{
{
...
@@ -100,6 +121,7 @@ export default class CoverCardList extends PureComponent {
...
@@ -100,6 +121,7 @@ export default class CoverCardList extends PureComponent {
{
{
key
:
'
project
'
,
key
:
'
project
'
,
tab
:
'
项目
'
,
tab
:
'
项目
'
,
default
:
true
,
},
},
];
];
...
@@ -121,9 +143,11 @@ export default class CoverCardList extends PureComponent {
...
@@ -121,9 +143,11 @@ export default class CoverCardList extends PureComponent {
title
=
"
带封面的卡片列表
"
title
=
"
带封面的卡片列表
"
content
=
{
pageHeaderContent
}
content
=
{
pageHeaderContent
}
tabList
=
{
tabList
}
tabList
=
{
tabList
}
onTabChange
=
{
this
.
handleTabChange
}
>
>
<
div
className
=
{
styles
.
coverCardList
}
>
<
div
className
=
{
styles
.
coverCardList
}
>
<
Card
<
Card
bordered
=
{
false
}
noHovering
noHovering
>
>
<
Form
<
Form
...
@@ -188,17 +212,9 @@ export default class CoverCardList extends PureComponent {
...
@@ -188,17 +212,9 @@ export default class CoverCardList extends PureComponent {
<
/StandardFormRow
>
<
/StandardFormRow
>
<
/Form
>
<
/Form
>
<
/Card
>
<
/Card
>
{
<
div
className
=
{
styles
.
cardList
}
>
loading
&&
(
list
.
length
>
0
)
&&
<
Spin
>
{
cardList
}
{
cardList
}
<
/div
>
<
/Spin
>
}
{
loading
&&
(
list
.
length
<
1
)
&&
<
div
style
=
{{
marginTop
:
16
}}
><
Spin
/><
/div
>
}
{
!
loading
&&
cardList
}
<
/div
>
<
/div
>
<
/PageHeaderLayout
>
<
/PageHeaderLayout
>
);
);
...
...
src/routes/List/CoverCardList.less
View file @
8e75fc92
...
@@ -21,4 +21,7 @@
...
@@ -21,4 +21,7 @@
flex: 0 1 auto;
flex: 0 1 auto;
}
}
}
}
.cardList {
margin-top: 24px;
}
}
}
src/routes/List/FilterCardList.js
View file @
8e75fc92
import
React
,
{
PureComponent
}
from
'
react
'
;
import
React
,
{
PureComponent
}
from
'
react
'
;
import
numeral
from
'
numeral
'
;
import
numeral
from
'
numeral
'
;
import
{
connect
}
from
'
dva
'
;
import
{
connect
}
from
'
dva
'
;
import
{
routerRedux
}
from
'
dva/router
'
;
import
{
Row
,
Col
,
Form
,
Card
,
Select
,
Spin
,
Icon
,
Avatar
}
from
'
antd
'
;
import
{
Row
,
Col
,
Form
,
Card
,
Select
,
Spin
,
Icon
,
Avatar
}
from
'
antd
'
;
import
PageHeaderLayout
from
'
../../layouts/PageHeaderLayout
'
;
import
PageHeaderLayout
from
'
../../layouts/PageHeaderLayout
'
;
...
@@ -60,22 +61,39 @@ export default class FilterCardList extends PureComponent {
...
@@ -60,22 +61,39 @@ export default class FilterCardList extends PureComponent {
},
0
);
},
0
);
}
}
handleTabChange
=
(
key
)
=>
{
const
{
dispatch
}
=
this
.
props
;
switch
(
key
)
{
case
'
doc
'
:
dispatch
(
routerRedux
.
push
(
'
/list/search
'
));
break
;
case
'
app
'
:
dispatch
(
routerRedux
.
push
(
'
/list/filter-card-list
'
));
break
;
case
'
project
'
:
dispatch
(
routerRedux
.
push
(
'
/list/cover-card-list
'
));
break
;
default
:
break
;
}
}
render
()
{
render
()
{
const
{
list
:
{
list
,
loading
},
form
}
=
this
.
props
;
const
{
list
:
{
list
,
loading
},
form
}
=
this
.
props
;
const
{
getFieldDecorator
}
=
form
;
const
{
getFieldDecorator
}
=
form
;
const
tabList
=
[
const
tabList
=
[
{
{
key
:
'
doc
s
'
,
key
:
'
doc
'
,
tab
:
'
文章
'
,
tab
:
'
文章
'
,
},
},
{
{
key
:
'
app
s
'
,
key
:
'
app
'
,
tab
:
'
应用
'
,
tab
:
'
应用
'
,
default
:
true
,
default
:
true
,
},
},
{
{
key
:
'
project
s
'
,
key
:
'
project
'
,
tab
:
'
项目
'
,
tab
:
'
项目
'
,
},
},
];
];
...
@@ -112,10 +130,12 @@ export default class FilterCardList extends PureComponent {
...
@@ -112,10 +130,12 @@ export default class FilterCardList extends PureComponent {
title
=
"
带筛选卡片列表
"
title
=
"
带筛选卡片列表
"
content
=
{
pageHeaderContent
}
content
=
{
pageHeaderContent
}
tabList
=
{
tabList
}
tabList
=
{
tabList
}
onTabChange
=
{
this
.
handleTabChange
}
>
>
<
div
className
=
{
styles
.
filterCardList
}
>
<
div
className
=
{
styles
.
filterCardList
}
>
<
Card
<
Card
noHovering
noHovering
bordered
=
{
false
}
>
>
<
Form
<
Form
layout
=
"
inline
"
layout
=
"
inline
"
...
...
src/routes/List/SearchList.js
View file @
8e75fc92
import
React
,
{
Component
}
from
'
react
'
;
import
React
,
{
Component
}
from
'
react
'
;
import
moment
from
'
moment
'
;
import
moment
from
'
moment
'
;
import
{
connect
}
from
'
dva
'
;
import
{
connect
}
from
'
dva
'
;
import
{
routerRedux
}
from
'
dva/router
'
;
import
{
Form
,
Card
,
Select
,
List
,
Tag
,
Icon
,
Avatar
,
Row
,
Col
}
from
'
antd
'
;
import
{
Form
,
Card
,
Select
,
List
,
Tag
,
Icon
,
Avatar
,
Row
,
Col
}
from
'
antd
'
;
import
PageHeaderLayout
from
'
../../layouts/PageHeaderLayout
'
;
import
PageHeaderLayout
from
'
../../layouts/PageHeaderLayout
'
;
...
@@ -70,6 +71,23 @@ export default class SearchList extends Component {
...
@@ -70,6 +71,23 @@ export default class SearchList extends Component {
});
});
}
}
handleTabChange
=
(
key
)
=>
{
const
{
dispatch
}
=
this
.
props
;
switch
(
key
)
{
case
'
docs
'
:
dispatch
(
routerRedux
.
push
(
'
/list/search
'
));
break
;
case
'
app
'
:
dispatch
(
routerRedux
.
push
(
'
/list/filter-card-list
'
));
break
;
case
'
project
'
:
dispatch
(
routerRedux
.
push
(
'
/list/cover-card-list
'
));
break
;
default
:
break
;
}
}
render
()
{
render
()
{
const
{
showLoadMore
,
loadingMore
}
=
this
.
state
;
const
{
showLoadMore
,
loadingMore
}
=
this
.
state
;
const
{
form
,
list
:
{
list
}
}
=
this
.
props
;
const
{
form
,
list
:
{
list
}
}
=
this
.
props
;
...
@@ -100,7 +118,7 @@ export default class SearchList extends Component {
...
@@ -100,7 +118,7 @@ export default class SearchList extends Component {
const
tabList
=
[
const
tabList
=
[
{
{
key
:
'
doc
s
'
,
key
:
'
doc
'
,
tab
:
'
文章
'
,
tab
:
'
文章
'
,
},
},
{
{
...
@@ -148,9 +166,10 @@ export default class SearchList extends Component {
...
@@ -148,9 +166,10 @@ export default class SearchList extends Component {
title
=
"
搜索列表
"
title
=
"
搜索列表
"
content
=
{
pageHeaderContent
}
content
=
{
pageHeaderContent
}
tabList
=
{
tabList
}
tabList
=
{
tabList
}
onTabChange
=
{
this
.
handleTabChange
}
>
>
<
div
>
<
div
>
<
Card
noHovering
>
<
Card
noHovering
bordered
=
{
false
}
>
<
Form
layout
=
"
inline
"
>
<
Form
layout
=
"
inline
"
>
<
StandardFormRow
title
=
"
所属类目
"
block
>
<
StandardFormRow
title
=
"
所属类目
"
block
>
<
FormItem
>
<
FormItem
>
...
@@ -243,7 +262,7 @@ export default class SearchList extends Component {
...
@@ -243,7 +262,7 @@ export default class SearchList extends Component {
<
/StandardFormRow
>
<
/StandardFormRow
>
<
/Form
>
<
/Form
>
<
/Card
>
<
/Card
>
<
Card
style
=
{{
marginTop
:
16
}}
>
<
Card
style
=
{{
marginTop
:
16
}}
bordered
=
{
false
}
>
<
List
<
List
loadingMore
=
{
loadingMore
}
loadingMore
=
{
loadingMore
}
showLoadMore
=
{(
list
.
length
>
0
)
&&
showLoadMore
}
showLoadMore
=
{(
list
.
length
>
0
)
&&
showLoadMore
}
...
...
src/routes/List/TableList.js
View file @
8e75fc92
...
@@ -164,15 +164,13 @@ export default class TableList extends PureComponent {
...
@@ -164,15 +164,13 @@ export default class TableList extends PureComponent {
const
menu
=
(
const
menu
=
(
<
Menu
onClick
=
{
this
.
handleMenuClick
}
selectedKeys
=
{[]}
>
<
Menu
onClick
=
{
this
.
handleMenuClick
}
selectedKeys
=
{[]}
>
<
Menu
.
Item
key
=
"
remove
"
>
删除
<
/Menu.Item
>
<
Menu
.
Item
key
=
"
remove
"
>
删除
<
/Menu.Item
>
{
<
Menu
.
Item
key
=
"
approval
"
>
批量审批
<
/Menu.Item
>
selectedRows
.
length
>
1
&&
<
Menu
.
Item
key
=
"
approval
"
>
批量审批
<
/Menu.Item
>
}
<
/Menu
>
<
/Menu
>
);
);
return
(
return
(
<
PageHeaderLayout
title
=
"
标准表格
"
>
<
PageHeaderLayout
title
=
"
标准表格
"
>
<
Card
noHovering
>
<
Card
noHovering
bordered
=
{
false
}
>
<
div
className
=
{
styles
.
tableList
}
>
<
div
className
=
{
styles
.
tableList
}
>
<
div
className
=
{
styles
.
tableListForm
}
>
<
div
className
=
{
styles
.
tableListForm
}
>
<
Form
onSubmit
=
{
this
.
handleSearch
}
>
<
Form
onSubmit
=
{
this
.
handleSearch
}
>
...
@@ -229,12 +227,16 @@ export default class TableList extends PureComponent {
...
@@ -229,12 +227,16 @@ export default class TableList extends PureComponent {
<
/div
>
<
/div
>
<
div
className
=
{
styles
.
tableListOperator
}
>
<
div
className
=
{
styles
.
tableListOperator
}
>
<
Button
icon
=
"
plus
"
type
=
"
primary
"
onClick
=
{()
=>
this
.
handleModalVisible
(
true
)}
>
新建
<
/Button
>
<
Button
icon
=
"
plus
"
type
=
"
primary
"
onClick
=
{()
=>
this
.
handleModalVisible
(
true
)}
>
新建
<
/Button
>
{
selectedRows
.
length
>
0
&&
<
span
>
<
Button
>
批量操作
<
/Button
>
<
Button
>
批量操作
<
/Button
>
<
Dropdown
overlay
=
{
menu
}
>
<
Dropdown
overlay
=
{
menu
}
>
<
Button
>
<
Button
>
更多操作
<
Icon
type
=
"
down
"
/>
更多操作
<
Icon
type
=
"
down
"
/>
<
/Button
>
<
/Button
>
<
/Dropdown
>
<
/Dropdown
>
<
/span
>
}
<
/div
>
<
/div
>
<
StandardTable
<
StandardTable
selectedRows
=
{
selectedRows
}
selectedRows
=
{
selectedRows
}
...
...
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