|
|
|
@ -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 |
|
|
|
|