From 3489c6d513f41a7e1ee236c951aad074d26547b3 Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Fri, 14 Jan 2022 14:32:33 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BF=AE=E6=94=B9]=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../today-warning-admin/today-warning-admin.component.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app/pages/today-warning-admin/today-warning-admin.component.ts b/src/app/pages/today-warning-admin/today-warning-admin.component.ts index 419ed55..5635a5a 100644 --- a/src/app/pages/today-warning-admin/today-warning-admin.component.ts +++ b/src/app/pages/today-warning-admin/today-warning-admin.component.ts @@ -44,15 +44,20 @@ export class TodayWarningAdminComponent implements OnInit { //预警类型接口 warningTypes: any //预警接口数据 + warningTypesDetailsMetadata:any warningTypesDetails: any warningType() { this.http.get('/api/services/app/Violation/GetAllList').subscribe((data: any) => { + this.warningTypesDetailsMetadata = JSON.parse(JSON.stringify(data.result)) this.warningTypesDetails = data.result - // console.log(this.warningTypesDetails) this.warningTypes = (data.result as any).groupBy((t) => { return t.violationType }); }) } typeChange(e) { + // console.log(e) + if(!e){ + this.warningTypesDetails = this.warningTypesDetailsMetadata + } this.warningTypes.forEach(element => { if (element.key == e) { this.warningTypesDetails = element