|
|
|
/*
|
|
|
|
* @Descripttion:
|
|
|
|
* @version:
|
|
|
|
* @Author: sueRimn
|
|
|
|
* @Date: 2020-12-14 17:21:02
|
|
|
|
* @LastEditors: sueRimn
|
|
|
|
* @LastEditTime: 2020-12-25 09:15:42
|
|
|
|
*/
|
|
|
|
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';
|
|
|
|
const ELEMENT_DATA = [
|
|
|
|
{name: "张三三", organization: '浦东支队', startTime: "2020-09-19 10:00", mark: '120',testState:'未阅卷'},
|
|
|
|
{name: "提亚马特", organization: '黄埔支队', startTime: "2020-09-19 10:00", mark: '100',testState:'已阅卷'},
|
|
|
|
{name: "艾泽拉斯", organization: '徐汇支队', startTime: "2020-09-19 10:00", mark: '90',testState:'已阅卷'},
|
|
|
|
];
|
|
|
|
|
|
|
|
@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
|
|
|
|
//console.log(headName)
|
|
|
|
});
|
|
|
|
this.getAlltabledate()
|
|
|
|
}
|
|
|
|
headtext
|
|
|
|
getid//试卷id
|
|
|
|
dataSource
|
|
|
|
markName//试卷名称
|
|
|
|
markDate//考试日期
|
|
|
|
//分页
|
|
|
|
@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
|
|
|
|
console.log(this.dataSource)
|
|
|
|
})
|
|
|
|
}
|
|
|
|
//分页事件
|
|
|
|
chagePage(e){
|
|
|
|
this.PageNumber = e.pageIndex+1
|
|
|
|
this.getAlltabledate()
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|