refactor:优化下钻,联动弹出窗口

This commit is contained in:
wangjiahao 2021-08-13 15:45:43 +08:00
parent af5af6411a
commit 7f2daa04df
2 changed files with 12 additions and 0 deletions

View File

@ -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)
})
},

View File

@ -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))