This commit is contained in:
zhangsir
2024-02-28 11:02:06 +08:00
parent 85dd4bb072
commit 46bcb5a9d3
2 changed files with 32 additions and 15 deletions

View File

@@ -3842,7 +3842,7 @@ function onFocusEnd(){
state.onceName = "";
state.xjkkinputV2 = "";
state.duration = "";
state.xjkkinputV3 = [];
// state.xjkkinputV3 = [];
state.xjkkinputV4 = null;
state.checked1 = false;
state.checked4 = false;
@@ -3922,6 +3922,9 @@ function onFocusEnd(){
if(!state.xjkkinputV3[1]){
return message.error("结束时间未填写");
}
if(durationText.value<0){
return message.error("结束时间不能小于开始时间,请重新填写");
}
if(state.offteachers.some(item => !item.teacherName)){
return message.error("请填写教师名称和设置权重");
}
@@ -5072,14 +5075,20 @@ function onFocusEnd(){
console.log("执行");
getTableDate();
};
const disabledDate = (current) => current && current < dayjs(state.xjkkinputV3[0]);
const disabledDate = (current) => {
// current && current < dayjs(state.xjkkinputV3[0])
};
const disabledDateTime = () => {
const currentMinute = dayjs(state.xjkkinputV3[0]).minute();
return {
disabledHours: () => range(0, dayjs(state.xjkkinputV3[0]).hour()).splice(0, dayjs(state.xjkkinputV3[0]).hour()),
disabledMinutes: () => range(0, currentMinute+1).splice(0, currentMinute+1),
};
// const dateOnlyStart = new Date(state.xjkkinputV3[0].split(' ')[0]);
// const dateOnlyEnd = new Date(state.xjkkinputV3[1].split(' ')[0]);
// if(dateOnlyStart.getTime()==dateOnlyEnd.getTime()){
// const currentMinute = dayjs(state.xjkkinputV3[0]).minute();
// return {
// disabledHours: () => range(0, dayjs(state.xjkkinputV3[0]).hour()).splice(0, dayjs(state.xjkkinputV3[0]).hour()),
// disabledMinutes: () => range(0, currentMinute+1).splice(0, currentMinute+1),
// };
// }
};
function auditStudent(record) {