提交 21134b76 authored 作者: wangjiahao's avatar wangjiahao

fix:【仪表板】跳转至系统内仪表板时,出现先提示空白仪表板,再加载仪表板的情况

上级 93eb5931
<template>
<div class="bg">
<Preview />
<div v-loading="dataLoading" class="bg">
<Preview v-show="!dataLoading" />
</div>
</template>
<script>
......@@ -12,14 +12,21 @@ import { queryPanelJumpInfo, queryTargetPanelJumpInfo } from '@/api/panel/linkJu
export default {
components: { Preview },
data() {
return {
dataLoading: false
}
},
mounted() {
this.restore()
},
methods: {
restore() {
this.dataLoading = true
this.panelId = this.$route.path.split('/')[2]
// 加载视图数据
findOne(this.panelId).then(response => {
this.dataLoading = false
this.$store.commit('setComponentData', this.resetID(JSON.parse(response.data.panelData)))
this.$store.commit('setCanvasStyle', JSON.parse(response.data.panelStyle))
const data = {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论