feat(查询组件): 时间范围类型的查询组件支持月初至昨天

This commit is contained in:
dataeaseShu
2025-10-20 14:09:58 +08:00
committed by dataeaseShu
parent 5dffb00347
commit e05ade7bab
8 changed files with 21 additions and 0 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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':

View File

@@ -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',

View File

@@ -1,5 +1,6 @@
export default {
common: {
month_to_yesterday: '月初至昨天',
to_this_month: '年初至本月',
up_to_options: '最多展示1000個選項',
next_week: '下週',

View File

@@ -1,5 +1,6 @@
export default {
common: {
month_to_yesterday: '月初至昨天',
to_this_month: '年初至本月',
up_to_options: '最多展示1000个选项',
next_week: '下周',