From 412f5d23c3f9dbe5aeaa2375ad795cf0b397f00f Mon Sep 17 00:00:00 2001 From: "@changcode" Date: Fri, 2 Jul 2021 09:25:10 +0800 Subject: [PATCH] =?UTF-8?q?NEZ-786=20fix:=20=E4=BF=AE=E5=A4=8DAsset=20mode?= =?UTF-8?q?l=E9=A1=B5=E9=9D=A2=EF=BC=8C=E6=9F=A5=E7=9C=8BAsset=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=9F=A5=E8=AF=A2=E9=97=AE=E9=A2=98=EF=BC=8C=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=95=B0=E6=8D=AE=E5=90=8E=EF=BC=8C=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=BA=94=E8=AF=A5=E5=8F=AA=E6=9F=A5=E8=AF=A2=E5=87=BA=E5=BD=93?= =?UTF-8?q?=E5=89=8D=E6=95=B0=E6=8D=AE=E7=9A=84Asset=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/bottomBox/tabs/assetTab.vue | 31 ++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/assetTab.vue b/nezha-fronted/src/components/common/bottomBox/tabs/assetTab.vue index 6560228a0..b5063d0b4 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/assetTab.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/assetTab.vue @@ -200,6 +200,35 @@ export default { port: row.authProtocolPort } this.$store.commit('addConsole', consoleParam) + }, + getTableData (params) { + if (params && Object.keys(params).length > 0) { + for (const key in params) { + this.$set(this.searchLabel, key, params[key]) + } + } + this.$set(this.searchLabel, 'pageNo', this.pageObj.pageNo) + this.$set(this.searchLabel, 'pageSize', this.pageObj.pageSize) + this.tools.loading = true + if (this.obj) { + this.$set(this.searchLabel, 'modelIds', this.obj.id) + } + this.$get(this.url, { ...this.searchLabel, ...this.searchCheckBox }).then(response => { + this.tools.loading = false + if (response.code === 200) { + for (let i = 0; i < response.data.list.length; i++) { + response.data.list[i].status = response.data.list[i].status + '' + } + this.tableData = response.data.list + this.pageObj.total = response.data.total + if (!this.scrollbarWrap) { + this.$nextTick(() => { + this.scrollbarWrap = this.$refs.dataTable.$refs.dataTable.bodyWrapper + this.toTopBtnHandler(this.scrollbarWrap) + }) + } + } + }) } }, watch: { @@ -208,7 +237,7 @@ export default { deep: true, handler (n, o) { this.searchLabel.dcIds = n.id - if ( this.from === fromRoute.model) { + if (this.from === fromRoute.model) { delete this.searchLabel.dcIds this.searchLabel.modelIds = n.id }