Browse Source

[完善] 结果展示页面完成

master
陈鹏飞 4 years ago
parent
commit
74dd38a3a5
  1. 46
      package-lock.json
  2. 2
      src/app/app-routing.module.ts
  3. 27
      src/app/ui/drawing-result/drawing-result.component.html
  4. 51
      src/app/ui/drawing-result/drawing-result.component.scss
  5. 25
      src/app/ui/drawing-result/drawing-result.component.spec.ts
  6. 22
      src/app/ui/drawing-result/drawing-result.component.ts
  7. 3
      src/app/ui/ui.module.ts

46
package-lock.json generated

@ -16640,8 +16640,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",
@ -16684,8 +16683,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",
@ -16696,8 +16694,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",
@ -16814,8 +16811,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",
@ -16827,7 +16823,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"
} }
@ -16857,7 +16852,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"
@ -16876,7 +16870,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"
} }
@ -16979,7 +16972,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"
} }
@ -17065,8 +17057,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",
@ -17102,7 +17093,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",
@ -17122,7 +17112,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"
} }
@ -17166,14 +17155,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
} }
} }
}, },
@ -17611,8 +17598,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",
@ -17729,8 +17715,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",
@ -17772,7 +17757,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"
@ -17791,7 +17775,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"
} }
@ -17894,7 +17877,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"
} }
@ -17980,8 +17962,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",
@ -18017,7 +17998,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",
@ -18081,14 +18061,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
} }
} }
}, },

2
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 {MTokenK1Component} from './m-token-k1/m-token-k1.component' //K1秘钥
import { LuckDrawComponent } from './ui/luck-draw/luck-draw.component'; import { LuckDrawComponent } from './ui/luck-draw/luck-draw.component';
import {ResetComponent} from './ui/reset/reset.component' import {ResetComponent} from './ui/reset/reset.component'
import { DrawingResultComponent } from './ui/drawing-result/drawing-result.component';
const routes: Routes = [ const routes: Routes = [
@ -35,6 +36,7 @@ const routes: Routes = [
}, */ }, */
{path:'',component:LuckDrawComponent}, {path:'',component:LuckDrawComponent},
{path:'Reset',component:ResetComponent}, {path:'Reset',component:ResetComponent},
{path: 'drawingResult', component:DrawingResultComponent}
// {path:'login', // {path:'login',
// component:LoginComponent}, // component:LoginComponent},

27
src/app/ui/drawing-result/drawing-result.component.html

@ -0,0 +1,27 @@
<div class="content">
<header><img src="../../../assets/images/tophead.png"></header>
<div class="center">
<table>
<tr>
<th *ngFor="let header of headers">{{header}}</th>
</tr>
<tr *ngFor="let item of tableData">
<td>{{item.order}}</td>
<td>{{item.fireName}}</td>
<td>{{item.drawLotsOrder}}</td>
<td>{{item.testTime}}</td>
<td>
<p *ngFor="let items of item.num" class="bottomBorder">{{items}}</p>
</td>
<td>
<p *ngFor="let items of item.name" class="bottomBorder">{{items}}</p>
</td>
<td>
<p *ngFor="let items of item.seatNum" class="bottomBorder">{{items}}</p>
</td>
</tr>
</table>
</div>
</div>

51
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; }

25
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<DrawingResultComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ DrawingResultComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(DrawingResultComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

22
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'] },
]
}

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

@ -61,9 +61,10 @@ import { WorkingAreaComponent } from '../working-area/working-area.component';
import { CountdownModule } from 'ngx-countdown'; import { CountdownModule } from 'ngx-countdown';
import { LuckDrawComponent } from './luck-draw/luck-draw.component'; import { LuckDrawComponent } from './luck-draw/luck-draw.component';
import { ResetComponent } from './reset/reset.component'; import { ResetComponent } from './reset/reset.component';
import { DrawingResultComponent } from './drawing-result/drawing-result.component';
@NgModule({ @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: [ imports: [
CommonModule, CommonModule,

Loading…
Cancel
Save