|
|
|
@ -10,6 +10,8 @@ import { GetOutOfLineDetailsComponent } from '../get-out-of-line-details/get-out
|
|
|
|
|
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'; |
|
|
|
|
declare var abp: any |
|
|
|
|
import 'linqjs'; |
|
|
|
|
@Component({ |
|
|
|
|
selector: 'app-criminal-records-admin', |
|
|
|
@ -43,7 +45,7 @@ export class CriminalRecordsAdminComponent implements OnInit {
|
|
|
|
|
type: [null], |
|
|
|
|
event: [null], |
|
|
|
|
site: [null], |
|
|
|
|
disposalState: [null], |
|
|
|
|
// disposalState: [null],
|
|
|
|
|
datePicker: [[this.startdate, this.enddate]] |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
@ -95,27 +97,28 @@ 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 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, |
|
|
|
|
ViolateArea: this.validateForm.value.site, |
|
|
|
|
OrganizationUnitId: JSON.parse(sessionStorage.getItem('userdata')).organization.id, |
|
|
|
|
IsContainsChildren: 'true', |
|
|
|
|
IsHandled: disposalState, |
|
|
|
|
IsCensored: 'false', |
|
|
|
|
// IsHandled: disposalState,
|
|
|
|
|
ViolateTime: this.validateForm.value.datePicker ? [moment(this.validateForm.value.datePicker[0]).format('yyyy-MM-DD'), moment(this.validateForm.value.datePicker[1]).format('yyyy-MM-DD')] : null, |
|
|
|
|
SkipCount: this.SkipCount, |
|
|
|
|
MaxResultCount: this.MaxResultCount |
|
|
|
|
MaxResultCount: this.MaxResultCount //每页50条
|
|
|
|
|
} |
|
|
|
|
this.tableSpin = true |
|
|
|
|
this.http.get('/api/services/app/ViolateRecord/GetAll', { |
|
|
|
|
this.http.get('/api/services/app/ViolateRecordCensorship/GetAll', { |
|
|
|
|
params: params |
|
|
|
|
}).subscribe((data: any) => { |
|
|
|
|
this.list = this.list.concat(data.result.items); |
|
|
|
@ -124,7 +127,6 @@ export class CriminalRecordsAdminComponent implements OnInit {
|
|
|
|
|
this.totalCount = data.result.totalCount |
|
|
|
|
console.log('违规记录列表', data) |
|
|
|
|
this.tableSpin = false |
|
|
|
|
|
|
|
|
|
console.log(this.list.length) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
@ -139,6 +141,18 @@ export class CriminalRecordsAdminComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
SignalRAspNetCoreHelper.initSignalR(); |
|
|
|
|
abp.event.on('abp.notifications.received', this.reloadPage); |
|
|
|
|
} |
|
|
|
|
reloadPage = (userNotification) => { |
|
|
|
|
console.log('abp.notifications.received收到通知', userNotification); |
|
|
|
|
|
|
|
|
|
}; |
|
|
|
|
ngOnDestroy() { |
|
|
|
|
console.log('退出') |
|
|
|
|
abp.event.off('abp.notifications.received', this.reloadPage); |
|
|
|
|
abp.signalr.disconnect() |
|
|
|
|
} |
|
|
|
|
getThirtyDays() { |
|
|
|
|
//获取当前日期
|
|
|
|
@ -321,7 +335,20 @@ export class CriminalRecordsAdminComponent implements OnInit {
|
|
|
|
|
}, |
|
|
|
|
nzFooter: null, |
|
|
|
|
nzOnOk: async () => { |
|
|
|
|
console.log('推送成功了!!!', item) |
|
|
|
|
|
|
|
|
|
for (let index = 0; index < this.list.length; index++) { |
|
|
|
|
const element = this.list[index]; |
|
|
|
|
if (element.id == item.id) { |
|
|
|
|
this.list.splice(index, 1) |
|
|
|
|
this.totalCount = String(Number(this.totalCount) - 1) |
|
|
|
|
this.SkipCount = String(Number(this.SkipCount) - 1) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// this.list = []
|
|
|
|
|
// this.SkipCount = '0'
|
|
|
|
|
// this.getViolateRecordList()
|
|
|
|
|
console.log(this.totalCount) |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
const instance = modal.getContentComponent(); |
|
|
|
@ -334,4 +361,5 @@ export class CriminalRecordsAdminComponent implements OnInit {
|
|
|
|
|
return (document.getElementById('tablebox').clientHeight - 32) + 'px' |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|