Browse Source

[完善]完善下一步限制

master
邵佳豪 4 years ago
parent
commit
17c29c7ad0
  1. 7
      src/app/ui/drawing-result/drawing-result.component.html
  2. 14
      src/app/ui/drawing-result/drawing-result.component.scss
  3. 14
      src/app/ui/drawing-result/drawing-result.component.ts
  4. 8
      src/app/ui/first-step-copy/first-step-copy.component.html
  5. 6
      src/app/ui/first-step-copy/first-step-copy.component.ts
  6. 8
      src/app/ui/four-step-copy/four-step-copy.component.ts
  7. 5
      src/app/ui/four-step/four-step.component.html
  8. 9
      src/app/ui/four-step/four-step.component.scss
  9. 14
      src/app/ui/four-step/four-step.component.ts

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

@ -2,8 +2,11 @@
<header><img src="../../../assets/images/tophead.png"></header>
<div class="center">
<h3>业务理论考试</h3>
<table>
<div class="laststep" (click)="laststep()">
上一步
</div>
<h3 *ngIf="isOne">业务理论考试</h3>
<table *ngIf="isOne">
<tr>
<th *ngFor="let header of headersZero">{{header}}</th>
</tr>

14
src/app/ui/drawing-result/drawing-result.component.scss

@ -17,12 +17,26 @@
}
.center {
position: relative;
width: 80%;
max-height: 90%;
margin: 0 auto;
overflow-x: hidden;
overflow-y: auto;
text-align: center;
.laststep{
position: absolute;
width: 85px;
height:36px;
line-height:36px;
color: white;
font-size: 18px;
right: 0;
top: 18px;
border: 1px solid white;
border-radius: 6px;
cursor: pointer;
}
h3 {
font-size: 26px;
color: #fff;

14
src/app/ui/drawing-result/drawing-result.component.ts

@ -1,4 +1,5 @@
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
@Component({
selector: 'app-drawing-result',
@ -7,9 +8,14 @@ import { Component, OnInit } from '@angular/core';
})
export class DrawingResultComponent implements OnInit {
constructor() { }
constructor(private router: Router) { }
isOne = false
ngOnInit(): void {
if(this.router.url == '/drawingResult?type=1'){
this.isOne = false
}else{
this.isOne = true
}
}
headersZero:string [] = ['序号','支队名称','抽签顺序', '职级','座位号']
@ -47,5 +53,7 @@ export class DrawingResultComponent implements OnInit {
{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号'] },
]
laststep(){
window.history.back();
}
}

8
src/app/ui/first-step-copy/first-step-copy.component.html

@ -13,15 +13,15 @@
<img class="ziti" src="../../../assets/images/tophead.png">
</div>
<div class="mainbox">
<!-- <div class="colum" style="margin-left: 13%;width: 100px;">
<div class="colum" style="margin-left: 13%;width: 100px;">
<div class="centerLefta" >
<div class="tanCenterbtna" id="chooseZhi">
<span style="background-color: #ff4d29;color:#FFF;" >序号</span>
<span *ngFor="let item of choujiang; let key=index" [ngClass]="{'beijicolor': chooseid ==key}" >{{item.idnum}}</span>
<span *ngFor="let item of choujiang; let key=index" [ngClass]="{'beijicolor': chooseid ==key}" >{{item.id}}</span>
</div>
</div>
</div> -->
<div class="colum" style="margin-left: 150px;">
</div>
<div class="colum">
<div class="centerLeft" >
<div class="tanCenterbtn" id="chooseZhi10">
<span style="background-color: #ff4d29;color:#FFF;" name="zhidui" data-id=`{{chooseid}}`>请选择支队</span>

6
src/app/ui/first-step-copy/first-step-copy.component.ts

@ -61,7 +61,13 @@ export class FirstStepCopyComponent implements OnInit {
this.isDraw = false
}
}
nextstep(){
if(localStorage.getItem("南宁支队copy") && localStorage.getItem("柳州支队copy") && localStorage.getItem("桂林支队copy") && localStorage.getItem("梧州支队copy") && localStorage.getItem("北海支队copy") && localStorage.getItem("防城港支队copy") && localStorage.getItem("钦州支队copy") && localStorage.getItem("贵港支队copy") && localStorage.getItem("玉林支队copy") && localStorage.getItem("百色支队copy") && localStorage.getItem("贺州支队copy") && localStorage.getItem("河池支队copy") && localStorage.getItem("来宾支队copy") && localStorage.getItem("崇左支队copy")){
window.location.href="/fourStep2";
}else{
alert("未全部抽完!")
}
}
}

8
src/app/ui/four-step-copy/four-step-copy.component.ts

@ -76,5 +76,11 @@ export class FourStepCopyComponent implements OnInit {
this.isDraw = false
}
}
lookresult(){
if(localStorage.getItem("南宁支队seatnumbercopy") && localStorage.getItem("柳州支队seatnumbercopy") && localStorage.getItem("桂林支队seatnumbercopy") && localStorage.getItem("梧州支队seatnumbercopy") && localStorage.getItem("北海支队seatnumbercopy") && localStorage.getItem("防城港支队seatnumbercopy") && localStorage.getItem("钦州支队seatnumbercopy") && localStorage.getItem("贵港支队seatnumbercopy") && localStorage.getItem("玉林支队seatnumbercopy") && localStorage.getItem("百色支队seatnumbercopy") && localStorage.getItem("贺州支队seatnumbercopy") && localStorage.getItem("河池支队seatnumbercopy") && localStorage.getItem("来宾支队seatnumbercopy") && localStorage.getItem("崇左支队seatnumbercopy")){
window.location.href="/drawingResult";
}else{
alert("请全部抽完再查看结果!")
}
}
}

5
src/app/ui/four-step/four-step.component.html

@ -68,7 +68,10 @@
</div>
<div class="chongzhi" style="height: 20%;"><button type="button" (click)="nextStep()" class="button">下一步</button></div>
<div class="chongzhi" style="height: 20%;">
<button type="button" (click)="lookresult()" class="button">查看结果</button>
<button type="button" (click)="nextStep()" class="button">下一步</button>
</div>
</div>
</div>

9
src/app/ui/four-step/four-step.component.scss

@ -43,8 +43,8 @@
}
.chongzhi{
position: relative;
top: 85%;
right: 17%;
top: 80%;
right: 23.5%;
}
.centerLeft{
@ -153,11 +153,6 @@
margin: 4px 2px;
cursor: pointer;
}
.chongzhi{
position: relative;
top: 85%;
right: 17%;
}
//选择后加背景色
.beijicolor{

14
src/app/ui/four-step/four-step.component.ts

@ -85,7 +85,17 @@ export class FourStepComponent implements OnInit {
}
}
nextStep(){
window.location.href="/drawingResult";
if(localStorage.getItem("南宁支队seatnumber") && localStorage.getItem("柳州支队seatnumber") && localStorage.getItem("桂林支队seatnumber") && localStorage.getItem("梧州支队seatnumber") && localStorage.getItem("北海支队seatnumber") && localStorage.getItem("防城港支队seatnumber") && localStorage.getItem("钦州支队seatnumber") && localStorage.getItem("贵港支队seatnumber") && localStorage.getItem("玉林支队seatnumber") && localStorage.getItem("百色支队seatnumber") && localStorage.getItem("贺州支队seatnumber") && localStorage.getItem("河池支队seatnumber") && localStorage.getItem("来宾支队seatnumber") && localStorage.getItem("崇左支队seatnumber")){
window.location.href="/firstStep2";
}else{
alert("未全部抽完!")
}
}
lookresult(){
if(localStorage.getItem("南宁支队seatnumber") && localStorage.getItem("柳州支队seatnumber") && localStorage.getItem("桂林支队seatnumber") && localStorage.getItem("梧州支队seatnumber") && localStorage.getItem("北海支队seatnumber") && localStorage.getItem("防城港支队seatnumber") && localStorage.getItem("钦州支队seatnumber") && localStorage.getItem("贵港支队seatnumber") && localStorage.getItem("玉林支队seatnumber") && localStorage.getItem("百色支队seatnumber") && localStorage.getItem("贺州支队seatnumber") && localStorage.getItem("河池支队seatnumber") && localStorage.getItem("来宾支队seatnumber") && localStorage.getItem("崇左支队seatnumber")){
window.location.href="/drawingResult?type=1";
}else{
alert("请全部抽完再查看结果!")
}
}
}

Loading…
Cancel
Save