提交 1fc9fdc6 编写于 作者: Neuromancer255's avatar Neuromancer255

表格聚合数值计算不准确的处理

上级 e3e1c74b
...@@ -1406,7 +1406,7 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -1406,7 +1406,7 @@ import { FormItemModel } from '@/model/form-detail';
return prev; return prev;
} }
}, 0); }, 0);
sums[index] = tempData; sums[index] = tempData.toFixed(3);
} }
<#elseif singleColumn.getAggMode() == "AVG"> <#elseif singleColumn.getAggMode() == "AVG">
if(Object.is(column.property,'${singleColumn.getCodeName()?lower_case}')){ if(Object.is(column.property,'${singleColumn.getCodeName()?lower_case}')){
...@@ -1418,7 +1418,7 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -1418,7 +1418,7 @@ import { FormItemModel } from '@/model/form-detail';
return prev; return prev;
} }
}, 0); }, 0);
sums[index] = tempData/data.length; sums[index] = tempData/data.length.toFixed(2);
} }
<#elseif singleColumn.getAggMode() == "MAX"> <#elseif singleColumn.getAggMode() == "MAX">
if(Object.is(column.property,'${singleColumn.getCodeName()?lower_case}')){ if(Object.is(column.property,'${singleColumn.getCodeName()?lower_case}')){
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册