feat(查询组件): 查询组件在参数是年月日的情况下,时间粒度可以选择年月或者年

This commit is contained in:
dataeaseShu 2024-09-23 11:21:17 +08:00
parent 2034078e45
commit 93e8d47afa

View File

@ -415,7 +415,16 @@ const timeParameterList = computed(() => {
const [year, y] = curComponent.value.parameters?.filter(
ele => ele.deType === 1 && !!ele.variableName
)[0].type
return timeList.filter(ele => ele.value === (typeTimeMap[y] || typeTimeMap[year]))
let stopPush = false
return timeList.reduce((pre, ele) => {
if (ele.value === (typeTimeMap[y] || typeTimeMap[year])) {
stopPush = true
pre.push(ele)
} else if (!stopPush) {
pre.push(ele)
}
return pre
}, [])
})
const cancelClick = () => {