|
|
|
@ -5,6 +5,7 @@ import { TreeService } from 'src/app/service/tree.service';
|
|
|
|
|
import * as moment from 'moment'; |
|
|
|
|
import * as echarts from 'echarts'; |
|
|
|
|
import { Router } from '@angular/router'; |
|
|
|
|
import { NzMessageService } from 'ng-zorro-antd/message'; |
|
|
|
|
@Component({ |
|
|
|
|
selector: 'app-examine', |
|
|
|
|
templateUrl: './examine.component.html', |
|
|
|
@ -12,7 +13,7 @@ import { Router } from '@angular/router';
|
|
|
|
|
}) |
|
|
|
|
export class ExamineComponent implements OnInit { |
|
|
|
|
|
|
|
|
|
constructor(private http: HttpClient, private toTree: TreeService, private methodService: MethodService, private router: Router) { } |
|
|
|
|
constructor(private http: HttpClient, private toTree: TreeService, private methodService: MethodService, private router: Router, private message: NzMessageService) { } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echartsOfBar |
|
|
|
@ -285,4 +286,33 @@ export class ExamineComponent implements OnInit {
|
|
|
|
|
goback() { |
|
|
|
|
this.router.navigate(['/statistic/home']) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
exportExcel() { |
|
|
|
|
const httpOptions = { |
|
|
|
|
responseType: 'blob' as 'json', |
|
|
|
|
params: { |
|
|
|
|
OrganizationId: this.searchForm.or, |
|
|
|
|
CheckStartTime: moment(this.searchForm.date[0]).format('yyyy-MM-DD') + ' 00:00:00', |
|
|
|
|
CheckEndTime: moment(this.searchForm.date[1]).format('yyyy-MM-DD') + ' 23:59:59', |
|
|
|
|
RecheckStaType: '检查情况' |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
this.http.get(`/api/PlanTasks/ExportOrgRecheckStat`, httpOptions).subscribe({ |
|
|
|
|
next: (data: any) => { |
|
|
|
|
const link = document.createElement('a'); |
|
|
|
|
const blob = new Blob([data], { type: 'application/vnd.ms-excel' }); |
|
|
|
|
link.setAttribute('href', window.URL.createObjectURL(blob)); |
|
|
|
|
link.setAttribute('download', '检查情况统计' + '.xls'); |
|
|
|
|
link.style.visibility = 'hidden'; |
|
|
|
|
document.body.appendChild(link); |
|
|
|
|
link.click(); |
|
|
|
|
document.body.removeChild(link); |
|
|
|
|
this.message.create('success', `导出成功`); |
|
|
|
|
}, |
|
|
|
|
error: err => { |
|
|
|
|
this.message.create('error', `导出失败`); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|