Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
钟摆人-Puppet゜
ant-design-pro
提交
c230fa84
A
ant-design-pro
项目概览
钟摆人-Puppet゜
/
ant-design-pro
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
ant-design-pro
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c230fa84
编写于
2月 14, 2018
作者:
D
ddcat1115
提交者:
jim
2月 15, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
workplace use user model
上级
aeda0d91
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
30 addition
and
51 deletion
+30
-51
src/common/router.js
src/common/router.js
+1
-1
src/routes/Dashboard/Workplace.js
src/routes/Dashboard/Workplace.js
+29
-47
src/routes/Dashboard/Workplace.less
src/routes/Dashboard/Workplace.less
+0
-3
未找到文件。
src/common/router.js
浏览文件 @
c230fa84
...
@@ -80,7 +80,7 @@ export const getRouterData = (app) => {
...
@@ -80,7 +80,7 @@ export const getRouterData = (app) => {
component
:
dynamicWrapper
(
app
,
[
'
monitor
'
],
()
=>
import
(
'
../routes/Dashboard/Monitor
'
)),
component
:
dynamicWrapper
(
app
,
[
'
monitor
'
],
()
=>
import
(
'
../routes/Dashboard/Monitor
'
)),
},
},
'
/dashboard/workplace
'
:
{
'
/dashboard/workplace
'
:
{
component
:
dynamicWrapper
(
app
,
[
'
project
'
,
'
activities
'
,
'
chart
'
],
()
=>
import
(
'
../routes/Dashboard/Workplace
'
)),
component
:
dynamicWrapper
(
app
,
[
'
user
'
,
'
project
'
,
'
activities
'
,
'
chart
'
],
()
=>
import
(
'
../routes/Dashboard/Workplace
'
)),
// hideInBreadcrumb: true,
// hideInBreadcrumb: true,
// name: '工作台',
// name: '工作台',
// authority: 'admin',
// authority: 'admin',
...
...
src/routes/Dashboard/Workplace.js
浏览文件 @
c230fa84
...
@@ -2,7 +2,7 @@ import React, { PureComponent } from 'react';
...
@@ -2,7 +2,7 @@ import React, { PureComponent } from 'react';
import
moment
from
'
moment
'
;
import
moment
from
'
moment
'
;
import
{
connect
}
from
'
dva
'
;
import
{
connect
}
from
'
dva
'
;
import
{
Link
}
from
'
dva/router
'
;
import
{
Link
}
from
'
dva/router
'
;
import
{
Row
,
Col
,
Card
,
List
,
Avatar
}
from
'
antd
'
;
import
{
Row
,
Col
,
Card
,
List
,
Avatar
,
Spin
}
from
'
antd
'
;
import
PageHeaderLayout
from
'
../../layouts/PageHeaderLayout
'
;
import
PageHeaderLayout
from
'
../../layouts/PageHeaderLayout
'
;
import
EditableLinkGroup
from
'
../../components/EditableLinkGroup
'
;
import
EditableLinkGroup
from
'
../../components/EditableLinkGroup
'
;
...
@@ -37,49 +37,21 @@ const links = [
...
@@ -37,49 +37,21 @@ const links = [
},
},
];
];
const
members
=
[
@
connect
(({
user
,
project
,
activities
,
chart
,
loading
})
=>
({
{
currentUser
:
user
.
currentUser
,
id
:
'
members-1
'
,
title
:
'
科学搬砖组
'
,
logo
:
'
https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png
'
,
link
:
''
,
},
{
id
:
'
members-2
'
,
title
:
'
程序员日常
'
,
logo
:
'
https://gw.alipayobjects.com/zos/rmsportal/cnrhVkzwxjPwAaCfPbdc.png
'
,
link
:
''
,
},
{
id
:
'
members-3
'
,
title
:
'
设计天团
'
,
logo
:
'
https://gw.alipayobjects.com/zos/rmsportal/gaOngJwsRYRaVAuXXcmB.png
'
,
link
:
''
,
},
{
id
:
'
members-4
'
,
title
:
'
中二少女团
'
,
logo
:
'
https://gw.alipayobjects.com/zos/rmsportal/ubnKSIfAJTxIgXOKlciN.png
'
,
link
:
''
,
},
{
id
:
'
members-5
'
,
title
:
'
骗你学计算机
'
,
logo
:
'
https://gw.alipayobjects.com/zos/rmsportal/WhxKECPNujWoWEFNdnJE.png
'
,
link
:
''
,
},
];
@
connect
(({
project
,
activities
,
chart
,
loading
})
=>
({
project
,
project
,
activities
,
activities
,
chart
,
chart
,
currentUserLoading
:
loading
.
effects
[
'
user/fetchCurrent
'
],
projectLoading
:
loading
.
effects
[
'
project/fetchNotice
'
],
projectLoading
:
loading
.
effects
[
'
project/fetchNotice
'
],
activitiesLoading
:
loading
.
effects
[
'
activities/fetchList
'
],
activitiesLoading
:
loading
.
effects
[
'
activities/fetchList
'
],
}))
}))
export
default
class
Workplace
extends
PureComponent
{
export
default
class
Workplace
extends
PureComponent
{
componentDidMount
()
{
componentDidMount
()
{
const
{
dispatch
}
=
this
.
props
;
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'
user/fetchCurrent
'
,
});
dispatch
({
dispatch
({
type
:
'
project/fetchNotice
'
,
type
:
'
project/fetchNotice
'
,
});
});
...
@@ -133,6 +105,8 @@ export default class Workplace extends PureComponent {
...
@@ -133,6 +105,8 @@ export default class Workplace extends PureComponent {
render
()
{
render
()
{
const
{
const
{
currentUser
,
currentUserLoading
,
project
:
{
notice
},
project
:
{
notice
},
projectLoading
,
projectLoading
,
activitiesLoading
,
activitiesLoading
,
...
@@ -140,15 +114,22 @@ export default class Workplace extends PureComponent {
...
@@ -140,15 +114,22 @@ export default class Workplace extends PureComponent {
}
=
this
.
props
;
}
=
this
.
props
;
const
pageHeaderContent
=
(
const
pageHeaderContent
=
(
<
div
className
=
{
styles
.
pageHeaderContent
}
>
<
Spin
spinning
=
{
currentUserLoading
}
>
<
div
className
=
{
styles
.
avatar
}
>
{
<
Avatar
size
=
"
large
"
src
=
"
https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png
"
/>
currentUser
&&
Object
.
keys
(
currentUser
).
length
?
<
/div
>
(
<
div
className
=
{
styles
.
content
}
>
<
div
className
=
{
styles
.
pageHeaderContent
}
>
<
div
className
=
{
styles
.
contentTitle
}
>
早安
,
曲丽丽
,
祝你开心每一天
!
<
/div
>
<
div
className
=
{
styles
.
avatar
}
>
<
div
>
交互专家
|
蚂蚁金服
-
某某某事业群
-
某某平台部
-
某某技术部
-
UED
<
/div
>
<
Avatar
size
=
"
large
"
src
=
{
currentUser
.
avatar
}
/
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
{
styles
.
content
}
>
<
div
className
=
{
styles
.
contentTitle
}
>
早安
,
{
currentUser
.
name
}
,
祝你开心每一天
!
<
/div
>
<
div
>
{
currentUser
.
title
}
|
{
currentUser
.
group
}
<
/div
>
<
/div
>
<
/div
>
)
:
null
}
<
/Spin
>
);
);
const
extraContent
=
(
const
extraContent
=
(
...
@@ -251,15 +232,16 @@ export default class Workplace extends PureComponent {
...
@@ -251,15 +232,16 @@ export default class Workplace extends PureComponent {
bodyStyle
=
{{
paddingTop
:
12
,
paddingBottom
:
12
}}
bodyStyle
=
{{
paddingTop
:
12
,
paddingBottom
:
12
}}
bordered
=
{
false
}
bordered
=
{
false
}
title
=
"
团队
"
title
=
"
团队
"
loading
=
{
projectLoading
}
>
>
<
div
className
=
{
styles
.
members
}
>
<
div
className
=
{
styles
.
members
}
>
<
Row
gutter
=
{
48
}
>
<
Row
gutter
=
{
48
}
>
{
{
members
.
map
(
item
=>
(
notice
.
map
(
item
=>
(
<
Col
span
=
{
12
}
key
=
{
`members-item-
${
item
.
id
}
`
}
>
<
Col
span
=
{
12
}
key
=
{
`members-item-
${
item
.
id
}
`
}
>
<
Link
to
=
{
item
.
link
}
>
<
Link
to
=
{
item
.
href
}
>
<
Avatar
src
=
{
item
.
logo
}
size
=
"
small
"
/>
<
Avatar
src
=
{
item
.
logo
}
size
=
"
small
"
/>
<
span
className
=
{
styles
.
member
}
>
{
item
.
title
}
<
/span
>
<
span
className
=
{
styles
.
member
}
>
{
item
.
member
}
<
/span
>
<
/Link
>
<
/Link
>
<
/Col
>
<
/Col
>
))
))
...
...
src/routes/Dashboard/Workplace.less
浏览文件 @
c230fa84
...
@@ -86,18 +86,15 @@
...
@@ -86,18 +86,15 @@
a {
a {
display: block;
display: block;
margin: 12px 0;
margin: 12px 0;
line-height: 24px;
height: 24px;
height: 24px;
.textOverflow();
.textOverflow();
.member {
.member {
font-size: @font-size-base;
font-size: @font-size-base;
color: @text-color;
color: @text-color;
line-height: 24px;
line-height: 24px;
max-width: 100px;
vertical-align: top;
vertical-align: top;
margin-left: 12px;
margin-left: 12px;
transition: all .3s;
transition: all .3s;
display: inline-block;
.textOverflow();
.textOverflow();
}
}
&:hover {
&:hover {
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录