Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bi
Project
Project
Details
Activity
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张苑
bi
Commits
07115ad0
Commit
07115ad0
authored
Oct 14, 2021
by
莫坚培
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 业务数据时间都加一
parent
846655cd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
dashboard.js
js/dashboard.js
+6
-1
No files found.
js/dashboard.js
View file @
07115ad0
...
...
@@ -4795,7 +4795,8 @@ function renderDatePicker(elem, format, addtime, index, prop, elemIndex, tabType
function
changeAddTime
(
format
,
addTime
)
{
let
types
=
[
'month'
,
'year'
,
'yyyy'
,
'yyyy-MM'
]
// 年、月结束时间不需要加一天
// let types = ['month', 'year', 'yyyy', 'yyyy-MM'] // 年、月结束时间不需要加一天
let
types
=
[]
// 都加一
let
value
=
''
if
(
types
.
includes
(
format
))
{
value
=
new
Date
(
addTime
).
getTime
()
...
...
@@ -4808,6 +4809,10 @@ function changeAddTime(format, addTime) {
value
=
dayjs
(
new
Date
(
addTime
)).
add
(
1
,
'hour'
).
valueOf
()
}
else
if
(
format
===
'yyyy-MM-dd'
)
{
value
=
dayjs
(
new
Date
(
addTime
)).
add
(
1
,
'day'
).
valueOf
()
}
else
if
(
format
===
'yyyy-MM'
)
{
value
=
dayjs
(
new
Date
(
addTime
)).
add
(
1
,
'month'
).
valueOf
()
}
else
if
(
format
===
'yyyy'
)
{
value
=
dayjs
(
new
Date
(
addTime
)).
add
(
1
,
'year'
).
valueOf
()
}
return
value
...
...
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