fix(图表): 存量明细表不合并单元格

This commit is contained in:
wisonic 2024-11-04 16:28:07 +08:00
parent 4413602e67
commit af3c22280b

View File

@ -29,6 +29,7 @@ import { deepCopy } from '@/utils/utils'
import { useEmitt } from '@/hooks/web/useEmitt'
import { trackBarStyleCheck } from '@/utils/canvasUtils'
import { type SpreadSheet } from '@antv/s2'
import { parseJson } from '../../js/util'
const dvMainStore = dvMainStoreWithOut()
const {
@ -165,10 +166,19 @@ const renderChartFromDialog = (viewInfo: Chart, chartDataInfo) => {
chartData.value = chartDataInfo
renderChart(viewInfo, false)
}
//
const handleDefaultVal = (chart: Chart) => {
const customAttr = parseJson(chart.customAttr)
//
if (customAttr.tableCell.mergeCells === undefined) {
customAttr.tableCell.mergeCells = false
}
}
const renderChart = (viewInfo: Chart, resetPageInfo: boolean) => {
if (!viewInfo) {
return
}
handleDefaultVal(viewInfo)
// view view.data
actualChart = deepCopy({
...defaultsDeep(viewInfo, cloneDeep(BASE_VIEW_CONFIG)),