Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
schedule
Overview
Overview
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
fengzhaoyu
schedule
Commits
51ff38cd
Commit
51ff38cd
authored
Apr 08, 2020
by
liang ce
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://gitlab.roboming.com/fengzhaoyu/schedule
into dev
parents
ece1c00f
4e228e3e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
scheduleList.js
PageComponents/scheduleList/scheduleList.js
+7
-8
No files found.
PageComponents/scheduleList/scheduleList.js
View file @
51ff38cd
...
@@ -61,7 +61,7 @@ create.Component({
...
@@ -61,7 +61,7 @@ create.Component({
},
},
()
=>
{
()
=>
{
let
now
=
new
Date
();
let
now
=
new
Date
();
let
year
=
now
.
get
UTC
FullYear
();
let
year
=
now
.
getFullYear
();
let
scheduleList
=
[];
let
scheduleList
=
[];
for
(
let
i
=
-
1
;
i
<=
year
-
2020
;
i
++
)
{
for
(
let
i
=
-
1
;
i
<=
year
-
2020
;
i
++
)
{
scheduleList
.
push
(
that
.
returnScheduleList
(
2020
+
i
));
scheduleList
.
push
(
that
.
returnScheduleList
(
2020
+
i
));
...
@@ -139,7 +139,7 @@ create.Component({
...
@@ -139,7 +139,7 @@ create.Component({
parseInt
(
initialTime
[
1
])
-
1
,
parseInt
(
initialTime
[
1
])
-
1
,
parseInt
(
initialTime
[
2
])
parseInt
(
initialTime
[
2
])
);
);
let
initialTimeDateyear
=
new
Date
(
initialTimeDate
).
getUTC
FullYear
();
let
initialTimeDateyear
=
initialTimeDate
.
get
FullYear
();
let
initialTimeDatemonth
=
let
initialTimeDatemonth
=
initialTimeDate
.
getMonth
()
+
1
<
10
initialTimeDate
.
getMonth
()
+
1
<
10
?
"0"
+
(
initialTimeDate
.
getMonth
()
+
1
)
?
"0"
+
(
initialTimeDate
.
getMonth
()
+
1
)
...
@@ -153,7 +153,7 @@ create.Component({
...
@@ -153,7 +153,7 @@ create.Component({
let
rule
=
RRule
.
fromString
(
let
rule
=
RRule
.
fromString
(
`
${
item
.
recurrenceModel
.
recurrenceRule
}
;DTSTART=
${
DTSTART
}
`
`
${
item
.
recurrenceModel
.
recurrenceRule
}
;DTSTART=
${
DTSTART
}
`
);
);
rule
.
options
.
tzid
=
""
;
//
rule.options.tzid = "";
// 判断是否需要剔除某一天
// 判断是否需要剔除某一天
if
(
item
.
excludePlanDates
)
{
if
(
item
.
excludePlanDates
)
{
// 拿到剔除日期的list
// 拿到剔除日期的list
...
@@ -161,11 +161,10 @@ create.Component({
...
@@ -161,11 +161,10 @@ create.Component({
item
.
excludePlanDates
.
split
(
","
)
item
.
excludePlanDates
.
split
(
","
)
);
);
rule
.
all
().
map
(
item2
=>
{
rule
.
all
().
map
(
item2
=>
{
let
excludeDate
=
getFormatDate
(
item2
,
"yyyyMMdd"
,
"-"
);
let
time
=
new
Date
(
item2
);
let
time
=
new
Date
(
item2
);
time
.
setHours
(
time
.
getHours
()
-
8
);
time
.
setHours
(
time
.
getHours
()
-
8
);
let
hasExclude
=
let
hasExclude
=
excludeDateList
.
scheduleList
.
indexOf
(
excludeDate
)
===
-
1
;
excludeDateList
.
scheduleList
.
indexOf
(
excludeDate
)
===
-
1
;
let
excludeDate
=
getFormatDate
(
time
,
"yyyyMMdd"
,
"-"
)
;
if
(
if
(
new
Date
(
time
).
getTime
()
<
excludeDateList
.
templateList
&&
new
Date
(
time
).
getTime
()
<
excludeDateList
.
templateList
&&
hasExclude
hasExclude
...
@@ -190,7 +189,7 @@ create.Component({
...
@@ -190,7 +189,7 @@ create.Component({
scheduleTemplateId
:
item
.
id
,
scheduleTemplateId
:
item
.
id
,
startTime
:
startTime
,
startTime
:
startTime
,
title
:
item
.
title
,
title
:
item
.
title
,
planDate
:
getFormatDate
(
startT
ime
,
"yyyyMMdd"
,
"-"
)
planDate
:
getFormatDate
(
t
ime
,
"yyyyMMdd"
,
"-"
)
}
}
);
);
}
}
...
@@ -327,7 +326,7 @@ create.Component({
...
@@ -327,7 +326,7 @@ create.Component({
DateMap
.
forEach
(
function
(
value
,
key
,
map
)
{
DateMap
.
forEach
(
function
(
value
,
key
,
map
)
{
const
keyDate
=
new
Date
(
key
);
const
keyDate
=
new
Date
(
key
);
if
(
keyDate
.
getDay
()
===
0
)
{
if
(
keyDate
.
getDay
()
===
0
)
{
let
rangeYear1
=
keyDate
.
get
UTC
FullYear
();
let
rangeYear1
=
keyDate
.
getFullYear
();
let
rangeMonth1
=
keyDate
.
getMonth
();
let
rangeMonth1
=
keyDate
.
getMonth
();
let
rangeDay1
=
keyDate
.
getDate
();
let
rangeDay1
=
keyDate
.
getDate
();
let
rangeDate
=
new
Date
(
rangeYear1
,
rangeMonth1
,
rangeDay1
+
6
);
let
rangeDate
=
new
Date
(
rangeYear1
,
rangeMonth1
,
rangeDay1
+
6
);
...
...
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