|
|
|
@ -11,6 +11,7 @@ import { NzMessageService } from 'ng-zorro-antd/message';
|
|
|
|
|
import { TreeService } from 'src/app/service/tree.service'; |
|
|
|
|
import { DisposeequipmentComponent } from '../disposeequipment/disposeequipment.component'; |
|
|
|
|
import { SignalRAspNetCoreHelper } from '../../../shared/helpers/SignalRAspNetCoreHelper'; |
|
|
|
|
import { listRefreshService } from '../../service/listRefresh.service'; |
|
|
|
|
declare var abp: any |
|
|
|
|
import 'linqjs'; |
|
|
|
|
@Component({ |
|
|
|
@ -21,7 +22,7 @@ import 'linqjs';
|
|
|
|
|
export class CriminalRecordsAdminComponent implements OnInit { |
|
|
|
|
|
|
|
|
|
validateForm!: FormGroup; |
|
|
|
|
constructor(private element: ElementRef, private toTree: TreeService, private http: HttpClient, private fb: FormBuilder, private router: Router, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService) { } |
|
|
|
|
constructor(private listRefreshService: listRefreshService, private element: ElementRef, private toTree: TreeService, private http: HttpClient, private fb: FormBuilder, private router: Router, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService) { } |
|
|
|
|
|
|
|
|
|
startdate |
|
|
|
|
enddate |
|
|
|
@ -53,6 +54,24 @@ export class CriminalRecordsAdminComponent implements OnInit {
|
|
|
|
|
this.warningType() |
|
|
|
|
this.tableSpin = true |
|
|
|
|
this.getAllOrganization() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.listRefreshService.getMessage().subscribe((message: any) => { |
|
|
|
|
//列表刷新
|
|
|
|
|
if (message.type == 'add') { |
|
|
|
|
this.reloadPage(message.data) |
|
|
|
|
} |
|
|
|
|
if (message.type == 'update') { |
|
|
|
|
this.list = [] |
|
|
|
|
this.SkipCount = '0' |
|
|
|
|
this.getViolateRecordList() |
|
|
|
|
} |
|
|
|
|
if (message.type == 'delete') { |
|
|
|
|
this.message.create('success', '一条预警已自动处置!'); |
|
|
|
|
this.deleteViolateRecordList(message.data.notification.entityId) |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
defaultOrId: string |
|
|
|
@ -81,6 +100,20 @@ export class CriminalRecordsAdminComponent implements OnInit {
|
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
deleteViolateRecordList(id) { |
|
|
|
|
for (let index = 0; index < this.list.length; index++) { |
|
|
|
|
const element = this.list[index]; |
|
|
|
|
if (element.id == id) { |
|
|
|
|
this.list.splice(index, 1) |
|
|
|
|
this.totalCount = String(Number(this.totalCount) - 1) |
|
|
|
|
this.SkipCount = String(Number(this.SkipCount) - 1) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//获得违规记录列表
|
|
|
|
|
SkipCount: string = '0' |
|
|
|
|
MaxResultCount: string = '50' |
|
|
|
@ -97,14 +130,6 @@ export class CriminalRecordsAdminComponent implements OnInit {
|
|
|
|
|
item.id ? ViolationIds.push(item.id) : null |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
// let disposalState
|
|
|
|
|
// if (this.validateForm.value.disposalState == '0') {
|
|
|
|
|
// disposalState = true
|
|
|
|
|
// } else if (this.validateForm.value.disposalState == '1') {
|
|
|
|
|
// disposalState = false
|
|
|
|
|
// } else {
|
|
|
|
|
// disposalState = null
|
|
|
|
|
// }
|
|
|
|
|
let params = { |
|
|
|
|
Level: this.validateForm.value.level, |
|
|
|
|
ViolationIds: ViolationIds, |
|
|
|
@ -145,13 +170,10 @@ export class CriminalRecordsAdminComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
SignalRAspNetCoreHelper.initSignalR(); |
|
|
|
|
abp.event.on('abp.notifications.received', this.reloadPage); |
|
|
|
|
} |
|
|
|
|
reloadPage = (userNotification) => { |
|
|
|
|
console.log('abp.notifications.received收到通知', userNotification); |
|
|
|
|
console.log('违规记录列表', this.list) |
|
|
|
|
// console.log('abp.notifications.received收到通知', userNotification);
|
|
|
|
|
// console.log('违规记录列表', this.list)
|
|
|
|
|
let params = { |
|
|
|
|
id: userNotification.notification.entityId |
|
|
|
|
} |
|
|
|
@ -166,11 +188,7 @@ export class CriminalRecordsAdminComponent implements OnInit {
|
|
|
|
|
console.log('新获取一条', data.result) |
|
|
|
|
}) |
|
|
|
|
}; |
|
|
|
|
ngOnDestroy() { |
|
|
|
|
console.log('退出') |
|
|
|
|
abp.event.off('abp.notifications.received', this.reloadPage); |
|
|
|
|
abp.signalr.disconnect() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
getThirtyDays() { |
|
|
|
|
//获取当前日期
|
|
|
|
|
let myDate = new Date(); |
|
|
|
@ -205,6 +223,7 @@ export class CriminalRecordsAdminComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
return dateList; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
submitForm(): void { |
|
|
|
|
for (const i in this.validateForm.controls) { |
|
|
|
|
this.validateForm.controls[i].markAsDirty(); |
|
|
|
@ -215,6 +234,7 @@ export class CriminalRecordsAdminComponent implements OnInit {
|
|
|
|
|
this.getViolateRecordList() |
|
|
|
|
// this.getAggregations()
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
resetForm(e: MouseEvent): void { |
|
|
|
|
e.preventDefault(); |
|
|
|
|
this.validateForm.reset(); |
|
|
|
|