Unverified 提交 92a7daa5 authored 作者: XiaJunjie2020's avatar XiaJunjie2020 提交者: GitHub

Merge pull request #1037 from dataease/pr@dev@feat_table_summary

feat: 表格合计调整
......@@ -283,10 +283,11 @@ export default {
const that = this
const means = [] // 合计
columns.forEach((column, columnIndex) => {
if (columnIndex === 0) {
const x = JSON.parse(that.chart.xaxis)
if (columnIndex === 0 && x.length > 0) {
means.push('合计')
} 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]))
// 合计
if (!values.every(value => isNaN(value))) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论