From 172688f3e1ba9d749169ed0dc37572a555ff268b Mon Sep 17 00:00:00 2001 From: W23123 <1021720039@qq.com> Date: Mon, 23 Mar 2020 17:08:27 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=84=E6=BA=90=E6=B1=A0=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=20loading?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../settings/system/TestResourcePool.vue | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/frontend/src/business/components/settings/system/TestResourcePool.vue b/frontend/src/business/components/settings/system/TestResourcePool.vue index a5bd6ab574..9699ff915f 100644 --- a/frontend/src/business/components/settings/system/TestResourcePool.vue +++ b/frontend/src/business/components/settings/system/TestResourcePool.vue @@ -69,7 +69,8 @@ - + @@ -143,7 +144,8 @@ - + @@ -225,6 +227,7 @@ data() { return { loading: false, + testLoading: false, createVisible: false, infoList: [], updateVisible: false, @@ -363,6 +366,7 @@ if (valide) { let vri = this.validateResourceInfo(); if (vri.validate) { + this.testLoading = true; this.form.info = JSON.stringify(this.infoList); this.$post("/testresourcepool/add", this.form) .then(() => { @@ -371,13 +375,15 @@ message: '添加成功!' }, this.createVisible = false, - this.initTableData()) + this.initTableData()); + this.testLoading = false; }); } else { this.$message({ type: 'warning', message: vri.msg }); + this.testLoading = false; return false; } @@ -389,6 +395,7 @@ updateTestResourcePool(updateTestResourcePoolForm) { this.$refs[updateTestResourcePoolForm].validate(valide => { if (valide) { + this.testLoading = true; let vri = this.validateResourceInfo(); if (vri.validate) { this.form.info = JSON.stringify(this.infoList); @@ -400,13 +407,15 @@ }, this.updateVisible = false, this.initTableData(), - self.loading = false) + self.loading = false); + this.testLoading = false; }); } else { this.$message({ type: 'warning', message: vri.msg }); + this.testLoading = false; return false; } } else {