Browse Source

[修改]修改bug

dev
邵佳豪 3 years ago
parent
commit
3489c6d513
  1. 7
      src/app/pages/today-warning-admin/today-warning-admin.component.ts

7
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

Loading…
Cancel
Save