mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 05:22:13 +08:00
feat(查询组件): 时间范围类型的查询组件支持月初至昨天
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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':
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
export default {
|
||||
common: {
|
||||
month_to_yesterday: '月初至昨天',
|
||||
to_this_month: '年初至本月',
|
||||
up_to_options: '最多展示1000個選項',
|
||||
next_week: '下週',
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
export default {
|
||||
common: {
|
||||
month_to_yesterday: '月初至昨天',
|
||||
to_this_month: '年初至本月',
|
||||
up_to_options: '最多展示1000个选项',
|
||||
next_week: '下周',
|
||||
|
||||
Reference in New Issue
Block a user