|
|
@ -37,6 +37,8 @@ export default {
|
|
|
|
state.activeItemConfig = _.cloneDeep(activeItem)
|
|
|
|
state.activeItemConfig = _.cloneDeep(activeItem)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
changeActiveCodes (state, codes) {
|
|
|
|
changeActiveCodes (state, codes) {
|
|
|
|
|
|
|
|
// 传入codes,将codes中的组件的group改为tempGroup,不传入或者传入空数组,将所有组件的group改为'',即取消组合
|
|
|
|
|
|
|
|
if (codes.length !== 0) {
|
|
|
|
state.activeCodes = codes
|
|
|
|
state.activeCodes = codes
|
|
|
|
state.pageInfo.chartList = state.pageInfo.chartList?.map(chart => {
|
|
|
|
state.pageInfo.chartList = state.pageInfo.chartList?.map(chart => {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
@ -44,6 +46,15 @@ export default {
|
|
|
|
group: (codes.includes(chart.code) && !chart.group) ? 'tempGroup' : chart.group
|
|
|
|
group: (codes.includes(chart.code) && !chart.group) ? 'tempGroup' : chart.group
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
state.activeCodes = codes
|
|
|
|
|
|
|
|
state.pageInfo.chartList = state.pageInfo.chartList?.map(chart => {
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
...chart,
|
|
|
|
|
|
|
|
group: ''
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 改变当前hover组件id
|
|
|
|
// 改变当前hover组件id
|
|
|
|
changeHoverCode (state, code) {
|
|
|
|
changeHoverCode (state, code) {
|
|
|
|