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 cfd3150c5d..8c9391a3b4 100644
--- a/core/core-frontend/src/custom-component/v-query/ConditionDefaultConfiguration.vue
+++ b/core/core-frontend/src/custom-component/v-query/ConditionDefaultConfiguration.vue
@@ -225,6 +225,10 @@ const relativeToCurrentListRange = computed(() => {
{
label: t('v_query.last_12_months'),
value: 'LastTwelveMonths'
+ },
+ {
+ label: t('common.to_this_month'),
+ value: 'YearToThisMonth'
}
]
break
@@ -272,8 +276,8 @@ const relativeToCurrentListRange = computed(() => {
})
const defaultValueFirstItemShow = computed(() => {
- const { displayType, optionValueSource, multiple } = curComponent.value
- return +displayType === 0 && optionValueSource === 1 && !multiple
+ const { displayType, optionValueSource } = curComponent.value
+ return +displayType === 0 && optionValueSource === 1
})
const aroundList = [
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 93d5539335..d4f8768743 100644
--- a/core/core-frontend/src/custom-component/v-query/FilterTime.vue
+++ b/core/core-frontend/src/custom-component/v-query/FilterTime.vue
@@ -213,6 +213,10 @@ const relativeToCurrentListRange = computed(() => {
{
label: t('v_query.last_12_months'),
value: 'LastTwelveMonths'
+ },
+ {
+ label: t('common.to_this_month'),
+ value: 'YearToThisMonth'
}
]
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 cd0a46d97e..ef3ac9d7a9 100644
--- a/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue
+++ b/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue
@@ -2165,6 +2165,10 @@ const relativeToCurrentListRange = computed(() => {
{
label: t('v_query.last_12_months'),
value: 'LastTwelveMonths'
+ },
+ {
+ label: t('common.to_this_month'),
+ value: 'YearToThisMonth'
}
]
break
@@ -2957,8 +2961,17 @@ defineExpose({
{{ t('v_query.of_option_values') }}
-
- {{ t('login.default_login') }}
+
+ {{ t('login.default_login') }}
+
+
+
+
+
{{ t('chart.result_mode_all') }}
@@ -3422,8 +3435,16 @@ defineExpose({
{{ t('v_query.of_option_values') }}
-
- {{ t('chart.default') }}
+
+ {{ t('chart.default') }}
+
+
+
+
{{ t('data_set.all') }}
@@ -4189,6 +4210,12 @@ defineExpose({
}
}
.larger-radio {
+ &.icon-info {
+ .ed-radio__label {
+ display: flex;
+ align-items: center;
+ }
+ }
.ed-radio__inner {
width: 16px;
height: 16px;
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 a4558cf4c8..c641620919 100644
--- a/core/core-frontend/src/custom-component/v-query/RangeFilterTime.vue
+++ b/core/core-frontend/src/custom-component/v-query/RangeFilterTime.vue
@@ -224,6 +224,10 @@ const relativeToCurrentListRange = computed(() => {
{
label: t('v_query.last_12_months'),
value: 'LastTwelveMonths'
+ },
+ {
+ label: t('common.to_this_month'),
+ value: 'YearToThisMonth'
}
]
break
diff --git a/core/core-frontend/src/custom-component/v-query/Select.vue b/core/core-frontend/src/custom-component/v-query/Select.vue
index 05ed63d72a..45ca0119b7 100644
--- a/core/core-frontend/src/custom-component/v-query/Select.vue
+++ b/core/core-frontend/src/custom-component/v-query/Select.vue
@@ -107,8 +107,8 @@ const cascade = computed(() => {
})
let time
const disabledFirstItem = computed(() => {
- const { defaultValueFirstItem, optionValueSource, multiple } = props.config
- return defaultValueFirstItem && optionValueSource === 1 && !multiple
+ const { defaultValueFirstItem, optionValueSource } = props.config
+ return defaultValueFirstItem && optionValueSource === 1
})
const setDefaultMapValue = arr => {
const { displayId, field } = config.value
@@ -402,7 +402,7 @@ watch(
const setDefaultValueFirstItem = () => {
if (!options.value.length) return
- selectValue.value = options.value[0].value
+ selectValue.value = config.value.multiple ? [options.value[0].value] : options.value[0].value
const value = Array.isArray(selectValue.value) ? [...selectValue.value] : selectValue.value
if (!props.isConfig) {
config.value.selectValue = Array.isArray(selectValue.value)
@@ -497,13 +497,15 @@ watch(
if (!props.isConfig) return
if (val) {
selectValue.value = []
+ setDefaultValueFirstItem()
}
nextTick(() => {
multiple.value = val
- config.value.defaultValueFirstItem = false
if (!val) {
nextTick(() => {
selectValue.value = undefined
+ if (!config.value.defaultValueFirstItem) return
+ setDefaultValueFirstItem()
})
}
})
@@ -762,6 +764,7 @@ defineExpose({
show-checked
:tagColor="tagColor"
scrollbar-always-on
+ :disabled="disabledFirstItem && props.isConfig"
clearable
:style="selectStyle"
collapse-tags
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 0cd1514a79..68fc493bef 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
@@ -68,6 +68,8 @@ function getCustomRange(relativeToCurrentRange: string): [Date, Date] {
new Date(dayjs().subtract(12, 'month').startOf('month').format('YYYY/MM/DD HH:mm:ss')),
getThisEnd('day')
]
+ case 'YearToThisMonth':
+ return [new Date(dayjs().startOf('year').format('YYYY/MM/DD HH:mm:ss')), getThisEnd('month')]
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 5bdd7aa906..35a5eb343d 100644
--- a/core/core-frontend/src/locales/en.ts
+++ b/core/core-frontend/src/locales/en.ts
@@ -1,5 +1,7 @@
export default {
common: {
+ to_this_month: 'From the beginning of the year to this month',
+ up_to_options: 'Display up to 1000 options',
next_week: 'Next week',
next_month: 'Next month',
next_quarter: 'Next quarter',
diff --git a/core/core-frontend/src/locales/tw.ts b/core/core-frontend/src/locales/tw.ts
index 47465d8282..0d2c8c4c39 100644
--- a/core/core-frontend/src/locales/tw.ts
+++ b/core/core-frontend/src/locales/tw.ts
@@ -1,5 +1,7 @@
export default {
common: {
+ to_this_month: '年初至本月',
+ up_to_options: '最多展示1000個選項',
next_week: '下週',
next_month: '下個月',
next_quarter: '下季',
diff --git a/core/core-frontend/src/locales/zh-CN.ts b/core/core-frontend/src/locales/zh-CN.ts
index 62e3180752..a43d3cd0d7 100644
--- a/core/core-frontend/src/locales/zh-CN.ts
+++ b/core/core-frontend/src/locales/zh-CN.ts
@@ -1,5 +1,7 @@
export default {
common: {
+ to_this_month: '年初至本月',
+ up_to_options: '最多展示1000个选项',
next_week: '下周',
next_month: '下月',
next_quarter: '下季',