mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 13:32:18 +08:00
fix(移动端): 大屏移动端查看日期范围过去提示异常
This commit is contained in:
committed by
xuwei-fit2cloud
parent
6f85a2abad
commit
1eceeef35b
@@ -145,6 +145,7 @@ watch(
|
||||
)
|
||||
|
||||
const handleValueChange = () => {
|
||||
selectValue.value = selectValue.value.map(ele => dayjs(ele).format('YYYY/MM/DD HH:mm:ss'))
|
||||
const value = Array.isArray(selectValue.value) ? [...selectValue.value] : selectValue.value
|
||||
if (!props.isConfig) {
|
||||
config.value.selectValue = Array.isArray(selectValue.value)
|
||||
@@ -412,8 +413,9 @@ const selectSecond = ref(false)
|
||||
|
||||
const setArrValue = () => {
|
||||
currentDate.value = currentDate.value.slice(0, getIndex() + 1)
|
||||
const timeFormat =
|
||||
currentDate.value.length === 2 ? currentDate.value.concat(['01']) : currentDate.value
|
||||
const timeFormat = [1, 2].includes(currentDate.value.length)
|
||||
? currentDate.value.concat(Array([0, 2, 1][currentDate.value.length]).fill('01'))
|
||||
: currentDate.value
|
||||
if (isRange.value) {
|
||||
const [start, end] = selectValue.value || []
|
||||
if (selectSecond.value) {
|
||||
|
||||
@@ -9,7 +9,7 @@ const { componentData, canvasStyleData } = storeToRefs(dvMainStore)
|
||||
const getDynamicRangeTime = (type: number, selectValue: any, timeGranularityMultiple: string) => {
|
||||
const timeType = (timeGranularityMultiple || '').split('range')[0]
|
||||
|
||||
if (timeGranularityMultiple === 'datetimerange' || type === 1 || !timeType) {
|
||||
if (['datetimerange', 'yearrange'].includes(timeGranularityMultiple) || type === 1 || !timeType) {
|
||||
return selectValue.map(ele => +new Date(ele))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user