fix:修改panel lock 刷新就panel 就重置的问题

This commit is contained in:
zhangyu
2022-03-11 10:45:19 +08:00
parent b0c23d1f03
commit 5a478fbffe
4 changed files with 7 additions and 5 deletions

View File

@@ -151,8 +151,8 @@ export default {
this.tooltip.show = false this.tooltip.show = false
}, },
getLayout () { getLayout () {
this.boxWidth = this.$refs['chart-stat-box'].offsetWidth - 2 * this.boxPadding this.boxWidth = this.$refs['chart-stat-box'].offsetWidth - 3 * this.boxPadding
this.boxHeight = this.$refs['chart-stat-box'].offsetHeight - 2 * this.boxPadding this.boxHeight = this.$refs['chart-stat-box'].offsetHeight - 3 * this.boxPadding
return new Promise(resolve => { return new Promise(resolve => {
let rateMax = 0 let rateMax = 0
let col = 0 let col = 0

View File

@@ -347,9 +347,6 @@ export default {
this.$store.commit('setChartListId', `chartList${this.timestamp}`) this.$store.commit('setChartListId', `chartList${this.timestamp}`)
} }
}, },
beforeDestroy () {
this.$store.dispatch('dispatchPanelLock', { flag: true })
},
watch: { watch: {
dataList: { dataList: {
deep: true, deep: true,

View File

@@ -778,6 +778,7 @@ export default {
document.querySelector('#tableList') && document.querySelector('#tableList').removeEventListener('mouseenter', this.tableListEnter) document.querySelector('#tableList') && document.querySelector('#tableList').removeEventListener('mouseenter', this.tableListEnter)
document.querySelector('#tableList') && document.querySelector('#tableList').removeEventListener('mouseleave', this.tableListLeave) document.querySelector('#tableList') && document.querySelector('#tableList').removeEventListener('mouseleave', this.tableListLeave)
this.scrollbarWrap && this.scrollbarWrap.removeEventListener('scroll', bus.debounce) this.scrollbarWrap && this.scrollbarWrap.removeEventListener('scroll', bus.debounce)
this.$store.dispatch('dispatchPanelLock', { flag: true })
} }
} }
</script> </script>

View File

@@ -527,6 +527,7 @@ export default {
createSuccess (msg, data, params, panel) { createSuccess (msg, data, params, panel) {
this.filter.panelId = this.showPanel.id this.filter.panelId = this.showPanel.id
this.getData(this.filter) this.getData(this.filter)
this.$store.dispatch('clearPanel')
}, },
// 获取数据,用在子页面 // 获取数据,用在子页面
getData (params) { getData (params) {
@@ -866,6 +867,9 @@ export default {
}, 100) }, 100)
} }
}, },
beforeDestroy () {
this.$store.dispatch('dispatchPanelLock', { flag: true })
},
watch: { watch: {
'filter.searchName': function (n, o) { 'filter.searchName': function (n, o) {
const temp = this const temp = this