refactor:优化下钻,联动弹出窗口
This commit is contained in:
parent
af5af6411a
commit
7f2daa04df
@ -7,6 +7,8 @@
|
||||
import Preview from './Preview'
|
||||
import { uuid } from 'vue-uuid'
|
||||
import { findOne } from '@/api/panel/panel'
|
||||
import { getPanelAllLinkageInfo } from '@/api/panel/linkage'
|
||||
|
||||
|
||||
export default {
|
||||
components: { Preview },
|
||||
@ -24,6 +26,10 @@ export default {
|
||||
id: response.data.id,
|
||||
name: response.data.name
|
||||
}
|
||||
// 刷新联动信息
|
||||
getPanelAllLinkageInfo(this.panelId).then(rsp => {
|
||||
this.$store.commit('setNowPanelTrackInfo', rsp.data)
|
||||
})
|
||||
this.$store.dispatch('panel/setPanelInfo', data)
|
||||
})
|
||||
},
|
||||
|
||||
@ -8,6 +8,8 @@
|
||||
import { loadResource } from '@/api/link'
|
||||
import { uuid } from 'vue-uuid'
|
||||
import Preview from '@/components/canvas/components/Editor/Preview'
|
||||
import { getPanelAllLinkageInfo } from '@/api/panel/linkage'
|
||||
|
||||
export default {
|
||||
name: 'LinkView',
|
||||
components: { Preview },
|
||||
@ -29,6 +31,10 @@ export default {
|
||||
methods: {
|
||||
setPanelInfo() {
|
||||
loadResource(this.resourceId).then(res => {
|
||||
// 刷新联动信息
|
||||
getPanelAllLinkageInfo(this.resourceId).then(rsp => {
|
||||
this.$store.commit('setNowPanelTrackInfo', rsp.data)
|
||||
})
|
||||
this.$store.commit('setComponentData', this.resetID(JSON.parse(res.data.panelData)))
|
||||
// this.$store.commit('setComponentData', JSON.parse(res.data.panelData))
|
||||
this.$store.commit('setCanvasStyle', JSON.parse(res.data.panelStyle))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user