fix: 修复审核弹窗预估总积分浮点数精度问题
This commit is contained in:
parent
67f57d93de
commit
f4c07ab334
@ -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)
|
||||
})
|
||||
|
||||
// 格式化时间
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user