|
|
|
@ -3,10 +3,8 @@ import { Component, ElementRef, OnInit, ViewContainerRef } from '@angular/core';
|
|
|
|
|
import { FormBuilder, FormGroup, Validators } from '@angular/forms'; |
|
|
|
|
import { Router } from '@angular/router' |
|
|
|
|
import * as echarts from 'echarts'; |
|
|
|
|
|
|
|
|
|
import { fromEvent } from 'rxjs'; |
|
|
|
|
import { debounceTime } from 'rxjs/operators'; |
|
|
|
|
|
|
|
|
|
import * as moment from 'moment'; |
|
|
|
|
import { NzModalService } from 'ng-zorro-antd/modal'; |
|
|
|
|
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); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//获取统计信息
|
|
|
|
|
chartsSpin: boolean = false |
|
|
|
|
getAggregations() { |
|
|
|
@ -460,8 +457,9 @@ export class CriminalRecordsAdminComponent implements OnInit {
|
|
|
|
|
tableSpin: boolean = false |
|
|
|
|
getViolateRecordList() { |
|
|
|
|
let ViolationIds = [] |
|
|
|
|
// console.log(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) { |
|
|
|
|
this.warningTypesDetails.forEach(item => { |
|
|
|
@ -479,7 +477,7 @@ export class CriminalRecordsAdminComponent implements OnInit {
|
|
|
|
|
let params = { |
|
|
|
|
Level: this.validateForm.value.level, |
|
|
|
|
ViolationIds: ViolationIds, |
|
|
|
|
ViolateArea: this.validateForm.value.site, |
|
|
|
|
ViolateAreas: this.validateForm.value.site, |
|
|
|
|
OrganizationUnitId: this.validateForm.value.organization, |
|
|
|
|
IsContainsChildren: 'true', |
|
|
|
|
IsHandled: disposalState, |
|
|
|
@ -500,6 +498,7 @@ export class CriminalRecordsAdminComponent implements OnInit {
|
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
isMouseEnter = false |
|
|
|
|
mouseEnter() { |
|
|
|
|
this.isMouseEnter = true |
|
|
|
@ -577,30 +576,84 @@ export class CriminalRecordsAdminComponent implements OnInit {
|
|
|
|
|
}); |
|
|
|
|
this.list = [] |
|
|
|
|
this.SkipCount = '0' |
|
|
|
|
console.log('xxxx',this.validateForm.value) |
|
|
|
|
console.log('xxxx', this.validateForm.value) |
|
|
|
|
this.getViolateRecordList() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//预警类型接口
|
|
|
|
|
warningTypes: any //预警接口数据
|
|
|
|
|
warningTypesDetails: any |
|
|
|
|
warningTypesDetailsCopy: any |
|
|
|
|
|
|
|
|
|
warningTypes: any //预警接口数据
|
|
|
|
|
warningTypesCopy: any |
|
|
|
|
warningLevels: any |
|
|
|
|
warningLevelsCopy: any |
|
|
|
|
warningType() { |
|
|
|
|
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.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) { |
|
|
|
|
if (!e) { |
|
|
|
|
this.warningTypesDetails = this.warningTypesDetailsCopy |
|
|
|
|
this.warningLevels = this.warningLevelsCopy |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
this.warningTypes.forEach(element => { |
|
|
|
|
if (element.key == e) { |
|
|
|
|
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({ |
|
|
|
|
event: null, |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
look(item) { |
|
|
|
|