forked from github/dataease
Merge pull request #575 from dataease/pr@dev@refactor_panel-linkage-more
refactor:优化仪表板多视图同时联动效果
This commit is contained in:
commit
6794a33564
@ -101,8 +101,9 @@ import { commonStyle, commonAttr } from '@/components/canvas/custom-component/co
|
|||||||
import eventBus from '@/components/canvas/utils/eventBus'
|
import eventBus from '@/components/canvas/utils/eventBus'
|
||||||
import { deepCopy } from '@/components/canvas/utils/utils'
|
import { deepCopy } from '@/components/canvas/utils/utils'
|
||||||
import { panelSave } from '@/api/panel/panel'
|
import { panelSave } from '@/api/panel/panel'
|
||||||
import { saveLinkage } from '@/api/panel/linkage'
|
import { saveLinkage, getPanelAllLinkageInfo } from '@/api/panel/linkage'
|
||||||
import bus from '@/utils/bus'
|
import bus from '@/utils/bus'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
DEFAULT_COMMON_CANVAS_STYLE_STRING
|
DEFAULT_COMMON_CANVAS_STYLE_STRING
|
||||||
} from '@/views/panel/panel'
|
} from '@/views/panel/panel'
|
||||||
@ -325,6 +326,10 @@ export default {
|
|||||||
linkageInfo: this.targetLinkageInfo
|
linkageInfo: this.targetLinkageInfo
|
||||||
}
|
}
|
||||||
saveLinkage(request).then(rsp => {
|
saveLinkage(request).then(rsp => {
|
||||||
|
// 刷新联动信息
|
||||||
|
getPanelAllLinkageInfo(this.$store.state.panel.panelInfo.id).then(rsp => {
|
||||||
|
this.$store.commit('setNowPanelTrackInfo', rsp.data)
|
||||||
|
})
|
||||||
this.cancelLinkageSettingStatus()
|
this.cancelLinkageSettingStatus()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -161,7 +161,7 @@ const data = {
|
|||||||
|
|
||||||
// 添加联动 下钻 等过滤组件
|
// 添加联动 下钻 等过滤组件
|
||||||
addViewTrackFilter(state, data) {
|
addViewTrackFilter(state, data) {
|
||||||
console.log('联动信息', JSON.stringify(data))
|
debugger
|
||||||
const viewId = data.viewId
|
const viewId = data.viewId
|
||||||
const trackInfo = state.nowPanelTrackInfo
|
const trackInfo = state.nowPanelTrackInfo
|
||||||
for (let index = 0; index < state.componentData.length; index++) {
|
for (let index = 0; index < state.componentData.length; index++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user