Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
钟摆人-Puppet゜
ant-design-pro
提交
02204c3f
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,发现更多精彩内容 >>
提交
02204c3f
编写于
9月 06, 2017
作者:
N
nikogu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
List & Dashboard Design Review
上级
f649e4b9
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
54 addition
and
23 deletion
+54
-23
src/components/Charts/MiniArea/index.js
src/components/Charts/MiniArea/index.js
+2
-1
src/components/Charts/MiniProgress/index.js
src/components/Charts/MiniProgress/index.js
+10
-7
src/components/Charts/MiniProgress/index.less
src/components/Charts/MiniProgress/index.less
+1
-0
src/components/Charts/Pie/index.js
src/components/Charts/Pie/index.js
+3
-1
src/components/TagCloud/index.js
src/components/TagCloud/index.js
+1
-1
src/layouts/PageHeaderLayout.js
src/layouts/PageHeaderLayout.js
+2
-1
src/routes/Dashboard/Analysis.js
src/routes/Dashboard/Analysis.js
+5
-1
src/routes/Dashboard/Analysis.less
src/routes/Dashboard/Analysis.less
+5
-0
src/routes/Dashboard/Monitor.js
src/routes/Dashboard/Monitor.js
+24
-10
src/routes/Dashboard/Workplace.js
src/routes/Dashboard/Workplace.js
+1
-1
未找到文件。
src/components/Charts/MiniArea/index.js
浏览文件 @
02204c3f
...
...
@@ -18,7 +18,7 @@ class MiniArea extends PureComponent {
}
renderChart
(
data
)
{
const
{
height
=
0
,
fit
=
true
,
color
=
'
#33abfb
'
,
line
,
xAxis
,
yAxis
}
=
this
.
props
;
const
{
height
=
0
,
fit
=
true
,
color
=
'
#33abfb
'
,
line
,
xAxis
,
yAxis
,
animate
=
true
}
=
this
.
props
;
if
(
!
data
||
(
data
&&
data
.
length
<
1
))
{
return
;
...
...
@@ -31,6 +31,7 @@ class MiniArea extends PureComponent {
container
:
this
.
node
,
forceFit
:
fit
,
height
:
height
+
54
,
animate
,
plotCfg
:
{
margin
:
[
36
,
0
,
30
,
0
],
},
...
...
src/components/Charts/MiniProgress/index.js
浏览文件 @
02204c3f
import
React
from
'
react
'
;
import
{
Popover
}
from
'
antd
'
;
import
styles
from
'
./index.less
'
;
const
MiniProgress
=
({
target
,
color
,
strokeWidth
,
percent
})
=>
(
<
div
className
=
{
styles
.
miniProgress
}
>
<
div
className
=
{
styles
.
target
}
style
=
{{
left
:
(
target
?
`
${
target
}
%`
:
null
)
}}
>
<
span
style
=
{{
backgroundColor
:
(
color
||
null
)
}}
/
>
<
span
style
=
{{
backgroundColor
:
(
color
||
null
)
}}
/
>
<
/div
>
<
Popover
title
=
{
null
}
content
=
{
`目标值:
${
target
}
%`
}
>
<
div
className
=
{
styles
.
target
}
style
=
{{
left
:
(
target
?
`
${
target
}
%`
:
null
)
}}
>
<
span
style
=
{{
backgroundColor
:
(
color
||
null
)
}}
/
>
<
span
style
=
{{
backgroundColor
:
(
color
||
null
)
}}
/
>
<
/div
>
<
/Popover
>
<
div
className
=
{
styles
.
progressWrap
}
>
<
div
className
=
{
styles
.
progress
}
...
...
src/components/Charts/MiniProgress/index.less
浏览文件 @
02204c3f
...
...
@@ -17,6 +17,7 @@
height: 100%;
}
.target {
cursor: pointer;
position: absolute;
top: 0;
bottom: 0;
...
...
src/components/Charts/Pie/index.js
浏览文件 @
02204c3f
...
...
@@ -14,7 +14,9 @@ class Pie extends Component {
}
componentWillReceiveProps
(
nextProps
)
{
this
.
renderChart
(
nextProps
.
data
);
if
(
this
.
props
.
data
!==
nextProps
.
data
)
{
this
.
renderChart
(
nextProps
.
data
);
}
}
handleRef
=
(
n
)
=>
{
...
...
src/components/TagCloud/index.js
浏览文件 @
02204c3f
...
...
@@ -79,7 +79,7 @@ class TagCloud extends PureComponent {
height
,
// 设定文字大小配置函数(默认为12-40px的随机大小)
size
:
words
=>
(((
words
.
value
-
min
)
/
(
max
-
min
))
*
1
0
)
+
12
,
size
:
words
=>
(((
words
.
value
-
min
)
/
(
max
-
min
))
*
1
2
)
+
6
,
// 设定文字内容
text
:
words
=>
words
.
name
,
...
...
src/layouts/PageHeaderLayout.js
浏览文件 @
02204c3f
import
React
from
'
react
'
;
import
PageHeader
from
'
../components/PageHeader
'
;
export
default
({
children
,
wrapperClassName
,
...
restProps
})
=>
(
export
default
({
children
,
wrapperClassName
,
top
,
...
restProps
})
=>
(
<
div
style
=
{{
margin
:
'
-24px -24px 0
'
}}
className
=
{
wrapperClassName
}
>
{
top
}
<
PageHeader
{...
restProps
}
/
>
{
children
?
<
div
style
=
{{
margin
:
'
24px 24px 0
'
}}
>
{
children
}
<
/div> : null
}
<
/div
>
...
...
src/routes/Dashboard/Analysis.js
浏览文件 @
02204c3f
...
...
@@ -60,6 +60,10 @@ export default class Analysis extends Component {
this
.
setState
({
rangePickerValue
,
});
this
.
props
.
dispatch
({
type
:
'
chart/fetchSalesData
'
,
});
}
selectDate
=
(
type
)
=>
{
...
...
@@ -84,7 +88,7 @@ export default class Analysis extends Component {
salesTypeData
,
salesTypeDataOnline
,
salesTypeDataOffline
,
}
=
chart
;
}
=
chart
;
const
salesPieData
=
salesType
===
'
all
'
?
salesTypeData
...
...
src/routes/Dashboard/Analysis.less
浏览文件 @
02204c3f
...
...
@@ -3,8 +3,13 @@
.iconGroup {
i {
transition: color 0.32s;
color: @text-color-secondary;
cursor: pointer;
margin-left: 16px;
&:hover {
color: @text-color;
}
}
}
.rankingList {
...
...
src/routes/Dashboard/Monitor.js
浏览文件 @
02204c3f
...
...
@@ -11,12 +11,15 @@ import { fixedZero } from '../../utils/utils';
import
styles
from
'
./Monitor.less
'
;
const
activeData
=
[];
for
(
let
i
=
0
;
i
<
24
;
i
+=
1
)
{
activeData
.
push
({
x
:
`
${
fixedZero
(
i
)}
:00`
,
y
:
(
i
*
50
)
+
(
Math
.
floor
(
Math
.
random
()
*
200
)),
});
function
getActiveData
()
{
const
activeData
=
[];
for
(
let
i
=
0
;
i
<
24
;
i
+=
1
)
{
activeData
.
push
({
x
:
`
${
fixedZero
(
i
)}
:00`
,
y
:
(
i
*
50
)
+
(
Math
.
floor
(
Math
.
random
()
*
200
)),
});
}
return
activeData
;
}
const
MapData
=
[];
...
...
@@ -33,13 +36,23 @@ const targetTime = new Date().getTime() + 3900000;
monitor
:
state
.
monitor
,
}))
export
default
class
Monitor
extends
PureComponent
{
state
=
{
activeData
:
getActiveData
(),
}
componentDidMount
()
{
this
.
props
.
dispatch
({
type
:
'
monitor/fetchTags
'
,
});
}
setInterval
(()
=>
{
this
.
setState
({
activeData
:
getActiveData
(),
});
},
1000
);
}
render
()
{
const
{
activeData
=
[]
}
=
this
.
state
;
const
{
monitor
}
=
this
.
props
;
const
{
tags
}
=
monitor
;
...
...
@@ -90,6 +103,7 @@ export default class Monitor extends PureComponent {
/>
<
div
style
=
{{
marginTop
:
32
}}
>
<
MiniArea
animate
=
{
false
}
line
color
=
"
#5DD1DD
"
height
=
{
84
}
...
...
@@ -129,7 +143,7 @@ export default class Monitor extends PureComponent {
bordered
=
{
false
}
>
<
Gauge
title
=
"
跳出
率
"
title
=
"
核销
率
"
height
=
{
164
}
percent
=
{
87
}
/
>
...
...
@@ -143,7 +157,7 @@ export default class Monitor extends PureComponent {
style
=
{{
marginBottom
:
24
}}
bordered
=
{
false
}
>
<
Row
style
=
{{
padding
:
'
18px 0 19px 0
'
}}
>
<
Row
gutter
=
{
4
}
style
=
{{
padding
:
'
18px 0 19px 0
'
}}
>
<
Col
span
=
{
8
}
>
<
Pie
percent
=
{
28
}
...
...
@@ -174,7 +188,7 @@ export default class Monitor extends PureComponent {
<
/Card
>
<
/Col
>
<
Col
sm
=
{
8
}
xs
=
{
24
}
style
=
{{
marginBottom
:
24
}}
>
<
Card
title
=
"
热门搜索
"
bordered
=
{
false
}
>
<
Card
title
=
"
热门搜索
"
bordered
=
{
false
}
bodyStyle
=
{{
height
:
214
}}
>
<
TagCloud
data
=
{
tags
}
height
=
{
161
}
...
...
src/routes/Dashboard/Workplace.js
浏览文件 @
02204c3f
...
...
@@ -144,9 +144,9 @@ export default class Workplace extends PureComponent {
return
(
<
PageHeaderLayout
top
=
{
pageHeaderContent
}
action
=
{
pageHeaderAction
}
title
=
{
pageHeaderTitle
}
content
=
{
pageHeaderContent
}
>
<
Row
gutter
=
{
24
}
>
<
Col
lg
=
{
16
}
md
=
{
24
}
sm
=
{
24
}
xs
=
{
24
}
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录