Browse Source

[新增]列表页

智慧矿山应急安全培训、考核、演练管理系统
邵佳豪 2 years ago
parent
commit
e0dc1fb1d5
  1. 14
      src/app/examiner/examiner-index/examiner-index.component.html
  2. 8
      src/app/examiner/examiner-index/examiner-index.component.ts
  3. 4
      src/app/examiner/examiner-routing.ts
  4. 2
      src/app/examiner/examiner.module.ts
  5. 57
      src/app/examiner/statistic-analysis/abilityAnalysis/examinee-capacity/examinee-capacity.component.html
  6. 116
      src/app/examiner/statistic-analysis/abilityAnalysis/examinee-capacity/examinee-capacity.component.scss
  7. 108
      src/app/examiner/statistic-analysis/abilityAnalysis/examinee-capacity/examinee-capacity.component.ts
  8. 3
      src/app/examiner/statistic-analysis/examStatistics/echarts/echarts.component.html
  9. 22
      src/app/examiner/statistic-analysis/examStatistics/echarts/echarts.component.ts
  10. 50
      src/app/examiner/statistic-analysis/examStatistics/examinee-papers/examinee-papers.component.html
  11. 118
      src/app/examiner/statistic-analysis/examStatistics/examinee-papers/examinee-papers.component.scss
  12. 109
      src/app/examiner/statistic-analysis/examStatistics/examinee-papers/examinee-papers.component.ts
  13. 54
      src/app/examiner/statistic-analysis/examStatistics/station-examinee/station-examinee.component.html
  14. 118
      src/app/examiner/statistic-analysis/examStatistics/station-examinee/station-examinee.component.scss
  15. 108
      src/app/examiner/statistic-analysis/examStatistics/station-examinee/station-examinee.component.ts
  16. 25
      src/app/theme.scss
  17. 1
      src/styles.scss

14
src/app/examiner/examiner-index/examiner-index.component.html

@ -1,18 +1,11 @@
<!--
* @Descripttion:
* @version:
* @Author: sueRimn
* @Date: 2020-12-11 09:06:03
* @LastEditors: sueRimn
* @LastEditTime: 2020-12-29 10:11:11
-->
<div class="content">
<div class="header">
<div class="queryBox">
<div class="queryField ordiv">
<label style="margin-right: 10px;font-size: 15px;">消防救援站:</label>
<nz-tree-select [nzDropdownClassName]="'maxHeightTreeSelect'" style="width: 250px" [(ngModel)]="js"
[nzNodes]="nodes" nzPlaceHolder="请选择" [nzExpandedIcon]="multiExpandedIconTpl" [nzExpandedKeys]="expandedKeys" (click)="zIndex()">
[nzNodes]="nodes" nzPlaceHolder="请选择" [nzExpandedIcon]="multiExpandedIconTpl"
[nzExpandedKeys]="expandedKeys" (click)="zIndex()">
</nz-tree-select>
<ng-template #multiExpandedIconTpl let-node let-origin="origin">
<ng-container *ngIf="node.children.length == 0; else elseTemplate">
@ -36,7 +29,8 @@
<button style="margin-left: 10px; background-color: #FF8678;" (click)="Reset()">重置</button>
</div>
<div class="queryField">
<button style="background-color: #07CDCF;" (click)="newExamination()"><img style="vertical-align: bottom;" src="../../../assets/images/add.png"> 新增考题</button>
<button style="background-color: #07CDCF;" (click)="newExamination()"><img
style="vertical-align: bottom;" src="../../../assets/images/add.png"> 新增考题</button>
</div>
</div>
</div>

8
src/app/examiner/examiner-index/examiner-index.component.ts

@ -1,11 +1,3 @@
/*
* @Descripttion:
* @version:
* @Author: sueRimn
* @Date: 2020-12-11 09:06:03
* @LastEditors: sueRimn
* @LastEditTime: 2021-02-25 11:44:34
*/
import {
Component,
OnInit,

4
src/app/examiner/examiner-routing.ts

@ -14,6 +14,8 @@ import { MarkPapersIndexComponent} from './mark-papers-index/mark-papers-index.c
import { MarkPapersTwoComponent } from './mark-papers-two/mark-papers-two.component'
import { EchartsComponent } from './statistic-analysis/examStatistics/echarts/echarts.component';
import { ExamineeCapacityComponent } from './statistic-analysis/abilityAnalysis/examinee-capacity/examinee-capacity.component';
import { StationExamineeComponent } from './statistic-analysis/examStatistics/station-examinee/station-examinee.component';
import { ExamineePapersComponent } from './statistic-analysis/examStatistics/examinee-papers/examinee-papers.component';
const routes: Routes = [
{ path: 'createexam-index', component:ExaminerIndexComponent },
@ -21,6 +23,8 @@ const routes: Routes = [
{ path: 'mark-papers-index',component:MarkPapersIndexComponent},
{ path: 'mark-papers-index/mark-papers-two',component:MarkPapersTwoComponent},
{ path: 'statistic-examination',component:EchartsComponent},
{ path: 'statistic-examination/station-examinee',component:StationExamineeComponent},
{ path: 'statistic-examination/examinee-papers',component:ExamineePapersComponent},
{ path: 'statistic-capacity',component:ExamineeCapacityComponent}
]
@NgModule({

2
src/app/examiner/examiner.module.ts

@ -76,6 +76,7 @@ import { EchartsComponent } from "./statistic-analysis/examStatistics/echarts/ec
import { StationExamineeComponent } from "./statistic-analysis/examStatistics/station-examinee/station-examinee.component";
import { ExamineePapersComponent } from "./statistic-analysis/examStatistics/examinee-papers/examinee-papers.component";
import { ExamineeCapacityComponent } from "./statistic-analysis/abilityAnalysis/examinee-capacity/examinee-capacity.component";
import { NzRateModule } from "ng-zorro-antd/rate";
@NgModule({
declarations: [
CreateTestScoreComponent,
@ -148,6 +149,7 @@ import { ExamineeCapacityComponent } from "./statistic-analysis/abilityAnalysis/
NzTreeModule,
NzDatePickerModule,
NzTreeSelectModule,
NzRateModule,
],
providers: [{ provide: MatPaginatorIntl, useValue: myPaginator() }],
exports: [PlanLevel],

57
src/app/examiner/statistic-analysis/abilityAnalysis/examinee-capacity/examinee-capacity.component.html

@ -1 +1,56 @@
<p>examinee-capacity works!</p>
<div class="content">
<div class="header">
<div class="queryBox">
<div class="queryField">
<label>考生姓名:</label>
<input type="text" placeholder="请输入考生姓名" [(ngModel)]="name" />
</div>
<div class="queryField">
<label>消防救援站:</label>
<nz-tree-select [nzDropdownClassName]="'maxHeightTreeSelect'" style="width: 250px" [(ngModel)]="orId"
[nzNodes]="nodes" nzPlaceHolder="请选择">
</nz-tree-select>
<mat-checkbox color="primary" style="margin-left: 26px;" [(ngModel)]="orIdChecked">包含下级
</mat-checkbox>
</div>
<div class="queryField">
<button style="background-color: #07CDCF;" (click)="Submit()">查询</button>
<button style="margin-left: 10px; background-color: #FF8678;" (click)="Reset()">重置</button>
</div>
</div>
</div>
<div class="centertable">
<table>
<thead>
<th style="width: 15%;">编号</th>
<th style="width: 15%;">考生姓名</th>
<th style="width: 25%;">所属机构</th>
<th style="width: 15%;">综合素质评分</th>
<th style="width: 15%;">作战能力评分</th>
<th style="width: 15%;">综合评分</th>
</thead>
<tbody>
<tr *ngFor="let item of tabledataSource;let key = index">
<td>{{key + 1}}</td>
<td>{{item.organizationsName}}</td>
<td>{{item.startTime|date:'yyyy-MM-dd HH:mm'}}</td>
<td class="ratebox">
<nz-rate [ngModel]="2" [nzDisabled]="true"></nz-rate>
<div class="mask"></div>
</td>
<td class="ratebox">
<nz-rate [ngModel]="2" [nzDisabled]="true"></nz-rate>
<div class="mask"></div>
<td class="ratebox">
<nz-rate [ngModel]="2" [nzDisabled]="true"></nz-rate>
<div class="mask"></div>
</td>
</tr>
</tbody>
</table>
<mat-paginator [length]="length" [pageSize]="10" (page)="chagePage($event)">
</mat-paginator>
</div>
</div>

116
src/app/examiner/statistic-analysis/abilityAnalysis/examinee-capacity/examinee-capacity.component.scss

@ -0,0 +1,116 @@
table {
width: 100%;
text-align: center;
.cdk-header-cell {
text-align: center;
}
}
.content {
width: 100%;
height: 100%;
overflow: hidden;
background: #F2F5F6;
overflow-y: auto;
}
.header {
width: 100%;
padding: 10px;
box-sizing: border-box;
display: flex;
align-items: center;
.queryBox {
box-sizing: border-box;
padding: 5px 15px;
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items: center;
justify-content: left;
.queryField {
margin: 0 25px;
font-size: 13px;
label {
margin-right: 10px;
font-size: 15px;
}
input {
font-size: 13px;
width: 320px;
height: 30px;
line-height: 30px;
border-radius: 3px;
padding-left: 5px;
outline: none;
border: 1px solid rgb(226, 211, 211);
}
button {
border: none;
color: white;
padding: 8px 20px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 13px;
margin: 4px 2px;
cursor: pointer;
border-radius: 5px;
outline: 0 none !important;
}
}
.headerright {
float: right;
}
}
}
.centertable {
width: 95%;
margin-right: 40px;
margin-left: 40px;
background-color: #FFFFFF;
table {
td,
th {
height: 48px;
font-size: 13px;
}
td {
border-bottom: 1px solid #F2F5F6;
}
.ratebox{
position: relative;
.mask{
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
}
}
thead {
background-color: #F5FDFE;
}
.green {
color: #07CDCF;
}
.red {
color: #FF8678;
}
}
}

108
src/app/examiner/statistic-analysis/abilityAnalysis/examinee-capacity/examinee-capacity.component.ts

@ -1,15 +1,111 @@
import { Component, OnInit } from '@angular/core';
import { Component, OnInit } from "@angular/core";
import { HttpClient } from "@angular/common/http";
import { MatSnackBar } from "@angular/material/snack-bar";
import { Router } from "@angular/router";
import { TreeService } from "src/app/http-interceptors/tree.service";
@Component({
selector: 'app-examinee-capacity',
templateUrl: './examinee-capacity.component.html',
styleUrls: ['./examinee-capacity.component.scss']
selector: "app-examinee-capacity",
templateUrl: "./examinee-capacity.component.html",
styleUrls: ["./examinee-capacity.component.scss"],
})
export class ExamineeCapacityComponent implements OnInit {
constructor() { }
constructor(
private router: Router,
public http: HttpClient,
public snackBar: MatSnackBar,
private tree: TreeService
) {}
ngOnInit(): void {
//获得登陆组织机构id
this.getProfiles().then((res) => {
//过滤得到正确的组织机构tree
this.getOrganizations();
});
this.getAlltabledate();
}
//获取登录账号的个人资料
Profiles: any;
getProfiles() {
return new Promise((resolve) => {
this.http.get("/api/ExamAccounts/Profiles").subscribe((data: any) => {
this.Profiles = data;
sessionStorage.setItem("creatorData", JSON.stringify(data));
resolve(data);
});
});
}
//获得所有组织机构
allorganizations;
treedata;
nodes;
expandedKeys = [];
getOrganizations() {
this.http.get("/api/Organizations").subscribe((data: any) => {
this.allorganizations = data;
this.treedata = this.tree.toTree(data);
this.getpresentOrganization();
});
}
//得到当前单位所在组织机构的tree型数据
organizationName;
newallorganizations;
getpresentOrganization() {
this.newallorganizations = this.allorganizations;
this.newallorganizations.forEach((item) => {
item.children = [];
this.newallorganizations.forEach((element) => {
if (element.parentId == item.id) {
item.children.push(element);
}
});
});
this.organizationName = this.Profiles.organizationName;
if (this.organizationName) {
this.newallorganizations.forEach((item) => {
if (item.name == this.organizationName) {
this.nodes = [item];
this.expandedKeys = [item.key];
}
});
} else {
this.nodes = this.tree.toTree(this.treedata);
this.expandedKeys = this.nodes[0].key;
}
}
//获取表格信息
PageNumber = 1;
PageSize = 10;
name;
orId;
orIdChecked;
tabledataSource;
length;
getAlltabledate() {
let paramsdata: any = {
PageNumber: this.PageNumber,
PageSize: this.PageSize,
OrganizationId: this.orId || "",
HasChildren: this.orIdChecked || "",
};
this.http
.get("/api/Papers", { params: paramsdata })
.subscribe((data: any) => {
this.tabledataSource = data.items;
this.length = data.totalCount;
});
}
//分页事件
chagePage(e) {
this.PageNumber = e.pageIndex + 1;
this.getAlltabledate();
}
//查询按钮
Submit() {}
//重置按钮
Reset() {}
}

3
src/app/examiner/statistic-analysis/examStatistics/echarts/echarts.component.html

@ -1 +1,2 @@
<p>echarts works!</p>
<button (click)="ok1()">按钮1</button>
<button (click)="ok2()">按钮2</button>

22
src/app/examiner/statistic-analysis/examStatistics/echarts/echarts.component.ts

@ -1,15 +1,21 @@
import { Component, OnInit } from '@angular/core';
import { Component, OnInit } from "@angular/core";
import { Router } from "@angular/router";
@Component({
selector: 'app-echarts',
templateUrl: './echarts.component.html',
styleUrls: ['./echarts.component.scss']
selector: "app-echarts",
templateUrl: "./echarts.component.html",
styleUrls: ["./echarts.component.scss"],
})
export class EchartsComponent implements OnInit {
constructor(private router: Router) {}
constructor() { }
ngOnInit(): void {
ngOnInit(): void {}
ok1() {
window.open("/home/statistic-examination/station-examinee")
// this.router.navigate(["/home/statistic-examination/station-examinee"]); //登陆成功跳转页面
}
ok2() {
window.open("/home/statistic-examination/examinee-papers")
// this.router.navigate(["/home/statistic-examination/examinee-papers"]); //登陆成功跳转页面
}
}

50
src/app/examiner/statistic-analysis/examStatistics/examinee-papers/examinee-papers.component.html

@ -1 +1,49 @@
<p>examinee-papers works!</p>
<div class="content">
<div class="header">
<div class="queryBox">
<div class="queryField">
<label>试卷名称:</label>
<input type="text" placeholder="请输入试卷名称" [(ngModel)]="name" />
</div>
<div class="queryField">
<label>考试时间:</label>
<input type="date" placeholder="请选择考试时间" [(ngModel)]="time" />
</div>
<div class="queryField">
<button style="background-color: #07CDCF;" (click)="Submit()">查询</button>
<button style="margin-left: 10px; background-color: #FF8678;" (click)="Reset()">重置</button>
</div>
</div>
</div>
<div class="centertable">
<table>
<thead>
<th style="width: 15%;">编号</th>
<th style="width: 15%;">试卷名称</th>
<th style="width: 25%;">考核机构</th>
<th style="width: 15%;">考试时间</th>
<th style="width: 15%;">试卷得分</th>
<th style="width: 15%;">操作</th>
</thead>
<tbody>
<tr *ngFor="let item of tabledataSource;let key = index">
<td>{{key + 1}}</td>
<td>xxx试卷</td>
<td>{{item.organizationsName}}</td>
<td>
{{item.startTime|date:'yyyy-MM-dd HH:mm'}}
</td>
<td>
85分
<td>
详情
</td>
</tr>
</tbody>
</table>
<mat-paginator [length]="length" [pageSize]="10" (page)="chagePage($event)">
</mat-paginator>
</div>
</div>

118
src/app/examiner/statistic-analysis/examStatistics/examinee-papers/examinee-papers.component.scss

@ -0,0 +1,118 @@
table {
width: 100%;
text-align: center;
.cdk-header-cell {
text-align: center;
}
}
.content {
width: 100%;
height: 100%;
overflow: hidden;
background: #F2F5F6;
overflow-y: auto;
}
.header {
width: 100%;
padding: 10px;
box-sizing: border-box;
display: flex;
align-items: center;
.queryBox {
box-sizing: border-box;
padding: 5px 15px;
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items: center;
justify-content: left;
.queryField {
margin: 0 25px;
font-size: 13px;
label {
margin-right: 10px;
font-size: 15px;
}
input {
font-size: 13px;
width: 320px;
height: 30px;
line-height: 30px;
border-radius: 3px;
padding-left: 5px;
outline: none;
border: 1px solid rgb(226, 211, 211);
}
button {
border: none;
color: white;
padding: 8px 20px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 13px;
margin: 4px 2px;
cursor: pointer;
border-radius: 5px;
outline: 0 none !important;
}
}
.headerright {
float: right;
}
}
}
.centertable {
width: 95%;
margin-right: 40px;
margin-left: 40px;
background-color: #FFFFFF;
table {
td,
th {
height: 48px;
font-size: 13px;
}
td {
border-bottom: 1px solid #F2F5F6;
}
.ratebox {
position: relative;
.mask {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
}
}
thead {
background-color: #F5FDFE;
}
.green {
color: #07CDCF;
}
.red {
color: #FF8678;
}
}
}

109
src/app/examiner/statistic-analysis/examStatistics/examinee-papers/examinee-papers.component.ts

@ -1,15 +1,112 @@
import { Component, OnInit } from '@angular/core';
import { Component, OnInit } from "@angular/core";
import { HttpClient } from "@angular/common/http";
import { MatSnackBar } from "@angular/material/snack-bar";
import { Router } from "@angular/router";
import { TreeService } from "src/app/http-interceptors/tree.service";
@Component({
selector: 'app-examinee-papers',
templateUrl: './examinee-papers.component.html',
styleUrls: ['./examinee-papers.component.scss']
selector: "app-examinee-papers",
templateUrl: "./examinee-papers.component.html",
styleUrls: ["./examinee-papers.component.scss"],
})
export class ExamineePapersComponent implements OnInit {
constructor() { }
constructor(
private router: Router,
public http: HttpClient,
public snackBar: MatSnackBar,
private tree: TreeService
) {}
ngOnInit(): void {
//获得登陆组织机构id
this.getProfiles().then((res) => {
//过滤得到正确的组织机构tree
this.getOrganizations();
});
this.getAlltabledate();
}
//获取登录账号的个人资料
Profiles: any;
getProfiles() {
return new Promise((resolve) => {
this.http.get("/api/ExamAccounts/Profiles").subscribe((data: any) => {
this.Profiles = data;
sessionStorage.setItem("creatorData", JSON.stringify(data));
resolve(data);
});
});
}
//获得所有组织机构
allorganizations;
treedata;
nodes;
expandedKeys = [];
getOrganizations() {
this.http.get("/api/Organizations").subscribe((data: any) => {
this.allorganizations = data;
this.treedata = this.tree.toTree(data);
this.getpresentOrganization();
});
}
//得到当前单位所在组织机构的tree型数据
organizationName;
newallorganizations;
getpresentOrganization() {
this.newallorganizations = this.allorganizations;
this.newallorganizations.forEach((item) => {
item.children = [];
this.newallorganizations.forEach((element) => {
if (element.parentId == item.id) {
item.children.push(element);
}
});
});
this.organizationName = this.Profiles.organizationName;
if (this.organizationName) {
this.newallorganizations.forEach((item) => {
if (item.name == this.organizationName) {
this.nodes = [item];
this.expandedKeys = [item.key];
}
});
} else {
this.nodes = this.tree.toTree(this.treedata);
this.expandedKeys = this.nodes[0].key;
}
}
//获取表格信息
PageNumber = 1;
PageSize = 10;
name;
time;
orId;
orIdChecked;
tabledataSource;
length;
getAlltabledate() {
let paramsdata: any = {
PageNumber: this.PageNumber,
PageSize: this.PageSize,
OrganizationId: this.orId || "",
HasChildren: this.orIdChecked || "",
};
this.http
.get("/api/Papers", { params: paramsdata })
.subscribe((data: any) => {
this.tabledataSource = data.items;
this.length = data.totalCount;
});
}
//分页事件
chagePage(e) {
this.PageNumber = e.pageIndex + 1;
this.getAlltabledate();
}
//查询按钮
Submit() {}
//重置按钮
Reset() {}
}

54
src/app/examiner/statistic-analysis/examStatistics/station-examinee/station-examinee.component.html

@ -1 +1,53 @@
<p>station-examinee works!</p>
<div class="content">
<div class="header">
<div class="queryBox">
<div class="queryField">
<label>考生姓名:</label>
<input type="text" placeholder="请输入考生姓名" [(ngModel)]="name" />
</div>
<div class="queryField">
<label>消防救援站:</label>
<nz-tree-select [nzDropdownClassName]="'maxHeightTreeSelect'" style="width: 250px" [(ngModel)]="orId"
[nzNodes]="nodes" nzPlaceHolder="请选择">
</nz-tree-select>
<mat-checkbox color="primary" style="margin-left: 26px;" [(ngModel)]="orIdChecked">包含下级
</mat-checkbox>
</div>
<div class="queryField">
<button style="background-color: #07CDCF;" (click)="Submit()">查询</button>
<button style="margin-left: 10px; background-color: #FF8678;" (click)="Reset()">重置</button>
</div>
</div>
</div>
<div class="centertable">
<table>
<thead>
<th style="width: 15%;">编号</th>
<th style="width: 15%;">考生姓名</th>
<th style="width: 25%;">所属机构</th>
<th style="width: 15%;">考试次数</th>
<th style="width: 15%;">平均成绩</th>
<th style="width: 15%;">操作</th>
</thead>
<tbody>
<tr *ngFor="let item of tabledataSource;let key = index">
<td>{{key + 1}}</td>
<td>{{item.organizationsName}}</td>
<td>{{item.startTime|date:'yyyy-MM-dd HH:mm'}}</td>
<td>
3次
</td>
<td>
85分
<td>
详情
</td>
</tr>
</tbody>
</table>
<mat-paginator [length]="length" [pageSize]="10" (page)="chagePage($event)">
</mat-paginator>
</div>
</div>

118
src/app/examiner/statistic-analysis/examStatistics/station-examinee/station-examinee.component.scss

@ -0,0 +1,118 @@
table {
width: 100%;
text-align: center;
.cdk-header-cell {
text-align: center;
}
}
.content {
width: 100%;
height: 100%;
overflow: hidden;
background: #F2F5F6;
overflow-y: auto;
}
.header {
width: 100%;
padding: 10px;
box-sizing: border-box;
display: flex;
align-items: center;
.queryBox {
box-sizing: border-box;
padding: 5px 15px;
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items: center;
justify-content: left;
.queryField {
margin: 0 25px;
font-size: 13px;
label {
margin-right: 10px;
font-size: 15px;
}
input {
font-size: 13px;
width: 320px;
height: 30px;
line-height: 30px;
border-radius: 3px;
padding-left: 5px;
outline: none;
border: 1px solid rgb(226, 211, 211);
}
button {
border: none;
color: white;
padding: 8px 20px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 13px;
margin: 4px 2px;
cursor: pointer;
border-radius: 5px;
outline: 0 none !important;
}
}
.headerright {
float: right;
}
}
}
.centertable {
width: 95%;
margin-right: 40px;
margin-left: 40px;
background-color: #FFFFFF;
table {
td,
th {
height: 48px;
font-size: 13px;
}
td {
border-bottom: 1px solid #F2F5F6;
}
.ratebox {
position: relative;
.mask {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
}
}
thead {
background-color: #F5FDFE;
}
.green {
color: #07CDCF;
}
.red {
color: #FF8678;
}
}
}

108
src/app/examiner/statistic-analysis/examStatistics/station-examinee/station-examinee.component.ts

@ -1,15 +1,111 @@
import { Component, OnInit } from '@angular/core';
import { Component, OnInit } from "@angular/core";
import { HttpClient } from "@angular/common/http";
import { MatSnackBar } from "@angular/material/snack-bar";
import { Router } from "@angular/router";
import { TreeService } from "src/app/http-interceptors/tree.service";
@Component({
selector: 'app-station-examinee',
templateUrl: './station-examinee.component.html',
styleUrls: ['./station-examinee.component.scss']
selector: "app-station-examinee",
templateUrl: "./station-examinee.component.html",
styleUrls: ["./station-examinee.component.scss"],
})
export class StationExamineeComponent implements OnInit {
constructor() { }
constructor(
private router: Router,
public http: HttpClient,
public snackBar: MatSnackBar,
private tree: TreeService
) {}
ngOnInit(): void {
//获得登陆组织机构id
this.getProfiles().then((res) => {
//过滤得到正确的组织机构tree
this.getOrganizations();
});
this.getAlltabledate();
}
//获取登录账号的个人资料
Profiles: any;
getProfiles() {
return new Promise((resolve) => {
this.http.get("/api/ExamAccounts/Profiles").subscribe((data: any) => {
this.Profiles = data;
sessionStorage.setItem("creatorData", JSON.stringify(data));
resolve(data);
});
});
}
//获得所有组织机构
allorganizations;
treedata;
nodes;
expandedKeys = [];
getOrganizations() {
this.http.get("/api/Organizations").subscribe((data: any) => {
this.allorganizations = data;
this.treedata = this.tree.toTree(data);
this.getpresentOrganization();
});
}
//得到当前单位所在组织机构的tree型数据
organizationName;
newallorganizations;
getpresentOrganization() {
this.newallorganizations = this.allorganizations;
this.newallorganizations.forEach((item) => {
item.children = [];
this.newallorganizations.forEach((element) => {
if (element.parentId == item.id) {
item.children.push(element);
}
});
});
this.organizationName = this.Profiles.organizationName;
if (this.organizationName) {
this.newallorganizations.forEach((item) => {
if (item.name == this.organizationName) {
this.nodes = [item];
this.expandedKeys = [item.key];
}
});
} else {
this.nodes = this.tree.toTree(this.treedata);
this.expandedKeys = this.nodes[0].key;
}
}
//获取表格信息
PageNumber = 1;
PageSize = 10;
name;
orId;
orIdChecked;
tabledataSource;
length;
getAlltabledate() {
let paramsdata: any = {
PageNumber: this.PageNumber,
PageSize: this.PageSize,
OrganizationId: this.orId || "",
HasChildren: this.orIdChecked || "",
};
this.http
.get("/api/Papers", { params: paramsdata })
.subscribe((data: any) => {
this.tabledataSource = data.items;
this.length = data.totalCount;
});
}
//分页事件
chagePage(e) {
this.PageNumber = e.pageIndex + 1;
this.getAlltabledate();
}
//查询按钮
Submit() {}
//重置按钮
Reset() {}
}

25
src/app/theme.scss

@ -1,18 +1,27 @@
@import "./theming";
@include mat-core();
$my-app-primary:mat-palette($mat-blue,500);
$my-app-accent :mat-palette($mat-pink,A200,A100,A400);
$my-app-primary:mat-palette($mat-blue, 500);
$my-app-accent :mat-palette($mat-pink, A200, A100, A400);
$my-app-warn :mat-palette($mat-red);
$my-app-theme :mat-light-theme($my-app-primary,$my-app-accent,$my-app-warn);
$my-app-theme :mat-light-theme($my-app-primary, $my-app-accent, $my-app-warn);
@include angular-material-theme($my-app-theme);
$my-dark-primary:mat-palette($mat-red,A700);
$my-dark-accent :mat-palette($mat-amber,A200,A100,A400);
$my-dark-primary:mat-palette($mat-red, A700);
$my-dark-accent :mat-palette($mat-amber, A200, A100, A400);
$my-dark-warn :mat-palette($mat-deep-orange);
$my-dark-theme :mat-dark-theme($my-dark-primary,$my-dark-accent,$my-dark-warn);
$my-dark-theme :mat-dark-theme($my-dark-primary, $my-dark-accent, $my-dark-warn);
.myapp-dark-theme{
@include angular-material-theme($my-dark-theme);
.myapp-dark-theme {
@include angular-material-theme($my-dark-theme);
}
.ant-rate-star:not(:last-child) {
margin-right: 0;
}
.ant-rate {
box-sizing: border-box;
padding-top: 10px;
}

1
src/styles.scss

@ -4,6 +4,7 @@
/* 引入组件样式 */
@import "~ng-zorro-antd/tree-select/style/index.min.css";
@import "~ng-zorro-antd/modal/style/index.min.css";
@import "~ng-zorro-antd/rate/style/index.min.css";
/* 引入组件样式 */
@import "./assets/css/time.scss";

Loading…
Cancel
Save