|
|
@ -3,10 +3,8 @@ import { Component, ElementRef, OnInit, ViewContainerRef } from '@angular/core'; |
|
|
|
import { FormBuilder, FormGroup, Validators } from '@angular/forms'; |
|
|
|
import { FormBuilder, FormGroup, Validators } from '@angular/forms'; |
|
|
|
import { Router } from '@angular/router' |
|
|
|
import { Router } from '@angular/router' |
|
|
|
import * as echarts from 'echarts'; |
|
|
|
import * as echarts from 'echarts'; |
|
|
|
|
|
|
|
|
|
|
|
import { fromEvent } from 'rxjs'; |
|
|
|
import { fromEvent } from 'rxjs'; |
|
|
|
import { debounceTime } from 'rxjs/operators'; |
|
|
|
import { debounceTime } from 'rxjs/operators'; |
|
|
|
|
|
|
|
|
|
|
|
import * as moment from 'moment'; |
|
|
|
import * as moment from 'moment'; |
|
|
|
import { NzModalService } from 'ng-zorro-antd/modal'; |
|
|
|
import { NzModalService } from 'ng-zorro-antd/modal'; |
|
|
|
import { GetOutOfLineDetailsComponent } from '../today-warning/get-out-of-line-details/get-out-of-line-details.component'; |
|
|
|
import { GetOutOfLineDetailsComponent } from '../today-warning/get-out-of-line-details/get-out-of-line-details.component'; |
|
|
@ -426,7 +424,6 @@ export class CriminalRecordsAdminComponent implements OnInit { |
|
|
|
} |
|
|
|
} |
|
|
|
this.mybarChart.setOption(option); |
|
|
|
this.mybarChart.setOption(option); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//获取统计信息
|
|
|
|
//获取统计信息
|
|
|
|
chartsSpin: boolean = false |
|
|
|
chartsSpin: boolean = false |
|
|
|
getAggregations() { |
|
|
|
getAggregations() { |
|
|
@ -460,8 +457,9 @@ export class CriminalRecordsAdminComponent implements OnInit { |
|
|
|
tableSpin: boolean = false |
|
|
|
tableSpin: boolean = false |
|
|
|
getViolateRecordList() { |
|
|
|
getViolateRecordList() { |
|
|
|
let ViolationIds = [] |
|
|
|
let ViolationIds = [] |
|
|
|
|
|
|
|
// console.log(this.validateForm.value.event)
|
|
|
|
if (this.validateForm.value.event) { |
|
|
|
if (this.validateForm.value.event) { |
|
|
|
ViolationIds.push(this.validateForm.value.event) |
|
|
|
ViolationIds = this.validateForm.value.event |
|
|
|
} |
|
|
|
} |
|
|
|
if (this.validateForm.value.type && !this.validateForm.value.event) { |
|
|
|
if (this.validateForm.value.type && !this.validateForm.value.event) { |
|
|
|
this.warningTypesDetails.forEach(item => { |
|
|
|
this.warningTypesDetails.forEach(item => { |
|
|
@ -479,7 +477,7 @@ export class CriminalRecordsAdminComponent implements OnInit { |
|
|
|
let params = { |
|
|
|
let params = { |
|
|
|
Level: this.validateForm.value.level, |
|
|
|
Level: this.validateForm.value.level, |
|
|
|
ViolationIds: ViolationIds, |
|
|
|
ViolationIds: ViolationIds, |
|
|
|
ViolateArea: this.validateForm.value.site, |
|
|
|
ViolateAreas: this.validateForm.value.site, |
|
|
|
OrganizationUnitId: this.validateForm.value.organization, |
|
|
|
OrganizationUnitId: this.validateForm.value.organization, |
|
|
|
IsContainsChildren: 'true', |
|
|
|
IsContainsChildren: 'true', |
|
|
|
IsHandled: disposalState, |
|
|
|
IsHandled: disposalState, |
|
|
@ -500,6 +498,7 @@ export class CriminalRecordsAdminComponent implements OnInit { |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
isMouseEnter = false |
|
|
|
isMouseEnter = false |
|
|
|
mouseEnter() { |
|
|
|
mouseEnter() { |
|
|
|
this.isMouseEnter = true |
|
|
|
this.isMouseEnter = true |
|
|
@ -577,30 +576,84 @@ export class CriminalRecordsAdminComponent implements OnInit { |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.list = [] |
|
|
|
this.list = [] |
|
|
|
this.SkipCount = '0' |
|
|
|
this.SkipCount = '0' |
|
|
|
console.log('xxxx',this.validateForm.value) |
|
|
|
console.log('xxxx', this.validateForm.value) |
|
|
|
this.getViolateRecordList() |
|
|
|
this.getViolateRecordList() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//预警类型接口
|
|
|
|
//预警类型接口
|
|
|
|
warningTypes: any //预警接口数据
|
|
|
|
|
|
|
|
warningTypesDetails: any |
|
|
|
warningTypesDetails: any |
|
|
|
|
|
|
|
warningTypesDetailsCopy: any |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
warningTypes: any //预警接口数据
|
|
|
|
|
|
|
|
warningTypesCopy: any |
|
|
|
|
|
|
|
warningLevels: any |
|
|
|
|
|
|
|
warningLevelsCopy: any |
|
|
|
warningType() { |
|
|
|
warningType() { |
|
|
|
this.http.get('/api/services/app/Violation/GetAllList').subscribe((data: any) => { |
|
|
|
this.http.get('/api/services/app/Violation/GetAllList').subscribe((data: any) => { |
|
|
|
this.warningTypesDetails = data.result |
|
|
|
this.warningTypesDetails = JSON.parse(JSON.stringify(data.result)) |
|
|
|
|
|
|
|
this.warningTypesDetailsCopy = JSON.parse(JSON.stringify(data.result)) //原始数据备份
|
|
|
|
this.warningTypes = (data.result as any).groupBy((t) => { return t.violationType }); |
|
|
|
this.warningTypes = (data.result as any).groupBy((t) => { return t.violationType }); |
|
|
|
|
|
|
|
this.warningTypesCopy = (data.result as any).groupBy((t) => { return t.violationType }) |
|
|
|
|
|
|
|
this.warningLevels = (data.result as any).groupBy((t) => { return t.level }); |
|
|
|
|
|
|
|
this.warningLevelsCopy = (data.result as any).groupBy((t) => { return t.level }) |
|
|
|
|
|
|
|
this.warningLevels.sort(function (a, b) { |
|
|
|
|
|
|
|
if (a.key < b.key) { |
|
|
|
|
|
|
|
return -1; |
|
|
|
|
|
|
|
} else if (a.key == b.key) { |
|
|
|
|
|
|
|
return 0; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
return 1; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
this.warningLevelsCopy.sort(function (a, b) { |
|
|
|
|
|
|
|
if (a.key < b.key) { |
|
|
|
|
|
|
|
return -1; |
|
|
|
|
|
|
|
} else if (a.key == b.key) { |
|
|
|
|
|
|
|
return 0; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
return 1; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
// console.log(111, this.warningTypesDetails)
|
|
|
|
|
|
|
|
// console.log(222, this.warningTypesCopy)
|
|
|
|
|
|
|
|
// console.log(333, this.warningLevels)
|
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
typeChange(e) { |
|
|
|
typeChange(e) { |
|
|
|
|
|
|
|
if (!e) { |
|
|
|
|
|
|
|
this.warningTypesDetails = this.warningTypesDetailsCopy |
|
|
|
|
|
|
|
this.warningLevels = this.warningLevelsCopy |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
this.warningTypes.forEach(element => { |
|
|
|
this.warningTypes.forEach(element => { |
|
|
|
if (element.key == e) { |
|
|
|
if (element.key == e) { |
|
|
|
this.warningTypesDetails = element |
|
|
|
this.warningTypesDetails = element |
|
|
|
|
|
|
|
this.warningLevels = (element as any).groupBy((t) => { return t.level }); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
this.validateForm.patchValue({ |
|
|
|
|
|
|
|
event: null, |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
levelChange(e) { |
|
|
|
|
|
|
|
if (!e) { |
|
|
|
|
|
|
|
this.warningTypesDetails = this.warningTypesDetailsCopy |
|
|
|
|
|
|
|
this.warningTypes = this.warningTypesCopy |
|
|
|
|
|
|
|
this.validateForm.patchValue({ |
|
|
|
|
|
|
|
type: null, |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.warningLevels.forEach(element => { |
|
|
|
|
|
|
|
if (element.key == e) { |
|
|
|
|
|
|
|
this.warningTypesDetails = element |
|
|
|
|
|
|
|
this.warningTypes = (element as any).groupBy((t) => { return t.violationType }); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.validateForm.patchValue({ |
|
|
|
this.validateForm.patchValue({ |
|
|
|
event: null, |
|
|
|
event: null, |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
look(item) { |
|
|
|
look(item) { |
|
|
|