From 058fb82c0ca4558a68497015c6bab9857d1f5678 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Fri, 1 Nov 2024 18:14:07 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=9B=BD=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/custom-component/v-query/Attr.vue | 2 +- .../custom-component/v-query/Component.vue | 16 +- .../v-query/ConditionDefaultConfiguration.vue | 117 +++---- .../custom-component/v-query/QueryCascade.vue | 36 +- .../v-query/QueryConditionConfiguration.vue | 325 ++++++++++-------- .../v-query/RangeFilterTime.vue | 93 ++--- .../src/custom-component/v-query/Select.vue | 5 +- .../custom-component/v-query/TextSearch.vue | 10 +- .../src/custom-component/v-query/Time.vue | 10 +- .../v-query/TreeFieldDialog.vue | 28 +- .../src/custom-component/v-query/options.ts | 4 +- core/core-frontend/src/locales/zh-CN.ts | 91 +++++ core/core-frontend/src/views/mobile/index.vue | 2 + 13 files changed, 444 insertions(+), 295 deletions(-) diff --git a/core/core-frontend/src/custom-component/v-query/Attr.vue b/core/core-frontend/src/custom-component/v-query/Attr.vue index 9c749c43ae..56f5163725 100644 --- a/core/core-frontend/src/custom-component/v-query/Attr.vue +++ b/core/core-frontend/src/custom-component/v-query/Attr.vue @@ -11,7 +11,7 @@ const { curComponent } = storeToRefs(dvMainStore)
- 内容 + {{ $t('visualization.content') }}
diff --git a/core/core-frontend/src/custom-component/v-query/Component.vue b/core/core-frontend/src/custom-component/v-query/Component.vue index c762516597..dc3ca09f3b 100644 --- a/core/core-frontend/src/custom-component/v-query/Component.vue +++ b/core/core-frontend/src/custom-component/v-query/Component.vue @@ -296,7 +296,7 @@ const queryDataForId = id => { return pre }, []) if (!!requiredName) { - ElMessage.error(`【${requiredName}】查询条件是必填项,请设置选项值后,再进行查询!`) + ElMessage.error(`【${requiredName}】${t('v_query.before_querying')}`) return } if (!emitterList.length) return @@ -572,7 +572,7 @@ const queryData = () => { return pre }, []) if (!!requiredName) { - ElMessage.error(`【${requiredName}】查询条件是必填项,请设置选项值后,再进行查询!`) + ElMessage.error(`【${requiredName}】${t('v_query.before_querying')}`) return } if (!emitterList.length) return @@ -640,13 +640,13 @@ const autoStyle = computed(() => { >
- 将右侧的字段拖拽到这里 或 点击 + {{ t('v_query.here_or_click') }} - 添加查询条件 + {{ t('v_query.add_query_condition') }}
@@ -677,12 +677,16 @@ const autoStyle = computed(() => { class="label-wrapper-tooltip" v-if="showPosition !== 'preview' && !dvMainStore.mobileInPc" > - + - + { } return [ { - label: '年', + label: t('chart.chart'), value: 'year' }, { - label: '月', + label: t('dynamic_time.month'), value: 'month' }, { - label: '日', + label: t('dynamic_time.date'), value: 'date' } ].slice(0, index) @@ -90,11 +90,11 @@ const relativeToCurrentList = computed(() => { case 'year': list = [ { - label: '今年', + label: t('dynamic_year.current'), value: 'thisYear' }, { - label: '去年', + label: t('dynamic_year.last'), value: 'lastYear' } ] @@ -102,11 +102,11 @@ const relativeToCurrentList = computed(() => { case 'month': list = [ { - label: '本月', + label: t('cron.this_month'), value: 'thisMonth' }, { - label: '上月', + label: t('dynamic_month.last'), value: 'lastMonth' } ] @@ -114,19 +114,19 @@ const relativeToCurrentList = computed(() => { case 'date': list = [ { - label: '今天', + label: t('dynamic_time.today'), value: 'today' }, { - label: '昨天', + label: t('dynamic_time.yesterday'), value: 'yesterday' }, { - label: '月初', + label: t('dynamic_time.firstOfMonth'), value: 'monthBeginning' }, { - label: '年初', + label: t('dynamic_time.firstOfYear'), value: 'yearBeginning' } ] @@ -134,19 +134,19 @@ const relativeToCurrentList = computed(() => { case 'datetime': list = [ { - label: '今天', + label: t('dynamic_time.today'), value: 'today' }, { - label: '昨天', + label: t('dynamic_time.yesterday'), value: 'yesterday' }, { - label: '月初', + label: t('dynamic_time.firstOfMonth'), value: 'monthBeginning' }, { - label: '年初', + label: t('dynamic_time.firstOfYear'), value: 'yearBeginning' } ] @@ -159,7 +159,7 @@ const relativeToCurrentList = computed(() => { return [ ...list, { - label: '自定义', + label: t('dynamic_time.custom'), value: 'custom' } ] @@ -172,11 +172,11 @@ const relativeToCurrentListRange = computed(() => { case 'yearrange': list = [ { - label: '今年', + label: t('dynamic_year.current'), value: 'thisYear' }, { - label: '去年', + label: t('dynamic_year.last'), value: 'lastYear' } ] @@ -184,23 +184,23 @@ const relativeToCurrentListRange = computed(() => { case 'monthrange': list = [ { - label: '本月', + label: t('cron.this_month'), value: 'thisMonth' }, { - label: '上月', + label: t('dynamic_month.dynamic_month'), value: 'lastMonth' }, { - label: '最近 3 个 月', + label: t('v_query.last_3_months'), value: 'LastThreeMonths' }, { - label: '最近 6 个 月', + label: t('v_query.last_6_months'), value: 'LastSixMonths' }, { - label: '最近 12 个 月', + label: t('v_query.last_12_months'), value: 'LastTwelveMonths' } ] @@ -209,23 +209,23 @@ const relativeToCurrentListRange = computed(() => { case 'datetimerange': list = [ { - label: '今天', + label: t('dynamic_time.today'), value: 'today' }, { - label: '昨天', + label: t('dynamic_time.yesterday'), value: 'yesterday' }, { - label: '最近 3 天', + label: t('v_query.last_3_days'), value: 'LastThreeDays' }, { - label: '月初至今', + label: t('v_query.month_to_date'), value: 'monthBeginning' }, { - label: '年初至今', + label: t('v_query.year_to_date'), value: 'yearBeginning' } ] @@ -238,7 +238,7 @@ const relativeToCurrentListRange = computed(() => { return [ ...list, { - label: '自定义', + label: t('dynamic_time.custom'), value: 'custom' } ] @@ -246,11 +246,11 @@ const relativeToCurrentListRange = computed(() => { const aroundList = [ { - label: '前', + label: t('dynamic_time.before'), value: 'f' }, { - label: '后', + label: t('dynamic_time.after'), value: 'b' } ] @@ -262,11 +262,11 @@ const dynamicTime = computed(() => { const operators = [ { - label: '精确匹配', + label: t('v_query.exact_match'), value: 'eq' }, { - label: '模糊匹配', + label: t('v_query.fuzzy_match'), value: 'like' } ] @@ -320,18 +320,11 @@ defineExpose({ mult, single }) -const handleInputStart = value => { - curComponent.value.defaultNumValueStart = value.replace(/[^\d.]/g, '') -} - -const handleInputEnd = value => { - curComponent.value.defaultNumValueEnd = value.replace(/[^\d.]/g, '') -} { curComponent.timeRange.intervalType !== 'none' || curComponent.timeRange.dynamicWindow " class="config-flag range-filter-time-flag" - >已配置{{ t('v_query.configured') }} @@ -457,21 +455,24 @@ const handleInputEnd = value => {
- +
{ >
- 固定时间 - 动态时间 + {{ t('dynamic_time.fix') }} + {{ t('dynamic_time.dynamic') }}
{{ curComponent.checkedFieldsMapStartNum[field.componentId] === ele.id - ? '最小值' + ? t('chart.min') : curComponent.checkedFieldsMapEndNum[field.componentId] === ele.id - ? '最大值' + ? t('chart.max') : '' }} @@ -2408,15 +2422,15 @@ defineExpose({ - 点击进行树结构设计 + {{ t('v_query.the_tree_structure') }}
-
时间粒度
+
{{ t('v_query.time_granularity') }}
- 添加选项值 + {{ t('data_fill.form.add_option') }}
- 已配置 + {{ t('v_query.configured') }}
-
选项值数量
+
{{ t('v_query.of_option_values') }}
- 默认 - 全部 + {{ t('chart.default') }} + {{ t('data_set.all') }}
-
条件类型
+
{{ t('v_query.condition_type') }}
- 单条件 - 与条件 - 或条件 + {{ t('v_query.single_condition') }} + {{ + t('v_query.single_condition') + }} + {{ + t('v_query.or_condition') + }}
- +
- +
- +
- +