fix: 分享仪表板联动信息失效问题

This commit is contained in:
wangjiahao 2022-01-20 18:31:40 +08:00
parent 57d948b613
commit 29080e0b89
2 changed files with 28 additions and 1 deletions

View File

@ -52,6 +52,8 @@ import { loadTree, loadShareOutTree, removeShares } from '@/api/panel/share'
import { uuid } from 'vue-uuid'
import { get } from '@/api/panel/panel'
import bus from '@/utils/bus'
import { getPanelAllLinkageInfo } from '@/api/panel/linkage'
import { queryPanelJumpInfo } from '@/api/panel/linkJump'
export default {
name: 'ShareTree',
props: {
@ -106,8 +108,15 @@ export default {
get('panel/group/findOne/' + data.id).then(response => {
this.$store.commit('setComponentData', this.resetID(JSON.parse(response.data.panelData)))
this.$store.commit('setCanvasStyle', JSON.parse(response.data.panelStyle))
this.$store.dispatch('panel/setPanelInfo', data)
//
getPanelAllLinkageInfo(data.id).then(rsp => {
this.$store.commit('setNowPanelTrackInfo', rsp.data)
})
//
queryPanelJumpInfo(data.id).then(rsp => {
this.$store.commit('setNowPanelJumpInfo', rsp.data)
})
bus.$emit('set-panel-show-type', 1)
})
this.$refs['botTree'].setCurrentKey(null)
@ -118,6 +127,14 @@ export default {
this.$store.commit('setCanvasStyle', JSON.parse(response.data.panelStyle))
this.$store.dispatch('panel/setPanelInfo', data)
//
getPanelAllLinkageInfo(data.id).then(rsp => {
this.$store.commit('setNowPanelTrackInfo', rsp.data)
})
//
queryPanelJumpInfo(data.id).then(rsp => {
this.$store.commit('setNowPanelJumpInfo', rsp.data)
})
bus.$emit('set-panel-show-type', 2)
})
this.$refs['topTree'].setCurrentKey(null)

View File

@ -29,6 +29,8 @@ import { deleteEnshrine, enshrineList } from '@/api/panel/enshrine'
import { uuid } from 'vue-uuid'
import { get } from '@/api/panel/panel'
import bus from '@/utils/bus'
import { getPanelAllLinkageInfo } from '@/api/panel/linkage'
import { queryPanelJumpInfo } from '@/api/panel/linkJump'
export default {
name: 'Enshrine',
data() {
@ -55,6 +57,14 @@ export default {
name: row.name
}
this.$store.dispatch('panel/setPanelInfo', data)
//
getPanelAllLinkageInfo(data.id).then(rsp => {
this.$store.commit('setNowPanelTrackInfo', rsp.data)
})
//
queryPanelJumpInfo(data.id).then(rsp => {
this.$store.commit('setNowPanelJumpInfo', rsp.data)
})
bus.$emit('set-panel-show-type', 0)
})
},