|
@@ -3503,7 +3503,27 @@ export default {
|
|
.map((v) => v.field)
|
|
.map((v) => v.field)
|
|
.includes(column.property)
|
|
.includes(column.property)
|
|
) {
|
|
) {
|
|
- return this.sumNum(data, column.property)
|
|
|
|
|
|
+ // 主表数据
|
|
|
|
+ if (column.level < 2){
|
|
|
|
+ // 过滤数据
|
|
|
|
+ const filteredData = data.reduce((acc, row) => {
|
|
|
|
+ if (row.mergeRow < 2) {
|
|
|
|
+ // 如果 mergeRow 为 1,直接添加到结果中 不是合并的数据
|
|
|
|
+ acc.push(row);
|
|
|
|
+ } else if (row.mergeRow > 1) {
|
|
|
|
+ // 如果 mergeRow 大于 1,只保留 seq 相同的一条数据 sql为序号且唯一 mergerow为合并的行数 只保留一条即可
|
|
|
|
+ if (!acc.some(r => r.seq === row.seq)) {
|
|
|
|
+ acc.push(row);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return acc;
|
|
|
|
+ }, []);
|
|
|
|
+ return this.sumNum(filteredData, column.property)
|
|
|
|
+ } else {
|
|
|
|
+ // 子表数据
|
|
|
|
+ return this.sumNum(data, column.property)
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
return '-'
|
|
return '-'
|
|
})
|
|
})
|