|
|
|
@ -132,6 +132,7 @@ export const validateOjForm = (props, type, cb) => {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
// 验证测试用例中的数组是否都有对应的值
|
|
|
|
|
let tcbool=false;
|
|
|
|
|
const tcValidResult = [];
|
|
|
|
|
// 验证测试用例: 1.必须要有输出值 2. 输入值与输出值必须唯一
|
|
|
|
|
testCases.forEach((obj, i) => {
|
|
|
|
@ -143,6 +144,16 @@ export const validateOjForm = (props, type, cb) => {
|
|
|
|
|
const errMsg = validateResult[key].errMsg;
|
|
|
|
|
if (errMsg) {
|
|
|
|
|
hasSuccess = false;
|
|
|
|
|
|
|
|
|
|
if(tcbool===false){
|
|
|
|
|
tcbool=true
|
|
|
|
|
notification['error']({
|
|
|
|
|
message: '提示',
|
|
|
|
|
description: '测试用例必须填写输出!'
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
// 唯一性校验
|
|
|
|
|
const bool = testCases.some((item, j) => {
|
|
|
|
|