From 716812266a1b490944148019452b40bc1d018620 Mon Sep 17 00:00:00 2001 From: jianneng-fit2cloud Date: Tue, 3 Feb 2026 18:08:00 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E5=9B=BE=E8=A1=A8):=20=E8=A1=A8=E6=A0=BC?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E6=A0=B7=E5=BC=8F=E4=B8=AD=EF=BC=8C=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E7=9A=84=E6=98=AF=E6=97=B6=E9=97=B4=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E7=9A=84=E5=AD=97=E6=AE=B5=E6=97=B6=EF=BC=8C=E5=9B=BA=E5=AE=9A?= =?UTF-8?q?=E5=80=BC=E4=BC=98=E5=8C=96=E6=88=90=E6=97=A5=E6=9C=9F=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E9=80=89=E6=8B=A9=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/dialog/TableThresholdEdit.vue | 25 +++++++ .../components/editor/util/DateFormatUtil.ts | 67 +++++++++++++++++++ 2 files changed, 92 insertions(+) create mode 100644 core/core-frontend/src/views/chart/components/editor/util/DateFormatUtil.ts diff --git a/core/core-frontend/src/views/chart/components/editor/editor-senior/components/dialog/TableThresholdEdit.vue b/core/core-frontend/src/views/chart/components/editor/editor-senior/components/dialog/TableThresholdEdit.vue index 63125c9ad6..0f2fc8282a 100644 --- a/core/core-frontend/src/views/chart/components/editor/editor-senior/components/dialog/TableThresholdEdit.vue +++ b/core/core-frontend/src/views/chart/components/editor/editor-senior/components/dialog/TableThresholdEdit.vue @@ -8,6 +8,10 @@ import { COLOR_PANEL } from '../../../util/chart' import { fieldType } from '@/utils/attr' import { iconFieldMap } from '@/components/icon-group/field-list' import { cloneDeep } from 'lodash-es' +import { + transDateFormat, + transDatePickerType +} from '@/views/chart/components/editor/util/DateFormatUtil' const { t } = useI18n() @@ -403,6 +407,14 @@ const getFieldOptions = () => { return fieldOptions } +const datePickerFormat = (fieldItem: { dateStyle: any; datePattern: any }) => { + return transDateFormat(fieldItem.dateStyle, fieldItem.datePattern) +} + +const datePickerType = (fieldItem: { dateStyle: string }) => { + return transDatePickerType(fieldItem.dateStyle) +} + init() @@ -528,6 +540,19 @@ init() clearable @change="changeThreshold" /> + = { + y: 'year', + y_M: 'month', + y_M_d: 'date', + y_M_d_H: 'datetime', + y_M_d_H_m: 'datetime', + y_M_d_H_m_s: 'datetime' + } + return ( + < + | 'year' + | 'years' + | 'month' + | 'months' + | 'date' + | 'dates' + | 'datetime' + | 'week' + | 'datetimerange' + | 'daterange' + | 'monthrange' + | 'yearrange' + >map[dateStyle ?? ''] ?? 'datetime' + ) +}