forked from github/dataease
feat(查询组件): 查询组件在参数是年月日的情况下,时间粒度可以选择年月或者年
This commit is contained in:
parent
2034078e45
commit
93e8d47afa
@ -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 = () => {
|
||||
|
Loading…
Reference in New Issue
Block a user