Browse Source

[修正] 修正按时间查询BUG

master
陈鹏飞 5 years ago
parent
commit
f3baf73aca
  1. 2
      src/app/ui/eharts-statistics/eharts-statistics.component.html
  2. 4
      src/app/ui/eharts-statistics/eharts-statistics.component.ts

2
src/app/ui/eharts-statistics/eharts-statistics.component.html

@ -5,7 +5,7 @@
<div class="queryBox">
<div class="queryField" style="margin-right: 90px;">
<button type="button" mat-raised-button color="primary" style="margin-right: 10px;" (click)='goBack()'><mat-icon style="vertical-align: middle; font-size: 20px;">reply</mat-icon>返回</button>
<!-- <button type="button" mat-raised-button color="primary" style="margin-right: 10px;" (click)='goBack()'><mat-icon style="vertical-align: middle; font-size: 20px;">reply</mat-icon>返回</button> -->
<button type="button" mat-raised-button color="primary" (click)='queryAll()'>查看全部详情</button>
</div>

4
src/app/ui/eharts-statistics/eharts-statistics.component.ts

@ -17,7 +17,7 @@ export class EhartsStatisticsComponent implements OnInit {
constructor(private adapter: DateAdapter<any>,private http:HttpClient,public snackBar: MatSnackBar,private route:ActivatedRoute,private router:Router) { }
ngOnInit(): void {
this.idCard = this.route.snapshot.queryParams.id || '370304199609261910'
this.idCard = this.route.snapshot.queryParams.id || ''
this.idName = this.route.snapshot.queryParams.name || ''
this.adapter.setLocale('CH')
this.getList()
@ -103,7 +103,7 @@ export class EhartsStatisticsComponent implements OnInit {
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('选择时间不能大于现在时间段','确定',config);
this.startTime = new FormControl( new Date() )
this.startTime = new FormControl( new Date(new Date().toLocaleDateString()) )
} else {
this.startTime = new FormControl(e.value)
}

Loading…
Cancel
Save