提交 fe650ff3 编写于 作者: xiaoping.di's avatar xiaoping.di

问诊修改排班

上级 95038102
......@@ -180,7 +180,6 @@
selectOverlap: false,
select: this.selectInfo,
selectMinDistance: 0,
eventResize: this.eventResize,
eventOverlap: false,
navLinks: true,
navLinkDayClick: this.navLinkDayClick,
......@@ -610,24 +609,24 @@
// 对于排班交叉部分处理
const infoStart = new Date(info.start).getTime();
const infoEnd = new Date(info.end).getTime();
const data = this.calendarOptions.events;
const newDate = [];
let indexObj = false;
data.forEach((item) => {
const d = new Date(item.end).getTime();
const s = new Date(item.start).getTime();
if (s > infoStart && infoEnd >= d) {
indexObj = true;
} else if (s > infoStart && infoEnd >= s) {
indexObj = true;
const haveSelectTime = this.calendarOptions.events;
const correctDate = [];
let isRepeat = false;
haveSelectTime.forEach((item) => {
const selectEndTime = new Date(item.end).getTime();
const selectStartTime = new Date(item.start).getTime();
if (selectStartTime > infoStart && infoEnd >= selectEndTime) {
isRepeat = true;
} else if (selectStartTime > infoStart && infoEnd >= selectStartTime) {
isRepeat = true;
} else {
const id = (newDate.length + 1) * 10;
const id = (correctDate.length + 1) * 10;
item.id = id;
newDate.push(item);
correctDate.push(item);
}
});
this.calendarOptions.events = newDate;
return indexObj;
this.calendarOptions.events = correctDate;
return isRepeat;
},
handlePriority(index) {
this.isDoIt = true;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册