fix: 修复左侧tree重命名右侧更新不及时的问题

This commit is contained in:
junjie 2022-01-12 11:26:29 +08:00
parent 95186bd330
commit ee917eeab3
4 changed files with 19 additions and 14 deletions

View File

@ -16,6 +16,7 @@ const getters = {
errorLogs: state => state.errorLog.logs, errorLogs: state => state.errorLog.logs,
sceneData: state => state.dataset.sceneData, sceneData: state => state.dataset.sceneData,
table: state => state.dataset.table, table: state => state.dataset.table,
chartTable: state => state.chart.table,
hideCustomDs: state => state.dataset.hideCustomDs, hideCustomDs: state => state.dataset.hideCustomDs,
loadingMap: state => state.request.loadingMap, loadingMap: state => state.request.loadingMap,
currentPath: state => state.permission.currentPath, currentPath: state => state.permission.currentPath,

View File

@ -558,7 +558,7 @@ export default {
showClose: true showClose: true
}) })
this.treeNode() this.treeNode()
this.$store.dispatch('chart/setTable', null) this.$store.dispatch('chart/setTable', new Date().getTime())
}) })
} else { } else {
// this.$message({ // this.$message({

View File

@ -1,6 +1,7 @@
<template> <template>
<el-row v-loading="loading" style="height: 100%;overflow-y: hidden;width: 100%;"> <el-row v-loading="loading" style="height: 100%;overflow-y: hidden;width: 100%;">
<el-row style="height: 40px;" class="padding-lr"> <el-row style="height: 40px;" class="padding-lr">
<span v-show="false">{{ refreshPage }}</span>
<span class="title-text" style="line-height: 40px;">{{ view.name }}</span> <span class="title-text" style="line-height: 40px;">{{ view.name }}</span>
<el-popover <el-popover
placement="right-start" placement="right-start"
@ -1105,11 +1106,10 @@ export default {
} }
}, },
computed: { computed: {
// vId() { refreshPage: function() {
// // console.log(this.$store.state.chart.viewId); this.getChart(this.param.id)
// this.getData(this.$store.state.chart.viewId) return this.$store.getters.chartTable
// return this.$store.state.chart.viewId },
// }
chartType() { chartType() {
return this.chart.type return this.chart.type
} }

View File

@ -1,6 +1,6 @@
<template> <template>
<el-row style="height: 100%;overflow-y: hidden;width: 100%;"> <el-row style="height: 100%;overflow-y: hidden;width: 100%;">
<!-- <span v-show="false">{{ tableRefresh }}</span>--> <span v-show="false">{{ refreshPage }}</span>
<el-row style="height: 26px;"> <el-row style="height: 26px;">
<span class="title-text" style="line-height: 26px;"> <span class="title-text" style="line-height: 26px;">
{{ table.name }} {{ table.name }}
@ -102,14 +102,13 @@ export default {
isPluginLoaded: false isPluginLoaded: false
} }
}, },
beforeCreate() {
pluginLoaded().then(res => {
this.isPluginLoaded = res.success && res.data
})
},
computed: { computed: {
hideCustomDs: function() { hideCustomDs: function() {
return this.$store.getters.hideCustomDs return this.$store.getters.hideCustomDs
},
refreshPage: function() {
this.initTable(this.param.id)
return this.$store.getters.table
} }
}, },
watch: { watch: {
@ -118,6 +117,11 @@ export default {
this.initTable(this.param.id) this.initTable(this.param.id)
} }
}, },
beforeCreate() {
pluginLoaded().then(res => {
this.isPluginLoaded = res.success && res.data
})
},
created() { created() {
}, },