gpt4 book ai didi

javascript - 如何在 TUI-Calendar 中禁用设置随机计划顺序

转载 作者:行者123 更新时间:2023-12-04 09:00:24 28 4
gpt4 key购买 nike

我正在使用 Toast UI 日历 用于在 Laravel 元素中进行进度管理。
但我需要每天禁用随机的日程安排。
这是截图
This is before clicking the refresh button
如果我点击刷新按钮,它会像下面的截图一样改变。
This is after clicking the refresh button
这是生成时间表功能

function generateSchedule(viewName, renderStart, renderEnd, check_key) {
ScheduleList = [];
realize_schedule.forEach(function(real_item){
var i = 0, length = 1;
if (viewName === 'month') {
length = 1;
} else if (viewName === 'day') {
length = 2;
}
for (i; i < length; i += 1) {
var index_calendar = real_item.roomRate_type;
if(index_calendar > 0){
index_calendar = index_calendar-1;
}
if(check_key === ""){
generateRandomSchedule(CalendarList[index_calendar], real_item, new Date(real_item.start), new Date(real_item.end));
}else{
if(check_key === real_item.roomRate_nameCode){
generateRandomSchedule(CalendarList[index_calendar], real_item, new Date(real_item.start), new Date(real_item.end));
}
}
}
})
}
这是 generateRandomSchedule 功能
function generateRandomSchedule(calendar, roomRate, renderStart, renderEnd) {
var schedule = new ScheduleInfo();

schedule.id = roomRate.id;
schedule.calendarId = calendar.id;

schedule.title = calendar.name;
schedule.body = roomRate.roomRate_nameCode;
schedule.isReadOnly = false;
generateTime(schedule, renderStart, renderEnd);
schedule.isPrivate = false;
schedule.location = roomRate.roomRate_value;
schedule.state =roomRate.status;
schedule.attendees=[roomRate.night_stayval];
schedule.recurrenceRule = roomRate.allotmant;

schedule.color = calendar.color;
schedule.bgColor = calendar.bgColor;
schedule.dragBgColor = calendar.dragBgColor;
schedule.borderColor = calendar.borderColor;

if (schedule.category === 'milestone') {
schedule.color = schedule.bgColor;
schedule.bgColor = 'transparent';
schedule.dragBgColor = 'transparent';
schedule.borderColor = 'transparent';
}

schedule.raw.memo = chance.sentence();
schedule.raw.creator.name = chance.name();
schedule.raw.creator.avatar = chance.avatar();
schedule.raw.creator.company = chance.company();
schedule.raw.creator.email = chance.email();
schedule.raw.creator.phone = chance.phone();
schedule.raw.creator.bug = "";

if (chance.bool({ likelihood: 20 })) {
var travelTime = chance.minute();
schedule.goingDuration = travelTime;
schedule.comingDuration = travelTime;
}

ScheduleList.push(schedule);
}
所以我想在日字段中禁用计划订单的随机功能。
如果有人有这方面的经验,请帮助我。

最佳答案

请看这个...
enter link description here
您可以从该网址查看引用代码。
如果您想禁用随机设置时间表的顺序,它可能会更改库的某些代码。

关于javascript - 如何在 TUI-Calendar 中禁用设置随机计划顺序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63590138/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com