From e05ade7babd5003c5fac5ee52dd55d0798d152a3 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Mon, 20 Oct 2025 14:09:58 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=9F=A5=E8=AF=A2=E7=BB=84=E4=BB=B6):=20?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E8=8C=83=E5=9B=B4=E7=B1=BB=E5=9E=8B=E7=9A=84?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E7=BB=84=E4=BB=B6=E6=94=AF=E6=8C=81=E6=9C=88?= =?UTF-8?q?=E5=88=9D=E8=87=B3=E6=98=A8=E5=A4=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../v-query/ConditionDefaultConfiguration.vue | 4 ++++ .../core-frontend/src/custom-component/v-query/FilterTime.vue | 4 ++++ .../custom-component/v-query/QueryConditionConfiguration.vue | 4 ++++ .../src/custom-component/v-query/RangeFilterTime.vue | 4 ++++ .../src/custom-component/v-query/time-format-dayjs.ts | 2 ++ core/core-frontend/src/locales/en.ts | 1 + core/core-frontend/src/locales/tw.ts | 1 + core/core-frontend/src/locales/zh-CN.ts | 1 + 8 files changed, 21 insertions(+) diff --git a/core/core-frontend/src/custom-component/v-query/ConditionDefaultConfiguration.vue b/core/core-frontend/src/custom-component/v-query/ConditionDefaultConfiguration.vue index 8c9391a3b4..500dce25f9 100644 --- a/core/core-frontend/src/custom-component/v-query/ConditionDefaultConfiguration.vue +++ b/core/core-frontend/src/custom-component/v-query/ConditionDefaultConfiguration.vue @@ -258,6 +258,10 @@ const relativeToCurrentListRange = computed(() => { { label: t('v_query.year_to_date'), value: 'yearBeginning' + }, + { + label: t('common.month_to_yesterday'), + value: 'monthToYesterday' } ] break diff --git a/core/core-frontend/src/custom-component/v-query/FilterTime.vue b/core/core-frontend/src/custom-component/v-query/FilterTime.vue index d4f8768743..da52e556be 100644 --- a/core/core-frontend/src/custom-component/v-query/FilterTime.vue +++ b/core/core-frontend/src/custom-component/v-query/FilterTime.vue @@ -242,6 +242,10 @@ const relativeToCurrentListRange = computed(() => { { label: t('v_query.year_to_date'), value: 'yearBeginning' + }, + { + label: t('common.month_to_yesterday'), + value: 'monthToYesterday' } ] break diff --git a/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue b/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue index ef3ac9d7a9..efb807228b 100644 --- a/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue +++ b/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue @@ -2194,6 +2194,10 @@ const relativeToCurrentListRange = computed(() => { { label: t('v_query.year_to_date'), value: 'yearBeginning' + }, + { + label: t('common.month_to_yesterday'), + value: 'monthToYesterday' } ] break diff --git a/core/core-frontend/src/custom-component/v-query/RangeFilterTime.vue b/core/core-frontend/src/custom-component/v-query/RangeFilterTime.vue index c641620919..817a3a757b 100644 --- a/core/core-frontend/src/custom-component/v-query/RangeFilterTime.vue +++ b/core/core-frontend/src/custom-component/v-query/RangeFilterTime.vue @@ -253,6 +253,10 @@ const relativeToCurrentListRange = computed(() => { { label: t('v_query.year_to_date'), value: 'yearBeginning' + }, + { + label: t('common.month_to_yesterday'), + value: 'monthToYesterday' } ] break diff --git a/core/core-frontend/src/custom-component/v-query/time-format-dayjs.ts b/core/core-frontend/src/custom-component/v-query/time-format-dayjs.ts index 68fc493bef..a0c60ff2a8 100644 --- a/core/core-frontend/src/custom-component/v-query/time-format-dayjs.ts +++ b/core/core-frontend/src/custom-component/v-query/time-format-dayjs.ts @@ -70,6 +70,8 @@ function getCustomRange(relativeToCurrentRange: string): [Date, Date] { ] case 'YearToThisMonth': return [new Date(dayjs().startOf('year').format('YYYY/MM/DD HH:mm:ss')), getThisEnd('month')] + case 'monthToYesterday': + return [new Date(dayjs().startOf('month').format('YYYY/MM/DD HH:mm:ss')), getLastEnd('day')] case 'today': return [getThisStart('day'), getThisEnd('day')] case 'yesterday': diff --git a/core/core-frontend/src/locales/en.ts b/core/core-frontend/src/locales/en.ts index 473b8c111c..3e24c47a18 100644 --- a/core/core-frontend/src/locales/en.ts +++ b/core/core-frontend/src/locales/en.ts @@ -1,5 +1,6 @@ export default { common: { + month_to_yesterday: 'From the beginning of the month to yesterday', to_this_month: 'From the beginning of the year to this month', up_to_options: 'Display up to 1000 options', next_week: 'Next week', diff --git a/core/core-frontend/src/locales/tw.ts b/core/core-frontend/src/locales/tw.ts index c8440b6283..5d5f6066f8 100644 --- a/core/core-frontend/src/locales/tw.ts +++ b/core/core-frontend/src/locales/tw.ts @@ -1,5 +1,6 @@ export default { common: { + month_to_yesterday: '月初至昨天', to_this_month: '年初至本月', up_to_options: '最多展示1000個選項', next_week: '下週', diff --git a/core/core-frontend/src/locales/zh-CN.ts b/core/core-frontend/src/locales/zh-CN.ts index 01c9d3313e..2c38bd7c2e 100644 --- a/core/core-frontend/src/locales/zh-CN.ts +++ b/core/core-frontend/src/locales/zh-CN.ts @@ -1,5 +1,6 @@ export default { common: { + month_to_yesterday: '月初至昨天', to_this_month: '年初至本月', up_to_options: '最多展示1000个选项', next_week: '下周',