Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
夏新然
/
appweb
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a0c3c115
authored
Jul 02, 2020
by
葛青博
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改选择日期范围
1 parent
bfaadc58
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
17 deletions
store/dateData.js
store/dateData.js
View file @
a0c3c11
// 自定义时间
let
createCustomTime
=
()
=>
{
let
customDate
=
[]
,
obj
=
{};
let
customDate
=
[],
obj
=
{};
let
hmsArr
=
[];
let
hours
=
[]
,
minutes
=
[]
,
seconds
=
[]
,
hourObj
=
{};
for
(
let
h
=
0
;
h
<
24
;
h
++
)
{
let
hours
=
[],
minutes
=
[],
seconds
=
[],
hourObj
=
{};
for
(
let
h
=
0
;
h
<
24
;
h
++
)
{
let
hVal
=
h
+
1
;
hVal
=
hVal
>
9
?
hVal
:
'0'
+
hVal
;
hourObj
=
{
value
:
hVal
,
children
:
[]
}
for
(
let
m
=
0
;
m
<
60
;
m
++
)
{
for
(
let
m
=
0
;
m
<
60
;
m
++
)
{
let
mVal
=
m
+
1
;
mVal
=
mVal
>
9
?
mVal
:
'0'
+
mVal
;
let
minutesObj
=
{
...
...
@@ -22,7 +22,7 @@ let createCustomTime = () => {
children
:
[]
};
hourObj
.
children
.
push
(
minutesObj
)
for
(
let
s
=
0
;
s
<
60
;
s
++
)
{
for
(
let
s
=
0
;
s
<
60
;
s
++
)
{
let
sVal
=
s
+
1
;
sVal
=
sVal
>
9
?
sVal
:
'0'
+
sVal
;
let
secondsObj
=
{
...
...
@@ -34,12 +34,12 @@ let createCustomTime = () => {
hours
.
push
(
hourObj
)
}
for
(
let
i
=
1999
;
i
<
202
0
;
i
++
)
{
for
(
let
i
=
1999
;
i
<
204
0
;
i
++
)
{
obj
=
{
'value'
:
i
+
'年'
,
children
:
[]
}
for
(
let
j
=
0
;
j
<
12
;
j
++
)
{
for
(
let
j
=
0
;
j
<
12
;
j
++
)
{
let
val
=
j
+
1
;
val
=
val
>
9
?
val
:
'0'
+
val
;
let
obj2
=
{
...
...
@@ -49,7 +49,7 @@ let createCustomTime = () => {
obj
.
children
.
push
(
obj2
)
let
day
=
new
Date
(
i
,
j
+
1
,
0
);
let
daycount
=
day
.
getDate
();
for
(
let
k
=
0
;
k
<
daycount
;
k
++
)
{
for
(
let
k
=
0
;
k
<
daycount
;
k
++
)
{
let
val
=
k
+
1
;
val
=
val
>
9
?
val
:
'0'
+
val
;
let
obj3
=
{
...
...
@@ -67,14 +67,14 @@ let createCustomTime = () => {
// 日级时间
let
createDayTime
=
()
=>
{
let
dayDate
=
[]
,
obj
=
{};
for
(
let
i
=
1999
;
i
<
202
0
;
i
++
)
{
let
dayDate
=
[],
obj
=
{};
for
(
let
i
=
1999
;
i
<
204
0
;
i
++
)
{
obj
=
{
'value'
:
i
+
'年'
,
children
:
[]
}
for
(
let
j
=
0
;
j
<
12
;
j
++
)
{
for
(
let
j
=
0
;
j
<
12
;
j
++
)
{
let
val
=
j
+
1
;
val
=
val
>
9
?
val
:
'0'
+
val
;
let
obj2
=
{
...
...
@@ -84,7 +84,7 @@ let createDayTime = () => {
obj
.
children
.
push
(
obj2
)
let
day
=
new
Date
(
i
,
j
+
1
,
0
);
let
daycount
=
day
.
getDate
();
for
(
let
k
=
0
;
k
<
daycount
;
k
++
)
{
for
(
let
k
=
0
;
k
<
daycount
;
k
++
)
{
let
val
=
k
+
1
;
val
=
val
>
9
?
val
:
'0'
+
val
;
let
obj3
=
{
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment