Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web into main
commit
9c16e74d3e
|
@ -451,8 +451,6 @@ export default {
|
|||
})
|
||||
break
|
||||
case 6:
|
||||
console.log(this.questionForm[o.QuestionId])
|
||||
console.log(this.questionForm)
|
||||
this.questionForm[o.QuestionId].forEach((q, qi) => {
|
||||
if (qi === 0) {
|
||||
num = parseFloat(q[o.TableQuestionId])
|
||||
|
@ -515,7 +513,6 @@ export default {
|
|||
formItemNumberChange(questionId, isTable) {
|
||||
if (isTable) {
|
||||
this.calculationList.forEach((v, i) => {
|
||||
console.log(v, i)
|
||||
var find = v.CalculateQuestionList.filter(o => {
|
||||
return o.QuestionId === questionId
|
||||
})
|
||||
|
@ -548,23 +545,38 @@ export default {
|
|||
this.question.TableQuestions.Questions.forEach(v => {
|
||||
if (v.Type === 'number' && v.DataSource === 1) {
|
||||
var CalculateQuestions = JSON.parse(v.CalculateQuestions)
|
||||
var num
|
||||
var num,arr=[]
|
||||
CalculateQuestions.forEach((o, i) => {
|
||||
if (i === 0) {
|
||||
num = this.QuestionsForm[o.TableQuestionId]
|
||||
num = parseFloat(this.QuestionsForm[o.TableQuestionId])
|
||||
arr = [num];
|
||||
} else {
|
||||
switch (v.CustomCalculateMark) {
|
||||
case 1:
|
||||
num += this.QuestionsForm[o.TableQuestionId]
|
||||
num += parseFloat(this.QuestionsForm[o.TableQuestionId])
|
||||
break
|
||||
case 2:
|
||||
num -= this.QuestionsForm[o.TableQuestionId]
|
||||
num -= parseFloat(this.QuestionsForm[o.TableQuestionId])
|
||||
break
|
||||
case 3:
|
||||
num *= this.QuestionsForm[o.TableQuestionId]
|
||||
num *= parseFloat(this.QuestionsForm[o.TableQuestionId])
|
||||
break
|
||||
case 4:
|
||||
num /= this.QuestionsForm[o.TableQuestionId]
|
||||
num /= parseFloat(this.QuestionsForm[o.TableQuestionId])
|
||||
break
|
||||
case 7:
|
||||
arr.push(parseFloat(this.QuestionsForm[o.TableQuestionId]))
|
||||
num += parseFloat(this.QuestionsForm[o.TableQuestionId])
|
||||
num = arr.length === 0 ? 0 : num / arr.length
|
||||
break
|
||||
case 8:
|
||||
arr.push(parseFloat(this.QuestionsForm[o.TableQuestionId]))
|
||||
num = arr.length === 0 ? 0 : Math.max(...arr)
|
||||
break
|
||||
case 9:
|
||||
arr.push(parseFloat(this.QuestionsForm[o.TableQuestionId]))
|
||||
num = arr.length === 0 ? 0 : Math.min(...arr)
|
||||
// console.log('min', this.questionForm[o.QuestionId], arr, num)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
@ -626,7 +638,6 @@ export default {
|
|||
this.$emit('setFormItemData', obj)
|
||||
},
|
||||
async uploadScreenshot(param) {
|
||||
console.log(this.visitTaskId)
|
||||
if (!this.visitTaskId) {
|
||||
const loading = this.$loading({
|
||||
target: document.querySelector('.ecrf-wrapper'),
|
||||
|
|
Loading…
Reference in New Issue