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

排班

上级 65c38f8f
......@@ -24,7 +24,7 @@
div {
width: 9%;
height: 55px;
border: 1px solid #ccc;
//border: 1px solid #ccc;
}
.ag-left1 {
position: absolute;
......
......@@ -246,7 +246,6 @@
dataObj['type'] = item.type;
this.calendarOptions.events.push(dataObj);
});
console.log(this.calendarOptions.events, 'wokkkwok');
},
handleDatesSet(dataInfo) {
const currentTime = new Date().getTime();
......@@ -255,7 +254,6 @@
const oneHour = 1 * 60 * 60 * 1000 * 24;
const timeDifference = (cz / oneHour) | 0;
const headObj = this.calendarOptions.customButtons.myCustomButton;
console.log(timeDifference, 'sjsjsjsj', cz);
if (timeDifference > 0 && timeDifference < 7) {
// 过去
this.week = 1;
......@@ -266,7 +264,7 @@
headObj.text = '下周';
} else {
// 现在
headObj.text = '周';
headObj.text = '周';
this.week = 2;
}
},
......@@ -298,6 +296,11 @@
return;
},
selectInfo(info) {
const startDay = new Date(info.start).getDay();
const endDay = new Date(info.end).getDay();
if (startDay != endDay) {
return this.$toast('不能夸天选择排班');
}
const id = (this.calendarOptions.events.length + 1) * 10;
info.id = id;
const keyAll = ['end', 'endStr', 'id', 'start', 'startStr', 'week'];
......@@ -312,6 +315,11 @@
this.calendarOptions.events.push(dataObj);
},
selectAllow(info) {
const startDay = new Date(info.start).getDay();
const endDay = new Date(info.end).getDay();
if (startDay != endDay) {
return false;
}
const currentDate = new Date();
const start = info.start;
const end = info.end;
......@@ -406,4 +414,3 @@
<style lang="scss" scoped>
@import 'index';
</style>
d e c
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册