fix: 下钻table中无法评分的项分数栏改为'-'

This commit is contained in:
chenjinsong
2023-08-17 19:11:57 +08:00
parent 3b7623fac2
commit 08b0c1fd1f

View File

@@ -112,6 +112,7 @@
<div v-else-if="scope.row.score <= 6" class="data-score data-score-green" :test-id="`score-${scope.row.index}`"> <div v-else-if="scope.row.score <= 6" class="data-score data-score-green" :test-id="`score-${scope.row.index}`">
{{scope.row[item.prop] ? unitConvert(scope.row[item.prop], unitTypes.number).join(' ') : '0'}} {{scope.row[item.prop] ? unitConvert(scope.row[item.prop], unitTypes.number).join(' ') : '0'}}
</div> </div>
<div v-else-if="scope.row.score === '-'">-</div>
</div> </div>
</template> </template>
<template v-else> <template v-else>
@@ -744,7 +745,7 @@ export default {
if (Object.keys(item.scoreGroup).length >= 5) { if (Object.keys(item.scoreGroup).length >= 5) {
item.score = computeScore(item.scoreGroup) item.score = computeScore(item.scoreGroup)
if (!_.isNumber(item.score)) { if (!_.isNumber(item.score)) {
item.score = 0 item.score = '-'
} }
} }
}) })