Merge pull request #7895 from dataease/pr@dev-v2_query_com

fix(查询组件): 查询组件年bug测试
This commit is contained in:
dataeaseShu 2024-01-30 09:41:58 +08:00 committed by GitHub
commit 0f07e82637
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -149,6 +149,7 @@ const init = () => {
'end-config'
)
console.log('startTime, endTime', startTime, endTime)
selectValue.value = [startTime, endTime]
}
@ -164,7 +165,7 @@ const formatDate = computed(() => {
<template>
<el-date-picker
disabled
v-if="rendering"
v-if="rendering && config.timeGranularityMultiple !== 'yearrange'"
v-model="selectValue"
:type="config.timeGranularityMultiple"
:prefix-icon="Calendar"
@ -173,4 +174,15 @@ const formatDate = computed(() => {
:start-placeholder="$t('datasource.start_time')"
:end-placeholder="$t('datasource.end_time')"
/>
<el-date-picker
v-else
disabled
v-model="selectValue"
type="yearrange"
:prefix-icon="Calendar"
format="YYYY"
:range-separator="$t('cron.to')"
:start-placeholder="$t('datasource.start_time')"
:end-placeholder="$t('datasource.end_time')"
/>
</template>