From 6f6d6e03aa377396c7c876ea9ed7090069e9ceab Mon Sep 17 00:00:00 2001 From: zhangyu Date: Mon, 14 Feb 2022 17:48:13 +0800 Subject: [PATCH] =?UTF-8?q?NEZ-1509=20fix=EF=BC=9A=20Main=E5=9B=BE?= =?UTF-8?q?=E8=A1=A8=E9=94=81=E5=AE=9A=E5=90=8EGroup=E4=B8=8B=E7=9A=84?= =?UTF-8?q?=E5=9B=BE=E8=A1=A8=E4=BE=9D=E7=84=B6=E5=8F=AF=E4=BB=A5=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/components/chart/chartList.vue | 9 +++++++-- nezha-fronted/src/components/page/dashboard/panel.vue | 7 ++++--- nezha-fronted/src/store/panel.js | 10 ++++++++++ 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/nezha-fronted/src/components/chart/chartList.vue b/nezha-fronted/src/components/chart/chartList.vue index ad23a09eb..7112ffa7f 100644 --- a/nezha-fronted/src/components/chart/chartList.vue +++ b/nezha-fronted/src/components/chart/chartList.vue @@ -100,8 +100,7 @@ export default { panelId: {}, chartDetailInfo: Object, timeRange: Array, // 时间范围 - panelLock: { type: Boolean, default: true }, - isGroup: { type: Boolean, default: false }, + isGroup: Boolean, groupInfo: {}, from: String, dataList: Array // 看板中所有图表信息 @@ -123,6 +122,9 @@ export default { }, layoutMargintop () { return this.isGroup ? '0' : (this.dataList.length ? (-1 * (this.stepWidth + 14) + 'px') : '0') + }, + panelLock () { + return this.$store.getters.getPanelLock } }, data () { @@ -333,6 +335,9 @@ export default { this.$store.commit('setChartListId', `chartList${this.timestamp}`) } }, + beforeDestroy () { + this.$store.dispatch('dispatchPanelLock', { flag: true }) + }, watch: { dataList: { deep: true, diff --git a/nezha-fronted/src/components/page/dashboard/panel.vue b/nezha-fronted/src/components/page/dashboard/panel.vue index 55b45ecf6..217503faa 100644 --- a/nezha-fronted/src/components/page/dashboard/panel.vue +++ b/nezha-fronted/src/components/page/dashboard/panel.vue @@ -64,7 +64,7 @@ >