Merge pull request #575 from dataease/pr@dev@refactor_panel-linkage-more

refactor:优化仪表板多视图同时联动效果
This commit is contained in:
王嘉豪 2021-08-10 18:29:19 +08:00 committed by GitHub
commit 6794a33564
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -101,8 +101,9 @@ import { commonStyle, commonAttr } from '@/components/canvas/custom-component/co
import eventBus from '@/components/canvas/utils/eventBus'
import { deepCopy } from '@/components/canvas/utils/utils'
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 {
DEFAULT_COMMON_CANVAS_STYLE_STRING
} from '@/views/panel/panel'
@ -325,6 +326,10 @@ export default {
linkageInfo: this.targetLinkageInfo
}
saveLinkage(request).then(rsp => {
//
getPanelAllLinkageInfo(this.$store.state.panel.panelInfo.id).then(rsp => {
this.$store.commit('setNowPanelTrackInfo', rsp.data)
})
this.cancelLinkageSettingStatus()
})
},

View File

@ -161,7 +161,7 @@ const data = {
// 添加联动 下钻 等过滤组件
addViewTrackFilter(state, data) {
console.log('联动信息', JSON.stringify(data))
debugger
const viewId = data.viewId
const trackInfo = state.nowPanelTrackInfo
for (let index = 0; index < state.componentData.length; index++) {