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
71056ac0
Commit
71056ac0
authored
Aug 29, 2018
by
ζι
Committed by
εε³
Aug 29, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix review issue
parent
ae2a58d0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
8 deletions
+4
-8
src/pages/Dashboard/Analysis.js
src/pages/Dashboard/Analysis.js
+2
-2
src/utils/utils.js
src/utils/utils.js
+2
-6
No files found.
src/pages/Dashboard/Analysis.js
View file @
71056ac0
...
@@ -132,7 +132,7 @@ class Analysis extends Component {
...
@@ -132,7 +132,7 @@ class Analysis extends Component {
const
{
rangePickerValue
}
=
this
.
state
;
const
{
rangePickerValue
}
=
this
.
state
;
const
value
=
getTimeDistance
(
type
);
const
value
=
getTimeDistance
(
type
);
if
(
!
rangePickerValue
[
0
]
||
!
rangePickerValue
[
1
])
{
if
(
!
rangePickerValue
[
0
]
||
!
rangePickerValue
[
1
])
{
return
undefined
;
return
''
;
}
}
if
(
if
(
rangePickerValue
[
0
].
isSame
(
value
[
0
],
'
day
'
)
&&
rangePickerValue
[
0
].
isSame
(
value
[
0
],
'
day
'
)
&&
...
@@ -140,7 +140,7 @@ class Analysis extends Component {
...
@@ -140,7 +140,7 @@ class Analysis extends Component {
)
{
)
{
return
styles
.
currentDate
;
return
styles
.
currentDate
;
}
}
return
undefined
;
return
''
;
}
}
render
()
{
render
()
{
...
...
src/utils/utils.js
View file @
71056ac0
...
@@ -47,12 +47,8 @@ export function getTimeDistance(type) {
...
@@ -47,12 +47,8 @@ export function getTimeDistance(type) {
];
];
}
}
if
(
type
===
'
year
'
)
{
const
year
=
now
.
getFullYear
();
const
year
=
now
.
getFullYear
();
return
[
moment
(
`
${
year
}
-01-01 00:00:00`
),
moment
(
`
${
year
}
-12-31 23:59:59`
)];
return
[
moment
(
`
${
year
}
-01-01 00:00:00`
),
moment
(
`
${
year
}
-12-31 23:59:59`
)];
}
return
undefined
;
}
}
export
function
getPlainNode
(
nodeList
,
parentPath
=
''
)
{
export
function
getPlainNode
(
nodeList
,
parentPath
=
''
)
{
...
...
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