From 75b2b77a40a4d4fb03bf1af8ea3da2594d3aa21d Mon Sep 17 00:00:00 2001 From: junjun Date: Wed, 2 Mar 2022 14:58:19 +0800 Subject: [PATCH 1/2] =?UTF-8?q?refactor:=20=E8=A7=86=E5=9B=BE=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E5=A2=9E=E5=8A=A0=E5=85=B3=E9=97=AD=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/chart/view/ChartEdit.vue | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/chart/view/ChartEdit.vue b/frontend/src/views/chart/view/ChartEdit.vue index 5b59684eff..84f8c778c6 100644 --- a/frontend/src/views/chart/view/ChartEdit.vue +++ b/frontend/src/views/chart/view/ChartEdit.vue @@ -13,6 +13,9 @@ + + {{ $t('chart.close') }} + {{ $t('chart.recover') }} @@ -1246,7 +1249,8 @@ export default { this.table = response.data this.initTableField(id) }).catch(err => { - this.resetView() + this.table = null + this.resetDatasetField() this.httpRequest.status = err.response.data.success this.httpRequest.msg = err.response.data.message return true @@ -1525,6 +1529,14 @@ export default { this.$success(this.$t('commons.save_success')) }) }, + close() { + this.closeChangeChart() + // 从仪表板入口关闭 + if (this.$route.path.indexOf('panel') > -1) { + this.$store.commit('recordSnapshot') + bus.$emit('PanelSwitchComponent', { name: 'PanelEdit' }) + } + }, getData(id) { this.hasEdit = false if (id) { From 7d69d3da92c7c189c0044e816318f733c5b48d3c Mon Sep 17 00:00:00 2001 From: junjun Date: Wed, 2 Mar 2022 15:40:57 +0800 Subject: [PATCH 2/2] =?UTF-8?q?refactor:=20=E6=8A=98=E7=BA=BF=E5=9B=BE?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/chart/chart/common/common_antv.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/chart/chart/common/common_antv.js b/frontend/src/views/chart/chart/common/common_antv.js index 4175a70bf1..331a3e45dc 100644 --- a/frontend/src/views/chart/chart/common/common_antv.js +++ b/frontend/src/views/chart/chart/common/common_antv.js @@ -112,7 +112,13 @@ export function getLabel(chart) { if (l.show) { if (chart.type === 'pie') { label = { - type: l.position + type: l.position, + autoRotate: false + } + } else if (chart.type.includes('line')) { + label = { + position: l.position, + offsetY: -8 } } else { label = {