Merge branch 'dev-3.7' of https://git.mesalab.cn/nezha/nezha-fronted into dev-3.8

This commit is contained in:
zhangyu
2023-07-24 15:46:37 +08:00
2 changed files with 11 additions and 0 deletions

View File

@@ -794,6 +794,12 @@ export default {
item.span = 12
item.height = 2
}
if (item.type === 'group') {
const chartGroupExpand = localStorage.getItem('nz-chart-group-expand') ? JSON.parse(localStorage.getItem('nz-chart-group-expand')) : {}
if (typeof chartGroupExpand[item.id] !== 'undefined') {
item.param.collapse = chartGroupExpand[item.id]
}
}
if (item.param) {
param = JSON.parse(JSON.stringify(item.param))
// try {

View File

@@ -762,6 +762,11 @@ export default {
this.chartInfo.param = {}
}
this.chartInfo.param.collapse = flag
const chartGroupExpand = localStorage.getItem('nz-chart-group-expand') ? JSON.parse(localStorage.getItem('nz-chart-group-expand')) : {}
if (this.chartInfo.id && this.chartInfo.id > 0) {
chartGroupExpand[this.chartInfo.id] = this.chartInfo.param.collapse
localStorage.setItem('nz-chart-group-expand', JSON.stringify(chartGroupExpand))
}
this.groupInit()
bus.$emit('groupMove', '', '', true)
this.$emit('groupShow', this.chartInfo)