fix: 过滤组件上一个规则开启参数化再次添加规则时参数化选项自动开启但没有弹窗显示

This commit is contained in:
dataeaseShu 2023-10-27 11:02:02 +08:00
parent 751051d293
commit 017af37bfe
4 changed files with 6 additions and 9 deletions

View File

@ -192,7 +192,7 @@ const dragover = () => {
const infoFormat = (obj: ComponentInfo) => {
const { id, name, deType, type, datasetId } = obj
const base = {
return {
id: guid(),
name,
showError: true,
@ -205,7 +205,6 @@ const infoFormat = (obj: ComponentInfo) => {
deType
},
auto: false,
operator: deType === 1 ? 'between' : 'eq',
defaultValue: undefined,
selectValue: undefined,
optionValueSource: 0,
@ -220,12 +219,11 @@ const infoFormat = (obj: ComponentInfo) => {
multiple: false,
displayType: '0',
checkedFields: [],
parameters: [],
parametersCheck: false,
parametersList: [],
checkedFieldsMap: {}
}
if (deType === 1) {
return base
}
return { ...base, parameters: [], parametersCheck: false, parametersList: [] }
}
const drop = e => {

View File

@ -245,7 +245,6 @@ const multipleChange = (val: boolean, isMultipleChange = false) => {
return
}
curComponent.value.multiple = val
curComponent.value.operator = val ? 'in' : 'eq'
}
const validate = () => {

View File

@ -1,6 +1,6 @@
<script lang="tsx" setup>
import { useI18n } from '@/hooks/web/useI18n'
import { defineProps, reactive, toRefs, watch } from 'vue'
import { reactive, toRefs, watch } from 'vue'
import {
compareYearList,
compareMonthList,

View File

@ -1,6 +1,6 @@
<script lang="tsx" setup>
import { useI18n } from '@/hooks/web/useI18n'
import { defineProps, reactive, toRefs } from 'vue'
import { reactive, toRefs } from 'vue'
import { formatterType, unitType, valueFormatter } from '@/views/chart/components/js/formatter'
const { t } = useI18n()