1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-10 20:39:48 +08:00

fix: Default search SmartBrowser without mandatory query criteria fields (#459)

This commit is contained in:
Edwin Betancourt 2020-04-24 10:00:47 -04:00 committed by GitHub
parent 0529d20676
commit 2453c673f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -109,8 +109,8 @@ export default {
browserTitle() {
return this.browserMetadata.name || this.$route.meta.title
},
getDataRecords() {
return this.$store.getters.getDataRecordsList(this.browserUuid)
isLoadedRecords() {
return this.$store.getters.getDataRecordAndSelection(this.browserUuid).isLoaded
},
getContainerIsReadyForSubmit() {
return !this.$store.getters.isNotReadyForSubmit(this.browserUuid) && !this.browserMetadata.awaitForValuesToQuery
@ -189,17 +189,17 @@ export default {
this.activeSearch = ['opened-criteria']
}
if (this.getDataRecords.length <= 0) {
if (!this.isLoadedRecords) {
if (this.getContainerIsReadyForSubmit) {
this.$store.dispatch('getBrowserSearch', {
containerUuid: this.browserUuid
})
} else {
this.$store.dispatch('setRecordSelection', {
containerUuid: this.browserUuid,
panelType: this.panelType
})
}
} else {
this.$store.dispatch('setRecordSelection', {
containerUuid: this.browserUuid,
panelType: this.panelType
})
}
}
}