fix: 修复组件库,分页数据被自定义组件、业务组件两个tab 共用的问题

main
wu.jian2 2 years ago
parent 36f6a2fd54
commit 757ad6f3a5

@ -247,7 +247,7 @@
:page-size="size"
prev-text="上一页"
next-text="下一页"
:total="totalCount"
:total="bizComponenTotalCount"
:page-sizes="[10, 20, 50, 100]"
:current-page="current"
@current-change="currentChangeHandle"
@ -368,7 +368,8 @@ export default {
activeName: 'combination',
remoteComponentlist: [],
//
bizComponentList: []
bizComponentList: [],
bizComponenTotalCount: 0
}
},
computed: {
@ -385,6 +386,9 @@ export default {
watch: {
activeName () {
this.getCatalogList()
this.current = 1
this.size = 10
this.getDataList()
}
},
mounted () {
@ -432,33 +436,38 @@ export default {
}
},
getDataList () {
console.log(this.activeName)
this.loading = true
this.$dataRoomAxios.get('/bigScreen/design/page', {
parentCode: this.code || null,
current: this.current,
size: this.size,
searchKey: this.searchKey,
type: 'component'
})
.then((data) => {
this.list = data.list
this.totalCount = data.totalCount
if (this.activeName === 'combination') {
this.$dataRoomAxios.get('/bigScreen/design/page', {
parentCode: this.code || null,
current: this.current,
size: this.size,
searchKey: this.searchKey,
type: 'component'
})
.finally(() => {
.then((data) => {
console.log('1', data)
this.list = data.list
this.totalCount = data.totalCount
})
.finally(() => {
this.loading = false
})
} else if (this.activeName === 'bizComponent') {
getBizComponentPage({
parentCode: this.code || null,
current: this.current,
size: this.size,
searchKey: this.searchKey,
name: this.name
}).then((data) => {
console.log('2', data)
this.bizComponentList = data.list
this.bizComponenTotalCount = data.totalCount
this.loading = false
})
getBizComponentPage({
parentCode: this.code || null,
current: this.current,
size: this.size,
searchKey: this.searchKey,
name: this.name
}).then((data) => {
this.bizComponentList = data.list
this.totalCount = data.totalCount
this.loading = false
})
}
},
//
getCatalogList () {

Loading…
Cancel
Save