|
|
|
@ -39,6 +39,7 @@ export class WarningStatisticsListComponent implements OnInit {
|
|
|
|
|
tableScrollHeight |
|
|
|
|
resizeListener |
|
|
|
|
ngOnInit(): void { |
|
|
|
|
this.getLicense() |
|
|
|
|
this.tableScrollHeight = '100px' |
|
|
|
|
// 页面监听
|
|
|
|
|
this.resizeListener = fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => { |
|
|
|
@ -75,6 +76,7 @@ export class WarningStatisticsListComponent implements OnInit {
|
|
|
|
|
this.validateForm = this.fb.group({ |
|
|
|
|
eventSystemName: null, |
|
|
|
|
organization: [null], |
|
|
|
|
licenseType: [null], |
|
|
|
|
datePicker: [[this.startdate, this.enddate]] |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
@ -94,6 +96,46 @@ export class WarningStatisticsListComponent implements OnInit {
|
|
|
|
|
ngOnDestroy(): void { |
|
|
|
|
this.resizeListener.unsubscribe() |
|
|
|
|
} |
|
|
|
|
listOfData//证照列表
|
|
|
|
|
//获取证照列表
|
|
|
|
|
getLicense() { |
|
|
|
|
let params = { |
|
|
|
|
SkipCount: '0', |
|
|
|
|
MaxResultCount: '999' |
|
|
|
|
} |
|
|
|
|
this.http.get('/api/services/app/ValidityLicenseType/GetAll', { |
|
|
|
|
params: params |
|
|
|
|
}).subscribe((data: any) => { |
|
|
|
|
console.log('证照列表', data.result.items) |
|
|
|
|
this.listOfData = data.result.items |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
isListOfData = false |
|
|
|
|
typeChange(e) { |
|
|
|
|
if (e) { |
|
|
|
|
let obj |
|
|
|
|
this.eventSystemNameOption.forEach(item => { |
|
|
|
|
if (item.id == e) { |
|
|
|
|
obj = item |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
if (obj.name == '证照预警') { |
|
|
|
|
this.isListOfData = true |
|
|
|
|
} else { |
|
|
|
|
this.isListOfData = false |
|
|
|
|
this.validateForm.patchValue({ |
|
|
|
|
licenseType: [] |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
this.isListOfData = false |
|
|
|
|
this.validateForm.patchValue({ |
|
|
|
|
licenseType: [] |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//刷新饼图图表数据
|
|
|
|
|
num |
|
|
|
|
echartsData: any |
|
|
|
@ -578,17 +620,20 @@ export class WarningStatisticsListComponent implements OnInit {
|
|
|
|
|
ViolationIds.push(element.id) |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
console.log('xxx',this.validateForm.value.licenseType) |
|
|
|
|
let params = { |
|
|
|
|
ViolationIds: ViolationIds, |
|
|
|
|
organizationUnitId: organizationUnitId, |
|
|
|
|
ViolateTime: (this.validateForm.value.datePicker[0] && this.validateForm.value.datePicker[1]) ? [moment(this.validateForm.value.datePicker[0]).format('yyyy-MM-DD') + ' 00:00:00', moment(this.validateForm.value.datePicker[1]).format('yyyy-MM-DD') + ' 23:59:59'] : null, |
|
|
|
|
IsContainsChildren: 'true', |
|
|
|
|
SkipCount: this.SkipCount, |
|
|
|
|
ValidityLicenseTypeIds: this.validateForm.value.licenseType, |
|
|
|
|
MaxResultCount: '50' |
|
|
|
|
} |
|
|
|
|
this.http.get('/api/services/app/ViolateRecord/GetAll', { |
|
|
|
|
params: params |
|
|
|
|
}).subscribe((data: any) => { |
|
|
|
|
console.log('证照预警列表', data.result.items) |
|
|
|
|
this.tableSpin = false |
|
|
|
|
data.result.items.forEach(element => { |
|
|
|
|
element.violatedItemSnapshotObj = JSON.parse(element.violatedItemSnapshot) |
|
|
|
@ -597,7 +642,7 @@ export class WarningStatisticsListComponent implements OnInit {
|
|
|
|
|
this.list = [...this.list] |
|
|
|
|
this.totalCount = data.result.totalCount |
|
|
|
|
this.isLoading = false |
|
|
|
|
console.log('证照预警列表', data.result.items) |
|
|
|
|
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
let tableHeader = this.element.nativeElement.querySelector(`.ant-table-header`).clientHeight |
|
|
|
|
this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - tableHeader - 10) + 'px' |
|
|
|
@ -666,6 +711,7 @@ export class WarningStatisticsListComponent implements OnInit {
|
|
|
|
|
this.validateForm.patchValue({ |
|
|
|
|
datePicker: [this.startdate, this.enddate], |
|
|
|
|
eventSystemName: null, |
|
|
|
|
licenseType: [], |
|
|
|
|
organization: JSON.parse(sessionStorage.getItem('userdata')).organization.id |
|
|
|
|
}); |
|
|
|
|
this.totalCount = null |
|
|
|
|