From 70dfafe86c45b4c0e1f11d9e55937fe6b165ab1c Mon Sep 17 00:00:00 2001 From: wisonic-s Date: Mon, 15 Apr 2024 18:47:51 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E7=BB=84=E4=BB=B6=E5=A2=9E=E5=8A=A0=E6=8E=92=E5=BA=8F?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../v-query/QueryConditionConfiguration.vue | 79 ++++++++++++++++++- .../src/custom-component/v-query/options.ts | 4 + 2 files changed, 79 insertions(+), 4 deletions(-) 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 ceba793d87..fd833d481d 100644 --- a/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue +++ b/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue @@ -9,7 +9,7 @@ import { getThisStart, getLastStart, getAround } from './time-format-dayjs' import { snapshotStoreWithOut } from '@/store/modules/data-visualization/snapshot' import { useI18n } from '@/hooks/web/useI18n' import { fieldType } from '@/utils/attr' -import { ElMessage } from 'element-plus-secondary' +import { ElMessage, ElSelect } from 'element-plus-secondary' import type { DatasetDetail } from '@/api/dataset' import { getDsDetailsWithPerm, getSqlParams, listFieldsWithPermissions } from '@/api/dataset' import EmptyBackground from '@/components/empty-background/src/EmptyBackground.vue' @@ -694,7 +694,6 @@ const parameterCompletion = () => { arbitraryTimeRange: new Date(), setTimeRange: false, showEmpty: false, - conditionType: 0, timeRange: { intervalType: 'none', dynamicWindow: false, @@ -744,6 +743,10 @@ const handleCondition = item => { valueSource.value.push('') valueSource.value.push('') } + curComponent.value.sortField = curComponent.value.sortField ?? { + id: '', + sortType: 'asc' + } parameterCompletion() nextTick(() => { curComponent.value.showError = showError.value @@ -1327,7 +1330,7 @@ defineExpose({
{ name, deType }, + sortField: { + id: '', + sortType: 'asc' + }, timeType: 'fixed', relativeToCurrent: 'custom', required: false,