forked from github/dataease
Merge pull request #13125 from dataease/pr@dev-v2_st
fix(查询组件): 过滤组件隐藏时,如果设置了默认值,过滤生效 ;如果没有设置默认值,没有过滤。#12714
This commit is contained in:
commit
6585d0102e
@ -488,6 +488,9 @@ const clearData = () => {
|
||||
})
|
||||
})
|
||||
;(list.value || []).reduce((pre, next) => {
|
||||
if (!next.visible) {
|
||||
return pre
|
||||
}
|
||||
next.selectValue = next.multiple || +next.displayType === 7 ? [] : undefined
|
||||
if (next.optionValueSource === 1 && next.defaultMapValue?.length) {
|
||||
next.mapValue = next.multiple ? [] : undefined
|
||||
@ -564,6 +567,15 @@ const queryData = () => {
|
||||
requiredName = next.name
|
||||
}
|
||||
}
|
||||
|
||||
if (next.displayType === '22') {
|
||||
if (
|
||||
[next.numValueEnd, next.numValueStart].filter(itx => ![null, undefined, ''].includes(itx))
|
||||
.length === 1
|
||||
) {
|
||||
requiredName = next.name
|
||||
}
|
||||
}
|
||||
const keyList = Object.entries(next.checkedFieldsMap)
|
||||
.filter(ele => next.checkedFields.includes(ele[0]))
|
||||
.filter(ele => !!ele[1])
|
||||
|
@ -246,13 +246,8 @@ const duplicateRemoval = arr => {
|
||||
export const searchQuery = (queryComponentList, filter, curComponentId, firstLoad) => {
|
||||
queryComponentList.forEach(ele => {
|
||||
if (!!ele.propValue?.length) {
|
||||
ele.propValue
|
||||
.filter(itx => itx.visible)
|
||||
.forEach(item => {
|
||||
if (
|
||||
item.checkedFields.includes(curComponentId) &&
|
||||
item.checkedFieldsMap[curComponentId]
|
||||
) {
|
||||
ele.propValue.forEach(item => {
|
||||
if (item.checkedFields.includes(curComponentId) && item.checkedFieldsMap[curComponentId]) {
|
||||
let selectValue
|
||||
const {
|
||||
selectValue: value,
|
||||
|
@ -228,6 +228,7 @@ watch(
|
||||
|
||||
<style scoped lang="less">
|
||||
.mobile-background-selector {
|
||||
padding-left: 16px;
|
||||
:deep(.ed-form-item) {
|
||||
display: block;
|
||||
margin-bottom: 8px;
|
||||
|
Loading…
Reference in New Issue
Block a user