From 27aa0973e2c188f819d71dd4861940e7ee8e5420 Mon Sep 17 00:00:00 2001 From: Dong Xia Date: Wed, 27 Nov 2024 16:31:42 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=AF=E4=BB=B6=E5=8C=85=E5=8D=87=E7=BA=A7?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E5=92=8C=E7=9B=AE=E5=BD=95=E6=A0=91=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=AD=9B=E9=80=89=E5=BC=82=E5=B8=B8=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../list/node-layout/dictionaryTree/index.vue | 481 +++++++++--------- src/pages/upgrade/index.vue | 17 +- 2 files changed, 256 insertions(+), 242 deletions(-) diff --git a/src/pages/node/list/node-layout/dictionaryTree/index.vue b/src/pages/node/list/node-layout/dictionaryTree/index.vue index c6ce672..f74d459 100644 --- a/src/pages/node/list/node-layout/dictionaryTree/index.vue +++ b/src/pages/node/list/node-layout/dictionaryTree/index.vue @@ -1,237 +1,244 @@ - - - - - + + + + + diff --git a/src/pages/upgrade/index.vue b/src/pages/upgrade/index.vue index 0bf59da..4a4cc24 100644 --- a/src/pages/upgrade/index.vue +++ b/src/pages/upgrade/index.vue @@ -224,7 +224,7 @@ export default { fetchTable() { this.loading = true return new Promise((resolve, reject) => { - nodePkgOp({ + const params = { pkgName: this.tableQuery.packageName, nodeName: this.tableQuery.nodeName, startTime: this.tableQuery.timeRange?.[0], @@ -232,11 +232,18 @@ export default { success: this.tableQuery.upgradeRes === '' ? '' : Boolean(this.tableQuery.upgradeRes), opType: this.tableQuery.opType, ...this.listQuery - }) + } + if (!params.pkgName || !params.nodeName || !params.startTime || !params.endTime) { + reject(new Error('Invalid input parameters')) + return + } + nodePkgOp(params) .then(res => { - this.upgradeList = res?.data?.list || [] - this.total = +res?.data?.total || 0 - resolve(res) + if(res && res.code === 200) { + this.upgradeList = res?.data?.list || [] + this.total = +res?.data?.total || 0 + resolve(res) + } }) .catch(err => reject(err)) .finally(() => { -- Gitee