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, timeNum: 0,
relativeToCurrentType: 'year', relativeToCurrentType: 'year',
around: 'f', around: 'f',
parametersStart: null,
parametersEnd: null,
arbitraryTime: new Date(), arbitraryTime: new Date(),
timeNumRange: 0, timeNumRange: 0,
relativeToCurrentTypeRange: 'year', relativeToCurrentTypeRange: 'year',

View File

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

View File

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