Browse Source

[完善]修改抽签为两步骤

master
邵佳豪 4 years ago
parent
commit
7ac3af1866
  1. 46
      package-lock.json
  2. 4
      src/app/ui/drawing-result/drawing-result.component.html
  3. 2
      src/app/ui/drawing-result/drawing-result.component.scss
  4. 6
      src/app/ui/first-step-copy/first-step-copy.component.scss
  5. 24
      src/app/ui/first-step-copy/first-step-copy.component.ts
  6. 6
      src/app/ui/first-step/first-step.component.scss
  7. 29
      src/app/ui/first-step/first-step.component.ts
  8. 2
      src/app/ui/four-step-copy/four-step-copy.component.html
  9. 6
      src/app/ui/four-step-copy/four-step-copy.component.scss
  10. 8
      src/app/ui/four-step/four-step.component.scss
  11. 6
      src/app/ui/luck-draw/luck-draw.component.scss

46
package-lock.json generated

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

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

@ -5,7 +5,7 @@
<div class="laststep" (click)="laststep()"> <div class="laststep" (click)="laststep()">
上一步 上一步
</div> </div>
<h3 *ngIf="isOne">业务理论考试</h3> <h3 *ngIf="isOne">业务理论考试结果</h3>
<table *ngIf="isOne"> <table *ngIf="isOne">
<tr> <tr>
<th *ngFor="let header of headersZero">{{header}}</th> <th *ngFor="let header of headersZero">{{header}}</th>
@ -22,7 +22,7 @@
</td> </td>
</tr> </tr>
</table> </table>
<h3 *ngIf="isTwo">指挥能力考评</h3> <h3 *ngIf="isTwo">指挥能力考评结果</h3>
<table *ngIf="isTwo"> <table *ngIf="isTwo">
<tr> <tr>
<th *ngFor="let header of headers">{{header}}</th> <th *ngFor="let header of headers">{{header}}</th>

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

@ -38,7 +38,7 @@
cursor: pointer; cursor: pointer;
} }
h3 { h3 {
font-size: 26px; font-size: 33px;
color: #fff; color: #fff;
margin: 30px 0; margin: 30px 0;
} }

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

@ -42,10 +42,10 @@
display: flex; display: flex;
.title{ .title{
position: absolute; position: absolute;
left: 28%; left: 27%;
top: 80px; top: 75px;
color: white; color: white;
font-size: 22px; font-size: 30px;
} }
} }
.chongzhi{ .chongzhi{

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

@ -11,7 +11,29 @@ export class FirstStepCopyComponent implements OnInit {
constructor(private router: Router) { } constructor(private router: Router) { }
ngOnInit(){ ngOnInit(){
var arr2 = [1,2,3,4,5,6,7,8,9,10,11,12,13,14]
let p = arr2.sort(() => {
return Math.round(Math.random()) - 0.5; //返回随机值(大于0|小于0)
})
var arrSeatcopy = [1,2,3,4,5,6,7,8,9,10,11,12,13,14]
var arrSeat2copy = [15,16,17,18,19,20,21,22,23,24,25,26,27,28]
let s = arrSeatcopy.sort(() => {
return Math.round(Math.random()) - 0.5; //返回随机值(大于0|小于0)
})
let j = arrSeat2copy.sort(() => {
return Math.round(Math.random()) - 0.5; //返回随机值(大于0|小于0)
})
if(!localStorage.getItem("arr2")){
localStorage.setItem("arr2",JSON.stringify(p))
}
if(!localStorage.getItem("arrSeatcopy")){
localStorage.setItem("arrSeatcopy",JSON.stringify(s))
}
if(!localStorage.getItem("arrSeat2copy")){
localStorage.setItem("arrSeat2copy",JSON.stringify(j))
}
let orgArr = ['南宁支队','柳州支队','桂林支队','梧州支队','北海支队','防城港支队','钦州支队','贵港支队','玉林支队','百色支队','贺州支队','河池支队','来宾支队','崇左支队',]
localStorage.setItem("orgArr",JSON.stringify(orgArr))
} }
//支队数据和是否抽奖 //支队数据和是否抽奖
choujiang=[ choujiang=[

6
src/app/ui/first-step/first-step.component.scss

@ -43,10 +43,10 @@
position: relative; position: relative;
.title{ .title{
position: absolute; position: absolute;
left: 28%; left: 25%;
top: 36px; top: 25px;
color: white; color: white;
font-size: 22px; font-size: 30px;
} }
} }

29
src/app/ui/first-step/first-step.component.ts

@ -13,51 +13,34 @@ export class FirstStepComponent implements OnInit {
ngOnInit(){ ngOnInit(){
var arr = [1,2,3,4,5,6,7,8,9,10,11,12,13,14] var arr = [1,2,3,4,5,6,7,8,9,10,11,12,13,14]
var arr2 = [1,2,3,4,5,6,7,8,9,10,11,12,13,14]
var arrSeat = [1,2,3,4,5,6,7,8,9,10,11,12,13,14] var arrSeat = [1,2,3,4,5,6,7,8,9,10,11,12,13,14]
var arrSeat2 = [15,16,17,18,19,20,21,22,23,24,25,26,27,28] var arrSeat2 = [15,16,17,18,19,20,21,22,23,24,25,26,27,28]
var arrSeatcopy = [1,2,3,4,5,6,7,8,9,10,11,12,13,14]
var arrSeat2copy = [15,16,17,18,19,20,21,22,23,24,25,26,27,28]
let x = arr.sort(() => { let x = arr.sort(() => {
return Math.round(Math.random()) - 0.5; //返回随机值(大于0|小于0) return Math.round(Math.random()) - 0.5; //返回随机值(大于0|小于0)
}) })
let p = arr2.sort(() => {
return Math.round(Math.random()) - 0.5; //返回随机值(大于0|小于0)
})
let y = arrSeat.sort(() => { let y = arrSeat.sort(() => {
return Math.round(Math.random()) - 0.5; //返回随机值(大于0|小于0) return Math.round(Math.random()) - 0.5; //返回随机值(大于0|小于0)
}) })
let z = arrSeat2.sort(() => { let z = arrSeat2.sort(() => {
return Math.round(Math.random()) - 0.5; //返回随机值(大于0|小于0) return Math.round(Math.random()) - 0.5; //返回随机值(大于0|小于0)
}) })
let s = arrSeatcopy.sort(() => {
return Math.round(Math.random()) - 0.5; //返回随机值(大于0|小于0)
})
let j = arrSeat2copy.sort(() => {
return Math.round(Math.random()) - 0.5; //返回随机值(大于0|小于0)
})
if(!localStorage.getItem("arr")){ if(!localStorage.getItem("arr")){
localStorage.setItem("arr",JSON.stringify(x)) localStorage.setItem("arr",JSON.stringify(x))
} }
if(!localStorage.getItem("arr2")){
localStorage.setItem("arr2",JSON.stringify(p))
}
if(!localStorage.getItem("arrSeat")){ if(!localStorage.getItem("arrSeat")){
localStorage.setItem("arrSeat",JSON.stringify(y)) localStorage.setItem("arrSeat",JSON.stringify(y))
} }
if(!localStorage.getItem("arrSeat2")){ if(!localStorage.getItem("arrSeat2")){
localStorage.setItem("arrSeat2",JSON.stringify(z)) localStorage.setItem("arrSeat2",JSON.stringify(z))
} }
if(!localStorage.getItem("arrSeatcopy")){
localStorage.setItem("arrSeatcopy",JSON.stringify(s))
}
if(!localStorage.getItem("arrSeat2copy")){
localStorage.setItem("arrSeat2copy",JSON.stringify(j))
}
let orgArr = ['南宁支队','柳州支队','桂林支队','梧州支队','北海支队','防城港支队','钦州支队','贵港支队','玉林支队','百色支队','贺州支队','河池支队','来宾支队','崇左支队',] let orgArr = ['南宁支队','柳州支队','桂林支队','梧州支队','北海支队','防城港支队','钦州支队','贵港支队','玉林支队','百色支队','贺州支队','河池支队','来宾支队','崇左支队',]
localStorage.setItem("orgArr",JSON.stringify(orgArr)) localStorage.setItem("orgArr",JSON.stringify(orgArr))
localStorage.setItem("pagetype",'true')
} }
numList = [ numList = [

2
src/app/ui/four-step-copy/four-step-copy.component.html

@ -13,7 +13,7 @@
<img class="ziti" src="../../../assets/images/tophead.png"> <img class="ziti" src="../../../assets/images/tophead.png">
</div> </div>
<div class="mainbox"> <div class="mainbox">
<span class="title">业务理论考试座位号抽签</span> <span class="title">业务理论考试座位号</span>
<div class="colum" style="margin-left: 13%;width: 100px;"> <div class="colum" style="margin-left: 13%;width: 100px;">
<div class="centerLefta" > <div class="centerLefta" >
<div class="tanCenterbtna" id="chooseZhi"> <div class="tanCenterbtna" id="chooseZhi">

6
src/app/ui/four-step-copy/four-step-copy.component.scss

@ -42,10 +42,10 @@
display: flex; display: flex;
.title{ .title{
position: absolute; position: absolute;
left: 28%; left: 27%;
top: 80px; top: 75px;
color: white; color: white;
font-size: 22px; font-size: 30px;
} }
} }

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

@ -42,16 +42,16 @@
display: flex; display: flex;
.title{ .title{
position: absolute; position: absolute;
left: 28%; left: 27%;
top: 80px; top: 75px;
color: white; color: white;
font-size: 22px; font-size: 30px;
} }
} }
.chongzhi{ .chongzhi{
position: relative; position: relative;
top: 75%; top: 75%;
right: 23%; right: 23.4%;
} }
.centerLeft{ .centerLeft{

6
src/app/ui/luck-draw/luck-draw.component.scss

@ -41,10 +41,10 @@
display: flex; display: flex;
.title{ .title{
position: absolute; position: absolute;
left: 28%; left: 24%;
top: 80px; top: 75px;
color: white; color: white;
font-size: 22px; font-size: 30px;
} }
/* background-attachment: fixed; /* background-attachment: fixed;
background-repeat:no-repeat; */ background-repeat:no-repeat; */

Loading…
Cancel
Save