提交 2387ed55 编写于 作者: qian.jie's avatar qian.jie

修改提示

上级 f0f6cee8
......@@ -212,7 +212,7 @@
// themeSystem: 'bootstrap', // 主题色(本地测试未能生效)
// initialDate: moment().format('YYYY-MM-DD'), // 自定义设置背景颜色时一定要初始化日期时间
timeGridEventMinHeight: '40', // 设置事件的最小高度
aspectRatio: 2, // 设置日历单元格宽度与高度的比例。
aspectRatio: 1.35, // 设置日历单元格宽度与高度的比例。
// displayEventTime: false, // 是否显示时间
allDaySlot: false, // 周,日视图时,all-day 不显示
eventLimit: true, // 设置月日程,与all-day slot的最大显示数量,超过的通过弹窗显示
......@@ -258,7 +258,7 @@
getEveryDay: '',
copyArr: [],
centerDialogVisible: false,
maxNumValue: '10',
maxNumValue: '',
showFirNum:'',
showMaxNum:''
};
......@@ -314,7 +314,7 @@
this.calendarOptions.editable = true;
} else {
// 查看
this.calendarOptions.slotDuration = '01:0:00';
this.calendarOptions.slotDuration = '01:00:00';
this.calendarOptions.selectable = false;
this.calendarOptions.editable = false;
}
......@@ -339,9 +339,16 @@
const day = dayjs(date).day();
const dayDate = dayjs(date).date();
const dayFormat = dayjs(date).format('YYYY-MM-DD');
let selectDate = dayFormat + ' ' + '09:00:00';
selectDate = dayjs(selectDate).unix();
const nowDate = dayjs(new Date()).unix();
let isAddAllDay = true;
const data = this.calendarOptions.events;
const len = data.length;
const cz = ((nowDate - selectDate) / 3600) | 0;
if (cz > 0 && cz >= 24) {
return this.$message.info('你不能添加过去的时间的排班');
}
for (var i = 0; i < len; i++) {
const itemDay = dayjs(data[i].start).day();
if (!data[i].constraint && day === itemDay) {
......@@ -490,8 +497,6 @@
const oneHour = 1 * 60 * 60 * 1000 * 24; // 一天的时间戳
const timeDifference = (cz / oneHour) | 0; // 每周一时间距离今天时间数量
const headObj = this.calendarOptions.customButtons.myCustomButton;
console.log(timeDifference, 'timeDifference', cz / oneHour);
// debugger;
const czCorrert = cz / oneHour;
if (timeDifference == 0 && czCorrert > 0) {
this.week = 1;
......@@ -673,7 +678,6 @@
const objParms = {};
objParms.week = weekV ? weekV : this.week;
objParms.workId = this.schedulingTypeValue.id;
// objParms.list = [];
const lastData = [];
const data = this.calendarOptions.events;
console.log('data=======', data);
......@@ -695,12 +699,10 @@
saveDutyRoster(objParms).then((res) => {
if (res.code === '000000') {
this.loading = false;
if (type == 1) {
this.$message({
message: '排班保存成功',
type: 'success',
});
}
this.$message({
message: '排班保存成功',
type: 'success',
});
this.isDoIt = false;
this.handleInitSearch(true);
} else {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册