Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
ant-design-pro
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thiago Borges
ant-design-pro
Commits
3390281a
Commit
3390281a
authored
Oct 23, 2017
by
nikogu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed design of exception & detail page
parent
897b1f84
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
103 additions
and
20 deletions
+103
-20
DescriptionList.js
src/components/DescriptionList/DescriptionList.js
+5
-2
index.less
src/components/DescriptionList/index.less
+17
-0
index.js
src/components/Exception/index.js
+2
-2
403.js
src/routes/Exception/403.js
+1
-1
404.js
src/routes/Exception/404.js
+1
-1
500.js
src/routes/Exception/500.js
+1
-1
AdvancedProfile.js
src/routes/Profile/AdvancedProfile.js
+44
-13
AdvancedProfile.less
src/routes/Profile/AdvancedProfile.less
+32
-0
No files found.
src/components/DescriptionList/DescriptionList.js
View file @
3390281a
...
@@ -4,8 +4,11 @@ import { Row } from 'antd';
...
@@ -4,8 +4,11 @@ import { Row } from 'antd';
import
styles
from
'./index.less'
;
import
styles
from
'./index.less'
;
export
default
({
className
,
title
,
col
=
3
,
layout
=
'horizontal'
,
gutter
=
32
,
export
default
({
className
,
title
,
col
=
3
,
layout
=
'horizontal'
,
gutter
=
32
,
children
,
...
restProps
})
=>
{
children
,
size
,
...
restProps
})
=>
{
const
clsString
=
classNames
(
styles
.
descriptionList
,
styles
[
layout
],
className
);
const
clsString
=
classNames
(
styles
.
descriptionList
,
styles
[
layout
],
className
,
{
[
styles
.
descriptionListSmall
]:
size
===
'small'
,
[
styles
.
descriptionListLarge
]:
size
===
'large'
,
});
const
column
=
col
>
4
?
4
:
col
;
const
column
=
col
>
4
?
4
:
col
;
return
(
return
(
<
div
className
=
{
clsString
}
{...
restProps
}
>
<
div
className
=
{
clsString
}
{...
restProps
}
>
...
...
src/components/DescriptionList/index.less
View file @
3390281a
...
@@ -49,3 +49,20 @@
...
@@ -49,3 +49,20 @@
}
}
}
}
}
}
.descriptionListSmall {
.title {
margin-bottom: 12px;
}
.term {
padding-bottom: 8px;
}
}
.descriptionListLarge {
.large {
margin-bottom: 24px;
}
.term {
padding-bottom: 24px;
}
}
src/components/Exception/index.js
View file @
3390281a
...
@@ -6,11 +6,11 @@ import config from './typeConfig';
...
@@ -6,11 +6,11 @@ import config from './typeConfig';
import
styles
from
'./index.less'
;
import
styles
from
'./index.less'
;
export
default
({
className
,
type
,
title
,
desc
,
img
,
actions
})
=>
{
export
default
({
className
,
type
,
title
,
desc
,
img
,
actions
,
...
rest
})
=>
{
const
pageType
=
type
in
config
?
type
:
'404'
;
const
pageType
=
type
in
config
?
type
:
'404'
;
const
clsString
=
classNames
(
styles
.
exception
,
className
);
const
clsString
=
classNames
(
styles
.
exception
,
className
);
return
(
return
(
<
div
className
=
{
clsString
}
>
<
div
className
=
{
clsString
}
{...
rest
}
>
<
div
className
=
{
styles
.
imgBlock
}
>
<
div
className
=
{
styles
.
imgBlock
}
>
<
div
<
div
className
=
{
styles
.
imgEle
}
className
=
{
styles
.
imgEle
}
...
...
src/routes/Exception/403.js
View file @
3390281a
import
React
from
'react'
;
import
React
from
'react'
;
import
Exception
from
'../../components/Exception'
;
import
Exception
from
'../../components/Exception'
;
export
default
()
=>
<
Exception
type
=
"403"
/>
;
export
default
()
=>
<
Exception
type
=
"403"
style
=
{{
minHeight
:
500
,
height
:
'80%'
}}
/>
;
src/routes/Exception/404.js
View file @
3390281a
import
React
from
'react'
;
import
React
from
'react'
;
import
Exception
from
'../../components/Exception'
;
import
Exception
from
'../../components/Exception'
;
export
default
()
=>
<
Exception
type
=
"404"
/>
;
export
default
()
=>
<
Exception
type
=
"404"
style
=
{{
minHeight
:
500
,
height
:
'80%'
}}
/>
;
src/routes/Exception/500.js
View file @
3390281a
import
React
from
'react'
;
import
React
from
'react'
;
import
Exception
from
'../../components/Exception'
;
import
Exception
from
'../../components/Exception'
;
export
default
()
=>
<
Exception
type
=
"500"
/>
;
export
default
()
=>
<
Exception
type
=
"500"
style
=
{{
minHeight
:
500
,
height
:
'80%'
}}
/>
;
src/routes/Profile/AdvancedProfile.js
View file @
3390281a
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
addEventListener
from
'rc-util/lib/Dom/addEventListener'
;
import
debounce
from
'lodash.debounce'
;
import
{
connect
}
from
'dva'
;
import
{
connect
}
from
'dva'
;
import
{
Button
,
Menu
,
Dropdown
,
Icon
,
Row
,
Col
,
Steps
,
Card
,
Popover
,
Badge
,
Table
,
Tooltip
,
Divider
}
from
'antd'
;
import
{
Button
,
Menu
,
Dropdown
,
Icon
,
Row
,
Col
,
Steps
,
Card
,
Popover
,
Badge
,
Table
,
Tooltip
,
Divider
}
from
'antd'
;
import
classNames
from
'classnames'
;
import
PageHeaderLayout
from
'../../layouts/PageHeaderLayout'
;
import
PageHeaderLayout
from
'../../layouts/PageHeaderLayout'
;
import
DescriptionList
from
'../../components/DescriptionList'
;
import
DescriptionList
from
'../../components/DescriptionList'
;
import
EditableItem
from
'../../components/EditableItem'
;
import
styles
from
'./AdvancedProfile.less'
;
import
styles
from
'./AdvancedProfile.less'
;
const
{
Step
}
=
Steps
;
const
{
Step
}
=
Steps
;
const
{
Description
}
=
DescriptionList
;
const
{
Description
}
=
DescriptionList
;
const
getWindowWidth
=
()
=>
(
window
.
innerWidth
||
document
.
documentElement
.
documentElement
);
const
menu
=
(
const
menu
=
(
<
Menu
>
<
Menu
>
<
Menu
.
Item
key
=
"1"
>
选项一
<
/Menu.Item
>
<
Menu
.
Item
key
=
"1"
>
选项一
<
/Menu.Item
>
...
@@ -44,7 +48,7 @@ const extra = (
...
@@ -44,7 +48,7 @@ const extra = (
);
);
const
description
=
(
const
description
=
(
<
DescriptionList
col
=
"2"
>
<
DescriptionList
c
lassName
=
{
styles
.
headerList
}
size
=
"small"
c
ol
=
"2"
>
<
Description
term
=
"创建人"
>
曲丽丽
<
/Description
>
<
Description
term
=
"创建人"
>
曲丽丽
<
/Description
>
<
Description
term
=
"订购产品"
>
XX
服务
<
/Description
>
<
Description
term
=
"订购产品"
>
XX
服务
<
/Description
>
<
Description
term
=
"创建时间"
>
2017
-
07
-
07
<
/Description
>
<
Description
term
=
"创建时间"
>
2017
-
07
-
07
<
/Description
>
...
@@ -63,8 +67,8 @@ const tabList = [{
...
@@ -63,8 +67,8 @@ const tabList = [{
}];
}];
const
desc1
=
(
const
desc1
=
(
<
div
style
=
{{
fontSize
:
14
}}
className
=
{
styles
.
textSecondary
}
>
<
div
className
=
{
classNames
(
styles
.
textSecondary
,
styles
.
stepDescription
)
}
>
<
div
style
=
{{
marginTop
:
8
,
marginBottom
:
4
}}
>
<
div
>
曲丽丽
曲丽丽
<
Icon
type
=
"dingding-o"
style
=
{{
marginLeft
:
8
}}
/
>
<
Icon
type
=
"dingding-o"
style
=
{{
marginLeft
:
8
}}
/
>
<
/div
>
<
/div
>
...
@@ -73,8 +77,8 @@ const desc1 = (
...
@@ -73,8 +77,8 @@ const desc1 = (
);
);
const
desc2
=
(
const
desc2
=
(
<
div
style
=
{{
fontSize
:
14
}
}
>
<
div
className
=
{
styles
.
stepDescription
}
>
<
div
style
=
{{
marginTop
:
8
,
marginBottom
:
4
}}
>
<
div
>
周毛毛
周毛毛
<
Icon
type
=
"dingding-o"
style
=
{{
color
:
'#00A0E9'
,
marginLeft
:
8
}}
/
>
<
Icon
type
=
"dingding-o"
style
=
{{
color
:
'#00A0E9'
,
marginLeft
:
8
}}
/
>
<
/div
>
<
/div
>
...
@@ -141,6 +145,7 @@ const columns = [{
...
@@ -141,6 +145,7 @@ const columns = [{
export
default
class
AdvancedProfile
extends
Component
{
export
default
class
AdvancedProfile
extends
Component
{
state
=
{
state
=
{
operationkey
:
'tab1'
,
operationkey
:
'tab1'
,
stepDirection
:
'horizontal'
,
}
}
componentDidMount
()
{
componentDidMount
()
{
...
@@ -148,13 +153,39 @@ export default class AdvancedProfile extends Component {
...
@@ -148,13 +153,39 @@ export default class AdvancedProfile extends Component {
dispatch
({
dispatch
({
type
:
'profile/fetchAdvanced'
,
type
:
'profile/fetchAdvanced'
,
});
});
this
.
setStepDirection
();
this
.
resizeEvent
=
addEventListener
(
window
,
'resize'
,
debounce
(
this
.
setStepDirection
,
100
,
{
leading
:
false
,
}));
}
componentWillUnmount
()
{
if
(
this
.
resizeEvent
)
{
this
.
resizeEvent
.
remove
();
}
}
}
onOperationTabChange
=
(
key
)
=>
{
onOperationTabChange
=
(
key
)
=>
{
this
.
setState
({
operationkey
:
key
});
this
.
setState
({
operationkey
:
key
});
}
}
setStepDirection
=
()
=>
{
const
{
stepDirection
}
=
this
.
state
;
const
w
=
getWindowWidth
();
if
(
stepDirection
!==
'vertical'
&&
w
<=
576
)
{
this
.
setState
({
stepDirection
:
'vertical'
,
});
}
else
if
(
stepDirection
!==
'horizontal'
&&
w
>
576
)
{
this
.
setState
({
stepDirection
:
'horizontal'
,
});
}
}
render
()
{
render
()
{
const
{
stepDirection
}
=
this
.
state
;
const
{
profile
}
=
this
.
props
;
const
{
profile
}
=
this
.
props
;
const
{
advancedLoading
,
advancedOperation1
,
advancedOperation2
,
advancedOperation3
}
=
profile
;
const
{
advancedLoading
,
advancedOperation1
,
advancedOperation2
,
advancedOperation3
}
=
profile
;
const
contentList
=
{
const
contentList
=
{
...
@@ -188,7 +219,7 @@ export default class AdvancedProfile extends Component {
...
@@ -188,7 +219,7 @@ export default class AdvancedProfile extends Component {
tabList
=
{
tabList
}
tabList
=
{
tabList
}
>
>
<
Card
title
=
"流程进度"
style
=
{{
marginBottom
:
24
}}
bordered
=
{
false
}
>
<
Card
title
=
"流程进度"
style
=
{{
marginBottom
:
24
}}
bordered
=
{
false
}
>
<
Steps
progressDot
=
{
customDot
}
current
=
{
1
}
>
<
Steps
direction
=
{
stepDirection
}
progressDot
=
{
customDot
}
current
=
{
1
}
>
<
Step
title
=
"创建项目"
description
=
{
desc1
}
/
>
<
Step
title
=
"创建项目"
description
=
{
desc1
}
/
>
<
Step
title
=
"部门初审"
description
=
{
desc2
}
/
>
<
Step
title
=
"部门初审"
description
=
{
desc2
}
/
>
<
Step
title
=
"财务复核"
/>
<
Step
title
=
"财务复核"
/>
...
@@ -200,14 +231,13 @@ export default class AdvancedProfile extends Component {
...
@@ -200,14 +231,13 @@ export default class AdvancedProfile extends Component {
<
Description
term
=
"用户姓名"
>
付小小
<
/Description
>
<
Description
term
=
"用户姓名"
>
付小小
<
/Description
>
<
Description
term
=
"会员卡号"
>
32943898021309809423
<
/Description
>
<
Description
term
=
"会员卡号"
>
32943898021309809423
<
/Description
>
<
Description
term
=
"身份证"
>
3321944288191034921
<
/Description
>
<
Description
term
=
"身份证"
>
3321944288191034921
<
/Description
>
<
Description
term
=
"联系方式"
>
<
Description
term
=
"联系方式"
>
18112345678
<
/Description
>
<
EditableItem
value
=
"18112345678"
/>
<
/Description
>
<
Description
term
=
"联系地址"
>
曲丽丽
18100000000
浙江省杭州市西湖区黄姑山路工专路交叉路口
<
/Description
>
<
Description
term
=
"联系地址"
>
曲丽丽
18100000000
浙江省杭州市西湖区黄姑山路工专路交叉路口
<
/Description
>
<
/DescriptionList
>
<
/DescriptionList
>
<
DescriptionList
style
=
{{
marginBottom
:
24
}}
title
=
"信息组"
col
=
"2"
>
<
DescriptionList
style
=
{{
marginBottom
:
24
}}
title
=
"信息组"
>
<
Description
term
=
"某某数据"
>
725
<
/Description
>
<
Description
term
=
"某某数据"
>
725
<
/Description
>
<
Description
term
=
"该数据更新时间"
>
2017
-
08
-
08
<
/Description
>
<
Description
term
=
"该数据更新时间"
>
2017
-
08
-
08
<
/Description
>
<
Description
>&
nbsp
;
<
/Description
>
<
Description
term
=
{
<
Description
term
=
{
<
span
>
<
span
>
某某数据
某某数据
...
@@ -221,8 +251,9 @@ export default class AdvancedProfile extends Component {
...
@@ -221,8 +251,9 @@ export default class AdvancedProfile extends Component {
<
/Description
>
<
/Description
>
<
Description
term
=
"该数据更新时间"
>
2017
-
08
-
08
<
/Description
>
<
Description
term
=
"该数据更新时间"
>
2017
-
08
-
08
<
/Description
>
<
/DescriptionList
>
<
/DescriptionList
>
<
h4
style
=
{{
marginBottom
:
16
}}
>
信息组
<
/h4
>
<
Card
type
=
"inner"
title
=
"多层级信息组"
>
<
Card
type
=
"inner"
title
=
"多层级信息组"
>
<
DescriptionList
style
=
{{
marginBottom
:
16
}}
title
=
"组名称"
>
<
DescriptionList
s
ize
=
"small"
s
tyle
=
{{
marginBottom
:
16
}}
title
=
"组名称"
>
<
Description
term
=
"负责人"
>
林东东
<
/Description
>
<
Description
term
=
"负责人"
>
林东东
<
/Description
>
<
Description
term
=
"角色码"
>
1234567
<
/Description
>
<
Description
term
=
"角色码"
>
1234567
<
/Description
>
<
Description
term
=
"所属部门"
>
XX
公司
-
YY
部
<
/Description
>
<
Description
term
=
"所属部门"
>
XX
公司
-
YY
部
<
/Description
>
...
@@ -244,7 +275,7 @@ export default class AdvancedProfile extends Component {
...
@@ -244,7 +275,7 @@ export default class AdvancedProfile extends Component {
<
/Card
>
<
/Card
>
<
Card
title
=
"用户近半年来电记录"
style
=
{{
marginBottom
:
24
}}
bordered
=
{
false
}
>
<
Card
title
=
"用户近半年来电记录"
style
=
{{
marginBottom
:
24
}}
bordered
=
{
false
}
>
<
div
className
=
{
styles
.
noData
}
>
<
div
className
=
{
styles
.
noData
}
>
<
Icon
type
=
"frown-o"
/>
暂无数据
<
Icon
type
=
"frown-o"
/>
暂无数据
<
/div
>
<
/div
>
<
/Card
>
<
/Card
>
<
Card
<
Card
...
...
src/routes/Profile/AdvancedProfile.less
View file @
3390281a
@import "~antd/lib/style/themes/default.less";
@import "~antd/lib/style/themes/default.less";
.headerList {
margin-bottom: 4px;
}
.tabsCard {
.tabsCard {
margin-bottom: 24px;
margin-bottom: 24px;
:global {
.ant-card-head {
padding: 0 16px;
}
}
}
}
.noData {
.noData {
color: @disabled-color;
color: @disabled-color;
text-align: center;
text-align: center;
line-height: 64px;
line-height: 64px;
font-size: 16px;
i {
font-size: 24px;
margin-right: 16px;
position: relative;
top: 3px;
}
}
}
.heading {
.heading {
...
@@ -15,6 +31,22 @@
...
@@ -15,6 +31,22 @@
font-size: 20px;
font-size: 20px;
}
}
.stepDescription {
font-size: 14px;
position: relative;
left: 38px;
& > div {
margin-top: 8px;
margin-bottom: 4px;
}
}
.textSecondary {
.textSecondary {
color: @text-color-secondary;
color: @text-color-secondary;
}
}
@media screen and (max-width: @screen-sm) {
.stepDescription {
left: 8px;
}
}
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