fix: 待我审批列表页面默认过滤出还未审批的工单

This commit is contained in:
wangruidong
2024-06-13 15:28:22 +08:00
committed by Bryan
parent 0b3a9844f7
commit 91c44d0500
2 changed files with 12 additions and 0 deletions

View File

@@ -126,6 +126,7 @@ export default {
filterTags: {
handler() {
this.$emit('tag-search', this.filterMaps)
this.$eventBus.$emit('TagSearch', this.filterMaps)
},
deep: true
},

View File

@@ -201,6 +201,9 @@ export default {
return Object.assign({}, this.defaultTicketActions, this.extraTicketAction)
}
},
created() {
this.$eventBus.$on('TagSearch', this.handleTagSearchEvent)
},
mounted() {
setTimeout(() => {
this.loading = false
@@ -209,6 +212,14 @@ export default {
methods: {
reloadTable() {
this.$refs.ListPage.$refs.ListTable.$refs.ListTable.reloadTable()
},
handleTagSearchEvent(tags) {
if (tags.hasOwnProperty('state')) {
const delimiter = this.url.indexOf('?') === -1 ? '?' : '&'
this.ticketTableConfig.url = `${this.url}${delimiter}state=${tags.state}`
} else {
this.ticketTableConfig.url = this.url
}
}
}
}