diff --git a/frontend/src/views/TaskHall.vue b/frontend/src/views/TaskHall.vue index 6de48b4..9246576 100644 --- a/frontend/src/views/TaskHall.vue +++ b/frontend/src/views/TaskHall.vue @@ -2966,10 +2966,12 @@ const getTaskTypeUnitScore = (typeId: number) => { // 计算审核弹窗中的预估总积分 const approveEstimatedScore = computed(() => { - return approveTaskTypes.value.reduce((total, item) => { + const total = approveTaskTypes.value.reduce((sum, item) => { const unitScore = getTaskTypeUnitScore(item.typeId) - return total + (unitScore * item.quantity) + return sum + (unitScore * item.quantity) }, 0) + // 使用 formatScore 处理浮点数精度问题 + return formatScore(total) }) // 格式化时间