新自定义dicom阅片自动计算相关
continuous-integration/drone/push Build is failing Details

main
wangxiaoshuang 2025-07-10 11:26:02 +08:00
parent 9d422d4327
commit 66bcff2405
2 changed files with 128 additions and 49 deletions

View File

@ -720,11 +720,14 @@ export default {
switch (rules.CustomCalculateMark) {
case 5:
this.questionForm[o.QuestionId].forEach((q, qi) => {
if (qi === 0) {
num = parseFloat(q[o.TableQuestionId])
} else {
num *= parseFloat(q[o.TableQuestionId])
if (!isNaN(parseFloat(q[o.TableQuestionId]))) {
if (qi === 0) {
num = parseFloat(q[o.TableQuestionId])
} else {
num *= parseFloat(q[o.TableQuestionId])
}
}
if (q[o.TableQuestionId] === 'NE') {
isNE = true
}
@ -732,11 +735,14 @@ export default {
break;
case 6:
this.questionForm[o.QuestionId].forEach((q, qi) => {
if (qi === 0) {
num = parseFloat(q[o.TableQuestionId])
} else {
num += parseFloat(q[o.TableQuestionId])
if (!isNaN(parseFloat(q[o.TableQuestionId]))) {
if (qi === 0) {
num = parseFloat(q[o.TableQuestionId])
} else {
num += parseFloat(q[o.TableQuestionId])
}
}
if (q[o.TableQuestionId] === 'NE') {
isNE = true
}
@ -744,11 +750,14 @@ export default {
break;
case 7:
this.questionForm[o.QuestionId].forEach((q, qi) => {
if (qi === 0) {
num = parseFloat(q[o.TableQuestionId])
} else {
num += parseFloat(q[o.TableQuestionId])
if (!isNaN(parseFloat(q[o.TableQuestionId]))) {
if (qi === 0) {
num = parseFloat(q[o.TableQuestionId])
} else {
num += parseFloat(q[o.TableQuestionId])
}
}
if (q[o.TableQuestionId] === 'NE') {
isNE = true
}
@ -758,7 +767,10 @@ export default {
case 8:
var arr = []
this.questionForm[o.QuestionId].forEach(q => {
arr.push(q[o.TableQuestionId])
if (!isNaN(parseFloat(q[o.TableQuestionId]))) {
arr.push(q[o.TableQuestionId])
}
if (q[o.TableQuestionId] === 'NE') {
isNE = true
}
@ -768,7 +780,9 @@ export default {
case 9:
var arr = []
this.questionForm[o.QuestionId].forEach(q => {
arr.push(q[o.TableQuestionId])
if (!isNaN(parseFloat(q[o.TableQuestionId]))) {
arr.push(q[o.TableQuestionId])
}
if (q[o.TableQuestionId] === 'NE') {
isNE = true
}
@ -780,7 +794,9 @@ export default {
if (this.questionForm[o.TableQuestionId] === 'NE') {
isNE = true
}
num = parseFloat(this.questionForm[o.TableQuestionId])
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
num = parseFloat(this.questionForm[o.TableQuestionId])
}
if (!isNaN(num)) {
dataArr.push(num)
}
@ -791,20 +807,32 @@ export default {
}
switch (rules.CustomCalculateMark) {
case 1:
num += parseFloat(this.questionForm[o.TableQuestionId])
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
num += parseFloat(this.questionForm[o.TableQuestionId])
}
break;
case 2:
num -= parseFloat(this.questionForm[o.TableQuestionId])
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
num -= parseFloat(this.questionForm[o.TableQuestionId])
}
break;
case 3:
num *= parseFloat(this.questionForm[o.TableQuestionId])
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
num *= parseFloat(this.questionForm[o.TableQuestionId])
}
break;
case 4:
if (parseFloat(this.questionForm[o.TableQuestionId]) === 0) {
num = 0
} else {
num /= parseFloat(this.questionForm[o.TableQuestionId])
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
if (parseFloat(this.questionForm[o.TableQuestionId]) === 0) {
num = 0
} else {
num /= parseFloat(this.questionForm[o.TableQuestionId])
}
}
break;
case 10:
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
@ -906,24 +934,42 @@ export default {
isNE = true
}
if (i === 0) {
num = parseFloat(this.QuestionsForm[o.TableQuestionId]);
arr = [num];
if (!isNaN(parseFloat(this.QuestionsForm[o.TableQuestionId]))) {
num = parseFloat(this.QuestionsForm[o.TableQuestionId]);
arr = [num];
}
} else {
switch (v.CustomCalculateMark) {
case 1:
num += parseFloat(this.QuestionsForm[o.TableQuestionId]);
if (!isNaN(parseFloat(this.QuestionsForm[o.TableQuestionId]))) {
num += parseFloat(this.QuestionsForm[o.TableQuestionId]);
}
break;
case 2:
num -= parseFloat(this.QuestionsForm[o.TableQuestionId]);
if (!isNaN(parseFloat(this.QuestionsForm[o.TableQuestionId]))) {
num -= parseFloat(this.QuestionsForm[o.TableQuestionId]);
}
break;
case 3:
num *= parseFloat(this.QuestionsForm[o.TableQuestionId]);
if (!isNaN(parseFloat(this.QuestionsForm[o.TableQuestionId]))) {
num *= parseFloat(this.QuestionsForm[o.TableQuestionId]);
}
break;
case 4:
num /= parseFloat(this.QuestionsForm[o.TableQuestionId]);
if (!isNaN(parseFloat(this.QuestionsForm[o.TableQuestionId]))) {
num /= parseFloat(this.QuestionsForm[o.TableQuestionId]);
}
break;
case 7:
arr.push(parseFloat(this.QuestionsForm[o.TableQuestionId]));
if (!isNaN(parseFloat(this.QuestionsForm[o.TableQuestionId]))) {
arr.push(parseFloat(this.QuestionsForm[o.TableQuestionId]));
}
num =
arr.length === 0
? 0
@ -932,11 +978,17 @@ export default {
}, 0) / arr.length;
break;
case 8:
arr.push(parseFloat(this.QuestionsForm[o.TableQuestionId]));
if (!isNaN(parseFloat(this.QuestionsForm[o.TableQuestionId]))) {
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]));
if (!isNaN(parseFloat(this.QuestionsForm[o.TableQuestionId]))) {
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;

View File

@ -391,49 +391,73 @@ export default {
if (i !== 0) {
switch (rules.CustomCalculateMark) {
case 7:
count += parseFloat(this.questionForm[o.TableQuestionId])
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
count += parseFloat(this.questionForm[o.TableQuestionId])
}
if (i === rules.CalculateQuestionList.length - 1) {
num = count / rules.CalculateQuestionList.length
}
break;
case 8:
maxList.push(this.questionForm[o.TableQuestionId])
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
maxList.push(this.questionForm[o.TableQuestionId])
}
if (i === rules.CalculateQuestionList.length - 1) {
num = Math.max(...maxList)
num = minList.length > 0 ? Math.max(...maxList) : 0
}
break;
case 9:
minList.push(this.questionForm[o.TableQuestionId])
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
minList.push(this.questionForm[o.TableQuestionId])
}
if (i === rules.CalculateQuestionList.length - 1) {
num = Math.min(...minList)
num = minList.length > 0 ? Math.min(...minList) : 0
}
break;
}
} else {
maxList.push(this.questionForm[o.TableQuestionId])
minList.push(this.questionForm[o.TableQuestionId])
count = parseFloat(this.questionForm[o.TableQuestionId])
num = parseFloat(this.questionForm[o.TableQuestionId])
dataArr.push(num)
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
maxList.push(this.questionForm[o.TableQuestionId])
minList.push(this.questionForm[o.TableQuestionId])
count = parseFloat(this.questionForm[o.TableQuestionId])
num = parseFloat(this.questionForm[o.TableQuestionId])
dataArr.push(num)
}
}
} else {
if (i !== 0) {
switch (rules.CustomCalculateMark) {
case 1:
num += parseFloat(this.questionForm[o.TableQuestionId])
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
num += parseFloat(this.questionForm[o.TableQuestionId])
}
break;
case 2:
num -= parseFloat(this.questionForm[o.TableQuestionId])
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
num -= parseFloat(this.questionForm[o.TableQuestionId])
}
break;
case 3:
num *= parseFloat(this.questionForm[o.TableQuestionId])
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
num *= parseFloat(this.questionForm[o.TableQuestionId])
}
break;
case 4:
if (parseFloat(this.questionForm[o.TableQuestionId]) === 0) {
num = 0
} else {
num /= parseFloat(this.questionForm[o.TableQuestionId])
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
if (parseFloat(this.questionForm[o.TableQuestionId]) === 0) {
num = 0
} else {
num /= parseFloat(this.questionForm[o.TableQuestionId])
}
}
break;
case 10:
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
@ -457,7 +481,10 @@ export default {
break;
}
} else {
num = parseFloat(this.questionForm[o.TableQuestionId])
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
num = parseFloat(this.questionForm[o.TableQuestionId])
}
}
}
})