Compare commits
No commits in common. "249448b15ee31aa2776686d50d3a67a35d4641ad" and "07b2341f93e30b5ce9cc44978e3780cb941ca448" have entirely different histories.
249448b15e
...
07b2341f93
|
@ -390,25 +390,20 @@ export default {
|
||||||
},
|
},
|
||||||
calculate(qsMarkArr, type) {
|
calculate(qsMarkArr, type) {
|
||||||
var num = 0
|
var num = 0
|
||||||
for (let i = 0; i< qsMarkArr.length; i++) {
|
qsMarkArr.map((qsmark, i) => {
|
||||||
const mark = qsMarkArr[i]
|
|
||||||
const v = this.questionForm[this.getQuestionId(mark)]
|
|
||||||
if (isNaN(parseFloat(v))) {
|
|
||||||
num = null
|
|
||||||
break
|
|
||||||
}
|
|
||||||
if (i === 0) {
|
if (i === 0) {
|
||||||
num = parseFloat(v)
|
const v = this.questionForm[this.getQuestionId(qsmark)]
|
||||||
|
num = isNaN(parseFloat(v)) ? 0 : parseFloat(v)
|
||||||
} else {
|
} else {
|
||||||
|
const v = this.questionForm[this.getQuestionId(qsmark)]
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case '-':
|
case '-':
|
||||||
num -= parseFloat(v)
|
num -= isNaN(parseFloat(v)) ? 0 : parseFloat(v)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
|
return parseFloat(num).toFixed(this.digitPlaces)
|
||||||
return num === null ? num : num.toFixed(this.digitPlaces)
|
|
||||||
},
|
},
|
||||||
limitBlur(qId, valueType) {
|
limitBlur(qId, valueType) {
|
||||||
const value = this.questionForm[qId]
|
const value = this.questionForm[qId]
|
||||||
|
|
|
@ -638,7 +638,6 @@ export default {
|
||||||
async close(questionsObj) {
|
async close(questionsObj) {
|
||||||
if (questionsObj) {
|
if (questionsObj) {
|
||||||
this.getReadingQuestionAndAnswer(questionsObj.visitTaskId)
|
this.getReadingQuestionAndAnswer(questionsObj.visitTaskId)
|
||||||
this.refreshQuestions()
|
|
||||||
}
|
}
|
||||||
this.activeItem.activeRowIndex = null
|
this.activeItem.activeRowIndex = null
|
||||||
this.activeItem.activeCollapseId = null
|
this.activeItem.activeCollapseId = null
|
||||||
|
|
Loading…
Reference in New Issue