fix(查询组件): 日期范围组件配置查询范围时,设置结束于为月底不生效 #15465

This commit is contained in:
dataeaseShu
2025-03-24 15:47:27 +08:00
committed by xuwei-fit2cloud
parent 9ec90e339a
commit bc4f8d7d43
4 changed files with 26 additions and 3 deletions

View File

@@ -3,7 +3,7 @@ import { toRefs, PropType, onBeforeMount, watch, computed } from 'vue'
import { Calendar } from '@element-plus/icons-vue'
import { type DatePickType } from 'element-plus-secondary'
import type { ManipulateType } from 'dayjs'
import { getThisStart, getLastStart, getAround } from './time-format-dayjs'
import { getThisStart, getThisEnd, getLastStart, getAround } from './time-format-dayjs'
interface SelectConfig {
intervalType: string
regularOrTrendsValue: Date
@@ -114,6 +114,9 @@ const init = () => {
case 'monthBeginning':
config.value.regularOrTrendsValue = getThisStart('month')
break
case 'monthEnd':
config.value.regularOrTrendsValue = getThisEnd('month')
break
case 'yearBeginning':
config.value.regularOrTrendsValue = getThisStart('year')
break

View File

@@ -28,7 +28,13 @@ import CustomSortFilter from './CustomSortFilter.vue'
import { addQueryCriteriaConfig } from './options'
import { getCustomTime } from './time-format'
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
import { getThisStart, getLastStart, getAround, getCustomRange } from './time-format-dayjs'
import {
getThisStart,
getThisEnd,
getLastStart,
getAround,
getCustomRange
} from './time-format-dayjs'
import { snapshotStoreWithOut } from '@/store/modules/data-visualization/snapshot'
import { useI18n } from '@/hooks/web/useI18n'
import { fieldType } from '@/utils/attr'
@@ -1067,6 +1073,9 @@ const isInRange = (ele, startWindowTime, timeStamp) => {
case 'monthBeginning':
startTime = getThisStart('month')
break
case 'monthEnd':
startTime = getThisEnd('month')
break
case 'yearBeginning':
startTime = getThisStart('year')
break

View File

@@ -7,7 +7,7 @@ import { type TimeRange } from './time-format'
import dayjs from 'dayjs'
import { useI18n } from '@/hooks/web/useI18n'
import { useShortcuts } from './shortcuts'
import { getThisStart, getLastStart, getAround } from './time-format-dayjs'
import { getThisStart, getThisEnd, getLastStart, getAround } from './time-format-dayjs'
import VanPopup from 'vant/es/popup'
import VanDatePicker from 'vant/es/date-picker'
import VanTimePicker from 'vant/es/time-picker'
@@ -314,6 +314,9 @@ const disabledDate = val => {
case 'monthBeginning':
startTime = getThisStart('month')
break
case 'monthEnd':
startTime = getThisEnd('month')
break
case 'yearBeginning':
startTime = getThisStart('year')
break

View File

@@ -579,3 +579,11 @@ span {
}
}
</style>
<style>
.senior-dark {
.label-dark {
color: #a6a6a6 !important;
}
}
</style>