提交 6cd006fb 编写于 作者: qian.jie's avatar qian.jie

Merge branch 'feature/jq_1' into 'develop'

Feature/jq 1

See merge request !200
......@@ -224,9 +224,9 @@
vm.$message.error(res.message);
}
})
.catch(function (err) {
.catch(function () {
vm.isClick = false;
vm.$message.error(err.message);
// vm.$message.error(err.message);
});
},
cancel() {
......
......@@ -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;
......@@ -509,11 +514,11 @@
} else if (timeDifference >= -13 && timeDifference <= -7) {
// 未来
this.week = 4;
headObj.text = '第二周';
headObj.text = '第三周 ';
} else if (timeDifference >= -20 && timeDifference <= -14) {
// 未来
this.week = 5;
headObj.text = '第周';
headObj.text = '第周';
} else if (timeDifference >= 7) {
// 现在
headObj.text = '上周';
......@@ -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 {
......
......@@ -48,8 +48,8 @@
<el-input-number
v-model="maxDiaNum"
:step="1"
:min="10"
:max="1000000"
:min="0"
:max="10000000"
step-strictly
@change="getInputNumber"
/>
......@@ -100,7 +100,7 @@
},
data() {
return {
maxDiaNum: 100,
maxDiaNum: 10,
dateTime: '',
interfaceOptions: [],
innerform: [],
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册