|
|
|
@ -142,7 +142,7 @@ export const validateOjForm = (props, type, cb) => {
|
|
|
|
|
let validateResult = emptyValidate(key, value);
|
|
|
|
|
const errMsg = validateResult[key].errMsg;
|
|
|
|
|
if (errMsg) {
|
|
|
|
|
hasSuccess = false;
|
|
|
|
|
// hasSuccess = false;
|
|
|
|
|
} else {
|
|
|
|
|
// 唯一性校验
|
|
|
|
|
const bool = testCases.some((item, j) => {
|
|
|
|
@ -154,7 +154,7 @@ export const validateOjForm = (props, type, cb) => {
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if (bool) {
|
|
|
|
|
hasSuccess = false;
|
|
|
|
|
// hasSuccess = false;
|
|
|
|
|
validateResult = {
|
|
|
|
|
[key]: {
|
|
|
|
|
validateStatus: 'error',
|
|
|
|
@ -168,13 +168,13 @@ export const validateOjForm = (props, type, cb) => {
|
|
|
|
|
tcValidResult.push(tempObj);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if (testCases.length === 0) {
|
|
|
|
|
hasSuccess = false;
|
|
|
|
|
notification['error']({
|
|
|
|
|
message: '提示',
|
|
|
|
|
description: '测试用例必须输入!'
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
// if (testCases.length === 0) {
|
|
|
|
|
// hasSuccess = false;
|
|
|
|
|
// notification['error']({
|
|
|
|
|
// message: '提示',
|
|
|
|
|
// description: '测试用例必须输入!'
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if (!code) {
|
|
|
|
|
// hasSuccess = false;
|
|
|
|
|