From 00460ea0d2d25face88fad5da313002be7e968a4 Mon Sep 17 00:00:00 2001 From: junjun Date: Mon, 4 Mar 2024 18:24:25 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E8=A7=86=E5=9B=BE):=20=E6=97=A5?= =?UTF-8?q?=E6=9C=9F=E5=AD=97=E6=AE=B5=E4=B8=8B=E9=92=BB=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/frontend/src/views/chart/view/ChartEdit.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/frontend/src/views/chart/view/ChartEdit.vue b/core/frontend/src/views/chart/view/ChartEdit.vue index 4839ee1ae3..2405604eed 100644 --- a/core/frontend/src/views/chart/view/ChartEdit.vue +++ b/core/frontend/src/views/chart/view/ChartEdit.vue @@ -2689,6 +2689,14 @@ export default { view.type === 'table-pivot') { view.drillFields = [] } + view.drillFields.forEach(ele => { + if (!ele.dateStyle || ele.dateStyle === '') { + ele.dateStyle = 'y_M_d' + } + if (!ele.datePattern || ele.datePattern === '') { + ele.datePattern = 'date_sub' + } + }) this.chart = JSON.parse(JSON.stringify(view)) this.view = JSON.parse(JSON.stringify(view)) // stringify json param