Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
3694c51288
|
@ -499,9 +499,10 @@ export default {
|
||||||
if (rules.CalculateQuestionList.length === 0) {
|
if (rules.CalculateQuestionList.length === 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
let dataArr = []
|
||||||
rules.CalculateQuestionList.forEach((o, i) => {
|
rules.CalculateQuestionList.forEach((o, i) => {
|
||||||
if (i === 0) {
|
if (i === 0) {
|
||||||
if (rules.CustomCalculateMark > 4) {
|
if (rules.CustomCalculateMark > 4 && rules.CustomCalculateMark < 10) {
|
||||||
switch (rules.CustomCalculateMark) {
|
switch (rules.CustomCalculateMark) {
|
||||||
case 5:
|
case 5:
|
||||||
this.questionForm[o.QuestionId].forEach((q, qi) => {
|
this.questionForm[o.QuestionId].forEach((q, qi) => {
|
||||||
|
@ -552,6 +553,7 @@ export default {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
num = parseFloat(this.questionForm[o.TableQuestionId]);
|
num = parseFloat(this.questionForm[o.TableQuestionId]);
|
||||||
|
dataArr.push(num)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
switch (rules.CustomCalculateMark) {
|
switch (rules.CustomCalculateMark) {
|
||||||
|
@ -567,6 +569,26 @@ export default {
|
||||||
case 4:
|
case 4:
|
||||||
num /= parseFloat(this.questionForm[o.TableQuestionId]);
|
num /= parseFloat(this.questionForm[o.TableQuestionId]);
|
||||||
break;
|
break;
|
||||||
|
case 10:
|
||||||
|
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
|
||||||
|
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
|
||||||
|
}
|
||||||
|
num = dataArr.length === 0 ? 0 : dataArr.reduce((acc, curr) => {
|
||||||
|
return acc + (typeof curr === "number" ? curr : 0);
|
||||||
|
}, 0) / dataArr.length;
|
||||||
|
break;
|
||||||
|
case 11:
|
||||||
|
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
|
||||||
|
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
|
||||||
|
}
|
||||||
|
num = Math.max(...dataArr);
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
|
||||||
|
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
|
||||||
|
}
|
||||||
|
num = Math.min(...dataArr);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -581,8 +603,6 @@ export default {
|
||||||
var find = v.CalculateQuestionList.filter((o) => {
|
var find = v.CalculateQuestionList.filter((o) => {
|
||||||
return o.QuestionId === questionId;
|
return o.QuestionId === questionId;
|
||||||
});
|
});
|
||||||
// find的自动计算值number
|
|
||||||
console.log("find", find);
|
|
||||||
if (find) {
|
if (find) {
|
||||||
var num = this.logic(v);
|
var num = this.logic(v);
|
||||||
if (num !== false) {
|
if (num !== false) {
|
||||||
|
|
|
@ -246,7 +246,7 @@ export default {
|
||||||
deep: true,
|
deep: true,
|
||||||
immediate: true,
|
immediate: true,
|
||||||
handler(v) {
|
handler(v) {
|
||||||
console.log(v)
|
// console.log(v)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -518,7 +518,7 @@
|
||||||
<div>
|
<div>
|
||||||
<el-radio
|
<el-radio
|
||||||
v-for="item of $d.CustomCalculateMark"
|
v-for="item of $d.CustomCalculateMark"
|
||||||
v-show="item.value <= 4"
|
v-show="item.value <= 4 || item.value === 10 || item.value === 11 || item.value === 12"
|
||||||
:key="`CustomCalculateMark${item.value}`"
|
:key="`CustomCalculateMark${item.value}`"
|
||||||
:label="item.value"
|
:label="item.value"
|
||||||
>
|
>
|
||||||
|
@ -528,7 +528,7 @@
|
||||||
<div>
|
<div>
|
||||||
<el-radio
|
<el-radio
|
||||||
v-for="item of $d.CustomCalculateMark"
|
v-for="item of $d.CustomCalculateMark"
|
||||||
v-show="item.value > 4"
|
v-show="item.value > 4 && item.value < 10"
|
||||||
:key="`CustomCalculateMark${item.value}`"
|
:key="`CustomCalculateMark${item.value}`"
|
||||||
:label="item.value"
|
:label="item.value"
|
||||||
>
|
>
|
||||||
|
@ -561,13 +561,13 @@
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{
|
{{
|
||||||
scope.$index === 0 && [1, 2, 3, 4].includes(form.CustomCalculateMark) ? null : $fd('CustomCalculateMark', form.CustomCalculateMark)
|
scope.$index === 0 && [1, 2, 3, 4, 10, 11, 12].includes(form.CustomCalculateMark) ? null : $fd('CustomCalculateMark', form.CustomCalculateMark)
|
||||||
}}
|
}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- 表格名称 -->
|
<!-- 表格名称 -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-if="form.CustomCalculateMark > 4"
|
v-if="form.CustomCalculateMark > 4 && form.CustomCalculateMark < 10"
|
||||||
:label="$t('trials:readingUnit:qsList:title:tableName')"
|
:label="$t('trials:readingUnit:qsList:title:tableName')"
|
||||||
prop="QuestionId"
|
prop="QuestionId"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
|
@ -600,7 +600,7 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-if="form.CustomCalculateMark <= 4"
|
v-if="form.CustomCalculateMark <= 4 || form.CustomCalculateMark >= 10"
|
||||||
:label="$t('common:action:action')"
|
:label="$t('common:action:action')"
|
||||||
prop="TableQuestionId"
|
prop="TableQuestionId"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
|
@ -629,7 +629,7 @@
|
||||||
<div style="font-size: 12px;color:#666;padding: 0 15px 0;text-align: right">
|
<div style="font-size: 12px;color:#666;padding: 0 15px 0;text-align: right">
|
||||||
<!-- '请选择同级问题!': '请选择表格问题下的子问题!' -->
|
<!-- '请选择同级问题!': '请选择表格问题下的子问题!' -->
|
||||||
<i class="el-icon-info"/>{{
|
<i class="el-icon-info"/>{{
|
||||||
[1, 2, 3, 4].includes(form.CustomCalculateMark) ? $t('trials:readingUnit:qsList:message:msg1') : $t('trials:readingUnit:qsList:message:msg2')
|
[1, 2, 3, 4, 10, 11, 12].includes(form.CustomCalculateMark) ? $t('trials:readingUnit:qsList:message:msg1') : $t('trials:readingUnit:qsList:message:msg2')
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -947,7 +947,8 @@ export default {
|
||||||
},
|
},
|
||||||
CustomCalculateMarkChange() {
|
CustomCalculateMarkChange() {
|
||||||
this.isShow = false
|
this.isShow = false
|
||||||
if (this.form.CustomCalculateMark <= 4) {
|
if (this.form.CustomCalculateMark <= 4 || this.form.CustomCalculateMark >= 10) {
|
||||||
|
console.log('1111')
|
||||||
this.form.CalculateQuestions = [
|
this.form.CalculateQuestions = [
|
||||||
{
|
{
|
||||||
IsTable: false,
|
IsTable: false,
|
||||||
|
|
Loading…
Reference in New Issue