26 changed files with 631 additions and 545 deletions
@ -0,0 +1 @@ |
|||||||
|
<p>examinee-capacity works!</p> |
@ -1,20 +1,20 @@ |
|||||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; |
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; |
||||||
|
|
||||||
import { StatisticAnalysisComponent } from './statistic-analysis.component'; |
import { ExamineeCapacityComponent } from './examinee-capacity.component'; |
||||||
|
|
||||||
describe('StatisticAnalysisComponent', () => { |
describe('ExamineeCapacityComponent', () => { |
||||||
let component: StatisticAnalysisComponent; |
let component: ExamineeCapacityComponent; |
||||||
let fixture: ComponentFixture<StatisticAnalysisComponent>; |
let fixture: ComponentFixture<ExamineeCapacityComponent>; |
||||||
|
|
||||||
beforeEach(async(() => { |
beforeEach(async(() => { |
||||||
TestBed.configureTestingModule({ |
TestBed.configureTestingModule({ |
||||||
declarations: [ StatisticAnalysisComponent ] |
declarations: [ ExamineeCapacityComponent ] |
||||||
}) |
}) |
||||||
.compileComponents(); |
.compileComponents(); |
||||||
})); |
})); |
||||||
|
|
||||||
beforeEach(() => { |
beforeEach(() => { |
||||||
fixture = TestBed.createComponent(StatisticAnalysisComponent); |
fixture = TestBed.createComponent(ExamineeCapacityComponent); |
||||||
component = fixture.componentInstance; |
component = fixture.componentInstance; |
||||||
fixture.detectChanges(); |
fixture.detectChanges(); |
||||||
}); |
}); |
@ -0,0 +1,15 @@ |
|||||||
|
import { Component, OnInit } from '@angular/core'; |
||||||
|
|
||||||
|
@Component({ |
||||||
|
selector: 'app-examinee-capacity', |
||||||
|
templateUrl: './examinee-capacity.component.html', |
||||||
|
styleUrls: ['./examinee-capacity.component.scss'] |
||||||
|
}) |
||||||
|
export class ExamineeCapacityComponent implements OnInit { |
||||||
|
|
||||||
|
constructor() { } |
||||||
|
|
||||||
|
ngOnInit(): void { |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1 @@ |
|||||||
|
<p>echarts works!</p> |
@ -0,0 +1,25 @@ |
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; |
||||||
|
|
||||||
|
import { EchartsComponent } from './echarts.component'; |
||||||
|
|
||||||
|
describe('EchartsComponent', () => { |
||||||
|
let component: EchartsComponent; |
||||||
|
let fixture: ComponentFixture<EchartsComponent>; |
||||||
|
|
||||||
|
beforeEach(async(() => { |
||||||
|
TestBed.configureTestingModule({ |
||||||
|
declarations: [ EchartsComponent ] |
||||||
|
}) |
||||||
|
.compileComponents(); |
||||||
|
})); |
||||||
|
|
||||||
|
beforeEach(() => { |
||||||
|
fixture = TestBed.createComponent(EchartsComponent); |
||||||
|
component = fixture.componentInstance; |
||||||
|
fixture.detectChanges(); |
||||||
|
}); |
||||||
|
|
||||||
|
it('should create', () => { |
||||||
|
expect(component).toBeTruthy(); |
||||||
|
}); |
||||||
|
}); |
@ -0,0 +1,15 @@ |
|||||||
|
import { Component, OnInit } from '@angular/core'; |
||||||
|
|
||||||
|
@Component({ |
||||||
|
selector: 'app-echarts', |
||||||
|
templateUrl: './echarts.component.html', |
||||||
|
styleUrls: ['./echarts.component.scss'] |
||||||
|
}) |
||||||
|
export class EchartsComponent implements OnInit { |
||||||
|
|
||||||
|
constructor() { } |
||||||
|
|
||||||
|
ngOnInit(): void { |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1 @@ |
|||||||
|
<p>examinee-papers works!</p> |
@ -0,0 +1,25 @@ |
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; |
||||||
|
|
||||||
|
import { ExamineePapersComponent } from './examinee-papers.component'; |
||||||
|
|
||||||
|
describe('ExamineePapersComponent', () => { |
||||||
|
let component: ExamineePapersComponent; |
||||||
|
let fixture: ComponentFixture<ExamineePapersComponent>; |
||||||
|
|
||||||
|
beforeEach(async(() => { |
||||||
|
TestBed.configureTestingModule({ |
||||||
|
declarations: [ ExamineePapersComponent ] |
||||||
|
}) |
||||||
|
.compileComponents(); |
||||||
|
})); |
||||||
|
|
||||||
|
beforeEach(() => { |
||||||
|
fixture = TestBed.createComponent(ExamineePapersComponent); |
||||||
|
component = fixture.componentInstance; |
||||||
|
fixture.detectChanges(); |
||||||
|
}); |
||||||
|
|
||||||
|
it('should create', () => { |
||||||
|
expect(component).toBeTruthy(); |
||||||
|
}); |
||||||
|
}); |
@ -0,0 +1,15 @@ |
|||||||
|
import { Component, OnInit } from '@angular/core'; |
||||||
|
|
||||||
|
@Component({ |
||||||
|
selector: 'app-examinee-papers', |
||||||
|
templateUrl: './examinee-papers.component.html', |
||||||
|
styleUrls: ['./examinee-papers.component.scss'] |
||||||
|
}) |
||||||
|
export class ExamineePapersComponent implements OnInit { |
||||||
|
|
||||||
|
constructor() { } |
||||||
|
|
||||||
|
ngOnInit(): void { |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1 @@ |
|||||||
|
<p>station-examinee works!</p> |
@ -0,0 +1,25 @@ |
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; |
||||||
|
|
||||||
|
import { StationExamineeComponent } from './station-examinee.component'; |
||||||
|
|
||||||
|
describe('StationExamineeComponent', () => { |
||||||
|
let component: StationExamineeComponent; |
||||||
|
let fixture: ComponentFixture<StationExamineeComponent>; |
||||||
|
|
||||||
|
beforeEach(async(() => { |
||||||
|
TestBed.configureTestingModule({ |
||||||
|
declarations: [ StationExamineeComponent ] |
||||||
|
}) |
||||||
|
.compileComponents(); |
||||||
|
})); |
||||||
|
|
||||||
|
beforeEach(() => { |
||||||
|
fixture = TestBed.createComponent(StationExamineeComponent); |
||||||
|
component = fixture.componentInstance; |
||||||
|
fixture.detectChanges(); |
||||||
|
}); |
||||||
|
|
||||||
|
it('should create', () => { |
||||||
|
expect(component).toBeTruthy(); |
||||||
|
}); |
||||||
|
}); |
@ -0,0 +1,15 @@ |
|||||||
|
import { Component, OnInit } from '@angular/core'; |
||||||
|
|
||||||
|
@Component({ |
||||||
|
selector: 'app-station-examinee', |
||||||
|
templateUrl: './station-examinee.component.html', |
||||||
|
styleUrls: ['./station-examinee.component.scss'] |
||||||
|
}) |
||||||
|
export class StationExamineeComponent implements OnInit { |
||||||
|
|
||||||
|
constructor() { } |
||||||
|
|
||||||
|
ngOnInit(): void { |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -1,29 +0,0 @@ |
|||||||
<!-- |
|
||||||
* @Descripttion: |
|
||||||
* @version: |
|
||||||
* @Author: sueRimn |
|
||||||
* @Date: 2020-12-15 14:19:50 |
|
||||||
* @LastEditors: sueRimn |
|
||||||
* @LastEditTime: 2020-12-17 14:30:16 |
|
||||||
--> |
|
||||||
<div class="conter"> |
|
||||||
<div class="left"> |
|
||||||
<div id="zhidui"> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
<div class="right"> |
|
||||||
<img src="../../../assets/images/statictop.png" style="height: 90px;width: 90px;"> |
|
||||||
<div class="rightone"> |
|
||||||
<div><span style="font-size: 24px;">STATISTICS</span></div> |
|
||||||
<div style="margin-top: 10px;"><span style="font-size: 20px;">消防救援单位信息</span></div> |
|
||||||
<div style="margin-top: 10px;"><span style="font-size: 20px;"> 考核统计分析</span></div> |
|
||||||
</div> |
|
||||||
<div class="righttwo"> |
|
||||||
<div><button [ngClass]="{'clickButton':upStatic}" (click)="upexam()"><img src="../../../assets/images/upload.png" > 发布统计</button></div> |
|
||||||
<div style="margin-top: 20px;"><button [ngClass]="{'clickButton':staticExam}" (click)="staticecam()"><img src="../../../assets/images/examstatic.png" [ngStyle]="{'background-color':staticExam==true?'#07CDCF':''}"> 考试统计</button></div> |
|
||||||
</div> |
|
||||||
<div class="rightthree"> |
|
||||||
<img src="../../../assets/images/examdown.png"> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</div> |
|
@ -1,69 +0,0 @@ |
|||||||
.conter{ |
|
||||||
width: 100%; |
|
||||||
height: 100%; |
|
||||||
overflow: hidden; |
|
||||||
background: #F2F5F6; |
|
||||||
display: flex; |
|
||||||
overflow-y: auto; |
|
||||||
.left{ |
|
||||||
width: 80%; |
|
||||||
height: 60%; |
|
||||||
margin: 20px 20px 10px 50px; |
|
||||||
background-color: #FFFFFF; |
|
||||||
border-radius: 16px ; |
|
||||||
#zhidui{ |
|
||||||
width: 80%; |
|
||||||
height: 50%; |
|
||||||
position: absolute; |
|
||||||
top: 100px; |
|
||||||
//left: 40%; |
|
||||||
//top: 45%; |
|
||||||
//transform: translate(-50%,-60%); |
|
||||||
} |
|
||||||
} |
|
||||||
.right{ |
|
||||||
width: 228px; |
|
||||||
height: 60%; |
|
||||||
margin: 20px 20px 10px 10px; |
|
||||||
background-color: #07CDCF; |
|
||||||
border-radius: 16px ; |
|
||||||
display: flex; |
|
||||||
flex-direction: column; |
|
||||||
.rightone{ |
|
||||||
//margin-top: 80px; |
|
||||||
margin-left: 24px; |
|
||||||
color:#FFFFFF; |
|
||||||
display: flex; |
|
||||||
flex-direction: column; |
|
||||||
position: absolute; |
|
||||||
top: 110px; |
|
||||||
} |
|
||||||
.righttwo{ |
|
||||||
margin-top: 100px; |
|
||||||
margin-left: 24px; |
|
||||||
button{ |
|
||||||
width: 180px; |
|
||||||
height: 44px; |
|
||||||
color: #FFFFFF; |
|
||||||
background: rgba(255,255,255,0.6); |
|
||||||
opacity: 1; |
|
||||||
border-radius: 8px; |
|
||||||
border: none; |
|
||||||
font-size: 18px; |
|
||||||
outline: none; |
|
||||||
cursor: pointer; |
|
||||||
} |
|
||||||
.clickButton{ |
|
||||||
background-color: #FFFFFF; |
|
||||||
color: #07CDCF; |
|
||||||
} |
|
||||||
} |
|
||||||
.rightthree{ |
|
||||||
width: 100%; |
|
||||||
margin-top: 110px; |
|
||||||
img{ |
|
||||||
float: right; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
@ -1,101 +0,0 @@ |
|||||||
/* |
|
||||||
* @Descripttion:
|
|
||||||
* @version:
|
|
||||||
* @Author: sueRimn |
|
||||||
* @Date: 2020-12-15 14:19:50 |
|
||||||
* @LastEditors: sueRimn |
|
||||||
* @LastEditTime: 2020-12-17 16:02:43 |
|
||||||
*/ |
|
||||||
import { Component, OnInit } from '@angular/core'; |
|
||||||
//import {EchartsDataService} from '../../echarts-data.service';
|
|
||||||
declare var echarts: any; |
|
||||||
|
|
||||||
@Component({ |
|
||||||
selector: 'app-statistic-analysis', |
|
||||||
templateUrl: './statistic-analysis.component.html', |
|
||||||
styleUrls: ['./statistic-analysis.component.scss'] |
|
||||||
}) |
|
||||||
export class StatisticAnalysisComponent implements OnInit { |
|
||||||
|
|
||||||
constructor() { } |
|
||||||
|
|
||||||
ngOnInit(): void { |
|
||||||
window.setTimeout(()=>{ |
|
||||||
this.initCharts() |
|
||||||
},0) |
|
||||||
} |
|
||||||
|
|
||||||
zhutu//柱状图实例
|
|
||||||
zhiNameData =["浦东支队","黄浦支队","徐汇支队","长宁支队","静安支队","普陀支队","虹口支队","杨浦支队","闵行支队","宝山支队","嘉定支队"] |
|
||||||
staticExam=false//考试统计
|
|
||||||
upStatic=false//发布考试统计
|
|
||||||
//考试统计按钮
|
|
||||||
staticecam(){ |
|
||||||
this.staticExam=true |
|
||||||
this.upStatic=false |
|
||||||
} |
|
||||||
//发布考试按钮
|
|
||||||
upexam(){ |
|
||||||
this.staticExam=false |
|
||||||
this.upStatic=true |
|
||||||
} |
|
||||||
|
|
||||||
initCharts() { |
|
||||||
var detailPlanEchart = echarts.init(document.getElementById('zhidui')); |
|
||||||
var option = { |
|
||||||
xAxis: { |
|
||||||
type: 'category', |
|
||||||
data: this.zhiNameData, |
|
||||||
axisLabel:{ |
|
||||||
fontSize:18, |
|
||||||
lineHeight:31, |
|
||||||
}, |
|
||||||
axisLine:{ |
|
||||||
show:false |
|
||||||
}, |
|
||||||
splitLine:{ |
|
||||||
show:false |
|
||||||
}, |
|
||||||
axisTick:{ |
|
||||||
show:false |
|
||||||
}, |
|
||||||
}, |
|
||||||
yAxis: { |
|
||||||
type: 'value', |
|
||||||
axisLabel:{ |
|
||||||
fontSize:18, |
|
||||||
lineHeight:31 |
|
||||||
}, |
|
||||||
axisTick:{ |
|
||||||
show:false |
|
||||||
}, |
|
||||||
axisLine:{ |
|
||||||
show:false |
|
||||||
}, |
|
||||||
splitLine:{ |
|
||||||
show:true, |
|
||||||
lineStyle:{ |
|
||||||
opacity:0.2, |
|
||||||
type:'dashed' |
|
||||||
} |
|
||||||
}, |
|
||||||
show:true |
|
||||||
}, |
|
||||||
series: [{ |
|
||||||
data: [160, 150,140,130, 120, 100,90, 80, 60, 40,30], |
|
||||||
type: 'bar', |
|
||||||
showBackground: true, |
|
||||||
backgroundStyle: { |
|
||||||
color: '#F2F5F6' |
|
||||||
}, |
|
||||||
itemStyle:{ |
|
||||||
color:"#FF8678", |
|
||||||
barBorderRadius:12 |
|
||||||
}, |
|
||||||
barWidth:"24px" |
|
||||||
}] |
|
||||||
}; |
|
||||||
detailPlanEchart.setOption(option); |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
@ -1,22 +1,55 @@ |
|||||||
import { Component, OnInit ,Inject,ViewChild} from '@angular/core'; |
import { Component, OnInit, Inject, ViewChild } from "@angular/core"; |
||||||
import { CacheTokenService } from '../http-interceptors/cache-token.service'//引入服务
|
import { CacheTokenService } from "../http-interceptors/cache-token.service"; //引入服务
|
||||||
import { HttpClient,HttpHeaders } from '@angular/common/http'; |
import { HttpClient, HttpHeaders } from "@angular/common/http"; |
||||||
import { FormControl } from '@angular/forms'; |
import { FormControl } from "@angular/forms"; |
||||||
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; |
import { |
||||||
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; |
MatDialog, |
||||||
import { IsLoginService } from '../is-login.service' |
MatDialogRef, |
||||||
import { ComponentServiceService } from '../component-service.service'; |
MAT_DIALOG_DATA, |
||||||
import { Router,ActivatedRoute } from '@angular/router' |
} from "@angular/material/dialog"; |
||||||
|
import { MatSnackBar, MatSnackBarConfig } from "@angular/material/snack-bar"; |
||||||
|
import { IsLoginService } from "../is-login.service"; |
||||||
|
import { ComponentServiceService } from "../component-service.service"; |
||||||
|
import { Router, ActivatedRoute } from "@angular/router"; |
||||||
@Component({ |
@Component({ |
||||||
selector: 'app-navigation', |
selector: "app-navigation", |
||||||
templateUrl: './navigation.component.html', |
templateUrl: "./navigation.component.html", |
||||||
styleUrls: ['./navigation.component.scss'] |
styleUrls: ["./navigation.component.scss"], |
||||||
}) |
}) |
||||||
export class NavigationComponent implements OnInit { |
export class NavigationComponent implements OnInit { |
||||||
|
constructor( |
||||||
|
private router: Router, |
||||||
|
public emitService: ComponentServiceService, |
||||||
|
public navmenus: CacheTokenService, |
||||||
|
private http: HttpClient, |
||||||
|
public dialog: MatDialog, |
||||||
|
public snackBar: MatSnackBar, |
||||||
|
public islogin: IsLoginService |
||||||
|
) {} |
||||||
|
|
||||||
constructor(private router:Router,public emitService: ComponentServiceService,public navmenus:CacheTokenService,private http: HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,public islogin:IsLoginService) { } |
roleType = sessionStorage.getItem("roleType"); |
||||||
|
|
||||||
roleType = sessionStorage.getItem('roleType') |
|
||||||
ngOnInit() {} |
ngOnInit() {} |
||||||
|
|
||||||
|
selectedNav; |
||||||
|
selectedNav2; |
||||||
|
routerTo(name) { |
||||||
|
this.selectedNav = name; |
||||||
|
if (name === "统计分析") { |
||||||
|
this.selectedNav2 = "考试统计"; |
||||||
|
this.router.navigate([RouterUrl["考试统计"]]); //登陆成功跳转页面
|
||||||
|
} else { |
||||||
|
this.router.navigate([RouterUrl[name]]); //登陆成功跳转页面
|
||||||
|
} |
||||||
|
} |
||||||
|
routerTo2(name) { |
||||||
|
this.selectedNav2 = name; |
||||||
|
this.router.navigate([RouterUrl[name]]); //登陆成功跳转页面
|
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
enum RouterUrl { |
||||||
|
"创建考试" = "/home/createexam-index", |
||||||
|
"阅卷" = "/home/mark-papers-index", |
||||||
|
"考试统计" = "/home/statistic-examination", |
||||||
|
"能力分析" = "/home/statistic-capacity", |
||||||
} |
} |
||||||
|
@ -1,57 +1,58 @@ |
|||||||
import { Component, OnInit } from '@angular/core'; |
import { Component, OnInit } from "@angular/core"; |
||||||
import { HttpClient } from '@angular/common/http' |
import { HttpClient } from "@angular/common/http"; |
||||||
import { Router,ActivatedRoute } from '@angular/router' |
import { Router, ActivatedRoute } from "@angular/router"; |
||||||
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; |
import { MatSnackBar, MatSnackBarConfig } from "@angular/material/snack-bar"; |
||||||
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"; //引入服务
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Component({ |
@Component({ |
||||||
selector: 'app-login', |
selector: "app-login", |
||||||
templateUrl: './login.component.html', |
templateUrl: "./login.component.html", |
||||||
styleUrls: ['./login.component.scss'], |
styleUrls: ["./login.component.scss"], |
||||||
|
|
||||||
}) |
}) |
||||||
export class LoginComponent implements OnInit { |
export class LoginComponent implements OnInit { |
||||||
|
constructor( |
||||||
|
private http: HttpClient, |
||||||
|
private router: Router, |
||||||
|
private route: ActivatedRoute, |
||||||
|
public token: CacheTokenService, |
||||||
|
public snackBar: MatSnackBar, |
||||||
|
private isLogin: IsLoginService |
||||||
|
) {} |
||||||
|
|
||||||
constructor(private http:HttpClient,private router:Router,private route:ActivatedRoute,public token:CacheTokenService,public snackBar: MatSnackBar,private isLogin:IsLoginService) { } |
ngOnInit() {} |
||||||
|
|
||||||
ngOnInit() { |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
errmsg :string = ''; //错误信息
|
|
||||||
|
|
||||||
|
|
||||||
|
errmsg: string = ""; //错误信息
|
||||||
|
|
||||||
//登录
|
//登录
|
||||||
onSubmit(e){ |
onSubmit(e) { |
||||||
let params = { roleType: '0' } |
let params = { roleType: "0" }; |
||||||
this.http.post('/api/ExamAccounts/SignIn',e,{params}).subscribe((data:any)=>{ |
this.http.post("/api/ExamAccounts/SignIn", e, { params }).subscribe( |
||||||
sessionStorage.setItem("realName",data.realName); |
(data: any) => { |
||||||
sessionStorage.setItem("roleType",data.roleType); |
sessionStorage.setItem("realName", data.realName); |
||||||
sessionStorage.setItem("token",data.token); |
sessionStorage.setItem("roleType", data.roleType); |
||||||
sessionStorage.setItem("refreshToken",data.refreshToken); |
sessionStorage.setItem("token", data.token); |
||||||
sessionStorage.setItem("level",data.level); |
sessionStorage.setItem("refreshToken", data.refreshToken); |
||||||
this.token.startUp(); //登陆成功启动定时器刷新token
|
sessionStorage.setItem("level", data.level); |
||||||
this.router.navigate(['/home/teachear']) //登陆成功跳转页面
|
this.token.startUp(); //登陆成功启动定时器刷新token
|
||||||
},(err) => {this.errmsg = err}) |
this.router.navigate(["/home/teachear"]); //登陆成功跳转页面
|
||||||
|
}, |
||||||
|
(err) => { |
||||||
|
this.errmsg = err; |
||||||
|
} |
||||||
|
); |
||||||
} |
} |
||||||
|
|
||||||
//跳转教员学员登录页面
|
//跳转教员学员登录页面
|
||||||
toAdminLogin () { |
toAdminLogin() { |
||||||
this.router.navigate(['/login']) //跳转管理员登录页面
|
this.router.navigate(["/login"]); //跳转管理员登录页面
|
||||||
} |
} |
||||||
|
|
||||||
//忘记密码弹窗
|
//忘记密码弹窗
|
||||||
forget () { |
forget() { |
||||||
const config = new MatSnackBarConfig(); |
const config = new MatSnackBarConfig(); |
||||||
config.verticalPosition = 'top'; |
config.verticalPosition = "top"; |
||||||
config.duration = 3000 |
config.duration = 3000; |
||||||
this.snackBar.open('请联系 系统维护技术人员','确定',config); |
this.snackBar.open("请联系 系统维护技术人员", "确定", config); |
||||||
} |
} |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} |
} |
||||||
|
Loading…
Reference in new issue