Browse Source

[完善]将老虎机数据变为随机数据

master
邵佳豪 4 years ago
parent
commit
59bae465e9
  1. 56
      src/app/ui/drawing-result/drawing-result.component.ts
  2. 1
      src/app/ui/first-step-copy/first-step-copy.component.html
  3. 7
      src/app/ui/first-step-copy/first-step-copy.component.scss
  4. 5
      src/app/ui/first-step-copy/first-step-copy.component.ts
  5. 4
      src/app/ui/first-step/first-step.component.html
  6. 8
      src/app/ui/first-step/first-step.component.scss
  7. 47
      src/app/ui/first-step/first-step.component.ts
  8. 3
      src/app/ui/four-step-copy/four-step-copy.component.html
  9. 7
      src/app/ui/four-step-copy/four-step-copy.component.scss
  10. 6
      src/app/ui/four-step-copy/four-step-copy.component.ts
  11. 3
      src/app/ui/four-step/four-step.component.html
  12. 7
      src/app/ui/four-step/four-step.component.scss
  13. 7
      src/app/ui/four-step/four-step.component.ts
  14. 1
      src/app/ui/luck-draw/luck-draw.component.html
  15. 8
      src/app/ui/luck-draw/luck-draw.component.scss
  16. 101
      src/assets/js/firststep.js
  17. 89
      src/assets/js/firststepcopy.js
  18. 211
      src/assets/js/fourstep.js
  19. 185
      src/assets/js/fourstepcopy.js

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

@ -20,38 +20,38 @@ export class DrawingResultComponent implements OnInit {
headersZero:string [] = ['序号','支队名称','抽签顺序', '职级','座位号'] headersZero:string [] = ['序号','支队名称','抽签顺序', '职级','座位号']
tableDataZero = [ tableDataZero = [
{order: 1, fireName: '南宁支队', drawLotsOrder: '12', name: ['支队长','副支队长'], seatNum: ['11号','17号'] }, {order: 1, fireName: '南宁支队', drawLotsOrder: JSON.parse(localStorage.getItem("arr2"))[0] , name: ['支队长','副支队长'], seatNum: [JSON.parse(localStorage.getItem("南宁支队seatnumbercopy")).zhi,JSON.parse(localStorage.getItem("南宁支队seatnumbercopy")).fuzhi] },
{order: 2, fireName: '柳州支队', drawLotsOrder: '07', name: ['支队长','副支队长'], seatNum: ['08号','15号'] }, {order: 2, fireName: '柳州支队', drawLotsOrder: JSON.parse(localStorage.getItem("arr2"))[1], name: ['支队长','副支队长'], seatNum: [JSON.parse(localStorage.getItem("柳州支队seatnumbercopy")).zhi,JSON.parse(localStorage.getItem("柳州支队seatnumbercopy")).fuzhi] },
{order: 3, fireName: '桂林支队', drawLotsOrder: '01', name: ['支队长','副支队长'], seatNum: ['04号','21号'] }, {order: 3, fireName: '桂林支队', drawLotsOrder: JSON.parse(localStorage.getItem("arr2"))[2], name: ['支队长','副支队长'], seatNum: [JSON.parse(localStorage.getItem("桂林支队seatnumbercopy")).zhi,JSON.parse(localStorage.getItem("桂林支队seatnumbercopy")).fuzhi] },
{order: 4, fireName: '梧州支队', drawLotsOrder: '06', name: ['支队长','副支队长'], seatNum: ['02号','26号'] }, {order: 4, fireName: '梧州支队', drawLotsOrder: JSON.parse(localStorage.getItem("arr2"))[3], name: ['支队长','副支队长'], seatNum: [JSON.parse(localStorage.getItem("梧州支队seatnumbercopy")).zhi,JSON.parse(localStorage.getItem("梧州支队seatnumbercopy")).fuzhi] },
{order: 5, fireName: '北海支队', drawLotsOrder: '11', name: ['支队长','副支队长'], seatNum: ['07号','27号'] }, {order: 5, fireName: '北海支队', drawLotsOrder: JSON.parse(localStorage.getItem("arr2"))[4], name: ['支队长','副支队长'], seatNum: [JSON.parse(localStorage.getItem("北海支队seatnumbercopy")).zhi,JSON.parse(localStorage.getItem("北海支队seatnumbercopy")).fuzhi] },
{order: 6, fireName: '防城港支队', drawLotsOrder: '02', name: ['支队长','副支队长'], seatNum: ['12号','22号'] }, {order: 6, fireName: '防城港支队', drawLotsOrder: JSON.parse(localStorage.getItem("arr2"))[5], name: ['支队长','副支队长'], seatNum: [JSON.parse(localStorage.getItem("防城港支队seatnumbercopy")).zhi,JSON.parse(localStorage.getItem("防城港支队seatnumbercopy")).fuzhi] },
{order: 7, fireName: '钦州支队', drawLotsOrder: '05', name: ['支队长','副支队长'], seatNum: ['03号','25号'] }, {order: 7, fireName: '钦州支队', drawLotsOrder: JSON.parse(localStorage.getItem("arr2"))[6], name: ['支队长','副支队长'], seatNum: [JSON.parse(localStorage.getItem("钦州支队seatnumbercopy")).zhi,JSON.parse(localStorage.getItem("钦州支队seatnumbercopy")).fuzhi] },
{order: 8, fireName: '贵港支队', drawLotsOrder: '08', name: ['支队长','副支队长'], seatNum: ['01号','16号'] }, {order: 8, fireName: '贵港支队', drawLotsOrder: JSON.parse(localStorage.getItem("arr2"))[7], name: ['支队长','副支队长'], seatNum: [JSON.parse(localStorage.getItem("贵港支队seatnumbercopy")).zhi,JSON.parse(localStorage.getItem("贵港支队seatnumbercopy")).fuzhi] },
{order: 9, fireName: '玉林支队', drawLotsOrder: '14', name: ['支队长','副支队长'], seatNum: ['09号','20号'] }, {order: 9, fireName: '玉林支队', drawLotsOrder: JSON.parse(localStorage.getItem("arr2"))[8], name: ['支队长','副支队长'], seatNum: [JSON.parse(localStorage.getItem("玉林支队seatnumbercopy")).zhi,JSON.parse(localStorage.getItem("玉林支队seatnumbercopy")).fuzhi] },
{order: 10, fireName: '百色支队', drawLotsOrder: '3', name: ['支队长','副支队长'], seatNum: ['06号','18号'] }, {order: 10, fireName: '百色支队', drawLotsOrder: JSON.parse(localStorage.getItem("arr2"))[9], name: ['支队长','副支队长'], seatNum: [JSON.parse(localStorage.getItem("百色支队seatnumbercopy")).zhi,JSON.parse(localStorage.getItem("百色支队seatnumbercopy")).fuzhi] },
{order: 11, fireName: '贺州支队', drawLotsOrder: '9', name: ['支队长','副支队长'], seatNum: ['05号','23号'] }, {order: 11, fireName: '贺州支队', drawLotsOrder: JSON.parse(localStorage.getItem("arr2"))[10], name: ['支队长','副支队长'], seatNum: [JSON.parse(localStorage.getItem("贺州支队seatnumbercopy")).zhi,JSON.parse(localStorage.getItem("贺州支队seatnumbercopy")).fuzhi] },
{order: 12, fireName: '河池支队', drawLotsOrder: '4', name: ['支队长','副支队长'], seatNum: ['14号','19号'] }, {order: 12, fireName: '河池支队', drawLotsOrder: JSON.parse(localStorage.getItem("arr2"))[11], name: ['支队长','副支队长'], seatNum: [JSON.parse(localStorage.getItem("河池支队seatnumbercopy")).zhi,JSON.parse(localStorage.getItem("河池支队seatnumbercopy")).fuzhi]},
{order: 13, fireName: '来宾支队', drawLotsOrder: '10', name: ['支队长','副支队长'], seatNum: ['10号','24号'] }, {order: 13, fireName: '来宾支队', drawLotsOrder: JSON.parse(localStorage.getItem("arr2"))[12], name: ['支队长','副支队长'], seatNum: [JSON.parse(localStorage.getItem("来宾支队seatnumbercopy")).zhi,JSON.parse(localStorage.getItem("来宾支队seatnumbercopy")).fuzhi] },
{order: 14, fireName: '崇左支队', drawLotsOrder: '13', name: ['支队长','副支队长'], seatNum: ['13号','28号'] }, {order: 14, fireName: '崇左支队', drawLotsOrder: JSON.parse(localStorage.getItem("arr2"))[13], name: ['支队长','副支队长'], seatNum:[JSON.parse(localStorage.getItem("崇左支队seatnumbercopy")).zhi,JSON.parse(localStorage.getItem("崇左支队seatnumbercopy")).fuzhi]},
] ]
headers:string [] = ['序号','支队名称','抽签顺序','场景类型', '职级','座位号'] headers:string [] = ['序号','支队名称','抽签顺序','场景类型', '职级','座位号']
tableData = [ tableData = [
{order: 1, fireName: '南宁支队', drawLotsOrder: '05', num: localStorage.getItem('5') || '', name: ['支队长','副支队长'], seatNum: ['8号','21号'] }, {order: 1, fireName: '南宁支队', drawLotsOrder: JSON.parse(localStorage.getItem("arr"))[0], num: localStorage.getItem('5') || '', name: ['支队长','副支队长'], seatNum: [JSON.parse(localStorage.getItem("南宁支队seatnumber")).zhi,JSON.parse(localStorage.getItem("南宁支队seatnumber")).fuzhi] },
{order: 2, fireName: '柳州支队', drawLotsOrder: '10', num: localStorage.getItem('10') || '', name: ['支队长','副支队长'], seatNum: ['12号','26号'] }, {order: 2, fireName: '柳州支队', drawLotsOrder: JSON.parse(localStorage.getItem("arr"))[1], num: localStorage.getItem('10') || '', name: ['支队长','副支队长'], seatNum: [JSON.parse(localStorage.getItem("柳州支队seatnumber")).zhi,JSON.parse(localStorage.getItem("柳州支队seatnumber")).fuzhi] },
{order: 3, fireName: '桂林支队', drawLotsOrder: '14', num: localStorage.getItem('14') || '', name: ['支队长','副支队长'], seatNum: ['14号','22号'] }, {order: 3, fireName: '桂林支队', drawLotsOrder: JSON.parse(localStorage.getItem("arr"))[2], num: localStorage.getItem('14') || '', name: ['支队长','副支队长'], seatNum: [JSON.parse(localStorage.getItem("桂林支队seatnumber")).zhi,JSON.parse(localStorage.getItem("桂林支队seatnumber")).fuzhi] },
{order: 4, fireName: '梧州支队', drawLotsOrder: '03', num: localStorage.getItem('3') || '', name: ['支队长','副支队长'], seatNum: ['13号','28号'] }, {order: 4, fireName: '梧州支队', drawLotsOrder: JSON.parse(localStorage.getItem("arr"))[3], num: localStorage.getItem('3') || '', name: ['支队长','副支队长'], seatNum: [JSON.parse(localStorage.getItem("梧州支队seatnumber")).zhi,JSON.parse(localStorage.getItem("梧州支队seatnumber")).fuzhi] },
{order: 5, fireName: '北海支队', drawLotsOrder: '08', num: localStorage.getItem('8') || '', name: ['支队长','副支队长'], seatNum: ['4号','15号'] }, {order: 5, fireName: '北海支队', drawLotsOrder: JSON.parse(localStorage.getItem("arr"))[4], num: localStorage.getItem('8') || '', name: ['支队长','副支队长'], seatNum: [JSON.parse(localStorage.getItem("北海支队seatnumber")).zhi,JSON.parse(localStorage.getItem("北海支队seatnumber")).fuzhi] },
{order: 6, fireName: '防城港支队', drawLotsOrder: '13', num: localStorage.getItem('13') || '', name: ['支队长','副支队长'], seatNum: ['1号','16号'] }, {order: 6, fireName: '防城港支队', drawLotsOrder: JSON.parse(localStorage.getItem("arr"))[5], num: localStorage.getItem('13') || '', name: ['支队长','副支队长'], seatNum: [JSON.parse(localStorage.getItem("防城港支队seatnumber")).zhi,JSON.parse(localStorage.getItem("防城港支队seatnumber")).fuzhi] },
{order: 7, fireName: '钦州支队', drawLotsOrder: '06', num: localStorage.getItem('6') || '', name: ['支队长','副支队长'], seatNum: ['10号','25号'] }, {order: 7, fireName: '钦州支队', drawLotsOrder: JSON.parse(localStorage.getItem("arr"))[6], num: localStorage.getItem('6') || '', name: ['支队长','副支队长'], seatNum: [JSON.parse(localStorage.getItem("钦州支队seatnumber")).zhi,JSON.parse(localStorage.getItem("钦州支队seatnumber")).fuzhi] },
{order: 8, fireName: '贵港支队', drawLotsOrder: '01', num: localStorage.getItem('1') || '', name: ['支队长','副支队长'], seatNum: ['11号','19号'] }, {order: 8, fireName: '贵港支队', drawLotsOrder: JSON.parse(localStorage.getItem("arr"))[7], num: localStorage.getItem('1') || '', name: ['支队长','副支队长'], seatNum: [JSON.parse(localStorage.getItem("贵港支队seatnumber")).zhi,JSON.parse(localStorage.getItem("贵港支队seatnumber")).fuzhi] },
{order: 9, fireName: '玉林支队', drawLotsOrder: '07', num: localStorage.getItem('7') || '', name: ['支队长','副支队长'], seatNum: ['2号','27号'] }, {order: 9, fireName: '玉林支队', drawLotsOrder: JSON.parse(localStorage.getItem("arr"))[8], num: localStorage.getItem('7') || '', name: ['支队长','副支队长'], seatNum: [JSON.parse(localStorage.getItem("玉林支队seatnumber")).zhi,JSON.parse(localStorage.getItem("玉林支队seatnumber")).fuzhi] },
{order: 10, fireName: '百色支队', drawLotsOrder: '12', num: localStorage.getItem('12') || '', name: ['支队长','副支队长'], seatNum: ['9号','20号'] }, {order: 10, fireName: '百色支队', drawLotsOrder: JSON.parse(localStorage.getItem("arr"))[9], num: localStorage.getItem('12') || '', name: ['支队长','副支队长'], seatNum: [JSON.parse(localStorage.getItem("百色支队seatnumber")).zhi,JSON.parse(localStorage.getItem("百色支队seatnumber")).fuzhi] },
{order: 11, fireName: '贺州支队', drawLotsOrder: '02', num: localStorage.getItem('02') || '', name: ['支队长','副支队长'], seatNum: ['3号','24号'] }, {order: 11, fireName: '贺州支队', drawLotsOrder: JSON.parse(localStorage.getItem("arr"))[10], num: localStorage.getItem('02') || '', name: ['支队长','副支队长'], seatNum: [JSON.parse(localStorage.getItem("贺州支队seatnumber")).zhi,JSON.parse(localStorage.getItem("贺州支队seatnumber")).fuzhi] },
{order: 12, fireName: '河池支队', drawLotsOrder: '04', num: localStorage.getItem('04') || '', name: ['支队长','副支队长'], seatNum: ['6号','18号'] }, {order: 12, fireName: '河池支队', drawLotsOrder: JSON.parse(localStorage.getItem("arr"))[11], num: localStorage.getItem('04') || '', name: ['支队长','副支队长'], seatNum: [JSON.parse(localStorage.getItem("河池支队seatnumber")).zhi,JSON.parse(localStorage.getItem("河池支队seatnumber")).fuzhi] },
{order: 13, fireName: '来宾支队', drawLotsOrder: '09', num: localStorage.getItem('09') || '', name: ['支队长','副支队长'], seatNum: ['7号','23号'] }, {order: 13, fireName: '来宾支队', drawLotsOrder: JSON.parse(localStorage.getItem("arr"))[12], num: localStorage.getItem('09') || '', name: ['支队长','副支队长'], seatNum: [JSON.parse(localStorage.getItem("来宾支队seatnumber")).zhi,JSON.parse(localStorage.getItem("来宾支队seatnumber")).fuzhi] },
{order: 14, fireName: '崇左支队', drawLotsOrder: '11', num: localStorage.getItem('11') || '', name: ['支队长','副支队长'], seatNum: ['5号','17号'] }, {order: 14, fireName: '崇左支队', drawLotsOrder: JSON.parse(localStorage.getItem("arr"))[13], num: localStorage.getItem('11') || '', name: ['支队长','副支队长'], seatNum: [JSON.parse(localStorage.getItem("崇左支队seatnumber")).zhi,JSON.parse(localStorage.getItem("崇左支队seatnumber")).fuzhi] },
] ]
laststep(){ laststep(){
window.history.back(); window.history.back();

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

@ -13,6 +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>
<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">

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

@ -40,6 +40,13 @@
height: 90%; height: 90%;
padding: 0.125rem 0.125rem 0; padding: 0.125rem 0.125rem 0;
display: flex; display: flex;
.title{
position: absolute;
left: 28%;
top: 80px;
color: white;
font-size: 22px;
}
} }
.chongzhi{ .chongzhi{
position: relative; position: relative;

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

@ -11,9 +11,6 @@ export class FirstStepCopyComponent implements OnInit {
constructor(private router: Router) { } constructor(private router: Router) { }
ngOnInit(){ ngOnInit(){
window.setTimeout(()=>{
//zhuan.drawRouletteWheel()
},0)
} }
//支队数据和是否抽奖 //支队数据和是否抽奖
@ -68,6 +65,6 @@ export class FirstStepCopyComponent implements OnInit {
}else{ }else{
alert("未全部抽完!") alert("未全部抽完!")
} }
} }
} }

4
src/app/ui/first-step/first-step.component.html

@ -9,11 +9,11 @@
<div class="box"> <div class="box">
<div class="head"> <div class="head">
<img src="../../../assets/images/head.png"> <img src="../../../assets/images/head.png">
<!-- <span>指挥员能力考评抽签</span> -->
<img class="ziti" src="../../../assets/images/tophead.png"> <img class="ziti" src="../../../assets/images/tophead.png">
</div> </div>
<div class="mainbox"> <div class="mainbox">
<div class="colum" style="margin-left: 13%;width: 100px;"> <span class="title">指挥员能力考评抽签顺序</span>
<div class="colum" style="margin-left: 12%;width: 100px;">
<div class="centerLefta" > <div class="centerLefta" >
<div class="tanCenterbtna" id="chooseZhi"> <div class="tanCenterbtna" id="chooseZhi">
<span style="background-color: #ff4d29;color:#FFF;" >序号</span> <span style="background-color: #ff4d29;color:#FFF;" >序号</span>

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

@ -40,6 +40,14 @@
height: 90%; height: 90%;
padding: 0.125rem 0.125rem 0; padding: 0.125rem 0.125rem 0;
display: flex; display: flex;
position: relative;
.title{
position: absolute;
left: 28%;
top: 36px;
color: white;
font-size: 22px;
}
} }
.centerLeft{ .centerLeft{

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

@ -10,8 +10,52 @@ export class FirstStepComponent implements OnInit {
constructor() { } constructor() { }
ngOnInit(){ ngOnInit(){
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 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(() => {
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(() => {
return Math.round(Math.random()) - 0.5; //返回随机值(大于0|小于0)
})
let z = arrSeat2.sort(() => {
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")){
localStorage.setItem("arr",JSON.stringify(x))
}
if(!localStorage.getItem("arr2")){
localStorage.setItem("arr2",JSON.stringify(p))
}
if(!localStorage.getItem("arrSeat")){
localStorage.setItem("arrSeat",JSON.stringify(y))
}
if(!localStorage.getItem("arrSeat2")){
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 = ['南宁支队','柳州支队','桂林支队','梧州支队','北海支队','防城港支队','钦州支队','贵港支队','玉林支队','百色支队','贺州支队','河池支队','来宾支队','崇左支队',]
localStorage.setItem("orgArr",JSON.stringify(orgArr))
localStorage.setItem("pagetype",'true')
} }
numList = [ numList = [
@ -68,4 +112,5 @@ export class FirstStepComponent implements OnInit {
{name:"来宾支队",id:13,result :localStorage.getItem("来宾支队") || ""}, {name:"来宾支队",id:13,result :localStorage.getItem("来宾支队") || ""},
{name:"崇左支队",id:14,result :localStorage.getItem("崇左支队") || ""} {name:"崇左支队",id:14,result :localStorage.getItem("崇左支队") || ""}
] ]
} }

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

@ -13,11 +13,12 @@
<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>
<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">
<span style="background-color: #ff4d29;color:#FFF;" >序号</span> <span style="background-color: #ff4d29;color:#FFF;" >序号</span>
<span *ngFor="let item of choujiang; let key=index" [ngClass]="{'beijicolor': chooseid ==key}" >{{item.seatnum}}</span> <span *ngFor="let item of sortNum; let key=index" [ngClass]="{'beijicolor': chooseid ==key}" >{{item}}</span>
</div> </div>
</div> </div>
</div> </div>

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

@ -40,6 +40,13 @@
height: 90%; height: 90%;
padding: 0.125rem 0.125rem 0; padding: 0.125rem 0.125rem 0;
display: flex; display: flex;
.title{
position: absolute;
left: 28%;
top: 80px;
color: white;
font-size: 22px;
}
} }
.centerLeft{ .centerLeft{

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

@ -17,11 +17,9 @@ export class FourStepCopyComponent implements OnInit {
constructor() { } constructor() { }
sortNum = []
ngOnInit(){ ngOnInit(){
window.setTimeout(()=>{ this.sortNum = JSON.parse(localStorage.getItem("arr2"))
//zhuan.drawRouletteWheel()
},0)
} }
choujiang = [ choujiang = [

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

@ -13,11 +13,12 @@
<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>
<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">
<span style="background-color: #ff4d29;color:#FFF;">序号</span> <span style="background-color: #ff4d29;color:#FFF;">序号</span>
<span *ngFor="let item of choujiang; let key=index" [ngClass]="{'beijicolor': chooseid ==key}" >{{item.seatnum}}</span> <span *ngFor="let item of sortNum; let key=index" [ngClass]="{'beijicolor': chooseid ==key}" >{{item}}</span>
</div> </div>
</div> </div>
</div> </div>

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

@ -40,6 +40,13 @@
height: 90%; height: 90%;
padding: 0.125rem 0.125rem 0; padding: 0.125rem 0.125rem 0;
display: flex; display: flex;
.title{
position: absolute;
left: 28%;
top: 80px;
color: white;
font-size: 22px;
}
} }
.chongzhi{ .chongzhi{
position: relative; position: relative;

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

@ -16,12 +16,9 @@ import '../../../assets/js/fourstep'
export class FourStepComponent implements OnInit { export class FourStepComponent implements OnInit {
constructor() { } constructor() { }
sortNum = []
ngOnInit(){ ngOnInit(){
window.setTimeout(()=>{ this.sortNum = JSON.parse(localStorage.getItem("arr"))
//zhuan.drawRouletteWheel()
},0)
} }
//支队数据和是否抽奖 //支队数据和是否抽奖
choujiang = [ choujiang = [

1
src/app/ui/luck-draw/luck-draw.component.html

@ -16,6 +16,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>
<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" > <div class="tanCenterbtna" >

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

@ -39,7 +39,13 @@
height: 90%; height: 90%;
padding: 0.125rem 0.125rem 0; padding: 0.125rem 0.125rem 0;
display: flex; display: flex;
.title{
position: absolute;
left: 28%;
top: 80px;
color: white;
font-size: 22px;
}
/* background-attachment: fixed; /* background-attachment: fixed;
background-repeat:no-repeat; */ background-repeat:no-repeat; */
} }

101
src/assets/js/firststep.js

@ -1,4 +1,5 @@
$(document).ready(function(){ $(document).ready(function(){
var orgArr = ['南宁支队','柳州支队','桂林支队','梧州支队','北海支队','防城港支队','钦州支队','贵港支队','玉林支队','百色支队','贺州支队','河池支队','来宾支队','崇左支队',]
var index = 0 var index = 0
var selected = null //点击的单位名称 var selected = null //点击的单位名称
var selectedIndex = null //点击的单位index var selectedIndex = null //点击的单位index
@ -6,50 +7,61 @@ $(document).ready(function(){
active : 0, active : 0,
delay : 500, delay : 500,
randomize : function(activeElementIndex){ randomize : function(activeElementIndex){
if(selected == "南宁支队"){ var index=localStorage.getItem("indexNum") - 1;
localStorage.setItem(selected,"5号") localStorage.setItem(JSON.parse(localStorage.getItem("orgArr"))[index],JSON.parse(localStorage.getItem("arr"))[index]+"号")
return 5; return JSON.parse(localStorage.getItem("arr"))[index];
}else if(selected == "柳州支队"){ // if(localStorage.getItem("pagetype") == "true"){
localStorage.setItem(selected,'10号') // var index=localStorage.getItem("indexNum") - 1;
return 10; // localStorage.setItem(JSON.parse(localStorage.getItem("orgArr"))[index],JSON.parse(localStorage.getItem("arr"))[index]+"号")
}else if(selected == "桂林支队"){ // return JSON.parse(localStorage.getItem("arr"))[index];
localStorage.setItem(selected,'14号') // }else{
return 14; // if(selected == "南宁支队"){
}else if(selected == "梧州支队"){ // localStorage.setItem(selected,"5号")
localStorage.setItem(selected,'3号') // return 5;
return 3; // }else if(selected == "柳州支队"){
}else if(selected == "北海支队"){ // localStorage.setItem(selected,'10号')
console.log(1996,) // return 10;
localStorage.setItem(selected,'8号') // }else if(selected == "桂林支队"){
return 8; // localStorage.setItem(selected,'14号')
}else if(selected == "防城港支队"){ // return 14;
localStorage.setItem(selected,'13号') // }else if(selected == "梧州支队"){
return 13; // localStorage.setItem(selected,'3号')
}else if(selected == "钦州支队"){ // return 3;
localStorage.setItem(selected,'6号') // }else if(selected == "北海支队"){
return 6; // console.log(1996,)
}else if(selected == "贵港支队"){ // localStorage.setItem(selected,'8号')
localStorage.setItem(selected,'1号') // return 8;
return 1; // }else if(selected == "防城港支队"){
}else if(selected == "玉林支队"){ // localStorage.setItem(selected,'13号')
localStorage.setItem(selected,'7号') // return 13;
return 7; // }else if(selected == "钦州支队"){
}else if(selected == "百色支队"){ // localStorage.setItem(selected,'6号')
localStorage.setItem(selected,'12号') // return 6;
return 12; // }else if(selected == "贵港支队"){
}else if(selected == "贺州支队"){ // localStorage.setItem(selected,'1号')
localStorage.setItem(selected,'2号') // return 1;
return 2; // }else if(selected == "玉林支队"){
}else if(selected == "河池支队"){ // localStorage.setItem(selected,'7号')
localStorage.setItem(selected,'4号') // return 7;
return 4; // }else if(selected == "百色支队"){
}else if(selected == "来宾支队"){ // localStorage.setItem(selected,'12号')
localStorage.setItem(selected,'9号') // return 12;
return 9; // }else if(selected == "贺州支队"){
}else if(selected == "崇左支队"){ // localStorage.setItem(selected,'2号')
localStorage.setItem(selected,'11号') // return 2;
return 11; // }else if(selected == "河池支队"){
} // localStorage.setItem(selected,'4号')
// return 4;
// }else if(selected == "来宾支队"){
// localStorage.setItem(selected,'9号')
// return 9;
// }else if(selected == "崇左支队"){
// localStorage.setItem(selected,'11号')
// return 11;
// }
// }
} }
}); });
@ -62,7 +74,6 @@ $(document).ready(function(){
$("#slotMachineButtonShuffle").addClass("disabled"); $("#slotMachineButtonShuffle").addClass("disabled");
setTimeout(() => { setTimeout(() => {
machine.stop(); machine.stop();
// $("#slotMachineButtonShuffle").removeClass("disabled");
setTimeout(() => { setTimeout(() => {
$("#endjieguoshao span").eq(selectedIndex).html(window.localStorage[selected]) $("#endjieguoshao span").eq(selectedIndex).html(window.localStorage[selected])
$("#chooseZhishao .img").eq(selectedIndex - 1).css("display","inline-block"); $("#chooseZhishao .img").eq(selectedIndex - 1).css("display","inline-block");

89
src/assets/js/firststepcopy.js

@ -7,49 +7,52 @@ $(document).ready(function(){
active : 0, active : 0,
delay : 500, delay : 500,
randomize : function(activeElementIndex){ randomize : function(activeElementIndex){
if(selected == "南宁支队"){ var index=localStorage.getItem("indexNum") - 1;
localStorage.setItem(selectedcopy,"12号") localStorage.setItem(JSON.parse(localStorage.getItem("orgArr"))[index] + 'copy',JSON.parse(localStorage.getItem("arr2"))[index]+"号")
return 12; return JSON.parse(localStorage.getItem("arr2"))[index];
}else if(selected == "柳州支队"){ // if(selected == "南宁支队"){
localStorage.setItem(selectedcopy,'7号') // localStorage.setItem(selectedcopy,"12号")
return 7; // return 12;
}else if(selected == "桂林支队"){ // }else if(selected == "柳州支队"){
localStorage.setItem(selectedcopy,'1号') // localStorage.setItem(selectedcopy,'7号')
return 1; // return 7;
}else if(selected == "梧州支队"){ // }else if(selected == "桂林支队"){
localStorage.setItem(selectedcopy,'6号') // localStorage.setItem(selectedcopy,'1号')
return 6; // return 1;
}else if(selected == "北海支队"){ // }else if(selected == "梧州支队"){
localStorage.setItem(selectedcopy,'11号') // localStorage.setItem(selectedcopy,'6号')
return 11; // return 6;
}else if(selected == "防城港支队"){ // }else if(selected == "北海支队"){
localStorage.setItem(selectedcopy,'2号') // localStorage.setItem(selectedcopy,'11号')
return 2; // return 11;
}else if(selected == "钦州支队"){ // }else if(selected == "防城港支队"){
localStorage.setItem(selectedcopy,'5号') // localStorage.setItem(selectedcopy,'2号')
return 5; // return 2;
}else if(selected == "贵港支队"){ // }else if(selected == "钦州支队"){
localStorage.setItem(selectedcopy,'8号') // localStorage.setItem(selectedcopy,'5号')
return 8; // return 5;
}else if(selected == "玉林支队"){ // }else if(selected == "贵港支队"){
localStorage.setItem(selectedcopy,'14号') // localStorage.setItem(selectedcopy,'8号')
return 14; // return 8;
}else if(selected == "百色支队"){ // }else if(selected == "玉林支队"){
localStorage.setItem(selectedcopy,'3号') // localStorage.setItem(selectedcopy,'14号')
return 3; // return 14;
}else if(selected == "贺州支队"){ // }else if(selected == "百色支队"){
localStorage.setItem(selectedcopy,'9号') // localStorage.setItem(selectedcopy,'3号')
return 9; // return 3;
}else if(selected == "河池支队"){ // }else if(selected == "贺州支队"){
localStorage.setItem(selectedcopy,'4号') // localStorage.setItem(selectedcopy,'9号')
return 4; // return 9;
}else if(selected == "来宾支队"){ // }else if(selected == "河池支队"){
localStorage.setItem(selectedcopy,'10号') // localStorage.setItem(selectedcopy,'4号')
return 10; // return 4;
}else if(selected == "崇左支队"){ // }else if(selected == "来宾支队"){
localStorage.setItem(selectedcopy,'13号') // localStorage.setItem(selectedcopy,'10号')
return 13; // return 10;
} // }else if(selected == "崇左支队"){
// localStorage.setItem(selectedcopy,'13号')
// return 13;
// }
} }
}); });

211
src/assets/js/fourstep.js

@ -7,116 +7,120 @@ $(document).ready(function(){
active : 0, active : 0,
delay : 500, delay : 500,
randomize : function(activeElementIndex){ randomize : function(activeElementIndex){
if(selected == "南宁支队"){ var index=localStorage.getItem("indexNum") - 1;
localStorage.setItem(selectedtime,JSON.stringify({zhi:"8号",fuzhi:"21号"})) localStorage.setItem(JSON.parse(localStorage.getItem("orgArr"))[index] + 'seatnumber',
return 7; JSON.stringify({zhi:JSON.parse(localStorage.getItem("arrSeat"))[index]+"号",fuzhi:JSON.parse(localStorage.getItem("arrSeat2"))[index]+"号"})
}else if(selected == "柳州支队"){ )
localStorage.setItem(selectedtime,JSON.stringify({zhi:"12号",fuzhi:"26号"})) return JSON.parse(localStorage.getItem("arrSeat"))[index] - 1;
return 11; // if(localStorage.getItem("pagetype") == "true"){//如果是真抽签
}else if(selected == "桂林支队"){
localStorage.setItem(selectedtime,JSON.stringify({zhi:"14号",fuzhi:"22号"})) // }else{
return 13; // if(selected == "南宁支队"){
}else if(selected == "梧州支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"8号",fuzhi:"21号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"13号",fuzhi:"28号"})) // return 7;
return 12; // }else if(selected == "柳州支队"){
}else if(selected == "北海支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"12号",fuzhi:"26号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"4号",fuzhi:"15号"})) // return 11;
return 3; // }else if(selected == "桂林支队"){
}else if(selected == "防城港支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"14号",fuzhi:"22号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"1号",fuzhi:"16号"})) // return 13;
return 0; // }else if(selected == "梧州支队"){
}else if(selected == "钦州支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"13号",fuzhi:"28号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"10号",fuzhi:"25号"})) // return 12;
return 9; // }else if(selected == "北海支队"){
}else if(selected == "贵港支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"4号",fuzhi:"15号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"11号",fuzhi:"19号"})) // return 3;
return 10; // }else if(selected == "防城港支队"){
}else if(selected == "玉林支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"1号",fuzhi:"16号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"2号",fuzhi:"27号"})) // return 0;
return 1; // }else if(selected == "钦州支队"){
}else if(selected == "百色支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"10号",fuzhi:"25号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"9号",fuzhi:"20号"})) // return 9;
return 8; // }else if(selected == "贵港支队"){
}else if(selected == "贺州支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"11号",fuzhi:"19号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"3号",fuzhi:"24号"})) // return 10;
return 2; // }else if(selected == "玉林支队"){
}else if(selected == "河池支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"2号",fuzhi:"27号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"6号",fuzhi:"18号"})) // return 1;
return 5; // }else if(selected == "百色支队"){
}else if(selected == "来宾支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"9号",fuzhi:"20号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"7号",fuzhi:"23号"})) // return 8;
return 6; // }else if(selected == "贺州支队"){
}else if(selected == "崇左支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"3号",fuzhi:"24号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"5号",fuzhi:"17号"})) // return 2;
return 4; // }else if(selected == "河池支队"){
} // localStorage.setItem(selectedtime,JSON.stringify({zhi:"6号",fuzhi:"18号"}))
// return 5;
// }else if(selected == "来宾支队"){
// localStorage.setItem(selectedtime,JSON.stringify({zhi:"7号",fuzhi:"23号"}))
// return 6;
// }else if(selected == "崇左支队"){
// localStorage.setItem(selectedtime,JSON.stringify({zhi:"5号",fuzhi:"17号"}))
// return 4;
// }
// }
} }
}); });
var machine6 = $("#machine6").slotMachine({ var machine6 = $("#machine6").slotMachine({
active : 1, active : 1,
delay : 500, delay : 500,
randomize : function(activeElementIndex){ randomize : function(activeElementIndex){
if(selected == "南宁支队"){ var index=localStorage.getItem("indexNum") - 1;
localStorage.setItem(selectedtime,JSON.stringify({zhi:"8号",fuzhi:"21号"})) localStorage.setItem(JSON.parse(localStorage.getItem("orgArr"))[index] + 'seatnumber',
return 6; JSON.stringify({zhi:JSON.parse(localStorage.getItem("arrSeat"))[index]+"号",fuzhi:JSON.parse(localStorage.getItem("arrSeat2"))[index]+"号"})
}else if(selected == "柳州支队"){ )
localStorage.setItem(selectedtime,JSON.stringify({zhi:"12号",fuzhi:"26号"})) return JSON.parse(localStorage.getItem("arrSeat2"))[index] - 15;
return 11; // if(localStorage.getItem("pagetype") == "true"){
}else if(selected == "桂林支队"){
localStorage.setItem(selectedtime,JSON.stringify({zhi:"14号",fuzhi:"22号"})) // }else{
return 7; // if(selected == "南宁支队"){
}else if(selected == "梧州支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"8号",fuzhi:"21号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"13号",fuzhi:"28号"})) // return 6;
return 13; // }else if(selected == "柳州支队"){
}else if(selected == "北海支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"12号",fuzhi:"26号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"4号",fuzhi:"15号"})) // return 11;
return 0; // }else if(selected == "桂林支队"){
}else if(selected == "防城港支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"14号",fuzhi:"22号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"1号",fuzhi:"16号"})) // return 7;
return 1; // }else if(selected == "梧州支队"){
}else if(selected == "钦州支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"13号",fuzhi:"28号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"10号",fuzhi:"25号"})) // return 13;
return 10; // }else if(selected == "北海支队"){
}else if(selected == "贵港支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"4号",fuzhi:"15号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"11号",fuzhi:"19号"})) // return 0;
return 4; // }else if(selected == "防城港支队"){
}else if(selected == "玉林支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"1号",fuzhi:"16号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"2号",fuzhi:"27号"})) // return 1;
return 12; // }else if(selected == "钦州支队"){
}else if(selected == "百色支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"10号",fuzhi:"25号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"9号",fuzhi:"20号"})) // return 10;
return 5; // }else if(selected == "贵港支队"){
}else if(selected == "贺州支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"11号",fuzhi:"19号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"3号",fuzhi:"24号"})) // return 4;
return 9; // }else if(selected == "玉林支队"){
}else if(selected == "河池支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"2号",fuzhi:"27号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"6号",fuzhi:"18号"})) // return 12;
return 3; // }else if(selected == "百色支队"){
}else if(selected == "来宾支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"9号",fuzhi:"20号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"7号",fuzhi:"23号"})) // return 5;
return 8; // }else if(selected == "贺州支队"){
}else if(selected == "崇左支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"3号",fuzhi:"24号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"5号",fuzhi:"17号"})) // return 9;
return 2; // }else if(selected == "河池支队"){
} // localStorage.setItem(selectedtime,JSON.stringify({zhi:"6号",fuzhi:"18号"}))
// return 3;
// }else if(selected == "来宾支队"){
// localStorage.setItem(selectedtime,JSON.stringify({zhi:"7号",fuzhi:"23号"}))
// return 8;
// }else if(selected == "崇左支队"){
// localStorage.setItem(selectedtime,JSON.stringify({zhi:"5号",fuzhi:"17号"}))
// return 2;
// }
// }
} }
}); });
var data = [
{'南宁支队':'8号21号'},
{'柳州支队':'12号26号'},
{'桂林支队':'14号22号'},
{'梧州支队':'13号28号'},
{'北海支队':'4号15号'},
{'防城港支队':'1号16号'},
{'钦州支队':'10号25号'},
{'贵港支队':'11号19号'},
{'玉林支队':'2号27号'},
{'百色支队':'9号20号'},
{'贺州支队':'3号24号'},
{'河池支队':'6号18号'},
{'来宾支队':'7号23号'},
{'崇左支队':'5号17号'}
]
$("#slotMachineButtonShuffle2").click(function(){ $("#slotMachineButtonShuffle2").click(function(){
if(!selected){ if(!selected){
@ -129,7 +133,8 @@ $(document).ready(function(){
machine.stop(); machine.stop();
machine6.stop(); machine6.stop();
setTimeout(() => { setTimeout(() => {
$("#endjieguo2 span").eq(selectedIndex).html(data[selectedIndex - 1][selected]) let obj = JSON.parse(localStorage.getItem(selectedtime))
$("#endjieguo2 span").eq(selectedIndex).html(obj.zhi + '' + obj.fuzhi)
$("#chooseZhi2 .img").eq(selectedIndex - 1).css("display","inline-block"); $("#chooseZhi2 .img").eq(selectedIndex - 1).css("display","inline-block");
}, 1300); }, 1300);
}, 1000); }, 1000);

185
src/assets/js/fourstepcopy.js

@ -7,98 +7,108 @@ $(document).ready(function(){
active : 0, active : 0,
delay : 500, delay : 500,
randomize : function(activeElementIndex){ randomize : function(activeElementIndex){
if(selected == "南宁支队"){ var index=localStorage.getItem("indexNum") - 1;
localStorage.setItem(selectedtime,JSON.stringify({zhi:"11号",fuzhi:"17号"})) localStorage.setItem(JSON.parse(localStorage.getItem("orgArr"))[index] + 'seatnumbercopy',
return 10; JSON.stringify({zhi:JSON.parse(localStorage.getItem("arrSeatcopy"))[index]+"号",fuzhi:JSON.parse(localStorage.getItem("arrSeat2copy"))[index]+"号"})
}else if(selected == "柳州支队"){ )
localStorage.setItem(selectedtime,JSON.stringify({zhi:"8号",fuzhi:"15号"})) return JSON.parse(localStorage.getItem("arrSeatcopy"))[index] - 1;
return 7; // if(selected == "南宁支队"){
}else if(selected == "桂林支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"11号",fuzhi:"17号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"4号",fuzhi:"21号"})) // return 10;
return 3; // }else if(selected == "柳州支队"){
}else if(selected == "梧州支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"8号",fuzhi:"15号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"2号",fuzhi:"26号"})) // return 7;
return 1; // }else if(selected == "桂林支队"){
}else if(selected == "北海支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"4号",fuzhi:"21号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"7号",fuzhi:"27号"})) // return 3;
return 6; // }else if(selected == "梧州支队"){
}else if(selected == "防城港支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"2号",fuzhi:"26号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"12号",fuzhi:"22号"})) // return 1;
return 11; // }else if(selected == "北海支队"){
}else if(selected == "钦州支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"7号",fuzhi:"27号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"3号",fuzhi:"25号"})) // return 6;
return 2; // }else if(selected == "防城港支队"){
}else if(selected == "贵港支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"12号",fuzhi:"22号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"1号",fuzhi:"16号"})) // return 11;
return 0; // }else if(selected == "钦州支队"){
}else if(selected == "玉林支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"3号",fuzhi:"25号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"9号",fuzhi:"20号"})) // return 2;
return 8; // }else if(selected == "贵港支队"){
}else if(selected == "百色支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"1号",fuzhi:"16号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"6号",fuzhi:"18号"})) // return 0;
return 5; // }else if(selected == "玉林支队"){
}else if(selected == "贺州支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"9号",fuzhi:"20号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"5号",fuzhi:"23号"})) // return 8;
return 4; // }else if(selected == "百色支队"){
}else if(selected == "河池支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"6号",fuzhi:"18号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"14号",fuzhi:"19号"})) // return 5;
return 13; // }else if(selected == "贺州支队"){
}else if(selected == "来宾支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"5号",fuzhi:"23号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"10号",fuzhi:"24号"})) // return 4;
return 9; // }else if(selected == "河池支队"){
}else if(selected == "崇左支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"14号",fuzhi:"19号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"13号",fuzhi:"28号"})) // return 13;
return 12; // }else if(selected == "来宾支队"){
} // localStorage.setItem(selectedtime,JSON.stringify({zhi:"10号",fuzhi:"24号"}))
// return 9;
// }else if(selected == "崇左支队"){
// localStorage.setItem(selectedtime,JSON.stringify({zhi:"13号",fuzhi:"28号"}))
// return 12;
// }
} }
}); });
var machine6 = $("#machine16").slotMachine({ var machine6 = $("#machine16").slotMachine({
active : 1, active : 1,
delay : 500, delay : 500,
randomize : function(activeElementIndex){ randomize : function(activeElementIndex){
if(selected == "南宁支队"){ var index=localStorage.getItem("indexNum") - 1;
localStorage.setItem(selectedtime,JSON.stringify({zhi:"11号",fuzhi:"17号"})) localStorage.setItem(JSON.parse(localStorage.getItem("orgArr"))[index] + 'seatnumbercopy',
return 2; JSON.stringify({zhi:JSON.parse(localStorage.getItem("arrSeatcopy"))[index]+"号",fuzhi:JSON.parse(localStorage.getItem("arrSeat2copy"))[index]+"号"})
}else if(selected == "柳州支队"){ )
localStorage.setItem(selectedtime,JSON.stringify({zhi:"8号",fuzhi:"15号"})) return JSON.parse(localStorage.getItem("arrSeat2copy"))[index] - 15;
return 0; // if(selected == "南宁支队"){
}else if(selected == "桂林支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"11号",fuzhi:"17号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"4号",fuzhi:"21号"})) // return 2;
return 6; // }else if(selected == "柳州支队"){
}else if(selected == "梧州支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"8号",fuzhi:"15号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"2号",fuzhi:"26号"})) // return 0;
return 11; // }else if(selected == "桂林支队"){
}else if(selected == "北海支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"4号",fuzhi:"21号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"7号",fuzhi:"27号"})) // return 6;
return 12; // }else if(selected == "梧州支队"){
}else if(selected == "防城港支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"2号",fuzhi:"26号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"12号",fuzhi:"22号"})) // return 11;
return 7; // }else if(selected == "北海支队"){
}else if(selected == "钦州支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"7号",fuzhi:"27号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"3号",fuzhi:"25号"})) // return 12;
return 10; // }else if(selected == "防城港支队"){
}else if(selected == "贵港支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"12号",fuzhi:"22号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"1号",fuzhi:"16号"})) // return 7;
return 1; // }else if(selected == "钦州支队"){
}else if(selected == "玉林支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"3号",fuzhi:"25号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"9号",fuzhi:"20号"})) // return 10;
return 5; // }else if(selected == "贵港支队"){
}else if(selected == "百色支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"1号",fuzhi:"16号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"6号",fuzhi:"18号"})) // return 1;
return 3; // }else if(selected == "玉林支队"){
}else if(selected == "贺州支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"9号",fuzhi:"20号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"5号",fuzhi:"23号"})) // return 5;
return 8; // }else if(selected == "百色支队"){
}else if(selected == "河池支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"6号",fuzhi:"18号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"14号",fuzhi:"19号"})) // return 3;
return 4; // }else if(selected == "贺州支队"){
}else if(selected == "来宾支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"5号",fuzhi:"23号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"10号",fuzhi:"24号"})) // return 8;
return 9; // }else if(selected == "河池支队"){
}else if(selected == "崇左支队"){ // localStorage.setItem(selectedtime,JSON.stringify({zhi:"14号",fuzhi:"19号"}))
localStorage.setItem(selectedtime,JSON.stringify({zhi:"13号",fuzhi:"28号"})) // return 4;
return 13; // }else if(selected == "来宾支队"){
} // localStorage.setItem(selectedtime,JSON.stringify({zhi:"10号",fuzhi:"24号"}))
// return 9;
// }else if(selected == "崇左支队"){
// localStorage.setItem(selectedtime,JSON.stringify({zhi:"13号",fuzhi:"28号"}))
// return 13;
// }
} }
}); });
var data = [ var data = [
@ -129,7 +139,8 @@ $(document).ready(function(){
machine.stop(); machine.stop();
machine6.stop(); machine6.stop();
setTimeout(() => { setTimeout(() => {
$("#endjieguo22 span").eq(selectedIndex).html(data[selectedIndex - 1][selected]) let obj = JSON.parse(localStorage.getItem(selectedtime))
$("#endjieguo22 span").eq(selectedIndex).html(obj.zhi + '' + obj.fuzhi)
$("#chooseZhi22 .img").eq(selectedIndex - 1).css("display","inline-block"); $("#chooseZhi22 .img").eq(selectedIndex - 1).css("display","inline-block");
}, 1300); }, 1300);
}, 1000); }, 1000);

Loading…
Cancel
Save