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) => {
|
;(list.value || []).reduce((pre, next) => {
|
||||||
|
if (!next.visible) {
|
||||||
|
return pre
|
||||||
|
}
|
||||||
next.selectValue = next.multiple || +next.displayType === 7 ? [] : undefined
|
next.selectValue = next.multiple || +next.displayType === 7 ? [] : undefined
|
||||||
if (next.optionValueSource === 1 && next.defaultMapValue?.length) {
|
if (next.optionValueSource === 1 && next.defaultMapValue?.length) {
|
||||||
next.mapValue = next.multiple ? [] : undefined
|
next.mapValue = next.multiple ? [] : undefined
|
||||||
@ -564,6 +567,15 @@ const queryData = () => {
|
|||||||
requiredName = next.name
|
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)
|
const keyList = Object.entries(next.checkedFieldsMap)
|
||||||
.filter(ele => next.checkedFields.includes(ele[0]))
|
.filter(ele => next.checkedFields.includes(ele[0]))
|
||||||
.filter(ele => !!ele[1])
|
.filter(ele => !!ele[1])
|
||||||
|
@ -246,13 +246,8 @@ const duplicateRemoval = arr => {
|
|||||||
export const searchQuery = (queryComponentList, filter, curComponentId, firstLoad) => {
|
export const searchQuery = (queryComponentList, filter, curComponentId, firstLoad) => {
|
||||||
queryComponentList.forEach(ele => {
|
queryComponentList.forEach(ele => {
|
||||||
if (!!ele.propValue?.length) {
|
if (!!ele.propValue?.length) {
|
||||||
ele.propValue
|
ele.propValue.forEach(item => {
|
||||||
.filter(itx => itx.visible)
|
if (item.checkedFields.includes(curComponentId) && item.checkedFieldsMap[curComponentId]) {
|
||||||
.forEach(item => {
|
|
||||||
if (
|
|
||||||
item.checkedFields.includes(curComponentId) &&
|
|
||||||
item.checkedFieldsMap[curComponentId]
|
|
||||||
) {
|
|
||||||
let selectValue
|
let selectValue
|
||||||
const {
|
const {
|
||||||
selectValue: value,
|
selectValue: value,
|
||||||
|
@ -228,6 +228,7 @@ watch(
|
|||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
.mobile-background-selector {
|
.mobile-background-selector {
|
||||||
|
padding-left: 16px;
|
||||||
:deep(.ed-form-item) {
|
:deep(.ed-form-item) {
|
||||||
display: block;
|
display: block;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
|
Loading…
Reference in New Issue
Block a user