Browse Source

[完善] 考官,考生管理员页面初步完成

master
陈鹏飞 4 years ago
parent
commit
281e4142fe
  1. 2
      src/app/pages/login/login.component.ts
  2. 5
      src/app/tabbar/tabbar.component.html
  3. 8
      src/app/tabbar/tabbar.component.ts
  4. 105
      src/app/ui/enterpriseuser/enterpriseuser.component.html
  5. 57
      src/app/ui/enterpriseuser/enterpriseuser.component.scss
  6. 11
      src/app/ui/enterpriseuser/enterpriseuser.component.ts
  7. 29
      src/app/ui/login/login.component.html
  8. 45
      src/app/ui/login/login.component.scss
  9. 25
      src/app/ui/login/login.component.spec.ts
  10. 42
      src/app/ui/login/login.component.ts
  11. 112
      src/app/ui/teacherManagement/enterpriseuser.component.html
  12. 57
      src/app/ui/teacherManagement/enterpriseuser.component.scss
  13. 25
      src/app/ui/teacherManagement/enterpriseuser.component.ts
  14. 4
      src/app/ui/ui-routing.module.ts
  15. 3
      src/app/ui/ui.module.ts

2
src/app/pages/login/login.component.ts

@ -36,7 +36,7 @@ export class LoginComponent implements OnInit {
sessionStorage.setItem("token",data.token);
sessionStorage.setItem("refreshToken",data.refreshToken);
this.token.startUp(); //登陆成功启动定时器刷新token
this.router.navigate(['/home/createexam']) //登陆成功跳转页面
this.router.navigate(['/home/teachear']) //登陆成功跳转页面
},(err) => {this.errmsg = err})
}

5
src/app/tabbar/tabbar.component.html

@ -3,11 +3,6 @@
<!-- <mat-toolbar> -->
<p style="color: white;border-bottom: 3px solid #fff;border-radius: 3px; font-size: 16px;padding: 0 4px;">考核系统</p>
<!-- 未登录状态 -->
<!-- <button mat-icon-button class="login" *ngIf="!isLogin.isLogin" (click)='login()'>
<mat-icon>account_circle</mat-icon>
</button> -->
<span style="position: absolute;right:100px;color: white;font-size: 16px;">欢迎您,{{realName}}</span>
<!-- 已登录状态 -->
<button mat-icon-button [matMenuTriggerFor]="appMenu" class="login">

8
src/app/tabbar/tabbar.component.ts

@ -4,7 +4,6 @@ import { Router,ActivatedRoute } from '@angular/router'
import { MatDialog } from '@angular/material/dialog';
import {ChangepasswordComponent} from '../ui/changepassword/changepassword.component'
import {ChangeuserdataComponent} from '../ui/changeuserdata/changeuserdata.component'
import {LoginComponent} from '../ui/login/login.component'
import {CacheTokenService} from '../http-interceptors/cache-token.service'//引入服务
import {IsLoginService} from '../is-login.service'//引入服务
import { MatSnackBarConfig, MatSnackBar } from '@angular/material/snack-bar';
@ -36,13 +35,6 @@ export class TabbarComponent implements OnInit {
realName:string; //登录用户角色
//登录系统
login () {
let dialogRef = this.dialog.open(LoginComponent);
dialogRef.afterClosed().subscribe();
}
//退出系统
signOut () {

105
src/app/ui/enterpriseuser/enterpriseuser.component.html

@ -1,68 +1,77 @@
<div class="header">
<form #form="ngForm">
<div class="queryBox">
<div class="queryField"style="margin-right: 90px;">
<button type="button" mat-raised-button color="primary" (click)='open()'>创建用户</button>
</div>
<div class="queryField">
<label style="margin-right: 10px;">姓名:</label>
<input type="text" [(ngModel)]="name" name="name" autocomplete="off">
</div>
<div class="queryField">
<label style="margin-right: 10px;">身份证号:</label>
<input type="text" [(ngModel)]="identityCard" name="identityCard" autocomplete="off">
</div>
<div class="btnbox" style="margin-left: 90px;">
<button mat-raised-button color="primary" (click)='initData()'>查询</button>
<button mat-raised-button style="margin-left: 10px;" type="button" (click)='empty()'>重置</button>
<div class="content">
<div class="header">
<form #form="ngForm">
<div class="queryBox">
<div class="queryField">
<label style="margin-right: 10px;">用户姓名:</label>
<input type="text" [(ngModel)]="name" name="name" autocomplete="off" placeholder="请输入用户姓名">
</div>
<div class="queryField">
<label style="margin-right: 10px;">身份证号:</label>
<input type="text" [(ngModel)]="identityCard" name="identityCard" autocomplete="off" placeholder="请输入身份证号">
</div>
<div class="queryField">
<label style="margin-right: 10px;">消防救援站:</label>
<input type="text" [(ngModel)]="fireTeam" name="fireTeam" autocomplete="off" placeholder="请选择消防救援站">
</div>
<div class="queryField">
<button mat-raised-button (click)='initData()' style="background-color: #07CDCF;">查询</button>
<button mat-raised-button (click)='empty()' style="margin-left: 10px; background-color: #FF8678;">重置</button>
</div>
<div class="queryField">
<button mat-raised-button (click)='open()' style="background-color: #07CDCF;">新增用户</button>
</div>
</div>
</div>
</form>
</div>
<table mat-table [dataSource]="dataSource" class="mat-elevation-z8">
</form>
</div>
<table mat-table [dataSource]="dataSource">
<ng-container matColumnDef="name">
<th mat-header-cell *matHeaderCellDef>姓名</th>
<th mat-header-cell *matHeaderCellDef>用户姓名</th>
<td mat-cell *matCellDef="let element">{{element.realName}}</td>
</ng-container>
<ng-container matColumnDef="identitycard">
<th mat-header-cell *matHeaderCellDef>身份证号</th>
<td mat-cell *matCellDef="let element">{{element.name}}</td>
</ng-container>
<ng-container matColumnDef="post">
<th mat-header-cell *matHeaderCellDef>职务</th>
<td mat-cell *matCellDef="let element">
<span *ngFor="let item of element.posts">
{{item.name}}
</span>
</td>
<th mat-header-cell *matHeaderCellDef>消防救援站</th>
<td mat-cell *matCellDef="let element">上海总队</td>
</ng-container>
<ng-container matColumnDef="tel">
<th mat-header-cell *matHeaderCellDef>手机号</th>
<td mat-cell *matCellDef="let element">13562321997</td>
</ng-container>
<ng-container matColumnDef="time">
<th mat-header-cell *matHeaderCellDef>创建时间</th>
<td mat-cell *matCellDef="let element">{{element.creationTime | date:'yyyy-MM-dd'}}</td>
</ng-container>
<ng-container matColumnDef="operation">
<th mat-header-cell *matHeaderCellDef>操作</th>
<td mat-cell *matCellDef="let element">
<span class="operationSpan"><mat-icon class="icon">assessment</mat-icon><span class="spanbtn blue" (click)="openRecord(element)">查看学习记录</span></span>
<span class="operationSpan"><mat-icon class="icon">cached</mat-icon><span class="spanbtn blue" (click)="reset(element)">重置密码</span></span>
<span class="operationSpan"><mat-icon class="icon">edit</mat-icon><span class="spanbtn blue" (click)="edit(element)">修改</span></span>
<span *ngIf="element.enabled" class="operationSpan"><mat-icon class="icon" style="color: rgb(245, 34, 45);">remove_circle</mat-icon><span class="spanbtn blue" (click)="noEnabled(element)">禁用</span></span>
<span *ngIf="!element.enabled" class="operationSpan"><mat-icon class="icon" style="color: gray;">remove_circle</mat-icon><span class="spanbtn gray" (click)="enabled(element)">禁用</span></span>
<span class="operationSpan"><mat-icon class="icon">delete</mat-icon><span class="spanbtn red" (click)="delete(element)">删除</span></span>
<span class="operationSpan"><span class="spanbtn green" (click)="reset(element)">重置密码</span></span>
<span class="operationSpan"><span class="spanbtn green" (click)="edit(element)">编辑</span></span>
<span *ngIf="element.enabled" class="operationSpan"><span class="spanbtn red" (click)="noEnabled(element)">禁用</span></span>
<span *ngIf="!element.enabled" class="operationSpan"><span class="spanbtn gray" (click)="enabled(element)">禁用</span></span>
<span class="operationSpan"><span class="spanbtn red" (click)="delete(element)">删除</span></span>
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table>
<mat-paginator [length]="length"
[pageSize]="pageSize"
[pageSizeOptions]="pageSizeOptions"
(page)="chagePage($event)">
</mat-paginator>
</table>
<mat-paginator [length]="length"
[pageSize]="pageSize"
[pageSizeOptions]="pageSizeOptions"
(page)="chagePage($event)">
</mat-paginator>
</div>

57
src/app/ui/enterpriseuser/enterpriseuser.component.scss

@ -1,16 +1,17 @@
table {
width: 100%;
width: 100%;
text-align: center;
.cdk-header-cell {
text-align: center;
.cdk-header-cell {
text-align: center;
}
}
.maginleft {
margin-left: 5px;
}
.content {
width: 100%;
height: 100%;
overflow: hidden;
background: #F2F5F6;
}
.header {
width: 100%;
padding: 10px;
@ -25,39 +26,29 @@ table {
align-items:center;
justify-content:center;
.queryField {
margin: 0 15px;
margin: 0 25px;
font-size: 14px;
input {
width: 280px;
height: 22px;
line-height: 22px;
// border-radius: 3px;
width: 160px;
height: 34px;
line-height: 34px;
border-radius: 5px;
padding-left: 5px;
outline: none;
border: 1px solid rgb(226, 211, 211);
}
button { color: #fff; }
}
.btnbox{
float: right;
}
} //queryBox
}
.operationSpan{
margin: 0 5px;
.spanbtn:hover{
text-decoration: underline;
margin: 0 10px;
.spanbtn {
font-weight: 550;
cursor: pointer;
}
.blue{
color:rgb(24, 144, 255) ;
}
.red{
color: rgb(245, 34, 45);
}
.gray{
color: gray;
}
}
.icon{
font-size: 18px;
vertical-align: top;
.green{ color: #04ced1; }
.red{ color: #FF8678 }
.gray{ color: gray; }
}

11
src/app/ui/enterpriseuser/enterpriseuser.component.ts

@ -8,6 +8,7 @@ import { AddEnterpriserUser } from './addenterpriseuser.component'
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import {FormControl} from '@angular/forms';
import { Router,ActivatedRoute } from '@angular/router'
@Component({
selector: 'app-enterpriseuser',
templateUrl: './enterpriseuser.component.html',
@ -21,15 +22,12 @@ export class EnterpriseuserComponent implements OnInit {
this.initData()
}
displayedColumns: string[] = ['name', 'identitycard', 'post', 'operation',];
displayedColumns: string[] = [ 'name','identitycard', 'post', 'tel', 'time', 'operation',];
dataSource:any; //所有企业用户
userLogin:string; //搜索账号
userName:string; //搜索名称
creditcode:string//统一社会信用代码
name:any //姓名
identityCard:any //身份证
fireTeam:any; //消防救援站
//分页
@ViewChild(MatPaginator, {static: true})
@ -95,9 +93,9 @@ export class EnterpriseuserComponent implements OnInit {
//跳转学习记录
openRecord(e){
// this.router.navigate([`/home/statistics`],{queryParams:{'name':`${e.realName}`,'id':`${e.name}`}})
window.open(`/home/statistics?name=${e.realName}&id=${e.name}`)
}
//创建用户
open(){
let dialogRef = this.dialog.open(AddEnterpriserUser, {//调用open方法打开对话框并且携带参数过去
@ -197,7 +195,6 @@ export class EnterpriseuserComponent implements OnInit {
})
}
//删除
delete (e) {
let isTrue = confirm('您确定要删除吗')

29
src/app/ui/login/login.component.html

@ -1,29 +0,0 @@
<div>
<div class="header"><img src="../../../assets/images/login.gif"></div>
<div class="content">
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm" class="example-container">
<div class="input">
<mat-icon class="icon">account_box</mat-icon>
<mat-form-field>
<input matInput id="name" name="name" required ngModel placeholder="请输入账号">
</mat-form-field>
</div>
<div class="input">
<mat-icon class="icon2">lock</mat-icon>
<mat-form-field>
<input matInput id="password" name="password" type='password' required ngModel placeholder="请输入密码">
</mat-form-field>
</div>
<div *ngIf="errmsg" class="alert-danger">
{{errmsg}}
</div>
<button type="submit" [disabled]="!form.form.valid" class="loginBtn" mat-raised-button color="primary">登录</button>
</form>
</div>
</div>

45
src/app/ui/login/login.component.scss

@ -1,45 +0,0 @@
.header {
margin: 0 auto;
width: 50px;
height: 50px;
border-radius: 50%;
img {
width: 100%;
height: 100%;
}
}
.content {
margin: 20px 0;
text-align: center;
.alert-danger {
text-align: left;
font-size: 14px;
color: red;
}
.loginBtn {
width: 90%;
border-radius: 5px;
margin-top: 10px;
}
}
.input {
margin-left: 22px;
position: relative;
}
.icon {
width: 24px;
color: #666;
font-size: 24px;
position: absolute;
top: 17px;
left: -24px;
}
.icon2 {
width: 24px;
color: #666;
font-size: 24px;
position: absolute;
top: 17px;
left: -24px;
}

25
src/app/ui/login/login.component.spec.ts

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { LoginComponent } from './login.component';
describe('LoginComponent', () => {
let component: LoginComponent;
let fixture: ComponentFixture<LoginComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ LoginComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(LoginComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

42
src/app/ui/login/login.component.ts

@ -1,42 +0,0 @@
import { Component, OnInit } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { IsLoginService } from '../../is-login.service'
import { CacheTokenService } from '../../http-interceptors/cache-token.service'
import { MatDialogRef } from '@angular/material/dialog';
import { MatSnackBarConfig, MatSnackBar } from '@angular/material/snack-bar';
@Component({
selector: 'app-login',
templateUrl: './login.component.html',
styleUrls: ['./login.component.scss']
})
export class LoginComponent implements OnInit {
constructor(private http:HttpClient,private isLogin:IsLoginService,private token:CacheTokenService,public dialogRef: MatDialogRef<any>,public snackBar: MatSnackBar) { }
ngOnInit(): void {
}
errmsg:any; //err信息
//登录
onSubmit (e) {
let loginMsg = {
name: e.name,
password: e.password
}
this.http.post('/api/Account/SignIn',loginMsg).subscribe((data:any)=>{
sessionStorage.setItem("token",data.token);
sessionStorage.setItem("refreshToken",data.refreshToken);
this.token.startUp(); //登陆成功启动定时器刷新token
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('登陆成功','确定',config);
this.dialogRef.close(data);
},(err) => {this.errmsg = err})
}
}

112
src/app/ui/teacherManagement/enterpriseuser.component.html

@ -1,68 +1,72 @@
<div class="header">
<form #form="ngForm">
<div class="queryBox">
<div class="queryField"style="margin-right: 90px;">
<button type="button" mat-raised-button color="primary" (click)='open()'>创建教员</button>
</div>
<div class="queryField">
<label style="margin-right: 10px;">姓名:</label>
<input type="text" [(ngModel)]="name" name="name" autocomplete="off">
</div>
<div class="queryField">
<label style="margin-right: 10px;">帐号:</label>
<input type="text" [(ngModel)]="identityCard" name="identityCard" autocomplete="off">
</div>
<div class="btnbox" style="margin-left: 90px;">
<button mat-raised-button color="primary" (click)='initData()'>查询</button>
<button mat-raised-button style="margin-left: 10px;" type="button" (click)='empty()'>重置</button>
<div class="content">
<div class="header">
<form #form="ngForm">
<div class="queryBox">
<div class="queryField">
<label style="margin-right: 10px;">用户账号:</label>
<input type="text" [(ngModel)]="identityCard" name="identityCard" autocomplete="off" placeholder="请输入用户账号">
</div>
<div class="queryField">
<label style="margin-right: 10px;">用户姓名:</label>
<input type="text" [(ngModel)]="name" name="name" autocomplete="off" placeholder="请输入用户姓名">
</div>
<div class="queryField">
<label style="margin-right: 10px;">消防救援站:</label>
<input type="text" [(ngModel)]="fireTeam" name="fireTeam" autocomplete="off" placeholder="请选择消防救援站">
</div>
<div class="queryField">
<button mat-raised-button (click)='initData()' style="background-color: #07CDCF;">查询</button>
<button mat-raised-button (click)='empty()' style="margin-left: 10px; background-color: #FF8678;">重置</button>
</div>
<div class="queryField">
<button mat-raised-button (click)='open()' style="background-color: #07CDCF;">新增用户</button>
</div>
</div>
</div>
</form>
</div>
<table mat-table [dataSource]="dataSource" class="mat-elevation-z8">
<ng-container matColumnDef="name">
<th mat-header-cell *matHeaderCellDef>姓名</th>
<td mat-cell *matCellDef="let element">{{element.realName}}</td>
</ng-container>
</form>
</div>
<table mat-table [dataSource]="dataSource">
<ng-container matColumnDef="identitycard">
<th mat-header-cell *matHeaderCellDef>帐号</th>
<th mat-header-cell *matHeaderCellDef>用户帐号</th>
<td mat-cell *matCellDef="let element">{{element.name}}</td>
</ng-container>
<ng-container matColumnDef="name">
<th mat-header-cell *matHeaderCellDef>用户姓名</th>
<td mat-cell *matCellDef="let element">{{element.realName}}</td>
</ng-container>
<ng-container matColumnDef="post">
<th mat-header-cell *matHeaderCellDef>职务</th>
<td mat-cell *matCellDef="let element">
<span *ngFor="let item of element.posts">
{{item.name}}
</span>
</td>
<th mat-header-cell *matHeaderCellDef>消防救援站</th>
<td mat-cell *matCellDef="let element">上海总队</td>
</ng-container>
<ng-container matColumnDef="time">
<th mat-header-cell *matHeaderCellDef>创建时间</th>
<td mat-cell *matCellDef="let element">{{element.creationTime | date:'yyyy-MM-dd'}}</td>
</ng-container>
<ng-container matColumnDef="operation">
<th mat-header-cell *matHeaderCellDef>操作</th>
<td mat-cell *matCellDef="let element">
<!-- <span class="operationSpan"><mat-icon class="icon">assessment</mat-icon><span class="spanbtn blue">查看学习记录</span></span> -->
<span class="operationSpan"><mat-icon class="icon">cached</mat-icon><span class="spanbtn blue" (click)="reset(element)">重置密码</span></span>
<span class="operationSpan"><mat-icon class="icon">edit</mat-icon><span class="spanbtn blue" (click)="edit(element)">修改</span></span>
<span *ngIf="element.enabled" class="operationSpan"><mat-icon class="icon" style="color: rgb(245, 34, 45);">remove_circle</mat-icon><span class="spanbtn blue" (click)="noEnabled(element)">禁用</span></span>
<span *ngIf="!element.enabled" class="operationSpan"><mat-icon class="icon" style="color: gray;">remove_circle</mat-icon><span class="spanbtn gray" (click)="enabled(element)">禁用</span></span>
<span class="operationSpan"><mat-icon class="icon">delete</mat-icon><span class="spanbtn red" (click)="delete(element)">删除</span></span>
<span class="operationSpan"><span class="spanbtn green" (click)="reset(element)">重置密码</span></span>
<span class="operationSpan"><span class="spanbtn green" (click)="edit(element)">编辑</span></span>
<span *ngIf="element.enabled" class="operationSpan"><span class="spanbtn red" (click)="noEnabled(element)">禁用</span></span>
<span *ngIf="!element.enabled" class="operationSpan"><span class="spanbtn gray" (click)="enabled(element)">禁用</span></span>
<span class="operationSpan"><span class="spanbtn red" (click)="delete(element)">删除</span></span>
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table>
<mat-paginator [length]="length"
[pageSize]="pageSize"
[pageSizeOptions]="pageSizeOptions"
(page)="chagePage($event)">
</mat-paginator>
</table>
<mat-paginator [length]="length"
[pageSize]="pageSize"
[pageSizeOptions]="pageSizeOptions"
(page)="chagePage($event)">
</mat-paginator>
</div>

57
src/app/ui/teacherManagement/enterpriseuser.component.scss

@ -1,16 +1,17 @@
table {
width: 100%;
width: 100%;
text-align: center;
.cdk-header-cell {
text-align: center;
.cdk-header-cell {
text-align: center;
}
}
.maginleft {
margin-left: 5px;
}
.content {
width: 100%;
height: 100%;
overflow: hidden;
background: #F2F5F6;
}
.header {
width: 100%;
padding: 10px;
@ -25,39 +26,29 @@ table {
align-items:center;
justify-content:center;
.queryField {
margin: 0 15px;
margin: 0 25px;
font-size: 14px;
input {
width: 280px;
height: 22px;
line-height: 22px;
// border-radius: 3px;
width: 160px;
height: 34px;
line-height: 34px;
border-radius: 5px;
padding-left: 5px;
outline: none;
border: 1px solid rgb(226, 211, 211);
}
button { color: #fff; }
}
.btnbox{
float: right;
}
} //queryBox
}
.operationSpan{
margin: 0 5px;
.spanbtn:hover{
text-decoration: underline;
margin: 0 10px;
.spanbtn {
font-weight: 550;
cursor: pointer;
}
.blue{
color:rgb(24, 144, 255) ;
}
.red{
color: rgb(245, 34, 45);
}
.gray{
color: gray;
}
}
.icon{
font-size: 18px;
vertical-align: top;
.green{ color: #04ced1; }
.red{ color: #FF8678 }
.gray{ color: gray; }
}

25
src/app/ui/teacherManagement/enterpriseuser.component.ts

@ -21,15 +21,12 @@ export class TeacherManagementComponent implements OnInit {
this.initData()
}
displayedColumns: string[] = ['name', 'identitycard', 'post', 'operation',];
displayedColumns: string[] = ['identitycard', 'name', 'post', 'time', 'operation',];
dataSource:any; //所有企业用户
userLogin:string; //搜索账号
userName:string; //搜索名称
creditcode:string//统一社会信用代码
name:any //姓名
identityCard:any //身份证
name:any //用户姓名
identityCard:any //用户账号
fireTeam:any; //消防救援站
//分页
@ViewChild(MatPaginator, {static: true})
@ -64,7 +61,6 @@ export class TeacherManagementComponent implements OnInit {
RoleType: '1',
}
this.http.get('/api/Users',{params:data}).subscribe((data:any)=>{
// console.log(666,data)
this.length = data.totalCount
this.pageSize = data.pageSize
this.pageEvent.pageIndex = 0
@ -93,7 +89,7 @@ export class TeacherManagementComponent implements OnInit {
this.name = ''
this.initData()
}
//创建教员
open(){
let dialogRef = this.dialog.open(AddTeacher, {//调用open方法打开对话框并且携带参数过去
@ -143,16 +139,6 @@ export class TeacherManagementComponent implements OnInit {
})
}
//查看企业信息
see (e) {
// this.http.get(`/api/CompanyUsers/${e.name}`).subscribe(
// data=> {
// let dialogRef = this.dialog.open(seeTeacher, {data});
// dialogRef.afterClosed().subscribe();
// }
// )
}
//启用
enabled (e) {
let date = new Date()
@ -193,7 +179,6 @@ export class TeacherManagementComponent implements OnInit {
})
}
//删除
delete (e) {
let isTrue = confirm('您确定要删除吗')

4
src/app/ui/ui-routing.module.ts

@ -17,7 +17,9 @@ const routes: Routes = [
{ path: 'looktest', component:LookOverTestComponent },
{ path: 'statisticAnalysis', component:StatisticAnalysisComponent },
{ path: 'joinExam', component:JoinExamComponent },
{ path: 'testRecords', component:TestRecordsComponent }
{ path: 'testRecords', component:TestRecordsComponent },
{ path: 'teachear', component:TeacherManagementComponent }, //管理员 教员页面
{ path: 'examinee', component:EnterpriseuserComponent }, //管理员 考生页面
]
@NgModule({
imports: [RouterModule.forChild(routes)],

3
src/app/ui/ui.module.ts

@ -50,7 +50,6 @@ import {ConfirmpswDirective} from './changepassword/equal-validator.directive';
import { FileUploadModule } from 'ng2-file-upload'
import { AllFileComponent, ViewDetails, FolderDialog } from './all-file/all-file.component';
import { ChangeuserdataComponent } from './changeuserdata/changeuserdata.component';
import { LoginComponent } from './login/login.component';
import { IsLoginService } from '../is-login.service';
import { UploadFilesComponent } from './upload-files/upload-files.component';
import {AddEnterpriserUser} from './enterpriseuser/addenterpriseuser.component';
@ -67,7 +66,7 @@ import { JoinExamComponent } from './join-exam/join-exam.component';
import { TestRecordsComponent } from './test-records/test-records.component'
import { NzDatePickerModule } from 'ng-zorro-antd/date-picker';
@NgModule({
declarations: [FolderDialog,ViewDetails,ChangepasswordComponent,SizePipe,NamePipe,NamePipe2,NamePipe3,ConfirmpswDirective, AllFileComponent, ChangeuserdataComponent, LoginComponent, UploadFilesComponent,AddEnterpriserUser,EnterpriseuserComponent,editenterpriseuser,seeenterpriseuser,TeacherManagementComponent,editTeacher,AddTeacher,seeTeacher, LearningRecordDetailsComponent, EhartsStatisticsComponent, CreateExamComponent, LookOverTestComponent, StatisticAnalysisComponent, JoinExamComponent, TestRecordsComponent,testState,CreateDialog],
declarations: [FolderDialog,ViewDetails,ChangepasswordComponent,SizePipe,NamePipe,NamePipe2,NamePipe3,ConfirmpswDirective, AllFileComponent, ChangeuserdataComponent, UploadFilesComponent,AddEnterpriserUser,EnterpriseuserComponent,editenterpriseuser,seeenterpriseuser,TeacherManagementComponent,editTeacher,AddTeacher,seeTeacher, LearningRecordDetailsComponent, EhartsStatisticsComponent, CreateExamComponent, LookOverTestComponent, StatisticAnalysisComponent, JoinExamComponent, TestRecordsComponent,testState,CreateDialog],
imports: [
NzDatePickerModule,

Loading…
Cancel
Save