From 261319cfe69a7ad34fe72a124fbdfc6377964364 Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Thu, 19 Jan 2023 14:29:10 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E6=9B=B4=E6=96=B0=E7=9B=92?= =?UTF-8?q?=E5=AD=90=E5=85=B3=E9=97=AD=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../condition-monitoring/condition-monitoring.component.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/system-management/condition-monitoring/condition-monitoring.component.ts b/src/app/system-management/condition-monitoring/condition-monitoring.component.ts index 28e3ecb..b6a4d0f 100644 --- a/src/app/system-management/condition-monitoring/condition-monitoring.component.ts +++ b/src/app/system-management/condition-monitoring/condition-monitoring.component.ts @@ -236,7 +236,7 @@ export class ConditionMonitoringComponent implements OnInit { port: instance.validateForm.value.port, maxRetries: instance.validateForm.value.maxRetries } - await new Promise(resolve => { + await new Promise((resolve, reject) => { this.loading = 'file' this.http.patch('/api/EdgeDevices/Commands/PushMonitorSettingsJson', body).subscribe({ next: (data: any) => { @@ -249,11 +249,13 @@ export class ConditionMonitoringComponent implements OnInit { } this.setOfCheckedId.clear(); this.refreshCheckedStatus(); - this.getConditionMonitoring() this.loading = null; + resolve(data) + return true }, error: (err) => { + reject(err) this.loading = null; } })