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

修改提示

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