|
|
@ -255,24 +255,44 @@ export class CriminalRecordsAdminComponent implements OnInit { |
|
|
|
showDetail: false,//即拖拽时候是否显示详细数值信息 默认true
|
|
|
|
showDetail: false,//即拖拽时候是否显示详细数值信息 默认true
|
|
|
|
realtime: true, //是否实时更新
|
|
|
|
realtime: true, //是否实时更新
|
|
|
|
filterMode: 'filter', |
|
|
|
filterMode: 'filter', |
|
|
|
backgroundColor:'#001735', |
|
|
|
backgroundColor: '#001735', |
|
|
|
width:'18' |
|
|
|
width: '18' |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type:'inside', |
|
|
|
type: 'inside', |
|
|
|
yAxisIndex:0, |
|
|
|
yAxisIndex: 0, |
|
|
|
zoomOnMouseWheel:false, //滚轮是否触发缩放
|
|
|
|
zoomOnMouseWheel: false, //滚轮是否触发缩放
|
|
|
|
moveOnMouseMove:true, //鼠标滚轮触发滚动
|
|
|
|
moveOnMouseMove: true, //鼠标滚轮触发滚动
|
|
|
|
moveOnMouseWheel:true |
|
|
|
moveOnMouseWheel: true |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
] |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
isEcharts: boolean = true |
|
|
|
|
|
|
|
isEchartsShow() { |
|
|
|
|
|
|
|
this.isEcharts = !this.isEcharts |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
startdate |
|
|
|
|
|
|
|
enddate |
|
|
|
ngOnInit(): void { |
|
|
|
ngOnInit(): void { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//当前日期
|
|
|
|
|
|
|
|
let myDate: any = new Date(); |
|
|
|
|
|
|
|
let nowY = myDate.getFullYear(); |
|
|
|
|
|
|
|
let nowM = myDate.getMonth() + 1; |
|
|
|
|
|
|
|
let nowD = myDate.getDate(); |
|
|
|
|
|
|
|
this.enddate = nowY + "-" + (nowM < 10 ? "0" + nowM : nowM) + "-" + (nowD < 10 ? "0" + nowD : nowD);//当前日期
|
|
|
|
|
|
|
|
//获取三十天前日期
|
|
|
|
|
|
|
|
let lw = new Date(myDate - 1000 * 60 * 60 * 24 * 30);//最后一个数字30可改,30天的意思
|
|
|
|
|
|
|
|
let lastY = lw.getFullYear(); |
|
|
|
|
|
|
|
let lastM = lw.getMonth() + 1; |
|
|
|
|
|
|
|
let lastD = lw.getDate(); |
|
|
|
|
|
|
|
this.startdate = lastY + "-" + (lastM < 10 ? "0" + lastM : lastM) + "-" + (lastD < 10 ? "0" + lastD : lastD);//三十天之前日期
|
|
|
|
|
|
|
|
|
|
|
|
this.validateForm = this.fb.group({ |
|
|
|
this.validateForm = this.fb.group({ |
|
|
|
level: [null], |
|
|
|
level: [null], |
|
|
|
type: [null], |
|
|
|
type: [null], |
|
|
|
site: [null], |
|
|
|
site: [null], |
|
|
|
datePicker: [null] |
|
|
|
datePicker: [[this.startdate, this.enddate]] |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
//饼图
|
|
|
|
//饼图
|
|
|
@ -283,6 +303,9 @@ export class CriminalRecordsAdminComponent implements OnInit { |
|
|
|
this.mybarChart.setOption(this.baroption); |
|
|
|
this.mybarChart.setOption(this.baroption); |
|
|
|
|
|
|
|
|
|
|
|
this.warningType() |
|
|
|
this.warningType() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log('当前日期', enddate) |
|
|
|
|
|
|
|
console.log('三十天前日期', startdate) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -332,6 +355,15 @@ export class CriminalRecordsAdminComponent implements OnInit { |
|
|
|
this.validateForm.controls[i].markAsDirty(); |
|
|
|
this.validateForm.controls[i].markAsDirty(); |
|
|
|
this.validateForm.controls[i].updateValueAndValidity(); |
|
|
|
this.validateForm.controls[i].updateValueAndValidity(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
console.log(this.validateForm.value) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let ViolationIds = [] |
|
|
|
|
|
|
|
if (this.validateForm.value.type) { |
|
|
|
|
|
|
|
this.warningTypesDetails.forEach(item => { |
|
|
|
|
|
|
|
item.id ? ViolationIds.push(item.id) : null |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
resetForm(e: MouseEvent): void { |
|
|
|
resetForm(e: MouseEvent): void { |
|
|
|
e.preventDefault(); |
|
|
|
e.preventDefault(); |
|
|
@ -351,6 +383,18 @@ export class CriminalRecordsAdminComponent implements OnInit { |
|
|
|
this.warningTypes = (data.result as any).groupBy((t) => { return t.violationType }); |
|
|
|
this.warningTypes = (data.result as any).groupBy((t) => { return t.violationType }); |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
typeChange(e) { |
|
|
|
|
|
|
|
this.warningTypes.forEach(element => { |
|
|
|
|
|
|
|
if (element.key == e) { |
|
|
|
|
|
|
|
this.warningTypesDetails = element |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
this.validateForm.patchValue({ |
|
|
|
|
|
|
|
event: null, |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
list: any = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] |
|
|
|
list: any = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] |
|
|
|
look() { |
|
|
|
look() { |
|
|
|
this.router.navigate(['/records/petrolStation']) |
|
|
|
this.router.navigate(['/records/petrolStation']) |
|
|
|