diff --git a/src/views/charts/Panel.vue b/src/views/charts/Panel.vue index 7bae66d5..e2d278df 100644 --- a/src/views/charts/Panel.vue +++ b/src/views/charts/Panel.vue @@ -114,6 +114,7 @@ export default { }, recursionParamsConvert (chart) { chart.params = chart.params ? JSON.parse(chart.params) : {} + chart.firstShow = false if (chart.type === 94) { chart.oldH = chart.h /* chart.params = { diff --git a/src/views/charts/PanelChartList.vue b/src/views/charts/PanelChartList.vue index 8e0f7787..fcf88881 100644 --- a/src/views/charts/PanelChartList.vue +++ b/src/views/charts/PanelChartList.vue @@ -134,7 +134,6 @@ export default { this.emitter.emit('groupParentCalcHeight', { chart, childrenList: this.copyDataList }) }, groupParentCalcHeight (chart, childrenList) { - // console.log(chart, childrenList) setTimeout(() => { const parent = this.copyDataList.find(chartitem => chartitem.id === chart.parent.id) const children = parent.children.find(item => item.id === chart.id) @@ -192,6 +191,26 @@ export default { setTimeout(() => { this.gridLayoutShow = true }) + setTimeout(() => { + this.copyDataList.forEach(item => { + // if (item.type === 95) { + // console.log(item.h, item.name) + // item.children.forEach(children => { + // console.log(children.name, children.h, children.y) + // }) + // let parentH = 1.5 + // parentH += getGroupHeight(item.children) + // if (parentH !== item.h) { + // item.h = parentH + // } + // } + if (item.type === 94 && !item.firstShow) { + item.firstShow = true + this.copyDataList = [...this.copyDataList] + this.emitter.emit('groupParentCalcHeight', { chart: item, childrenList: this.copyDataList }) + } + }) + }, 200) this.gridLayoutLoading = false }) }