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