mirror of
https://github.com/dataease/dataease.git
synced 2025-02-25 12:03:05 +08:00
feat: 表格合计调整
This commit is contained in:
parent
3792298919
commit
2f46571f17
@ -283,10 +283,11 @@ export default {
|
|||||||
const that = this
|
const that = this
|
||||||
const means = [] // 合计
|
const means = [] // 合计
|
||||||
columns.forEach((column, columnIndex) => {
|
columns.forEach((column, columnIndex) => {
|
||||||
if (columnIndex === 0) {
|
const x = JSON.parse(that.chart.xaxis)
|
||||||
|
if (columnIndex === 0 && x.length > 0) {
|
||||||
means.push('合计')
|
means.push('合计')
|
||||||
} else {
|
} else {
|
||||||
if (columnIndex >= that.chart.data.fields.length - that.chart.data.series.length) {
|
if (columnIndex >= x.length) {
|
||||||
const values = data.map(item => Number(item[column.property]))
|
const values = data.map(item => Number(item[column.property]))
|
||||||
// 合计
|
// 合计
|
||||||
if (!values.every(value => isNaN(value))) {
|
if (!values.every(value => isNaN(value))) {
|
||||||
|
Loading…
Reference in New Issue
Block a user