|
|
|
@ -222,38 +222,52 @@ export const validateOjForm = (props, type, cb) => {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
let boolflad=false;
|
|
|
|
|
try {
|
|
|
|
|
if(ojForm.sub_discipline_id.length===0){
|
|
|
|
|
hasSuccess = false;
|
|
|
|
|
notification['error']({
|
|
|
|
|
message: '提示',
|
|
|
|
|
description: '课程必须选择!'
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
boolflad=true;
|
|
|
|
|
}else if(ojForm.timeLimit===null){
|
|
|
|
|
hasSuccess = false;
|
|
|
|
|
notification['error']({
|
|
|
|
|
message: '提示',
|
|
|
|
|
description: '时间限制必须输入!'
|
|
|
|
|
});
|
|
|
|
|
} else if(ojForm.name.length===0){
|
|
|
|
|
boolflad=true;
|
|
|
|
|
|
|
|
|
|
} else if(ojForm.name.length===0){
|
|
|
|
|
hasSuccess = false;
|
|
|
|
|
notification['error']({
|
|
|
|
|
message: '提示',
|
|
|
|
|
description: '任务名称必须输入!'
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
boolflad=true;
|
|
|
|
|
}else if(ojForm.description.length===0){
|
|
|
|
|
hasSuccess = false;
|
|
|
|
|
notification['error']({
|
|
|
|
|
message: '提示',
|
|
|
|
|
description: '描述必须输入!'
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
boolflad=true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}catch (e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
if( hasSuccess === false){
|
|
|
|
|
if(boolflad===true){
|
|
|
|
|
props.changeSubmitLoadingStatus(false);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}catch (e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|