fix: 修复复用明细表翻页模式切换失败问题
This commit is contained in:
parent
cb539ac59f
commit
8483fd828f
@ -577,7 +577,11 @@ export const dvMainStore = defineStore('dataVisualization', {
|
|||||||
} else {
|
} else {
|
||||||
viewInfo[propertyInfo.custom][propertyInfo.property] = propertyInfo.value
|
viewInfo[propertyInfo.custom][propertyInfo.property] = propertyInfo.value
|
||||||
}
|
}
|
||||||
useEmitt().emitter.emit('renderChart-' + viewId, viewInfo)
|
if (['tablePageMode', 'tablePageSize'].includes(propertyInfo.subProp)) {
|
||||||
|
useEmitt().emitter.emit('calcData-' + viewId, viewInfo)
|
||||||
|
} else {
|
||||||
|
useEmitt().emitter.emit('renderChart-' + viewId, viewInfo)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.componentData.forEach(component => {
|
this.componentData.forEach(component => {
|
||||||
|
|||||||
@ -108,18 +108,21 @@ const renderChartFromDialog = (viewInfo: Chart, chartDataInfo) => {
|
|||||||
chartData.value = chartDataInfo
|
chartData.value = chartDataInfo
|
||||||
renderChart(viewInfo, false)
|
renderChart(viewInfo, false)
|
||||||
}
|
}
|
||||||
const renderChart = (view: Chart, resetPageInfo: boolean) => {
|
const renderChart = (viewInfo: Chart, resetPageInfo: boolean) => {
|
||||||
if (!view) {
|
if (!viewInfo) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// view 为引用对象 需要存库 view.data 直接赋值会导致保存不必要的数据
|
// view 为引用对象 需要存库 view.data 直接赋值会导致保存不必要的数据
|
||||||
const chart = {
|
const chart = {
|
||||||
...defaultsDeep(view, cloneDeep(BASE_VIEW_CONFIG)),
|
...defaultsDeep(viewInfo, cloneDeep(BASE_VIEW_CONFIG)),
|
||||||
data: chartData.value
|
data: chartData.value
|
||||||
} as ChartObj
|
} as ChartObj
|
||||||
setupPage(chart, resetPageInfo)
|
setupPage(chart, resetPageInfo)
|
||||||
myChart?.destroy()
|
myChart?.destroy()
|
||||||
const chartView = chartViewManager.getChartView(view.render, view.type) as S2ChartView<any>
|
const chartView = chartViewManager.getChartView(
|
||||||
|
viewInfo.render,
|
||||||
|
viewInfo.type
|
||||||
|
) as S2ChartView<any>
|
||||||
myChart = chartView.drawChart({
|
myChart = chartView.drawChart({
|
||||||
container: containerId,
|
container: containerId,
|
||||||
chart: toRaw(chart),
|
chart: toRaw(chart),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user