From 757ad6f3a5fc7482b7a3b4c0d154b3cd2f9c0373 Mon Sep 17 00:00:00 2001 From: "wu.jian2" Date: Thu, 27 Jul 2023 10:40:17 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=BA=93=EF=BC=8C=E5=88=86=E9=A1=B5=E6=95=B0=E6=8D=AE=E8=A2=AB?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E7=BB=84=E4=BB=B6=E3=80=81=E4=B8=9A?= =?UTF-8?q?=E5=8A=A1=E7=BB=84=E4=BB=B6=E4=B8=A4=E4=B8=AAtab=20=E5=85=B1?= =?UTF-8?q?=E7=94=A8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BigScreenDesign/ComponentDialog/index.vue | 59 +++++++++++-------- 1 file changed, 34 insertions(+), 25 deletions(-) diff --git a/data-room-ui/packages/BigScreenDesign/ComponentDialog/index.vue b/data-room-ui/packages/BigScreenDesign/ComponentDialog/index.vue index b473e83f..c7895d34 100644 --- a/data-room-ui/packages/BigScreenDesign/ComponentDialog/index.vue +++ b/data-room-ui/packages/BigScreenDesign/ComponentDialog/index.vue @@ -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 () {