Compare commits

...

2 Commits

Author SHA1 Message Date
caiyiling 249448b15e Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web into main
continuous-integration/drone/push Build is passing Details
2024-09-06 18:01:42 +08:00
caiyiling 4569f16050 IVUS自动计算更改 2024-09-06 18:01:21 +08:00
2 changed files with 13 additions and 7 deletions

View File

@ -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]

View File

@ -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