forked from github/dataease
Merge pull request #9171 from dataease/pr@dev-v2_bug_fix
fix(仪表板): 修复文本搜索把内容清空后,页面出现错误的问题
This commit is contained in:
commit
ec861e2a9e
@ -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,6 +300,7 @@ export const searchQuery = (queryComponentList, filter, curComponentId, firstLoa
|
||||
firstLoad,
|
||||
optionValueSource
|
||||
)
|
||||
if (result?.length) {
|
||||
filter.push({
|
||||
componentId: ele.id,
|
||||
fieldId: item.checkedFieldsMap[curComponentId],
|
||||
@ -327,6 +320,7 @@ export const searchQuery = (queryComponentList, filter, curComponentId, firstLoa
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user