IVUS自动计算更改
parent
f39050e220
commit
4569f16050
|
@ -390,20 +390,25 @@ export default {
|
|||
},
|
||||
calculate(qsMarkArr, type) {
|
||||
var num = 0
|
||||
qsMarkArr.map((qsmark, i) => {
|
||||
for (let i = 0; i< qsMarkArr.length; i++) {
|
||||
const mark = qsMarkArr[i]
|
||||
const v = this.questionForm[this.getQuestionId(mark)]
|
||||
if (isNaN(parseFloat(v))) {
|
||||
num = null
|
||||
break
|
||||
}
|
||||
if (i === 0) {
|
||||
const v = this.questionForm[this.getQuestionId(qsmark)]
|
||||
num = isNaN(parseFloat(v)) ? 0 : parseFloat(v)
|
||||
num = parseFloat(v)
|
||||
} else {
|
||||
const v = this.questionForm[this.getQuestionId(qsmark)]
|
||||
switch (type) {
|
||||
case '-':
|
||||
num -= isNaN(parseFloat(v)) ? 0 : parseFloat(v)
|
||||
num -= parseFloat(v)
|
||||
break
|
||||
}
|
||||
}
|
||||
})
|
||||
return parseFloat(num).toFixed(this.digitPlaces)
|
||||
}
|
||||
|
||||
return num === null ? num : num.toFixed(this.digitPlaces)
|
||||
},
|
||||
limitBlur(qId, valueType) {
|
||||
const value = this.questionForm[qId]
|
||||
|
|
|
@ -638,6 +638,7 @@ export default {
|
|||
async close(questionsObj) {
|
||||
if (questionsObj) {
|
||||
this.getReadingQuestionAndAnswer(questionsObj.visitTaskId)
|
||||
this.refreshQuestions()
|
||||
}
|
||||
this.activeItem.activeRowIndex = null
|
||||
this.activeItem.activeCollapseId = null
|
||||
|
|
Loading…
Reference in New Issue