fix: 修复报告传值错误问题

This commit is contained in:
@changcode
2022-04-22 11:18:14 +08:00
parent 4e48c5c652
commit bccea4cf5c
3 changed files with 4 additions and 7 deletions

View File

@@ -69,9 +69,6 @@ export default {
tableId: { tableId: {
type: String type: String
}, },
builtinId: {
type: Number
},
tableTitle: { tableTitle: {
type: Array type: Array
}, },
@@ -99,8 +96,7 @@ export default {
}, },
onsearch () { onsearch () {
const params = { const params = {
q: this.keyWord, q: this.keyWord
id: this.builtinId
} }
this.$emit('search', params) this.$emit('search', params)
} }

View File

@@ -76,8 +76,10 @@ export default {
getTableData (params) { getTableData (params) {
if (params) { if (params) {
this.searchLabel = { ...this.searchLabel, ...params } this.searchLabel = { ...this.searchLabel, ...params }
} else {
this.searchLabel = {}
} }
this.searchLabel = { ...this.searchLabel, ...this.pageObj} this.searchLabel = { ...this.searchLabel, ...this.pageObj }
this.tools.loading = true this.tools.loading = true
delete this.searchLabel.total delete this.searchLabel.total
let listUrl = this.url let listUrl = this.url

View File

@@ -17,7 +17,6 @@
:tableId="tableId" :tableId="tableId"
v-model:custom-table-title="tools.customTableTitle" v-model:custom-table-title="tools.customTableTitle"
:api="url" :api="url"
:builtinId="builtinId"
:from="fromRoute.builtinReport" :from="fromRoute.builtinReport"
:layout="['search']" :layout="['search']"
@search="search" @search="search"