From 74dd38a3a5c152e4a832cc53a9bf379ee4b6d8c9 Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Sat, 17 Oct 2020 13:53:11 +0800 Subject: [PATCH 1/3] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=20=E7=BB=93=E6=9E=9C?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E9=A1=B5=E9=9D=A2=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 46 +++++------------ src/app/app-routing.module.ts | 2 + .../drawing-result.component.html | 27 ++++++++++ .../drawing-result.component.scss | 51 +++++++++++++++++++ .../drawing-result.component.spec.ts | 25 +++++++++ .../drawing-result.component.ts | 22 ++++++++ src/app/ui/ui.module.ts | 3 +- 7 files changed, 141 insertions(+), 35 deletions(-) create mode 100644 src/app/ui/drawing-result/drawing-result.component.html create mode 100644 src/app/ui/drawing-result/drawing-result.component.scss create mode 100644 src/app/ui/drawing-result/drawing-result.component.spec.ts create mode 100644 src/app/ui/drawing-result/drawing-result.component.ts diff --git a/package-lock.json b/package-lock.json index 5b2bab3..d275bfc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16640,8 +16640,7 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "aproba": { "version": "1.2.0", @@ -16684,8 +16683,7 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "concat-map": { "version": "0.0.1", @@ -16696,8 +16694,7 @@ "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "core-util-is": { "version": "1.0.2", @@ -16814,8 +16811,7 @@ "inherits": { "version": "2.0.4", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "ini": { "version": "1.3.5", @@ -16827,7 +16823,6 @@ "version": "1.0.0", "bundled": true, "dev": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -16857,7 +16852,6 @@ "version": "2.9.0", "bundled": true, "dev": true, - "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -16876,7 +16870,6 @@ "version": "0.5.1", "bundled": true, "dev": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -16979,7 +16972,6 @@ "version": "1.4.0", "bundled": true, "dev": true, - "optional": true, "requires": { "wrappy": "1" } @@ -17065,8 +17057,7 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "safer-buffer": { "version": "2.1.2", @@ -17102,7 +17093,6 @@ "version": "1.0.2", "bundled": true, "dev": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -17122,7 +17112,6 @@ "version": "3.0.1", "bundled": true, "dev": true, - "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -17166,14 +17155,12 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "yallist": { "version": "3.1.1", "bundled": true, - "dev": true, - "optional": true + "dev": true } } }, @@ -17611,8 +17598,7 @@ "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "core-util-is": { "version": "1.0.2", @@ -17729,8 +17715,7 @@ "inherits": { "version": "2.0.4", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "ini": { "version": "1.3.5", @@ -17772,7 +17757,6 @@ "version": "2.9.0", "bundled": true, "dev": true, - "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -17791,7 +17775,6 @@ "version": "0.5.1", "bundled": true, "dev": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -17894,7 +17877,6 @@ "version": "1.4.0", "bundled": true, "dev": true, - "optional": true, "requires": { "wrappy": "1" } @@ -17980,8 +17962,7 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "safer-buffer": { "version": "2.1.2", @@ -18017,7 +17998,6 @@ "version": "1.0.2", "bundled": true, "dev": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -18081,14 +18061,12 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "yallist": { "version": "3.1.1", "bundled": true, - "dev": true, - "optional": true + "dev": true } } }, diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 833c96c..3b5e4ce 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -18,6 +18,7 @@ import {AuthGuard} from './auth.guard' import {MTokenK1Component} from './m-token-k1/m-token-k1.component' //K1秘钥 import { LuckDrawComponent } from './ui/luck-draw/luck-draw.component'; import {ResetComponent} from './ui/reset/reset.component' +import { DrawingResultComponent } from './ui/drawing-result/drawing-result.component'; const routes: Routes = [ @@ -35,6 +36,7 @@ const routes: Routes = [ }, */ {path:'',component:LuckDrawComponent}, {path:'Reset',component:ResetComponent}, + {path: 'drawingResult', component:DrawingResultComponent} // {path:'login', // component:LoginComponent}, diff --git a/src/app/ui/drawing-result/drawing-result.component.html b/src/app/ui/drawing-result/drawing-result.component.html new file mode 100644 index 0000000..fc6d596 --- /dev/null +++ b/src/app/ui/drawing-result/drawing-result.component.html @@ -0,0 +1,27 @@ +
+
+ +
+ + + + + + + + + + + + + +
{{header}}
{{item.order}}{{item.fireName}}{{item.drawLotsOrder}}{{item.testTime}} +

{{items}}

+
+

{{items}}

+
+

{{items}}

+
+
+ +
\ No newline at end of file diff --git a/src/app/ui/drawing-result/drawing-result.component.scss b/src/app/ui/drawing-result/drawing-result.component.scss new file mode 100644 index 0000000..559e5da --- /dev/null +++ b/src/app/ui/drawing-result/drawing-result.component.scss @@ -0,0 +1,51 @@ +.content { + width: 100%; + height: 100%; + overflow: hidden; + box-sizing: border-box; + padding: 1px; + background: url('../../../assets/images/backgroud.png'); + background-size: 100% 100%; + header { + width: 100%; + height: 50px; + text-align: center; + background: url('../../../assets/images/head.png'); + background-size: 100% 100%; + img { margin: 11px 0; } + } +} + +.center { + width: 80%; + margin: 50px auto; + background-color: #fff; +} + +table { + width: 100%; + text-align: center; + border-collapse:collapse; + word-break:break-all; + word-wrap:break-all; + table-layout:fixed; + th { + height: 50px; + font-size: 24px; + color: #fff; + font-weight: 400; + border: 1px solid #fff; + background-color: #ff4d29; + } + td { + height: 80px; + color: #000; + font-weight: 400; + border: 1px solid #ECEDEE; + } + .bottomBorder:not(:last-child) { + border-bottom: 1px solid #ECEDEE; + } +} + +th,td,p { cursor: default; } \ No newline at end of file diff --git a/src/app/ui/drawing-result/drawing-result.component.spec.ts b/src/app/ui/drawing-result/drawing-result.component.spec.ts new file mode 100644 index 0000000..9bfbd8c --- /dev/null +++ b/src/app/ui/drawing-result/drawing-result.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { DrawingResultComponent } from './drawing-result.component'; + +describe('DrawingResultComponent', () => { + let component: DrawingResultComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ DrawingResultComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(DrawingResultComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/ui/drawing-result/drawing-result.component.ts b/src/app/ui/drawing-result/drawing-result.component.ts new file mode 100644 index 0000000..2c7c646 --- /dev/null +++ b/src/app/ui/drawing-result/drawing-result.component.ts @@ -0,0 +1,22 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-drawing-result', + templateUrl: './drawing-result.component.html', + styleUrls: ['./drawing-result.component.scss'] +}) +export class DrawingResultComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + + headers:string [] = ['序号','支队名称','抽签顺序','考试批次','编号', '姓名','座位号'] + tableData = [ + {order: 1, fireName: '南宁市消防救援队', drawLotsOrder: '01', testTime: '上午8:00', num: ['01-01','01-02','01-03','01-04'], name: ['陈小辉','毛志毅','韩月','白显乐'], seatNum: ['01','02','03','04'] }, + {order: 2, fireName: '南宁市消防救援队', drawLotsOrder: '01', testTime: '上午8:00', num: ['01-01','01-02','01-03','01-04'], name: ['陈小辉','毛志毅','韩月','白显乐'], seatNum: ['01','02','03','04'] }, + {order: 3, fireName: '南宁市消防救援队', drawLotsOrder: '01', testTime: '上午8:00', num: ['01-01','01-02','01-03','01-04'], name: ['陈小辉','毛志毅','韩月','白显乐'], seatNum: ['01','02','03','04'] }, + ] + +} diff --git a/src/app/ui/ui.module.ts b/src/app/ui/ui.module.ts index 4d0ab39..1469a22 100644 --- a/src/app/ui/ui.module.ts +++ b/src/app/ui/ui.module.ts @@ -61,9 +61,10 @@ import { WorkingAreaComponent } from '../working-area/working-area.component'; import { CountdownModule } from 'ngx-countdown'; import { LuckDrawComponent } from './luck-draw/luck-draw.component'; import { ResetComponent } from './reset/reset.component'; +import { DrawingResultComponent } from './drawing-result/drawing-result.component'; @NgModule({ - declarations: [SafeHtmlPipe,UiComponent,PersonaldataComponent, ChangepasswordComponent,IsnoPipe,ConfirmpswDirective,TimePipe,WorkingAreaComponent, LuckDrawComponent, ResetComponent], + declarations: [SafeHtmlPipe,UiComponent,PersonaldataComponent, ChangepasswordComponent,IsnoPipe,ConfirmpswDirective,TimePipe,WorkingAreaComponent, LuckDrawComponent, ResetComponent, DrawingResultComponent], imports: [ CommonModule, From be41d36158492a0df7e7c002795b8bf3b545172d Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Sat, 17 Oct 2020 14:00:39 +0800 Subject: [PATCH 2/3] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=20=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E8=AF=B4=E6=98=8E=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 +--- src/app/app.component.ts | 14 -------------- src/app/http-interceptors/base-interceptor.ts | 19 +++---------------- 3 files changed, 4 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index 41fa697..249b388 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,4 @@ -智能实战指挥平台-前端项目 - - ---广西 演示 +指挥员指挥能力考评抽签-前端项目 项目初始化:npm install diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 13a5c02..f3f4ecf 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -16,20 +16,6 @@ export class AppComponent { constructor(private http:HttpClient,private router:Router,public token:CacheTokenService) { } ngOnInit(): void { - var token = sessionStorage.getItem("token"); - var refreshToken = sessionStorage.getItem("refreshToken"); - if(token && refreshToken) { - this.http.post('/api/Account/RefreshToken', { - token: token, - refreshToken: refreshToken - }).subscribe((data: Data) => { - sessionStorage.setItem("level",data.level); - sessionStorage.setItem("token",data.token); - sessionStorage.setItem("refreshToken",data.refreshToken); - this.token.startUp() - }) - } - } diff --git a/src/app/http-interceptors/base-interceptor.ts b/src/app/http-interceptors/base-interceptor.ts index 76b39b8..066dec9 100644 --- a/src/app/http-interceptors/base-interceptor.ts +++ b/src/app/http-interceptors/base-interceptor.ts @@ -44,26 +44,13 @@ export class BaseInterceptor implements HttpInterceptor { private handleError(error: HttpErrorResponse) { // 用户认证失败返回登录页 if (error.status === 401||error.status === 614) { - this.token.delete() - sessionStorage.clear() - window.localStorage.clear() - this.router.navigate(['ui/plan']) - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('用户认证信息过期,请重新登录','确定',config); + } if (error.status === 403) { - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('对不起,您无此权限','确定',config); + } if (error.status === 400) { - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('请核对您的输入格式是否正确','确定',config); + } if (error.error instanceof ErrorEvent) { From b10ee4f49eeac4608f1c321c6f6be94d3d9785e1 Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Sat, 17 Oct 2020 17:20:12 +0800 Subject: [PATCH 3/3] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=20=E6=9C=80=E7=BB=88?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E9=A1=B5=E9=9D=A2=E5=88=9D=E6=AD=A5=E5=AE=8C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../drawing-result.component.html | 27 +++++++++++--- .../drawing-result.component.scss | 22 +++++++++-- .../drawing-result.component.ts | 37 +++++++++++++++++-- 3 files changed, 73 insertions(+), 13 deletions(-) diff --git a/src/app/ui/drawing-result/drawing-result.component.html b/src/app/ui/drawing-result/drawing-result.component.html index fc6d596..13b9b3c 100644 --- a/src/app/ui/drawing-result/drawing-result.component.html +++ b/src/app/ui/drawing-result/drawing-result.component.html @@ -2,23 +2,38 @@
+

业务理论考试

- + - + - + + +
{{header}}{{header}}
{{item.order}} {{item.fireName}} {{item.drawLotsOrder}}{{item.testTime}} -

{{items}}

+

{{items}}

+
+

{{items}}

+

指挥能力考评

+ + + + + + + + +
{{header}}
{{item.order}}{{item.fireName}}{{item.drawLotsOrder}}{{item.num}} -

{{items}}

+

{{items}}

-

{{items}}

+

{{items}}

diff --git a/src/app/ui/drawing-result/drawing-result.component.scss b/src/app/ui/drawing-result/drawing-result.component.scss index 559e5da..f1ffba2 100644 --- a/src/app/ui/drawing-result/drawing-result.component.scss +++ b/src/app/ui/drawing-result/drawing-result.component.scss @@ -18,18 +18,32 @@ .center { width: 80%; - margin: 50px auto; - background-color: #fff; + max-height: 90%; + margin: 0 auto; + overflow-x: hidden; + overflow-y: auto; + text-align: center; + h3 { + font-size: 26px; + color: #fff; + margin: 30px 0; + } +} +.center::-webkit-scrollbar { + display: none; } table { width: 100%; + box-sizing: border-box; + background-color: #fff; text-align: center; border-collapse:collapse; word-break:break-all; word-wrap:break-all; table-layout:fixed; th { + box-sizing: border-box; height: 50px; font-size: 24px; color: #fff; @@ -38,11 +52,13 @@ table { background-color: #ff4d29; } td { - height: 80px; + box-sizing: border-box; + height: 60px; color: #000; font-weight: 400; border: 1px solid #ECEDEE; } + p { height: 30px; line-height: 30px; box-sizing: border-box; } .bottomBorder:not(:last-child) { border-bottom: 1px solid #ECEDEE; } diff --git a/src/app/ui/drawing-result/drawing-result.component.ts b/src/app/ui/drawing-result/drawing-result.component.ts index 2c7c646..3c35d99 100644 --- a/src/app/ui/drawing-result/drawing-result.component.ts +++ b/src/app/ui/drawing-result/drawing-result.component.ts @@ -12,11 +12,40 @@ export class DrawingResultComponent implements OnInit { ngOnInit(): void { } - headers:string [] = ['序号','支队名称','抽签顺序','考试批次','编号', '姓名','座位号'] + headersZero:string [] = ['序号','支队名称','抽签顺序', '职级','座位号'] + tableDataZero = [ + {order: 1, fireName: '南宁支队', drawLotsOrder: '01', name: ['支队长','副支队长'], seatNum: ['01','02'] }, + {order: 2, fireName: '柳州支队', drawLotsOrder: '02', name: ['支队长','副支队长'], seatNum: ['03','04'] }, + {order: 3, fireName: '桂林支队', drawLotsOrder: '03', name: ['支队长','副支队长'], seatNum: ['05','06'] }, + {order: 4, fireName: '梧州支队', drawLotsOrder: '04', name: ['支队长','副支队长'], seatNum: ['01','02'] }, + {order: 5, fireName: '北海支队', drawLotsOrder: '05', name: ['支队长','副支队长'], seatNum: ['03','04'] }, + {order: 6, fireName: '防城港支队', drawLotsOrder: '06', name: ['支队长','副支队长'], seatNum: ['05','06'] }, + {order: 7, fireName: '钦州支队', drawLotsOrder: '07', name: ['支队长','副支队长'], seatNum: ['01','02'] }, + {order: 8, fireName: '贵港支队', drawLotsOrder: '08', name: ['支队长','副支队长'], seatNum: ['03','04'] }, + {order: 9, fireName: '玉林支队', drawLotsOrder: '09', name: ['支队长','副支队长'], seatNum: ['05','06'] }, + {order: 10, fireName: '百色支队', drawLotsOrder: '10', name: ['支队长','副支队长'], seatNum: ['01','02'] }, + {order: 11, fireName: '贺州支队', drawLotsOrder: '11', name: ['支队长','副支队长'], seatNum: ['03','04'] }, + {order: 12, fireName: '河池支队', drawLotsOrder: '12', name: ['支队长','副支队长'], seatNum: ['05','06'] }, + {order: 13, fireName: '来宾支队', drawLotsOrder: '13', name: ['支队长','副支队长'], seatNum: ['03','04'] }, + {order: 14, fireName: '崇左支队', drawLotsOrder: '14', name: ['支队长','副支队长'], seatNum: ['05','06'] }, + ] + + headers:string [] = ['序号','支队名称','抽签顺序','场景类型', '职级','座位号'] tableData = [ - {order: 1, fireName: '南宁市消防救援队', drawLotsOrder: '01', testTime: '上午8:00', num: ['01-01','01-02','01-03','01-04'], name: ['陈小辉','毛志毅','韩月','白显乐'], seatNum: ['01','02','03','04'] }, - {order: 2, fireName: '南宁市消防救援队', drawLotsOrder: '01', testTime: '上午8:00', num: ['01-01','01-02','01-03','01-04'], name: ['陈小辉','毛志毅','韩月','白显乐'], seatNum: ['01','02','03','04'] }, - {order: 3, fireName: '南宁市消防救援队', drawLotsOrder: '01', testTime: '上午8:00', num: ['01-01','01-02','01-03','01-04'], name: ['陈小辉','毛志毅','韩月','白显乐'], seatNum: ['01','02','03','04'] }, + {order: 1, fireName: '南宁支队', drawLotsOrder: '05', num: localStorage.getItem('5') || '', name: ['支队长','副支队长'], seatNum: ['8号','21号'] }, + {order: 2, fireName: '柳州支队', drawLotsOrder: '10', num: localStorage.getItem('10') || '', name: ['支队长','副支队长'], seatNum: ['12号','26号'] }, + {order: 3, fireName: '桂林支队', drawLotsOrder: '14', num: localStorage.getItem('14') || '', name: ['支队长','副支队长'], seatNum: ['14号','15号'] }, + {order: 4, fireName: '梧州支队', drawLotsOrder: '03', num: localStorage.getItem('3') || '', name: ['支队长','副支队长'], seatNum: ['13号','28号'] }, + {order: 5, fireName: '北海支队', drawLotsOrder: '08', num: localStorage.getItem('8') || '', name: ['支队长','副支队长'], seatNum: ['4号','22号'] }, + {order: 6, fireName: '防城港支队', drawLotsOrder: '13', num: localStorage.getItem('13') || '', name: ['支队长','副支队长'], seatNum: ['1号','16号'] }, + {order: 7, fireName: '钦州支队', drawLotsOrder: '06', num: localStorage.getItem('6') || '', name: ['支队长','副支队长'], seatNum: ['10号','25号'] }, + {order: 8, fireName: '贵港支队', drawLotsOrder: '01', num: localStorage.getItem('1') || '', name: ['支队长','副支队长'], seatNum: ['11号','19号'] }, + {order: 9, fireName: '玉林支队', drawLotsOrder: '07', num: localStorage.getItem('7') || '', name: ['支队长','副支队长'], seatNum: ['2号','27号'] }, + {order: 10, fireName: '百色支队', drawLotsOrder: '12', num: localStorage.getItem('12') || '', name: ['支队长','副支队长'], seatNum: ['9号','20号'] }, + {order: 11, fireName: '贺州支队', drawLotsOrder: '02', num: localStorage.getItem('02') || '', name: ['支队长','副支队长'], seatNum: ['3号','24号'] }, + {order: 12, fireName: '河池支队', drawLotsOrder: '04', num: localStorage.getItem('04') || '', name: ['支队长','副支队长'], seatNum: ['6号','18号'] }, + {order: 13, fireName: '来宾支队', drawLotsOrder: '09', num: localStorage.getItem('09') || '', name: ['支队长','副支队长'], seatNum: ['7号','23号'] }, + {order: 14, fireName: '崇左支队', drawLotsOrder: '11', num: localStorage.getItem('11') || '', name: ['支队长','副支队长'], seatNum: ['5号','17号'] }, ] }