chenjingyu 4 years ago
parent
commit
efc164f58c
  1. 46
      package-lock.json
  2. 3
      src/app/app-routing.module.ts
  3. 2
      src/app/app.component.ts
  4. 7
      src/app/app.module.ts
  5. 77
      src/app/examiner/create-test-score/create-test-score.component.html
  6. 125
      src/app/examiner/create-test-score/create-test-score.component.scss
  7. 12
      src/app/examiner/create-test-score/create-test-score.component.spec.ts
  8. 18
      src/app/examiner/create-test-score/create-test-score.component.ts
  9. 9
      src/app/examiner/examiner.module.ts
  10. 2
      src/app/http-interceptors/cache-token.service.ts
  11. 18
      src/app/navigation/navigation.component.html
  12. 2
      src/app/navigation/navigation.component.scss
  13. 4
      src/app/navigation/navigation.module.ts
  14. 26
      src/app/pages/lockscreen/lockscreen.component.html
  15. 114
      src/app/pages/lockscreen/lockscreen.component.scss
  16. 4
      src/app/pages/lockscreen/lockscreen.component.ts
  17. 34
      src/app/pages/login/login.component.html
  18. 95
      src/app/pages/login/login.component.scss
  19. 6
      src/app/pages/login/login.component.ts
  20. 17
      src/app/pages/pages-routing.module.ts
  21. 1
      src/app/pages/pages.component.html
  22. 0
      src/app/pages/pages.component.scss
  23. 25
      src/app/pages/pages.component.spec.ts
  24. 15
      src/app/pages/pages.component.ts
  25. 14
      src/app/pages/pages.module.ts
  26. 280
      src/app/pages/personaldata/personaldata.component.html
  27. 110
      src/app/pages/personaldata/personaldata.component.scss
  28. 25
      src/app/pages/personaldata/personaldata.component.spec.ts
  29. 15
      src/app/pages/personaldata/personaldata.component.ts
  30. 81
      src/app/pages/register/register.component.html
  31. 88
      src/app/pages/register/register.component.scss
  32. 25
      src/app/pages/register/register.component.spec.ts
  33. 19
      src/app/pages/register/register.component.ts
  34. 7
      src/app/tabbar/tabbar.component.html
  35. 8
      src/app/tabbar/tabbar.component.ts
  36. 105
      src/app/ui/enterpriseuser/enterpriseuser.component.html
  37. 57
      src/app/ui/enterpriseuser/enterpriseuser.component.scss
  38. 11
      src/app/ui/enterpriseuser/enterpriseuser.component.ts
  39. 29
      src/app/ui/login/login.component.html
  40. 45
      src/app/ui/login/login.component.scss
  41. 42
      src/app/ui/login/login.component.ts
  42. 112
      src/app/ui/teacherManagement/enterpriseuser.component.html
  43. 57
      src/app/ui/teacherManagement/enterpriseuser.component.scss
  44. 25
      src/app/ui/teacherManagement/enterpriseuser.component.ts
  45. 4
      src/app/ui/ui-routing.module.ts
  46. 7
      src/app/ui/ui.module.ts
  47. BIN
      src/assets/images/login.gif
  48. BIN
      src/assets/images/login.png
  49. BIN
      src/assets/images/loginBGC.png
  50. BIN
      src/assets/images/loginBackground.jpg
  51. BIN
      src/assets/images/loginBackground.png
  52. BIN
      src/assets/images/loginHeader.png
  53. 3
      src/index.html
  54. 7
      src/styles.scss

46
package-lock.json generated

@ -16031,8 +16031,7 @@
"ansi-regex": { "ansi-regex": {
"version": "2.1.1", "version": "2.1.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"aproba": { "aproba": {
"version": "1.2.0", "version": "1.2.0",
@ -16075,8 +16074,7 @@
"code-point-at": { "code-point-at": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"concat-map": { "concat-map": {
"version": "0.0.1", "version": "0.0.1",
@ -16087,8 +16085,7 @@
"console-control-strings": { "console-control-strings": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
@ -16205,8 +16202,7 @@
"inherits": { "inherits": {
"version": "2.0.4", "version": "2.0.4",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"ini": { "ini": {
"version": "1.3.5", "version": "1.3.5",
@ -16218,7 +16214,6 @@
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"number-is-nan": "^1.0.0" "number-is-nan": "^1.0.0"
} }
@ -16248,7 +16243,6 @@
"version": "2.9.0", "version": "2.9.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"safe-buffer": "^5.1.2", "safe-buffer": "^5.1.2",
"yallist": "^3.0.0" "yallist": "^3.0.0"
@ -16267,7 +16261,6 @@
"version": "0.5.1", "version": "0.5.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"minimist": "0.0.8" "minimist": "0.0.8"
} }
@ -16370,7 +16363,6 @@
"version": "1.4.0", "version": "1.4.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"wrappy": "1" "wrappy": "1"
} }
@ -16456,8 +16448,7 @@
"safe-buffer": { "safe-buffer": {
"version": "5.1.2", "version": "5.1.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"safer-buffer": { "safer-buffer": {
"version": "2.1.2", "version": "2.1.2",
@ -16493,7 +16484,6 @@
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"code-point-at": "^1.0.0", "code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0", "is-fullwidth-code-point": "^1.0.0",
@ -16513,7 +16503,6 @@
"version": "3.0.1", "version": "3.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"ansi-regex": "^2.0.0" "ansi-regex": "^2.0.0"
} }
@ -16557,14 +16546,12 @@
"wrappy": { "wrappy": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"yallist": { "yallist": {
"version": "3.1.1", "version": "3.1.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
} }
} }
}, },
@ -17002,8 +16989,7 @@
"console-control-strings": { "console-control-strings": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
@ -17120,8 +17106,7 @@
"inherits": { "inherits": {
"version": "2.0.4", "version": "2.0.4",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"ini": { "ini": {
"version": "1.3.5", "version": "1.3.5",
@ -17163,7 +17148,6 @@
"version": "2.9.0", "version": "2.9.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"safe-buffer": "^5.1.2", "safe-buffer": "^5.1.2",
"yallist": "^3.0.0" "yallist": "^3.0.0"
@ -17182,7 +17166,6 @@
"version": "0.5.1", "version": "0.5.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"minimist": "0.0.8" "minimist": "0.0.8"
} }
@ -17285,7 +17268,6 @@
"version": "1.4.0", "version": "1.4.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"wrappy": "1" "wrappy": "1"
} }
@ -17371,8 +17353,7 @@
"safe-buffer": { "safe-buffer": {
"version": "5.1.2", "version": "5.1.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"safer-buffer": { "safer-buffer": {
"version": "2.1.2", "version": "2.1.2",
@ -17408,7 +17389,6 @@
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"code-point-at": "^1.0.0", "code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0", "is-fullwidth-code-point": "^1.0.0",
@ -17472,14 +17452,12 @@
"wrappy": { "wrappy": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"yallist": { "yallist": {
"version": "3.1.1", "version": "3.1.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
} }
} }
}, },

3
src/app/app-routing.module.ts

@ -1,12 +1,12 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router'; import { Routes, RouterModule } from '@angular/router';
import { LoginComponent } from './pages/login/login.component'; import { LoginComponent } from './pages/login/login.component';
import { RegisterComponent } from './pages/register/register.component';
import { NavigationComponent } from './navigation/navigation.component'; import { NavigationComponent } from './navigation/navigation.component';
import { LockscreenComponent } from './pages/lockscreen/lockscreen.component'; import { LockscreenComponent } from './pages/lockscreen/lockscreen.component';
//路由守卫 //路由守卫
import {AuthGuard} from './auth.guard' import {AuthGuard} from './auth.guard'
import { CreateTestScoreComponent } from './examiner/create-test-score/create-test-score.component';
@ -22,6 +22,7 @@ const routes: Routes = [
}, },
{ path:'adminLogin', component:LoginComponent}, //管理员登录路由 { path:'adminLogin', component:LoginComponent}, //管理员登录路由
{ path:'login', component:LockscreenComponent}, //教员学员登录路由 { path:'login', component:LockscreenComponent}, //教员学员登录路由
{ path:'examiner/create-test-score', component:CreateTestScoreComponent}, //创建试卷具体分数页面
]; ];

2
src/app/app.component.ts

@ -1,6 +1,5 @@
import { Component } from '@angular/core'; import { Component } from '@angular/core';
import { HttpClient } from '@angular/common/http' import { HttpClient } from '@angular/common/http'
import { Data } from './interface'
import { Router,ActivatedRoute } from '@angular/router' import { Router,ActivatedRoute } from '@angular/router'
import { IsLoginService } from './is-login.service' //引入服务 import { IsLoginService } from './is-login.service' //引入服务
import {CacheTokenService} from './http-interceptors/cache-token.service' //引入服务 import {CacheTokenService} from './http-interceptors/cache-token.service' //引入服务
@ -14,7 +13,6 @@ import {CacheTokenService} from './http-interceptors/cache-token.service' //引
}) })
export class AppComponent { export class AppComponent {
constructor(private http:HttpClient,private router:Router,public token:CacheTokenService,public isLogin:IsLoginService) { } constructor(private http:HttpClient,private router:Router,public token:CacheTokenService,public isLogin:IsLoginService) { }
ngOnInit(): void { ngOnInit(): void {

7
src/app/app.module.ts

@ -8,7 +8,6 @@ import { MatCheckboxModule } from '@angular/material/checkbox';
import { MatIconModule } from '@angular/material/icon'; import { MatIconModule } from '@angular/material/icon';
import { MatSidenavModule } from '@angular/material/sidenav'; import { MatSidenavModule } from '@angular/material/sidenav';
import { NavigationModule } from './navigation/navigation.module'; import { NavigationModule } from './navigation/navigation.module';
import { TabbarComponent } from './tabbar/tabbar.component';
import { PagesModule } from './pages/pages.module'; import { PagesModule } from './pages/pages.module';
import { FormsModule } from '@angular/forms'; import { FormsModule } from '@angular/forms';
import { UiModule } from './ui/ui.module'; import { UiModule } from './ui/ui.module';
@ -20,6 +19,7 @@ import { IsLoginService } from './is-login.service';
import { ComponentServiceService } from './component-service.service'; import { ComponentServiceService } from './component-service.service';
import { registerLocaleData } from '@angular/common'; import { registerLocaleData } from '@angular/common';
import zh from '@angular/common/locales/zh'; import zh from '@angular/common/locales/zh';
import { ExaminerModule } from './examiner/examiner.module';
registerLocaleData(zh); registerLocaleData(zh);
@NgModule({ @NgModule({
declarations: [ declarations: [
@ -32,11 +32,12 @@ registerLocaleData(zh);
MatButtonModule, MatButtonModule,
MatCheckboxModule, MatCheckboxModule,
MatSidenavModule, MatSidenavModule,
NavigationModule, // NavigationModule,
MatIconModule, MatIconModule,
PagesModule, PagesModule,
FormsModule, FormsModule,
HttpClientModule HttpClientModule,
ExaminerModule
], ],
providers: [httpInterceptorProviders, CacheTokenService,TreeService,ComponentServiceService], providers: [httpInterceptorProviders, CacheTokenService,TreeService,ComponentServiceService],
bootstrap: [AppComponent] bootstrap: [AppComponent]

77
src/app/examiner/create-test-score/create-test-score.component.html

@ -0,0 +1,77 @@
<div class="box" id="createtestscore">
<div class="topbox">
<app-tabbar></app-tabbar>
</div>
<div class="contant">
<div class="main">
<div class="leftDiv">
<div class="title">
<div>
单位列表
</div>
<div>
总分: <span class="colorspan">120</span>
</div>
</div>
<div class="unitList">
<table>
<tr>
<td>单位名称</td>
<td>总分</td>
</tr>
<tr>
<td>富力华大酒店</td>
<td class="colorspan">80</td>
</tr>
<tr>
<td>富力华大酒店</td>
<td class="colorspan">80</td>
</tr>
</table>
</div>
</div>
<div class="rightDiv">
<div class="tabsbox">
<div [ngClass]="{selectedTab: selectedTab == 1}" (click)="selectTab(1)">
基本信息
</div>
<div [ngClass]="{selectedTab: selectedTab == 2}" (click)="selectTab(2)">
作战部署
</div>
</div>
<div class="maincontantbox">
<div class="basicinfodiv" *ngIf="selectedTab == 1">
<div>
<!-- 选择的单位名称 -->
<p class="colorspan" style="margin: 0 0 12px 6px;">宇宙无敌酒店</p>
<mat-accordion>
<mat-expansion-panel style="box-shadow: 0 0 black;">
<mat-expansion-panel-header collapsedHeight ='40px' expandedHeight='40px' style="position: relative;padding-left:20px;background: #F5FDFE;">
<mat-panel-title>
基本信息<span class="colorspan" style="margin-left: 20px;">30分</span>
</mat-panel-title>
</mat-expansion-panel-header>
<div style="box-sizing: border-box;padding: 10px 20px;">
xxxxx
</div>
</mat-expansion-panel>
</mat-accordion>
</div>
</div>
<div class="fightdeploydiv" *ngIf="selectedTab == 2">
作战部署
</div>
</div>
</div>
</div>
<div class="btnbox">
<div class="btn">
上一步
</div>
<div class="btn">
完成
</div>
</div>
</div>
</div>

125
src/app/examiner/create-test-score/create-test-score.component.scss

@ -0,0 +1,125 @@
table,table tr th, table tr td { border-bottom: 1px solid #EEF1F5; }
table { text-align: center; border-collapse: collapse; padding:2px;}
*{
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
scrollbar-width: none; /* Firefox */
}
::-webkit-scrollbar {
display: none; /* Chrome Safari */
}
.box{
width: 100%;
height: 100%;
background: #F2F5F6;
display: flex;
flex-direction: column;
box-sizing: border-box;
.contant{
flex: 1;
display: flex;
flex-direction: column;
.colorspan{
color: #07CDCF;
}
.main{
flex: 1;
display: flex;
div{
box-sizing: border-box;
background-color: #fff;
border-radius: 13px;
}
.leftDiv{
width: 18%;
margin: 20px;
margin-bottom: 0;
padding: 18px;
.title{
display: flex;
justify-content: space-between;
font-size: 16px;
}
.unitList{
margin-top: 12px;
table{
width: 100%;
font-size: 15px;
tr{
height: 35px;
td:nth-child(1){
width: 60%;
}
}
tr:nth-child(1){
background: #F5FDFE;
}
}
}
}
.rightDiv{
margin: 20px;
margin-left: 0;
flex: 1;
margin-bottom: 0;
display: flex;
flex-direction: column;
.tabsbox{
height: 46px;
border-radius: 0;
background: #F2F5F6;
div{
float: left;
height: 46px;
line-height: 46px;
width: 100px;
text-align: center;
color: #1E2323;
border-radius: 0;
border-top: 2px solid #fff;
cursor: pointer;
}
// div:nth-child(1){
// border-radius:13px 0 0 0 ;
// }
//选中选项卡
.selectedTab{
color: #07CDCF;
border-top: 2px solid #07CDCF;
}
}
.maincontantbox{
flex: 1;
overflow-y: auto;
padding: 18px;
}
}
}
.btnbox{
width: 100%;
height: 70px;
display: flex;
justify-content: center;
align-items: center;
.btn{
width: 100px;
height: 33px;
background: #01CFD5;
opacity: 1;
border-radius: 8px;
color: #FFFFFF;
text-align: center;
line-height: 33px;
font-size: 16px;
font-family: Source Han Sans CN;
margin: 0 15px;
cursor: pointer;
}
}
}
}

12
src/app/ui/login/login.component.spec.ts → src/app/examiner/create-test-score/create-test-score.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 { CreateTestScoreComponent } from './create-test-score.component';
describe('LoginComponent', () => { describe('CreateTestScoreComponent', () => {
let component: LoginComponent; let component: CreateTestScoreComponent;
let fixture: ComponentFixture<LoginComponent>; let fixture: ComponentFixture<CreateTestScoreComponent>;
beforeEach(async(() => { beforeEach(async(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
declarations: [ LoginComponent ] declarations: [ CreateTestScoreComponent ]
}) })
.compileComponents(); .compileComponents();
})); }));
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(LoginComponent); fixture = TestBed.createComponent(CreateTestScoreComponent);
component = fixture.componentInstance; component = fixture.componentInstance;
fixture.detectChanges(); fixture.detectChanges();
}); });

18
src/app/examiner/create-test-score/create-test-score.component.ts

@ -0,0 +1,18 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-create-test-score',
templateUrl: './create-test-score.component.html',
styleUrls: ['./create-test-score.component.scss']
})
export class CreateTestScoreComponent implements OnInit {
constructor() { }
selectedTab:number = 1 //选中的选项卡
selectTab(index){
this.selectedTab = index
}
ngOnInit(): void {
}
}

9
src/app/examiner/examiner.module.ts

@ -48,9 +48,13 @@ import { MatFormFieldModule } from '@angular/material/form-field';
import { MatPaginatorIntl } from '@angular/material/paginator'; import { MatPaginatorIntl } from '@angular/material/paginator';
import { myPaginator } from '../ui/my-paginator'; import { myPaginator } from '../ui/my-paginator';
import { ExaminerIndexComponent } from './examiner-index/examiner-index.component'; import { ExaminerIndexComponent } from './examiner-index/examiner-index.component';
import { CreateTestScoreComponent } from './create-test-score/create-test-score.component';
import { NavigationModule } from '../navigation/navigation.module';
@NgModule({ @NgModule({
declarations: [ExaminerIndexComponent], declarations: [CreateTestScoreComponent],
imports: [ imports: [
CommonModule, CommonModule,
examinerRoutingModule, examinerRoutingModule,
@ -97,7 +101,8 @@ import { ExaminerIndexComponent } from './examiner-index/examiner-index.componen
PortalModule, PortalModule,
ScrollingModule, ScrollingModule,
ReactiveFormsModule, ReactiveFormsModule,
FormsModule FormsModule,
NavigationModule
], ],
providers: [ { provide: MatPaginatorIntl, useValue: myPaginator() } ] providers: [ { provide: MatPaginatorIntl, useValue: myPaginator() } ]
}) })

2
src/app/http-interceptors/cache-token.service.ts

@ -29,7 +29,7 @@ export class CacheTokenService {
} else { this.delete() } } else { this.delete() }
},18*60*1000) },18*60*1000)
} }
//删除定时器 //删除定时器
delete = ():void=> { delete = ():void=> {
window.clearInterval(this.timer) window.clearInterval(this.timer)

18
src/app/navigation/navigation.component.html

@ -4,7 +4,7 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2020-12-10 10:21:40 * @Date: 2020-12-10 10:21:40
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2020-12-11 09:51:16 * @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">
@ -31,15 +31,15 @@
<img style="width: 191px;height: 113px; position: absolute; bottom: 0;" src="../../assets/images/backbottom.png"> <img style="width: 191px;height: 113px; position: absolute; bottom: 0;" src="../../assets/images/backbottom.png">
</div> </div>
</mat-sidenav>
<div class="example-sidenav-content">
</mat-sidenav> <div style="height: 64px; min-height: 64px;">
<app-tabbar (toggleDarkTheme)="switchTheme($event)" (defaulttheme)="defaulttheme()" (redtheme)="redtheme()"></app-tabbar>
<div class="example-sidenav-content"> </div>
<app-tabbar (toggleDarkTheme)="switchTheme($event)" (defaulttheme)="defaulttheme()" (redtheme)="redtheme()"></app-tabbar> <div style="flex: 1; overflow: hidden;">
<router-outlet></router-outlet> <router-outlet></router-outlet>
<!-- <app-all-file #child></app-all-file> -->
</div> </div>
</div>
</mat-sidenav-container> </mat-sidenav-container>

2
src/app/navigation/navigation.component.scss

@ -202,6 +202,8 @@ mat-sidenav{
.example-sidenav-content{ .example-sidenav-content{
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
display: flex;
flex-direction: column;
} }
//一级目录前图标 //一级目录前图标

4
src/app/navigation/navigation.module.ts

@ -65,7 +65,6 @@ import {MatTreeModule} from '@angular/material/tree';
MatIconModule, MatIconModule,
FormsModule, FormsModule,
UiModule, UiModule,
A11yModule, A11yModule,
CdkStepperModule, CdkStepperModule,
CdkTableModule, CdkTableModule,
@ -110,7 +109,8 @@ import {MatTreeModule} from '@angular/material/tree';
ScrollingModule ScrollingModule
], ],
exports: [ exports: [
NavigationComponent NavigationComponent,
TabbarComponent
] ]
}) })
export class NavigationModule { } export class NavigationModule { }

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})
} }

17
src/app/pages/pages-routing.module.ts

@ -1,17 +0,0 @@
// import { Routes, RouterModule } from '@angular/router';
// import { NgModule } from '@angular/core';
// import { PagesComponent } from './pages.component';
// import { PersonaldataComponent } from './personaldata/personaldata.component';
// const routes: Routes = [
// { path: '', component: PagesComponent},
// { path: 'personaldata ', component: PersonaldataComponent},
// ];
// @NgModule({
// imports: [RouterModule.forChild(routes)],
// exports: [RouterModule]
// })
// export class PagesRoutingModule {}

1
src/app/pages/pages.component.html

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

0
src/app/pages/pages.component.scss

25
src/app/pages/pages.component.spec.ts

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

15
src/app/pages/pages.component.ts

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

14
src/app/pages/pages.module.ts

@ -1,11 +1,6 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { PagesComponent } from './pages.component';
import { LoginComponent } from './login/login.component'; import { LoginComponent } from './login/login.component';
import { RegisterComponent } from './register/register.component';
// import { PagesRoutingModule } from './pages-routing.module'
import {A11yModule} from '@angular/cdk/a11y'; import {A11yModule} from '@angular/cdk/a11y';
import {DragDropModule} from '@angular/cdk/drag-drop'; import {DragDropModule} from '@angular/cdk/drag-drop';
import {PortalModule} from '@angular/cdk/portal'; import {PortalModule} from '@angular/cdk/portal';
@ -48,17 +43,13 @@ import {MatToolbarModule} from '@angular/material/toolbar';
import {MatTooltipModule} from '@angular/material/tooltip'; import {MatTooltipModule} from '@angular/material/tooltip';
import {MatTreeModule} from '@angular/material/tree'; import {MatTreeModule} from '@angular/material/tree';
import { FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms'; import { FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';
import { PersonaldataComponent } from './personaldata/personaldata.component';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { LockscreenComponent } from './lockscreen/lockscreen.component'; import { LockscreenComponent } from './lockscreen/lockscreen.component';
// import { PagesRoutingModule } from './pages-routing.module';
@NgModule({ @NgModule({
declarations: [PagesComponent, LoginComponent, RegisterComponent, LockscreenComponent], declarations: [LoginComponent, LockscreenComponent],
imports: [ imports: [
CommonModule, CommonModule,
A11yModule, A11yModule,
CdkStepperModule, CdkStepperModule,
CdkTableModule, CdkTableModule,
@ -70,7 +61,6 @@ import { LockscreenComponent } from './lockscreen/lockscreen.component';
MatButtonModule, MatButtonModule,
MatButtonToggleModule, MatButtonToggleModule,
MatCardModule, MatCardModule,
MatCheckboxModule, MatCheckboxModule,
MatChipsModule, MatChipsModule,
MatStepperModule, MatStepperModule,
@ -102,11 +92,9 @@ import { LockscreenComponent } from './lockscreen/lockscreen.component';
MatTreeModule, MatTreeModule,
PortalModule, PortalModule,
ScrollingModule, ScrollingModule,
FormsModule, FormsModule,
ReactiveFormsModule, ReactiveFormsModule,
RouterModule RouterModule
// PagesRoutingModule,
] ]
}) })
export class PagesModule { } export class PagesModule { }

280
src/app/pages/personaldata/personaldata.component.html

@ -1,280 +0,0 @@
<div class="pages-profile">
<div fxLayout.gt-sm="row nowrap" fxLayout.lt-md="column nowrap" fxLayoutAlign.gt-sm="space-between start"
fxLayoutGap="30px" id="xxx">
<mat-card fxFlex="30" class="profile-card">
<mat-card-content>
<img mat-card-avatar src="">
<mat-card-title class="profile-user">安信科创</mat-card-title>
<mat-card-subtitle class="profile-job">嘻嘻嘻嘻</mat-card-subtitle>
<p class="profile-introduction">
不要做程序员,要做问题解决者
</p>
<div class="profile-social">
<mat-icon size="1" class="secondary-text s-24"></mat-icon>
<mat-icon size="1" class="secondary-text s-24"></mat-icon>
<mat-icon size="1" class="secondary-text s-24"></mat-icon>
<mat-icon size="1" class="secondary-text s-24"></mat-icon>
</div>
<button mat-flat-button color="accent">关注</button>
</mat-card-content>
<mat-card-actions class="profile-card-footer" fxLayout="row nowrap">
<div fxFlex="32">
<strong class="profile-stat-count">260</strong>
<span>粉丝</span>
</div>
<div fxFlex="32">
<strong class="profile-stat-count">180</strong>
<span>关注</span>
</div>
<div fxFlex="32">
<strong class="profile-stat-count">2000</strong>
<span>博客</span>
</div>
</mat-card-actions>
</mat-card>
<mat-card fxFlex="70" class="profile-board">
<mat-tab-group>
<mat-tab label="活动">
<mat-list>
<mat-list-item>
<div matLine fxLayoutAlign="start center" fxLayoutGap="16px">
<img matListAvatar src="">
<div>
<div>我是假数据
<span class="secondary-text font-size-12">我是假数据</span>
</div>
<span class="secondary-text font-size-12">我是假数据</span>
</div>
</div>
<div matLine class="profile-item-content">
我是假数据
</div>
</mat-list-item>
<mat-list-item>
<div matLine fxLayoutAlign="start center" fxLayoutGap="16px">
<img matListAvatar src="">
<div>
<div>我是假数据
<span class="secondary-text font-size-12">我是假数据</span>
</div>
<span class="secondary-text font-size-12">我是假数据</span>
</div>
</div>
<div matLine class="profile-item-content">
<img src="" alt="">
<img src="" alt="">
<img src="" alt="">
<img src="" alt="">
</div>
</mat-list-item>
<mat-list-item>
<div matLine fxLayoutAlign="start center" fxLayoutGap="16px">
<img matListAvatar src="">
<div>
<div>我是假数据
<span class="secondary-text font-size-12">我是假数据</span>
</div>
<span class="secondary-text font-size-12">我是假数据</span>
</div>
</div>
<div matLine class="profile-item-content">
<img src="" alt="">
我是假数据
</div>
</mat-list-item>
<mat-list-item>
<div matLine fxLayoutAlign="start center" fxLayoutGap="16px">
<img matListAvatar src="">
<div>
<div>我是假数据
<span class="secondary-text font-size-12">我是假数据</span>
</div>
<span class="secondary-text font-size-12">我是假数据</span>
</div>
</div>
<div matLine class="profile-item-content">
我是假数据
</div>
</mat-list-item>
<mat-list-item>
<div matLine fxLayoutAlign="start center" fxLayoutGap="16px">
<img matListAvatar src="">
<div>
<div>我是假数据
<span class="secondary-text font-size-12">我是假数据</span>
</div>
<span class="secondary-text font-size-12">我是假数据</span>
</div>
</div>
<div matLine class="profile-item-content">
我是假数据
</div>
</mat-list-item>
</mat-list>
<div class="pt-40 pb-40">
<button mat-flat-button class="show-more-btn">更多</button>
</div>
</mat-tab>
<mat-tab label="评论">
<mat-list>
<mat-list-item>
<div matLine fxLayoutAlign="start center" fxLayoutGap="16px">
<img matListAvatar src="">
<div>
<div>我是假数据
<span class="secondary-text font-size-12">我是假数据</span>
</div>
<span class="secondary-text font-size-12">我是假数据</span>
</div>
</div>
<div matLine class="profile-item-content">
<img src="" alt="">
我是假数据
</div>
</mat-list-item>
<mat-list-item>
<div matLine fxLayoutAlign="start center" fxLayoutGap="16px">
<img matListAvatar src="">
<div>
<div>我是假数据
<span class="secondary-text font-size-12">我是假数据</span>
</div>
<span class="secondary-text font-size-12">我是假数据</span>
</div>
</div>
<div matLine class="profile-item-content">
我是假数据
</div>
</mat-list-item>
<mat-list-item>
<div matLine fxLayoutAlign="start center" fxLayoutGap="16px">
<img matListAvatar src="">
<div>
<div>我是假数据
<span class="secondary-text font-size-12">我是假数据</span>
</div>
<span class="secondary-text font-size-12">我是假数据</span>
</div>
</div>
<div matLine class="profile-item-content">
我是假数据
</div>
</mat-list-item>
<mat-list-item>
<div matLine fxLayoutAlign="start center" fxLayoutGap="16px">
<img matListAvatar src="">
<div>
<div>我是假数据
<span class="secondary-text font-size-12">我是假数据</span>
</div>
<span class="secondary-text font-size-12">我是假数据</span>
</div>
</div>
<div matLine class="profile-item-content">
我是假数据
</div>
</mat-list-item>
<mat-list-item>
<div matLine fxLayoutAlign="start center" fxLayoutGap="16px">
<img matListAvatar src="">
<div>
<div>我是假数据
<span class="secondary-text font-size-12">我是假数据</span>
</div>
<span class="secondary-text font-size-12">我是假数据</span>
</div>
</div>
<div matLine class="profile-item-content">
<img src="" alt="">
<img src="" alt="">
<img src="" alt="">
<img src="" alt="">
</div>
</mat-list-item>
</mat-list>
</mat-tab>
<mat-tab label="消息">
<mat-list>
<mat-list-item>
<div matLine fxLayoutAlign="start center" fxLayoutGap="16px">
<img matListAvatar src="">
<div>
<div>我是假数据
<span class="secondary-text font-size-12">我是假数据</span>
</div>
<span class="secondary-text font-size-12">我是假数据</span>
</div>
</div>
<div matLine class="profile-item-content">
我是假数据
</div>
</mat-list-item>
<mat-list-item>
<div matLine fxLayoutAlign="start center" fxLayoutGap="16px">
<img matListAvatar src="">
<div>
<div>我是假数据
<span class="secondary-text font-size-12">我是假数据</span>
</div>
<span class="secondary-text font-size-12">我是假数据</span>
</div>
</div>
<div matLine class="profile-item-content">
<img src="" alt="">
我是假数据
</div>
</mat-list-item>
<mat-list-item>
<div matLine fxLayoutAlign="start center" fxLayoutGap="16px">
<img matListAvatar src="">
<div>
<div>我是假数据
<span class="secondary-text font-size-12">我是假数据</span>
</div>
<span class="secondary-text font-size-12">我是假数据</span>
</div>
</div>
<div matLine class="profile-item-content">
<img src="" alt="">
<img src="" alt="">
<img src="" alt="">
<img src="" alt="">
</div>
</mat-list-item>
<mat-list-item>
<div matLine fxLayoutAlign="start center" fxLayoutGap="16px">
<img matListAvatar src="">
<div>
<div>我是假数据
<span class="secondary-text font-size-12">我是假数据</span>
</div>
<span class="secondary-text font-size-12">我是假数据</span>
</div>
</div>
<div matLine class="profile-item-content">
我是假数据
</div>
</mat-list-item>
<mat-list-item>
<div matLine fxLayoutAlign="start center" fxLayoutGap="16px">
<img matListAvatar src="">
<div>
<div>我是假数据
<span class="secondary-text font-size-12">我是假数据</span>
</div>
<span class="secondary-text font-size-12">我是假数据</span>
</div>
</div>
<div matLine class="profile-item-content">
我是假数据
</div>
</mat-list-item>
</mat-list>
</mat-tab>
</mat-tab-group>
</mat-card>
</div>
</div>

110
src/app/pages/personaldata/personaldata.component.scss

@ -1,110 +0,0 @@
#xxx{
display: flex;
justify-content: space-around;
}
.pages-profile {
padding: 30px;
.profile-card {
padding: 9px;
text-align: center;
font-family: Roboto, sans-serif;
width: 500px;
height: 600px;
mat-card-content {
padding: 40px 15px;
margin: 0;
}
.mat-card-avatar {
width: 130px;
height: 130px;
margin-bottom: 10px;
}
.profile-user {
margin: 10px 0;
font-weight: normal;
}
.profile-job {
margin-bottom: 20px;
color: #9e9e9e;
font-weight: 500;
}
.profile-introduction {
margin: 0 0 1rem;
color: #757575;
}
.profile-social {
margin: 25px 0;
mat-icon {
margin: 0 10px;
color: rgba(66, 66, 66, .4);
}
}
mat-card-actions {
padding: 10px;
background: #f6f9fd;
}
.profile-card-footer {
display: flex;
justify-content: space-around;
.profile-stat-count {
display: block;
margin-bottom: 3px;
font-size: 20px;
font-weight: bold;
color: #616161;
+span {
color: #9e9e9e;
}
}
}
}
.profile-board {
padding: 30px;
width: 500px;
mat-list {
padding-bottom: 20px;
}
mat-list-item {
height: auto;
padding: 25px 0;
margin-left: -16px;
border-bottom: 1px solid #dfe0df;
.profile-item-content {
padding: 20px 0 0 56px;
line-height: 1.571429;
color: #757575;
white-space: normal;
display: flex;
flex-wrap: wrap;
img {
width: 100%;
max-width: 220px;
max-height: 150px;
padding: 0 20px 20px 0;
}
}
}
}
.show-more-btn {
width: 100%;
background-color: #eee;
color: #3949ab;
}
}

25
src/app/pages/personaldata/personaldata.component.spec.ts

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

15
src/app/pages/personaldata/personaldata.component.ts

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

81
src/app/pages/register/register.component.html

@ -1,81 +0,0 @@
<div class="login">
<div class="loginbox">
<div class="intro">
<p>北京安信科创有限公司</p>
<span>北京安信科创软件有限公司作为中国应急服务领跑者,于2006年进入消防救援领域,是一家专注于应急领域仿真培训演练与应急数据预判领域的软件服务供应商。安信主要利用大数据与虚拟现实技术实现对消防、公安、机场相关安防人员与企业安全监管人员的仿真培训与考核,致力于为我国应急产业的发展构建更美好的未来。目前,安信的业务遍布全国20多个省份和地区,服务全国将近四分之一以上的人口
</span>
</div>
<div class="card">
<mat-card>
<p class="cardheader">注册</p>
<p>Please register first</p>
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm" class="example-container">
<mat-form-field>
<input matInput id="name" name="name"
required
ngModel #name="ngModel" placeholder="请输入账号">
</mat-form-field>
<!-- <div *ngIf="name.invalid && (name.dirty || name.touched)"
class="alert-danger">
<div *ngIf="name.errors.required">
账号不能为空
</div>
</div> -->
<mat-form-field>
<input matInput id="email" name="email"
required pattern="^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$"
ngModel #email="ngModel" placeholder="请输入邮箱">
</mat-form-field>
<!--
<div *ngIf="email.invalid && (email.dirty || email.touched)"
class="alert-danger">
<div *ngIf="email.errors.required">
邮箱不能为空
</div>
<div *ngIf="email.errors.pattern">
邮箱格式不正确
</div>
</div> -->
<mat-form-field>
<input matInput id="password" name="password" type='password'
required minlength="8"
ngModel #password="ngModel" placeholder="请输入密码">
</mat-form-field>
<!-- <div *ngIf="password.invalid && (password.dirty || password.touched)"
class="alert-danger">
<div *ngIf="password.errors.required">
密码不能为空
</div>
<div *ngIf="password.errors.minlength">
密码最少8位
</div>
</div> -->
<mat-checkbox style="margin-top: 25px;">请同意不扩散核武器条约条约</mat-checkbox>
<button type="submit" [disabled]="!form.form.valid" class="loginbtn"mat-button>注册</button>
</form>
<div class="applyfor">
<p>已有账号?去<a href="/login">登录</a></p>
</div>
<div class="website">
<p>WEBSITE BY AnXin</p>
<p>© 2020. All RIGHT RESERVED.</p>
</div>
</mat-card>
</div>
</div>
</div>

88
src/app/pages/register/register.component.scss

@ -1,88 +0,0 @@
.login {
width: 100%;
height: 100%;
// background: url('../../../assets/images/bg_login.jpg');
.loginbox {
width: 100%;
height: 100%;
background-color: #000;
background: rgba(0,0,0,0.5);/*盒子背景透明*/
// opacity: 0.5;
position: relative;
}
.intro {
width: 650px;
// height: 350px;
position: fixed;
top:35%;
left: 15%;
p {
font-size: 36px;
color:white;
margin-bottom: 35px;
}
span {
font-size: 16px;
color:white;
opacity: 0.5;
}
}
.card{
width: 460px;
height: 100%;
padding-left: 20px;
background-color: #fff;
position: absolute;
right: 0;
p {
width: 100%;
margin: 18px 0;
}
.cardheader{
font-size: 26px;
font-weight: 500;
}
}
}
.example-container {
display: flex;
flex-direction: column;
}
.example-container > * {
width: 100%;
}
.loginbtn {
margin-top: 18px;
height: 35px;
background-color:#039be5;
border-radius: 15px;
color: #fff;;
}
.mat-card {
box-shadow: 0 0 0;
margin-top: 70px;
}
.applyfor {
font-size: 16px;
a {
color: #039be5;
}
}
.website {
font-size: 14px;
text-align: center;
margin-top: 50px;
}
.alert-danger {
font-size: 14px;
color: red;
}

25
src/app/pages/register/register.component.spec.ts

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

19
src/app/pages/register/register.component.ts

@ -1,19 +0,0 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-register',
templateUrl: './register.component.html',
styleUrls: ['./register.component.scss']
})
export class RegisterComponent implements OnInit {
constructor() { }
ngOnInit() {
}
onSubmit(e){
// console.log(e)
}
}

7
src/app/tabbar/tabbar.component.html

@ -4,18 +4,13 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2020-12-10 10:21:40 * @Date: 2020-12-10 10:21:40
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2020-12-10 19:47:19 * @LastEditTime: 2020-12-11 10:01:47
--> -->
<mat-toolbar style="background-color:#FFFFFF;height: 60px;"> <mat-toolbar style="background-color:#FFFFFF;height: 60px;">
<!-- <mat-toolbar> --> <!-- <mat-toolbar> -->
<p>欢迎登录消防救援考核系统</p> <p>欢迎登录消防救援考核系统</p>
<!-- 未登录状态 -->
<!-- <button mat-icon-button class="login" *ngIf="!isLogin.isLogin" (click)='login()'>
<mat-icon>account_circle</mat-icon>
</button> -->
<!-- 已登录状态 --> <!-- 已登录状态 -->
<button mat-icon-button class="login"> <button mat-icon-button 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 { 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)],

7
src/app/ui/ui.module.ts

@ -17,7 +17,6 @@ import {MatCardModule} from '@angular/material/card';
import {MatCheckboxModule} from '@angular/material/checkbox'; import {MatCheckboxModule} from '@angular/material/checkbox';
import {MatChipsModule} from '@angular/material/chips'; import {MatChipsModule} from '@angular/material/chips';
import {MatStepperModule} from '@angular/material/stepper'; import {MatStepperModule} from '@angular/material/stepper';
// import {MatDatepickerModule} from '@angular/material/datepicker';
import {MatDialogModule} from '@angular/material/dialog'; import {MatDialogModule} from '@angular/material/dialog';
import {MatDividerModule} from '@angular/material/divider'; import {MatDividerModule} from '@angular/material/divider';
import {MatExpansionModule} from '@angular/material/expansion'; import {MatExpansionModule} from '@angular/material/expansion';
@ -45,14 +44,12 @@ import {MatTreeModule} from '@angular/material/tree';
import { ReactiveFormsModule, FormsModule } from '@angular/forms'; import { ReactiveFormsModule, FormsModule } from '@angular/forms';
import { MatFormFieldModule } from '@angular/material/form-field'; import { MatFormFieldModule } from '@angular/material/form-field';
import { MatPaginatorIntl } from '@angular/material/paginator'; import { MatPaginatorIntl } from '@angular/material/paginator';
import { PersonaldataComponent } from '../pages/personaldata/personaldata.component';
import { ChangepasswordComponent } from './changepassword/changepassword.component'; import { ChangepasswordComponent } from './changepassword/changepassword.component';
import { SizePipe , NamePipe,NamePipe2, NamePipe3, testState} from '../pipes/size.pipe'; import { SizePipe , NamePipe,NamePipe2, NamePipe3, testState} from '../pipes/size.pipe';
import {ConfirmpswDirective} from './changepassword/equal-validator.directive'; 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';
@ -69,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,PersonaldataComponent, 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,
@ -89,7 +86,6 @@ import { NzDatePickerModule } from 'ng-zorro-antd/date-picker';
MatCheckboxModule, MatCheckboxModule,
MatChipsModule, MatChipsModule,
MatStepperModule, MatStepperModule,
// MatDatepickerModule,
MatDialogModule, MatDialogModule,
MatDividerModule, MatDividerModule,
MatExpansionModule, MatExpansionModule,
@ -117,7 +113,6 @@ import { NzDatePickerModule } from 'ng-zorro-antd/date-picker';
MatTreeModule, MatTreeModule,
PortalModule, PortalModule,
ScrollingModule, ScrollingModule,
ReactiveFormsModule, ReactiveFormsModule,
FormsModule, FormsModule,
FileUploadModule FileUploadModule

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/loginBackground.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 KiB

BIN
src/assets/images/loginHeader.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

3
src/index.html

@ -2,12 +2,11 @@
<html lang="zh-CN"> <html lang="zh-CN">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>灭火救援指挥培训系统</title> <title>消防救援单位信息考核系统</title>
<base href="/"> <base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico"> <link rel="icon" type="image/x-icon" href="favicon.ico">
<link href='/assets/icon/material-icons.css' rel="stylesheet"> <link href='/assets/icon/material-icons.css' rel="stylesheet">
<!-- <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> -->
</head> </head>
<body> <body>
<app-root></app-root> <app-root></app-root>

7
src/styles.scss

@ -86,4 +86,11 @@ table td.mat-footer-cell:last-of-type{
.mat-drawer-container{ .mat-drawer-container{
background-color: none; background-color: none;
}
//可展开面板按钮颜色
#createtestscore{
.mat-expansion-indicator::after {
color: #333333;
}
} }
Loading…
Cancel
Save