mirror of
https://github.com/dataease/dataease.git
synced 2026-06-12 16:31:11 +08:00
fix(视图): 修复透视表使用计算字段导致渲染失败
This commit is contained in:
@@ -1058,7 +1058,7 @@ function customCalcFunc(query, data, totalCfgMap) {
|
||||
if (!data?.length || !query[EXTRA_FIELD]) {
|
||||
return 0
|
||||
}
|
||||
const aggregation = totalCfgMap[query[EXTRA_FIELD]].aggregation
|
||||
const aggregation = totalCfgMap[query[EXTRA_FIELD]]?.aggregation ?? 'SUM'
|
||||
switch (aggregation) {
|
||||
case 'SUM': {
|
||||
return data.reduce((p, n) => {
|
||||
|
||||
Reference in New Issue
Block a user