Merge pull request #3934 from dataease/pr@dev@fix_filter_search

fix(过滤器): 过滤器查询出的结果与实际结果不符
This commit is contained in:
Junjun 2022-11-29 16:12:21 +08:00 committed by GitHub
commit 26c8a55d29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 2 deletions

View File

@ -312,9 +312,14 @@ export default {
}
},
clearHandler() {
if (this.$refs.deOutWidget && this.$refs.deOutWidget.clearHandler) {
if (this.$refs.deOutWidget?.clearHandler) {
this.$refs.deOutWidget.clearHandler()
}
},
responseResetButton() {
if (this.$refs.wrapperChild?.responseResetButton) {
this.$refs.wrapperChild.responseResetButton()
}
}
}
}

View File

@ -1106,6 +1106,11 @@ export default {
},
triggerResetButton() {
this.triggerSearchButton(true)
this.$refs['wrapperChild']?.forEach(item => {
if (item?.['responseResetButton']) {
item.responseResetButton()
}
})
},
refreshButtonInfo(isClear = false) {
const result = this.buildButtonFilterMap(this.componentData, isClear)

View File

@ -468,6 +468,11 @@ export default {
},
triggerResetButton() {
this.triggerSearchButton(true)
this.$refs['viewWrapperChild']?.forEach(item => {
if (item?.responseResetButton) {
item.responseResetButton()
}
})
},
triggerSearchButton(isClear = false) {
const result = this.buildButtonFilterMap(this.componentData, isClear)

View File

@ -474,7 +474,7 @@ export default {
},
'cfilters': {
handler: function(val1, val2) {
if ((isChange(val1, val2) || isChange(val1, this.filters)) && !this.isFirstLoad) {
if (isChange(val1, val2) && !this.isFirstLoad) {
this.getData(this.element.propValue.viewId)
}
},
@ -560,6 +560,11 @@ export default {
}
},
methods: {
responseResetButton() {
if (!this.cfilters?.length) {
this.getData(this.element.propValue.viewId, false)
}
},
exportExcel() {
this.$refs['userViewDialog'].exportExcel()
},