考核考试系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

77 lines
2.1 KiB

/*
* @Descripttion:
* @version:
* @Author: sueRimn
* @Date: 2020-12-14 17:21:02
* @LastEditors: sueRimn
* @LastEditTime: 2020-12-29 14:53:15
*/
import { Component, OnInit, ViewChild, Inject } from '@angular/core';
import {HttpClient} from '@angular/common/http'
import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { MatPaginator } from '@angular/material/paginator';
import { MatTableDataSource } from '@angular/material/table';
import { PageEvent } from '@angular/material/paginator';
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import {FormControl} from '@angular/forms';
import { Router,ActivatedRoute } from '@angular/router';
@Component({
selector: 'app-mark-papers-two',
templateUrl: './mark-papers-two.component.html',
styleUrls: ['./mark-papers-two.component.scss']
})
export class MarkPapersTwoComponent implements OnInit {
constructor(private router: Router,private activatedRoute: ActivatedRoute,public http: HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar) { }
ngOnInit(): void {
this.activatedRoute.queryParams.subscribe(param=>{
this.headtext=param.level
this.getid=param.id
this.getname=param.name
});
this.getAlltabledate()
}
headtext
getid//试卷id
getname//考核中队
dataSource
//分页
@ViewChild(MatPaginator, {static: true})
pageEvent: PageEvent;
paginator: MatPaginator;
length:any; //共多少条数据
pageSize:any; //每页条数
pageSizeOptions: number[] = [10] //设置每页条数
PageNumber:any //第几页
//获取表格信息
getAlltabledate(){
let paramsdata:any = {
PaperId:this.getid,
PageNumber: this.PageNumber || '1',
PageSize: this.pageSizeOptions[0],
Sort: null,
SortType: null,
}
this.http.get("/api/Examinations",{params:paramsdata}).subscribe((data:any)=>{
this.dataSource=data.items
this.length=data.totalCount
})
}
//分页事件
chagePage(e){
this.PageNumber = e.pageIndex+1
this.getAlltabledate()
}
//阅卷
reviewFiles (e) {
window.open(`/reviewFiles?examId=${e.id}&paperType=1`)
}
}