fix(过滤器): 过滤器查询出的结果与实际结果不符

This commit is contained in:
fit2cloud-chenyw 2022-11-29 16:00:34 +08:00
parent 7681885e9a
commit 1145c59db5
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

@ -410,6 +410,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

@ -469,7 +469,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)
}
},
@ -555,6 +555,11 @@ export default {
}
},
methods: {
responseResetButton() {
if (!this.cfilters?.length) {
this.getData(this.element.propValue.viewId, false)
}
},
exportExcel() {
this.$refs['userViewDialog'].exportExcel()
},