Commit f2b11c05 by fengzhaoyu

fix: rrule生成出错处理

parent 19646474
......@@ -358,7 +358,6 @@ create.Page({
}
}
}
if (DateMap.has(toLocaleDateString(startTime))) {
DateMap.get(toLocaleDateString(startTime)).push(pushItem);
}
......@@ -391,10 +390,12 @@ create.Page({
const initialTimeList = item.initialTime.split("-");
const startTimeList = item.startTime.split(":");
const DTSTART = `${initialTimeList[0]}${initialTimeList[1]}${initialTimeList[2]}T${startTimeList[0]}${startTimeList[1]}00Z`;
const rule = RRule.fromString(
`${item.recurrenceModel.recurrenceRule};DTSTART=${DTSTART}`
);
let rule = { all: () => [] };
if (item.recurrenceModel.recurrenceRule) {
rule = RRule.fromString(
`${item.recurrenceModel.recurrenceRule};DTSTART=${DTSTART}`
);
}
const setDateMapValueAll = (startTime, endTime, item) => {
//如果有日程会议则用日程会议替换
let replaceItem = [];
......@@ -415,6 +416,7 @@ create.Page({
};
// 需要剔除某一天
if (item.excludePlanDates) {
const excludeData = getExcludeDate(item.excludePlanDates.split(","));
rule.all().forEach(startTime => {
//修正时间(时间有8小时时差)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment