Browse Source

[合并]合并代码

master
邵佳豪 4 years ago
parent
commit
a49c32136e
  1. 1
      src/app/examiner/examiner-index/examiner-index.component.html
  2. 0
      src/app/examiner/examiner-index/examiner-index.component.scss
  3. 12
      src/app/examiner/examiner-index/examiner-index.component.spec.ts
  4. 15
      src/app/examiner/examiner-index/examiner-index.component.ts
  5. 10
      src/app/examiner/examiner-routing.ts
  6. 5
      src/app/examiner/examiner.module.ts
  7. 46
      src/app/navigation/navigation.component.html
  8. 70
      src/app/navigation/navigation.component.scss
  9. 7
      src/app/navigation/navigation.component.ts
  10. 26
      src/app/pages/lockscreen/lockscreen.component.html
  11. 114
      src/app/pages/lockscreen/lockscreen.component.scss
  12. 4
      src/app/pages/lockscreen/lockscreen.component.ts
  13. 34
      src/app/pages/login/login.component.html
  14. 95
      src/app/pages/login/login.component.scss
  15. 6
      src/app/pages/login/login.component.ts
  16. 32
      src/app/tabbar/tabbar.component.html
  17. 12
      src/app/tabbar/tabbar.component.scss
  18. 8
      src/app/tabbar/tabbar.component.ts
  19. 105
      src/app/ui/enterpriseuser/enterpriseuser.component.html
  20. 57
      src/app/ui/enterpriseuser/enterpriseuser.component.scss
  21. 11
      src/app/ui/enterpriseuser/enterpriseuser.component.ts
  22. 29
      src/app/ui/login/login.component.html
  23. 45
      src/app/ui/login/login.component.scss
  24. 42
      src/app/ui/login/login.component.ts
  25. 112
      src/app/ui/teacherManagement/enterpriseuser.component.html
  26. 57
      src/app/ui/teacherManagement/enterpriseuser.component.scss
  27. 25
      src/app/ui/teacherManagement/enterpriseuser.component.ts
  28. 4
      src/app/ui/ui-routing.module.ts
  29. 3
      src/app/ui/ui.module.ts
  30. BIN
      src/assets/images/Statistics.png
  31. BIN
      src/assets/images/backbottom.png
  32. BIN
      src/assets/images/backleft.png
  33. BIN
      src/assets/images/found.png
  34. BIN
      src/assets/images/login.gif
  35. BIN
      src/assets/images/login.png
  36. BIN
      src/assets/images/loginBGC.png
  37. BIN
      src/assets/images/loginBackground.jpg
  38. BIN
      src/assets/images/loginHeader.png
  39. BIN
      src/assets/images/logo.png
  40. BIN
      src/assets/images/logo1.png
  41. BIN
      src/assets/images/papers.png
  42. BIN
      src/assets/images/sign.png
  43. BIN
      src/assets/images/uppsd.png

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

@ -0,0 +1 @@
<p>examiner-index works!</p>

0
src/app/examiner/examiner-index/examiner-index.component.scss

12
src/app/ui/login/login.component.spec.ts → src/app/examiner/examiner-index/examiner-index.component.spec.ts

@ -1,20 +1,20 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { LoginComponent } from './login.component'; import { ExaminerIndexComponent } from './examiner-index.component';
describe('LoginComponent', () => { describe('ExaminerIndexComponent', () => {
let component: LoginComponent; let component: ExaminerIndexComponent;
let fixture: ComponentFixture<LoginComponent>; let fixture: ComponentFixture<ExaminerIndexComponent>;
beforeEach(async(() => { beforeEach(async(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
declarations: [ LoginComponent ] declarations: [ ExaminerIndexComponent ]
}) })
.compileComponents(); .compileComponents();
})); }));
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(LoginComponent); fixture = TestBed.createComponent(ExaminerIndexComponent);
component = fixture.componentInstance; component = fixture.componentInstance;
fixture.detectChanges(); fixture.detectChanges();
}); });

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

@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-examiner-index',
templateUrl: './examiner-index.component.html',
styleUrls: ['./examiner-index.component.scss']
})
export class ExaminerIndexComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}

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

@ -1,8 +1,18 @@
/*
* @Descripttion:
* @version:
* @Author: sueRimn
* @Date: 2020-12-10 12:11:26
* @LastEditors: sueRimn
* @LastEditTime: 2020-12-11 09:15:24
*/
import { Routes, RouterModule } from '@angular/router'; import { Routes, RouterModule } from '@angular/router';
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { ExaminerIndexComponent } from './examiner-index/examiner-index.component'
const routes: Routes = [ const routes: Routes = [
// { path: '', component:CreateExamComponent } // { path: '', component:CreateExamComponent }
{ path: 'createexam-index', component:ExaminerIndexComponent }
] ]
@NgModule({ @NgModule({

5
src/app/examiner/examiner.module.ts

@ -50,6 +50,11 @@ import { myPaginator } from '../ui/my-paginator';
import { AddPlanDialog, AddPlanTwoDialog, CreateTestScoreComponent } from './create-test-score/create-test-score.component'; import { AddPlanDialog, AddPlanTwoDialog, CreateTestScoreComponent } from './create-test-score/create-test-score.component';
import { NavigationModule } from '../navigation/navigation.module'; import { NavigationModule } from '../navigation/navigation.module';
import { NzTreeModule } from 'ng-zorro-antd/tree'; import { NzTreeModule } from 'ng-zorro-antd/tree';
import { ExaminerIndexComponent } from './examiner-index/examiner-index.component';
@NgModule({ @NgModule({
declarations: [CreateTestScoreComponent,AddPlanDialog,AddPlanTwoDialog], declarations: [CreateTestScoreComponent,AddPlanDialog,AddPlanTwoDialog],
imports: [ imports: [

46
src/app/navigation/navigation.component.html

@ -1,21 +1,35 @@
<!--
* @Descripttion:
* @version:
* @Author: sueRimn
* @Date: 2020-12-10 10:21:40
* @LastEditors: sueRimn
* @LastEditTime: 2020-12-11 10:01:35
-->
<mat-sidenav-container class="example-container" autosize [class.myapp-dark-theme]="darktheme"> <mat-sidenav-container class="example-container" autosize [class.myapp-dark-theme]="darktheme">
<mat-sidenav #drawer class="example-sidenav" mode="side" opened="true" color="primary" style="overflow-x: hidden;">
<mat-sidenav #drawer class="example-sidenav" mode="side" opened="true" color="primary" style="overflow-x: hidden;"> <div class="backtopleft">
<div class="biglogobox"> <img src="../../assets/images/backleft.png" style="height: 60px;width: 93px;">
<img src="../../assets/images/logo.png" alt="logo"> </div>
</div> <div class="biglogobox">
<div class="navbox"> <div class="biglogoimg">
<ul class="teacher"> <img src="../../assets/images/logo.png" alt="logo">
<li [routerLink]="['/home/createexam']" routerLinkActive="router-link-active" >创建考试</li> </div>
<li [routerLink]="['/home/looktest']" routerLinkActive="router-link-active" >阅卷</li> <div class="biglogospan">
<li [routerLink]="['/home/statisticAnalysis']" routerLinkActive="router-link-active" >统计分析</li> <div class="top"><span style="font-size: 22px;font-weight: 800;margin-left: 3px;">上海消防救援</span></div>
</ul> <div class="down"><span style="font-size: 4px;font-weight: 400;width: 125px;">shanghai fire and rescue</span></div>
<ul class="student"> </div>
<li [routerLink]="['/home/joinExam']" routerLinkActive="router-link-active" >参加考试</li>
<li [routerLink]="['/home/testRecords']" routerLinkActive="router-link-active" >考试记录</li> </div>
</ul> <div class="navbox">
</div> <ul class="teacher">
<li [routerLink]="['/home/createexam']" routerLinkActive="router-link-active" ><div (click)="clickLeftmenu('found')" [ngClass]="{'clickStyle': leftMenuname=='found'}"><img src="../../assets/images/found.png" style="background-color: #FFFFFF;"> 创建考试</div></li>
<li [routerLink]="['/home/looktest']" routerLinkActive="router-link-active" ><div (click)="clickLeftmenu('papers')" [ngClass]="{'clickStyle': leftMenuname=='papers'}"><img src="../../assets/images/papers.png" style="position: relative;right: 20px;background-color: #07CDCF;"> 阅卷</div></li>
<li [routerLink]="['/home/statisticAnalysis']" routerLinkActive="router-link-active" ><div (click)="clickLeftmenu('Statistics')" [ngClass]="{'clickStyle': leftMenuname=='Statistics'}"><img src="../../assets/images/Statistics.png" style="background-color: #07CDCF;"> 统计分析</div></li>
</ul>
<img style="width: 191px;height: 113px; position: absolute; bottom: 0;" src="../../assets/images/backbottom.png">
</div>
</mat-sidenav> </mat-sidenav>

70
src/app/navigation/navigation.component.scss

@ -9,8 +9,9 @@ mat-accordion{
mat-sidenav{ mat-sidenav{
box-shadow: 2px 0px 5px #888888; box-shadow: 2px 0px 5px #888888;
color: white; color: white;
background: url(../../assets/images/main_bg.png) 100% 100%; //background: url(../../assets/images/main_bg.png) 100% 100%;
width: 194px; background-color: #07CDCF;
width: 216px;
overflow-x: hidden; overflow-x: hidden;
p{ p{
height: 48px; height: 48px;
@ -91,13 +92,26 @@ mat-sidenav{
overflow-y: scroll; overflow-y: scroll;
font-size: 15px; font-size: 15px;
.router-link-active{ .router-link-active{
background-color: #5d9cf2; background-color: #FFFFFF;
} }
ul{ ul{
li{ li{
width: 198px;
height: 44px;
line-height:44px;
font-size: 20px;
margin-left: 10px;
margin-top: 30px;
position: relative; position: relative;
text-align: center; text-align: center;
border-bottom: 1px solid #326db1; outline:none;
}
img{
position: relative;
top: 2px;
width: 18px;
height: 20px;
} }
} }
} }
@ -109,7 +123,7 @@ mat-sidenav{
} }
ul li{ ul li{
background-color: white; background-color: white;
color: black; //color: black;
} }
.biglogobox{ .biglogobox{
background-color: #d50000; background-color: #d50000;
@ -118,20 +132,33 @@ mat-sidenav{
color: black; color: black;
} }
.biglogobox{ .biglogobox{
width: 194px; width: 220px;
height: 148px; height: 56px;
background-color: #4699f6;
display: block; display: block;
text-align: center; text-align: center;
position: relative; display: flex;
left: 0;
margin-bottom: 20px;
color: #FFF; color: #FFF;
margin: 0 auto; margin: 0 auto;
border-bottom: 1px solid rgba(0, 0, 0, 0.12); .biglogoimg{
margin-left: 20px;
height: 40px;
width: 36px;
}
.biglogospan{
display: flex;
flex-direction: column;
.down{
position: relative;
bottom: 7px;
width: 125px;
span{
white-space: nowrap;
}
}
}
img{ img{
width: 138px; width: 32px;
height: 138px; height: 34px;
margin-top: 6px; margin-top: 6px;
} }
} }
@ -162,9 +189,9 @@ mat-sidenav{
color: white; color: white;
} }
.example-container .navbox .router-link-active { .example-container .router-link-active {
background-color: rgba(225,225,225,.5); background-color: rgba(225,225,225,.5);
border:0 border-radius: 8px ;
} }
.btn{ .btn{
text-align: center; text-align: center;
@ -190,4 +217,15 @@ mat-sidenav{
border-radius: 50%; border-radius: 50%;
border: 2px solid #fff; border: 2px solid #fff;
font-weight: 550; font-weight: 550;
}
//选中左侧菜单样式
.clickStyle{
background-color: #FFFFFF;
border-radius: 8px ;
//border:1px solid #FFFFFF ;
color: #07CDCF;
}
//鼠标移入改变背景色
.onmousbackcolor{
background-color: #FFFFFF;
} }

7
src/app/navigation/navigation.component.ts

@ -23,6 +23,13 @@ export class NavigationComponent implements OnInit {
selectedDataBank:any //当前选中的资料库 selectedDataBank:any //当前选中的资料库
hoverDataBank:any //当前鼠标移入的资料库 hoverDataBank:any //当前鼠标移入的资料库
isOneClick:boolean //是否第一次进入网页 isOneClick:boolean //是否第一次进入网页
leftMenuname=""
//左侧菜单点击事件
clickLeftmenu(name){
this.leftMenuname=name
console.log(this.leftMenuname)
}
//支队级菜单 //支队级菜单
detachmentMenus:any = [ detachmentMenus:any = [

26
src/app/pages/lockscreen/lockscreen.component.html

@ -1,13 +1,18 @@
<div class="content"> <div class="content">
<h1 class="header">考试系统</h1> <div class="leftBox"></div>
<div class="loginBox"> <div class="loginBox">
<div class="center"> <div class="center">
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm" class="example-container"> <form (ngSubmit)="onSubmit(form.value)" #form="ngForm" class="example-container">
<div class="input">
<img src="../../../assets/images/loginHeader.png">
<h1>消防救援单位信息考核系统</h1>
</div>
<div class="input" style="margin-bottom: 50px;"> <div class="input" style="margin-bottom: 50px;">
<label class="role" [ngClass]="{'isCheck': roleType=='2'}" (click)='toggle(2)'>学员</label> <label class="role" [ngClass]="{'isCheck': roleType=='2'}" (click)='toggle(2)'>考官</label>
<label class="role" [ngClass]="{'isCheck': roleType=='1'}" (click)='toggle(1)'>教员</label> <label class="role" [ngClass]="{'isCheck': roleType=='1'}" (click)='toggle(1)'>考生</label>
</div> </div>
<div class="input"> <div class="input">
@ -20,20 +25,13 @@
<input id="password" name="password" type='password' required ngModel placeholder="请输入登录密码" maxlength="20"> <input id="password" name="password" type='password' required ngModel placeholder="请输入登录密码" maxlength="20">
</div> </div>
<div class="forget"> <div class="forget"><label (click)='forget()'>忘记密码?</label></div>
<label (click)='forget()'>忘记密码?</label> <div *ngIf="errmsg" class="alert-danger">{{errmsg}}</div>
</div>
<div *ngIf="errmsg" class="alert-danger">
{{errmsg}}
</div>
<button type="submit" [disabled]="!form.form.valid" class="loginBtn" mat-raised-button>登录</button> <button type="submit" [disabled]="!form.form.valid" class="loginBtn" mat-raised-button>登录</button>
<label class="toAdmin" (click)='toAdminLogin()'>管理员登录</label>
</form> </form>
</div> </div>
<img src="../../../assets/images/login.png" class="loginBackground">
</div> </div>
<p class="toLogin" title="管理员登录" (click)='toAdminLogin()'><mat-icon>arrow_drop_down_circle</mat-icon></p>
<p class="footer">Copyright <mat-icon style="vertical-align: top; font-size: 20px;">copyright</mat-icon> 2019 北京安信科创软件有限公司出品</p>
</div> </div>

114
src/app/pages/lockscreen/lockscreen.component.scss

@ -1,76 +1,31 @@
.content { .content {
width: 100%; width: 100%;
height: 100%; height: 100%;
max-height: 100%;
display: flex; display: flex;
justify-content:center; overflow: hidden;
align-items: center;
background: url('../../../assets//images/loginBGC.png');
background-repeat:no-repeat;
background-size:100% 100%;
-moz-background-size:100% 100%;
}
.loginBox {
min-width: 1080px;
min-height: 610px;
margin: 0 auto;
width: 70%;
text-align: center;
box-sizing: border-box; box-sizing: border-box;
position: relative; padding: 1px;
.leftBox {
.loginBackground{ flex: 70%;
width: 100%; background: url('../../../assets/images/loginBackground.png');
height: 100%; background-size: 100% 100%;
margin: 0 auto;
}
.center {
width: 30%;
box-sizing: border-box;
margin: 0 auto;
position: absolute;
top: 24%;
right: 16%;
} }
} .loginBox {
flex: 30%;
.header { position: relative;
width: 100%; display: flex;
text-align: center; // align-items: center;
position: fixed; background-color: #fff;
top: 60px; .center {
font-size: 46px; width: 60%;
font-weight: 800; margin: 0 auto;
color: #fff; text-align: center;
font-family: 'NSimSun'; box-sizing: border-box;
} padding-top: 120px;
.footer { }
width: 100%;
text-align: center;
position: fixed;
bottom: 35px;
font-size: 14px;
color: white;
}
.toLogin{
color: #B0B0B0;
transform: rotate(90deg);
transform-origin: center center;
position: fixed;
left: 1%;
bottom: 1%;
cursor:pointer;
mat-icon{
width: 36px;
height: 36px;
font-size: 36px;
cursor:pointer;
} }
} }
// 表单内部样式 // 表单内部样式
.forget{ .forget{
width: 100%; width: 100%;
@ -79,7 +34,7 @@
label { label {
box-sizing: border-box; box-sizing: border-box;
font-size: 14px; font-size: 14px;
color: #2196f3; color: #07CDCF;
cursor:pointer; cursor:pointer;
} }
} }
@ -93,7 +48,7 @@
width: 100%; width: 100%;
color: white; color: white;
border-radius: 5px; border-radius: 5px;
background:linear-gradient(to right,#4DA3FE,#52b9fe,#56cdff) background:linear-gradient(to right,#07CDCF,#07CDCF,#0ad6da);
} }
//input + 字体图标 //input + 字体图标
.input { .input {
@ -102,14 +57,13 @@
position: relative; position: relative;
.role{ .role{
box-sizing: border-box; box-sizing: border-box;
margin: 0px 15px; padding: 10px 0;
margin: 0 10px;
display: inline-block; display: inline-block;
width: 30%;
text-align: center; text-align: center;
font-size: 26px; font-size: 18px;
font-weight: 800; font-weight: 550;
font-family: 'NSimSun'; color: #07CDCF;
color: #4DA1FE;
cursor:pointer; cursor:pointer;
} }
input { input {
@ -119,6 +73,8 @@
height: 36px; height: 36px;
padding-left: 30px; padding-left: 30px;
} }
img { width: 75px; height: 80px; }
h1 { font-size:28px; font-weight:700; margin-top:25px; font-style:italic; }
} }
.icon { .icon {
width: 24px; width: 24px;
@ -136,8 +92,20 @@
top: 7px; top: 7px;
left: 8px; left: 8px;
} }
.toAdmin {
display: inline-block;
width: 100%;
text-align: center;
font-size: 14px;
font-weight: 550;
color: #07CDCF;
cursor:pointer;
position: absolute;
bottom: 25px;
left: 0;
}
//class名是否选中 //class名是否选中
.isCheck { .isCheck {
border-bottom: 3px solid #4DA1FE; border-bottom: 3px solid #07CDCF;
} }

4
src/app/pages/lockscreen/lockscreen.component.ts

@ -36,11 +36,7 @@ export class LockscreenComponent implements OnInit {
sessionStorage.setItem("token",data.token); sessionStorage.setItem("token",data.token);
sessionStorage.setItem("refreshToken",data.refreshToken); sessionStorage.setItem("refreshToken",data.refreshToken);
this.token.startUp(); //登陆成功启动定时器刷新token this.token.startUp(); //登陆成功启动定时器刷新token
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.router.navigate(['/home/createexam']) //登陆成功跳转页面 this.router.navigate(['/home/createexam']) //登陆成功跳转页面
this.snackBar.open('登陆成功','确定',config);
},(err) => {this.errmsg = err}) },(err) => {this.errmsg = err})
} }

34
src/app/pages/login/login.component.html

@ -1,33 +1,31 @@
<div class="content"> <div class="login">
<div class="loginBox"> <div class="loginBox">
<h1 class="header">灭火救援指挥培训系统 (管理员)</h1>
<div class="center"> <div>
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm" class="example-container"> <div class="card">
<span class="cardheader">考核系统管理员登录页面</span>
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm" class="example-container">
<div class="input"> <div class="input">
<mat-icon class="icon">account_box</mat-icon> <mat-icon class="icon">account_box</mat-icon>
<input id="name" name="name" required ngModel placeholder="请输入用户名" maxlength="18"> <input id="name" name="name" required ngModel placeholder="请输入用户名" maxlength="20">
</div> </div>
<div class="input"> <div class="input">
<mat-icon class="icon2">lock</mat-icon> <mat-icon class="icon2">lock</mat-icon>
<input id="password" name="password" type='password' required ngModel placeholder="请输入登录密码" maxlength="18"> <input id="password" name="password" type='password' required ngModel placeholder="请输入登录密码" maxlength="20">
</div> </div>
<div class="forget"><label (click)='forget()'>忘记密码?</label></div>
<div *ngIf="errmsg" class="alert-danger">{{errmsg}}</div>
<button type="submit" [disabled]="!form.form.valid" class="loginBtn" mat-raised-button>登录</button>
<label class="toAdmin" (click)='toAdminLogin()'>返回</label>
<div class="forget">
<label (click)='forget()'>忘记密码?</label>
</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> </form>
</div>
</div>
</div>
</div> </div>
<p class="toLogin" title="教员学员登录" (click)='toAdminLogin()'><mat-icon>arrow_drop_down_circle</mat-icon></p>
<p class="footer">Copyright <mat-icon style="vertical-align: top; font-size: 20px;">copyright</mat-icon> 2019 北京安信科创软件有限公司出品</p>
</div> </div>

95
src/app/pages/login/login.component.scss

@ -1,81 +1,66 @@
.content { .login {
width: 100%; width: 100%;
height: 100%; height: 100%;
max-height: 100%; overflow: hidden;
background: url('../../../assets//images/loginBackground.jpg'); box-sizing: border-box;
background-repeat:no-repeat; padding: 1px;
background: url('../../../assets/images/loginBackground.png');
background-size:100% 100%; background-size:100% 100%;
-moz-background-size:100% 100%;
} }
.loginBox { .loginBox {
margin: 0 auto;
width: 40%;
text-align: center;
box-sizing: border-box;
padding: 8% 0;
.header {
font-size: 34px;
font-weight: 650;
font-family: 'NSimSun';
}
.center {
padding: 100px 0;
width: 50%;
box-sizing: border-box;
margin: 0 auto;
}
}
.footer {
width: 100%; width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.card {
width: 500px;
height: 355px;
border-radius: 10px;
padding-top: 30px;
background-color: #fff;
text-align: center; text-align: center;
position: fixed; box-shadow:0px 0px 10px 5px #333;
bottom: 35px; position: relative;
color: #858688; .example-container { width: 60%; margin: 0 auto; }
font-size: 14px;
} }
.toLogin{ .cardheader{
color: #B0B0B0; font-size: 26px;
transform: rotate(270deg); font-weight: 700;
transform-origin: center center; font-style: italic;
position: fixed; color: #07CDCF;
left: 1%;
bottom: 1%;
cursor:pointer;
mat-icon{
width: 36px;
height: 36px;
font-size: 36px;
cursor:pointer;
}
} }
// 表单内部样式 // 表单内部样式
.forget{ .forget{
margin: 30px auto; width: 100%;
text-align: right;
margin: 15px auto;
label { label {
margin-left: 80%;
box-sizing: border-box; box-sizing: border-box;
font-size: 14px; font-size: 14px;
color: #2196f3; color: #07CDCF;
cursor:pointer; cursor:pointer;
} }
} }
.alert-danger { .alert-danger {
margin-bottom: 30px; margin-bottom: 10px;
text-align: left; text-align: left;
font-size: 14px; font-size: 14px;
color: red; color: red;
} }
.loginBtn { .loginBtn {
width: 100%; width: 100%;
color: white;
border-radius: 5px;
background:linear-gradient(to right,#07CDCF,#07CDCF,#0ad6da);
} }
//input + 字体图标 //input + 字体图标
.input { .input {
width: 100%; width: 100%;
margin: 30px auto; margin: 35px auto 0;
position: relative; position: relative;
input { input {
width: 90%; width: 90%;
@ -100,4 +85,16 @@
position: absolute; position: absolute;
top: 7px; top: 7px;
left: 8px; left: 8px;
}
.toAdmin {
display: inline-block;
width: 100%;
text-align: center;
font-size: 14px;
font-weight: 550;
color: #07CDCF;
cursor:pointer;
position: absolute;
bottom: 10px;
left: 0;
} }

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

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

32
src/app/tabbar/tabbar.component.html

@ -1,30 +1,34 @@
<mat-toolbar style="background-color: #3b8cff;"> <!--
* @Descripttion:
* @version:
* @Author: sueRimn
* @Date: 2020-12-10 10:21:40
* @LastEditors: sueRimn
* @LastEditTime: 2020-12-11 10:01:47
-->
<mat-toolbar style="background-color:#FFFFFF;height: 60px;">
<!-- <mat-toolbar> --> <!-- <mat-toolbar> -->
<p style="color: white;border-bottom: 3px solid #fff;border-radius: 3px; font-size: 16px;padding: 0 4px;">考核系统</p> <p>欢迎登录消防救援考核系统</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"> <button mat-icon-button class="login">
<mat-icon>account_circle</mat-icon> <mat-icon>account_circle</mat-icon>
</button> </button>
<span style="position: absolute;right:80px;color: #1E2323;font-size: 16px;">用户名:{{realName}}<mat-icon [matMenuTriggerFor]="appMenu" style="color: #1E2323;position: relative;top: 8px;cursor: pointer;">keyboard_arrow_down</mat-icon></span>
<mat-menu #appMenu="matMenu"> <mat-menu #appMenu="matMenu">
<!-- <button mat-menu-item (click)='changeUserData()'> <!-- <button mat-menu-item (click)='changeUserData()'>
<mat-icon>perm_identity</mat-icon> <mat-icon>perm_identity</mat-icon>
<span>修改资料</span> <span>修改资料</span>
</button> --> </button> -->
<button mat-menu-item (click)='changPassword()'> <button mat-menu-item >
<mat-icon>verified_user</mat-icon> <img style="width: 16px;height: 18px;position: relative;top: 2px;" src="../../assets/images/uppsd.png">
<span>修改密码</span> <span style="margin-left: 5px;">修改密码</span>
</button> </button>
<button mat-menu-item (click)='signOut()'> <button mat-menu-item (click)='signOut()'>
<mat-icon>power_settings_new</mat-icon> <img style="width: 16px;height: 18px;position: relative;top: 2px;" src="../../assets/images/sign.png">
<span>退出系统</span> <span style="margin-left: 5px;">安全退出</span>
</button> </button>
</mat-menu> </mat-menu>

12
src/app/tabbar/tabbar.component.scss

@ -8,5 +8,15 @@ mat-icon{
} }
.login{ .login{
position: absolute; position: absolute;
right:60px; right:220px;
background-color: #000000;
}
p{
color:#1E2323;
border-bottom: 3px solid #fff;
border-radius: 3px;
font-size: 25px;
padding: 0 4px;
font-weight: 400;
line-height: 34px;
} }

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

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

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

@ -1,68 +1,77 @@
<div class="header"> <div class="content">
<form #form="ngForm"> <div class="header">
<div class="queryBox"> <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 class="queryField">
</div> <label style="margin-right: 10px;">用户姓名:</label>
<input type="text" [(ngModel)]="name" name="name" autocomplete="off" placeholder="请输入用户姓名">
<div class="queryField"> </div>
<label style="margin-right: 10px;">姓名:</label> <div class="queryField">
<input type="text" [(ngModel)]="name" name="name" autocomplete="off"> <label style="margin-right: 10px;">身份证号:</label>
</div> <input type="text" [(ngModel)]="identityCard" name="identityCard" autocomplete="off" placeholder="请输入身份证号">
</div>
<div class="queryField"> <div class="queryField">
<label style="margin-right: 10px;">身份证号:</label> <label style="margin-right: 10px;">消防救援站:</label>
<input type="text" [(ngModel)]="identityCard" name="identityCard" autocomplete="off"> <input type="text" [(ngModel)]="fireTeam" name="fireTeam" autocomplete="off" placeholder="请选择消防救援站">
</div> </div>
<div class="btnbox" style="margin-left: 90px;"> <div class="queryField">
<button mat-raised-button color="primary" (click)='initData()'>查询</button> <button mat-raised-button (click)='initData()' style="background-color: #07CDCF;">查询</button>
<button mat-raised-button style="margin-left: 10px;" type="button" (click)='empty()'>重置</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>
</div> </form>
</div>
</form>
</div> <table mat-table [dataSource]="dataSource">
<table mat-table [dataSource]="dataSource" class="mat-elevation-z8">
<ng-container matColumnDef="name"> <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> <td mat-cell *matCellDef="let element">{{element.realName}}</td>
</ng-container> </ng-container>
<ng-container matColumnDef="identitycard"> <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> <td mat-cell *matCellDef="let element">{{element.name}}</td>
</ng-container> </ng-container>
<ng-container matColumnDef="post"> <ng-container matColumnDef="post">
<th mat-header-cell *matHeaderCellDef>职务</th> <th mat-header-cell *matHeaderCellDef>消防救援站</th>
<td mat-cell *matCellDef="let element"> <td mat-cell *matCellDef="let element">上海总队</td>
<span *ngFor="let item of element.posts">
{{item.name}}
</span>
</td>
</ng-container> </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"> <ng-container matColumnDef="operation">
<th mat-header-cell *matHeaderCellDef>操作</th> <th mat-header-cell *matHeaderCellDef>操作</th>
<td mat-cell *matCellDef="let element"> <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"><span class="spanbtn green" (click)="reset(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"><span class="spanbtn green" (click)="edit(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"><span class="spanbtn red" (click)="noEnabled(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"><span class="spanbtn gray" (click)="enabled(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"><span class="spanbtn red" (click)="delete(element)">删除</span></span>
<span class="operationSpan"><mat-icon class="icon">delete</mat-icon><span class="spanbtn red" (click)="delete(element)">删除</span></span>
</td> </td>
</ng-container> </ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr> <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr> <tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table> </table>
<mat-paginator [length]="length" <mat-paginator [length]="length"
[pageSize]="pageSize" [pageSize]="pageSize"
[pageSizeOptions]="pageSizeOptions" [pageSizeOptions]="pageSizeOptions"
(page)="chagePage($event)"> (page)="chagePage($event)">
</mat-paginator> </mat-paginator>
</div>

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

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

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

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"> <div class="content">
<form #form="ngForm"> <div class="header">
<div class="queryBox"> <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 class="queryField">
</div> <label style="margin-right: 10px;">用户账号:</label>
<input type="text" [(ngModel)]="identityCard" name="identityCard" autocomplete="off" placeholder="请输入用户账号">
<div class="queryField"> </div>
<label style="margin-right: 10px;">姓名:</label> <div class="queryField">
<input type="text" [(ngModel)]="name" name="name" autocomplete="off"> <label style="margin-right: 10px;">用户姓名:</label>
</div> <input type="text" [(ngModel)]="name" name="name" autocomplete="off" placeholder="请输入用户姓名">
</div>
<div class="queryField"> <div class="queryField">
<label style="margin-right: 10px;">帐号:</label> <label style="margin-right: 10px;">消防救援站:</label>
<input type="text" [(ngModel)]="identityCard" name="identityCard" autocomplete="off"> <input type="text" [(ngModel)]="fireTeam" name="fireTeam" autocomplete="off" placeholder="请选择消防救援站">
</div> </div>
<div class="btnbox" style="margin-left: 90px;"> <div class="queryField">
<button mat-raised-button color="primary" (click)='initData()'>查询</button> <button mat-raised-button (click)='initData()' style="background-color: #07CDCF;">查询</button>
<button mat-raised-button style="margin-left: 10px;" type="button" (click)='empty()'>重置</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>
</div> </form>
</div>
</form>
</div> <table mat-table [dataSource]="dataSource">
<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>
<ng-container matColumnDef="identitycard"> <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> <td mat-cell *matCellDef="let element">{{element.name}}</td>
</ng-container> </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"> <ng-container matColumnDef="post">
<th mat-header-cell *matHeaderCellDef>职务</th> <th mat-header-cell *matHeaderCellDef>消防救援站</th>
<td mat-cell *matCellDef="let element"> <td mat-cell *matCellDef="let element">上海总队</td>
<span *ngFor="let item of element.posts">
{{item.name}}
</span>
</td>
</ng-container> </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"> <ng-container matColumnDef="operation">
<th mat-header-cell *matHeaderCellDef>操作</th> <th mat-header-cell *matHeaderCellDef>操作</th>
<td mat-cell *matCellDef="let element"> <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"><span class="spanbtn green" (click)="reset(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"><span class="spanbtn green" (click)="edit(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"><span class="spanbtn red" (click)="noEnabled(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"><span class="spanbtn gray" (click)="enabled(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"><span class="spanbtn red" (click)="delete(element)">删除</span></span>
<span class="operationSpan"><mat-icon class="icon">delete</mat-icon><span class="spanbtn red" (click)="delete(element)">删除</span></span>
</td> </td>
</ng-container> </ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr> <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr> <tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table> </table>
<mat-paginator [length]="length" <mat-paginator [length]="length"
[pageSize]="pageSize" [pageSize]="pageSize"
[pageSizeOptions]="pageSizeOptions" [pageSizeOptions]="pageSizeOptions"
(page)="chagePage($event)"> (page)="chagePage($event)">
</mat-paginator> </mat-paginator>
</div>

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

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

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

@ -21,15 +21,12 @@ export class TeacherManagementComponent implements OnInit {
this.initData() this.initData()
} }
displayedColumns: string[] = ['name', 'identitycard', 'post', 'operation',]; displayedColumns: string[] = ['identitycard', 'name', 'post', 'time', 'operation',];
dataSource:any; //所有企业用户 dataSource:any; //所有企业用户
userLogin:string; //搜索账号 name:any //用户姓名
userName:string; //搜索名称 identityCard:any //用户账号
creditcode:string//统一社会信用代码 fireTeam:any; //消防救援站
name:any //姓名
identityCard:any //身份证
//分页 //分页
@ViewChild(MatPaginator, {static: true}) @ViewChild(MatPaginator, {static: true})
@ -64,7 +61,6 @@ export class TeacherManagementComponent implements OnInit {
RoleType: '1', RoleType: '1',
} }
this.http.get('/api/Users',{params:data}).subscribe((data:any)=>{ this.http.get('/api/Users',{params:data}).subscribe((data:any)=>{
// console.log(666,data)
this.length = data.totalCount this.length = data.totalCount
this.pageSize = data.pageSize this.pageSize = data.pageSize
this.pageEvent.pageIndex = 0 this.pageEvent.pageIndex = 0
@ -93,7 +89,7 @@ export class TeacherManagementComponent implements OnInit {
this.name = '' this.name = ''
this.initData() this.initData()
} }
//创建教员 //创建教员
open(){ open(){
let dialogRef = this.dialog.open(AddTeacher, {//调用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) { enabled (e) {
let date = new Date() let date = new Date()
@ -193,7 +179,6 @@ export class TeacherManagementComponent implements OnInit {
}) })
} }
//删除 //删除
delete (e) { delete (e) {
let isTrue = confirm('您确定要删除吗') let isTrue = confirm('您确定要删除吗')

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

@ -17,7 +17,9 @@ const routes: Routes = [
{ path: 'looktest', component:LookOverTestComponent }, { path: 'looktest', component:LookOverTestComponent },
{ path: 'statisticAnalysis', component:StatisticAnalysisComponent }, { path: 'statisticAnalysis', component:StatisticAnalysisComponent },
{ path: 'joinExam', component:JoinExamComponent }, { path: 'joinExam', component:JoinExamComponent },
{ path: 'testRecords', component:TestRecordsComponent } { path: 'testRecords', component:TestRecordsComponent },
{ path: 'teachear', component:TeacherManagementComponent }, //管理员 教员页面
{ path: 'examinee', component:EnterpriseuserComponent }, //管理员 考生页面
] ]
@NgModule({ @NgModule({
imports: [RouterModule.forChild(routes)], 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 { FileUploadModule } from 'ng2-file-upload'
import { AllFileComponent, ViewDetails, FolderDialog } from './all-file/all-file.component'; import { AllFileComponent, ViewDetails, FolderDialog } from './all-file/all-file.component';
import { ChangeuserdataComponent } from './changeuserdata/changeuserdata.component'; import { ChangeuserdataComponent } from './changeuserdata/changeuserdata.component';
import { LoginComponent } from './login/login.component';
import { IsLoginService } from '../is-login.service'; import { IsLoginService } from '../is-login.service';
import { UploadFilesComponent } from './upload-files/upload-files.component'; import { UploadFilesComponent } from './upload-files/upload-files.component';
import {AddEnterpriserUser} from './enterpriseuser/addenterpriseuser.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 { TestRecordsComponent } from './test-records/test-records.component'
import { NzDatePickerModule } from 'ng-zorro-antd/date-picker'; import { NzDatePickerModule } from 'ng-zorro-antd/date-picker';
@NgModule({ @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: [ imports: [
NzDatePickerModule, NzDatePickerModule,

BIN
src/assets/images/Statistics.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 409 B

BIN
src/assets/images/backbottom.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
src/assets/images/backleft.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
src/assets/images/found.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 B

BIN
src/assets/images/login.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

BIN
src/assets/images/login.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 447 KiB

BIN
src/assets/images/loginBGC.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 KiB

BIN
src/assets/images/loginBackground.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

BIN
src/assets/images/loginHeader.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
src/assets/images/logo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
src/assets/images/logo1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

BIN
src/assets/images/papers.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 418 B

BIN
src/assets/images/sign.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 633 B

BIN
src/assets/images/uppsd.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 400 B

Loading…
Cancel
Save