1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-13 07:04:21 +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() { browserTitle() {
return this.browserMetadata.name || this.$route.meta.title return this.browserMetadata.name || this.$route.meta.title
}, },
getDataRecords() { isLoadedRecords() {
return this.$store.getters.getDataRecordsList(this.browserUuid) return this.$store.getters.getDataRecordAndSelection(this.browserUuid).isLoaded
}, },
getContainerIsReadyForSubmit() { getContainerIsReadyForSubmit() {
return !this.$store.getters.isNotReadyForSubmit(this.browserUuid) && !this.browserMetadata.awaitForValuesToQuery return !this.$store.getters.isNotReadyForSubmit(this.browserUuid) && !this.browserMetadata.awaitForValuesToQuery
@ -189,11 +189,12 @@ export default {
this.activeSearch = ['opened-criteria'] this.activeSearch = ['opened-criteria']
} }
if (this.getDataRecords.length <= 0) { if (!this.isLoadedRecords) {
if (this.getContainerIsReadyForSubmit) { if (this.getContainerIsReadyForSubmit) {
this.$store.dispatch('getBrowserSearch', { this.$store.dispatch('getBrowserSearch', {
containerUuid: this.browserUuid containerUuid: this.browserUuid
}) })
}
} else { } else {
this.$store.dispatch('setRecordSelection', { this.$store.dispatch('setRecordSelection', {
containerUuid: this.browserUuid, containerUuid: this.browserUuid,
@ -203,7 +204,6 @@ export default {
} }
} }
} }
}
</script> </script>
<style> <style>