Compare commits

..

No commits in common. "1bc78dffc16d0dab919b6a8c3fdd0de8b82755b3" and "6992dc6a2bc862d751bb0212cedca99712dec8a8" have entirely different histories.

2 changed files with 5 additions and 13 deletions

View File

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