fix: 日期范围参数

This commit is contained in:
dataeaseShu 2023-12-21 09:46:55 +08:00
parent 8828cf33a6
commit 25f42831b4
3 changed files with 18 additions and 5 deletions

View File

@ -212,6 +212,8 @@ const infoFormat = (obj: ComponentInfo) => {
timeNum: 0,
relativeToCurrentType: 'year',
around: 'f',
parametersStart: null,
parametersEnd: null,
arbitraryTime: new Date(),
timeNumRange: 0,
relativeToCurrentTypeRange: 'year',

View File

@ -478,6 +478,8 @@ const parameterCompletion = () => {
const attributes = {
timeType: 'fixed',
required: false,
parametersStart: null,
parametersEnd: null,
relativeToCurrent: 'custom',
timeNum: 0,
relativeToCurrentType: 'year',
@ -1184,8 +1186,7 @@ defineExpose({
<el-select
popper-class="dataset-parameters"
value-key="id"
multiple
v-model="curComponent.parameters"
v-model="curComponent.parametersStart"
clearable
>
<el-option
@ -1205,8 +1206,7 @@ defineExpose({
<el-select
popper-class="dataset-parameters"
value-key="id"
multiple
v-model="curComponent.parameters"
v-model="curComponent.parametersEnd"
clearable
>
<el-option

View File

@ -90,6 +90,8 @@ export const searchQuery = (queryComponentList, filter, curComponentId, firstLoa
let selectValue = ''
const {
selectValue: value,
parametersStart,
parametersEnd,
defaultValueCheck,
timeType = 'fixed',
defaultValue,
@ -154,7 +156,16 @@ export const searchQuery = (queryComponentList, filter, curComponentId, firstLoa
fieldId: item.checkedFieldsMap[curComponentId],
operator: [1, 7].includes(+displayType) ? 'between' : multiple ? 'in' : 'eq',
value: values,
parameters: parametersCheck ? parameters : [],
parameters: parametersCheck
? +displayType === 7
? [
parametersStart,
parametersEnd?.id
? { ...parametersEnd, id: `${parametersEnd.id}_START_END_SPLIT` }
: parametersEnd
]
: parameters
: [],
isTree
})
}