自定义标准与运算更改

uat_us
caiyiling 2024-11-11 15:51:32 +08:00
parent 631c903135
commit e21d3b331a
2 changed files with 13 additions and 5 deletions

View File

@ -666,7 +666,9 @@ export default {
} }
} else { } else {
num = parseFloat(this.questionForm[o.TableQuestionId]) num = parseFloat(this.questionForm[o.TableQuestionId])
dataArr.push(num) if (!isNaN(num)) {
dataArr.push(num)
}
} }
} else { } else {
switch (rules.CustomCalculateMark) { switch (rules.CustomCalculateMark) {
@ -707,10 +709,12 @@ export default {
num = Math.min(...dataArr); num = Math.min(...dataArr);
break; break;
case 13: case 13:
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) { if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId])) dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
} else {
dataArr.push(0)
} }
num = dataArr.length === 0 ? 0 : dataArr.reduce((acc, curr) => acc && curr, 0) ? 1 : 0; num = dataArr.length === 0 ? 0 : dataArr.reduce((acc, curr) => acc && curr) ? 1 : 0
break; break;
case 14: case 14:
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) { if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {

View File

@ -595,7 +595,9 @@ export default {
} }
} else { } else {
num = parseFloat(this.questionForm[o.TableQuestionId]); num = parseFloat(this.questionForm[o.TableQuestionId]);
dataArr.push(num) if (!isNaN(num)) {
dataArr.push(num)
}
} }
} else { } else {
switch (rules.CustomCalculateMark) { switch (rules.CustomCalculateMark) {
@ -634,8 +636,10 @@ export default {
case 13: case 13:
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) { if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId])) dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
} else {
dataArr.push(0)
} }
num = dataArr.length === 0 ? 0 : dataArr.reduce((acc, curr) => acc && curr, 0) ? 1 : 0; num = dataArr.length === 0 ? 0 : dataArr.reduce((acc, curr) => acc && curr) ? 1 : 0
break; break;
case 14: case 14:
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) { if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {