forked from github/dataease
fix(仪表板): 修复文本搜索把内容清空后,页面出现错误的问题
This commit is contained in:
parent
58968e864b
commit
5234b1d407
@ -302,6 +302,8 @@ const resetData = () => {
|
||||
? [...next.defaultMapValue]
|
||||
: next.defaultMapValue
|
||||
}
|
||||
next.conditionValueF = next.defaultConditionValueF
|
||||
next.conditionValueS = next.defaultConditionValueS
|
||||
const keyList = Object.entries(next.checkedFieldsMap)
|
||||
.filter(ele => next.checkedFields.includes(ele[0]))
|
||||
.filter(ele => !!ele[1])
|
||||
@ -317,6 +319,8 @@ const clearData = () => {
|
||||
if (next.optionValueSource === 1 && next.defaultMapValue?.length) {
|
||||
next.mapValue = next.multiple ? [] : undefined
|
||||
}
|
||||
next.conditionValueF = ''
|
||||
next.conditionValueS = ''
|
||||
const keyList = Object.entries(next.checkedFieldsMap)
|
||||
.filter(ele => next.checkedFields.includes(ele[0]))
|
||||
.filter(ele => !!ele[1])
|
||||
|
@ -1,5 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import { toRefs, onBeforeMount, type PropType } from 'vue'
|
||||
import { toRefs, onBeforeMount, type PropType, inject, type CSSProperties } from 'vue'
|
||||
interface SelectConfig {
|
||||
conditionValueOperatorF: string
|
||||
conditionValueF: string
|
||||
@ -57,10 +57,11 @@ const setParams = () => {
|
||||
onBeforeMount(() => {
|
||||
setParams()
|
||||
})
|
||||
const customStyle = inject<{ background: string }>('$custom-style-filter')
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="text-search-select">
|
||||
<div class="text-search-select" :style="{ background: customStyle.background }">
|
||||
<div class="condition-type">
|
||||
<el-select
|
||||
class="condition-value-select"
|
||||
|
@ -211,14 +211,6 @@ export const searchQuery = (queryComponentList, filter, curComponentId, firstLoa
|
||||
multiple
|
||||
} = item
|
||||
|
||||
console.log(
|
||||
'displayType',
|
||||
timeType === 'dynamic',
|
||||
[1, 7].includes(+displayType),
|
||||
firstLoad,
|
||||
curComponentId
|
||||
)
|
||||
|
||||
if (timeType === 'dynamic' && [1, 7].includes(+displayType) && firstLoad) {
|
||||
if (+displayType === 1) {
|
||||
selectValue = getDynamicRange(item)
|
||||
@ -308,23 +300,25 @@ export const searchQuery = (queryComponentList, filter, curComponentId, firstLoa
|
||||
firstLoad,
|
||||
optionValueSource
|
||||
)
|
||||
filter.push({
|
||||
componentId: ele.id,
|
||||
fieldId: item.checkedFieldsMap[curComponentId],
|
||||
operator,
|
||||
value: result,
|
||||
parameters: parametersCheck
|
||||
? +displayType === 7
|
||||
? [
|
||||
parametersStart,
|
||||
parametersEnd?.id
|
||||
? { ...parametersEnd, id: `${parametersEnd.id}_START_END_SPLIT` }
|
||||
: parametersEnd
|
||||
]
|
||||
: parameters
|
||||
: [],
|
||||
isTree
|
||||
})
|
||||
if (result?.length) {
|
||||
filter.push({
|
||||
componentId: ele.id,
|
||||
fieldId: item.checkedFieldsMap[curComponentId],
|
||||
operator,
|
||||
value: result,
|
||||
parameters: parametersCheck
|
||||
? +displayType === 7
|
||||
? [
|
||||
parametersStart,
|
||||
parametersEnd?.id
|
||||
? { ...parametersEnd, id: `${parametersEnd.id}_START_END_SPLIT` }
|
||||
: parametersEnd
|
||||
]
|
||||
: parameters
|
||||
: [],
|
||||
isTree
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user