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

This commit is contained in:
wangjiahao 2021-11-10 11:31:29 +08:00
parent 71365c4ba7
commit 12f73ef9a1

View File

@ -1,6 +1,6 @@
<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 = {