diff --git a/src/app/ui/drawing-result/drawing-result.component.ts b/src/app/ui/drawing-result/drawing-result.component.ts index d375e83..ed239da 100644 --- a/src/app/ui/drawing-result/drawing-result.component.ts +++ b/src/app/ui/drawing-result/drawing-result.component.ts @@ -20,38 +20,38 @@ export class DrawingResultComponent implements OnInit { headersZero:string [] = ['序号','支队名称','抽签顺序', '职级','座位号'] tableDataZero = [ - {order: 1, fireName: '南宁支队', drawLotsOrder: '12', name: ['支队长','副支队长'], seatNum: ['11号','17号'] }, - {order: 2, fireName: '柳州支队', drawLotsOrder: '07', name: ['支队长','副支队长'], seatNum: ['08号','15号'] }, - {order: 3, fireName: '桂林支队', drawLotsOrder: '01', name: ['支队长','副支队长'], seatNum: ['04号','21号'] }, - {order: 4, fireName: '梧州支队', drawLotsOrder: '06', name: ['支队长','副支队长'], seatNum: ['02号','26号'] }, - {order: 5, fireName: '北海支队', drawLotsOrder: '11', name: ['支队长','副支队长'], seatNum: ['07号','27号'] }, - {order: 6, fireName: '防城港支队', drawLotsOrder: '02', name: ['支队长','副支队长'], seatNum: ['12号','22号'] }, - {order: 7, fireName: '钦州支队', drawLotsOrder: '05', name: ['支队长','副支队长'], seatNum: ['03号','25号'] }, - {order: 8, fireName: '贵港支队', drawLotsOrder: '08', name: ['支队长','副支队长'], seatNum: ['01号','16号'] }, - {order: 9, fireName: '玉林支队', drawLotsOrder: '14', name: ['支队长','副支队长'], seatNum: ['09号','20号'] }, - {order: 10, fireName: '百色支队', drawLotsOrder: '3', name: ['支队长','副支队长'], seatNum: ['06号','18号'] }, - {order: 11, fireName: '贺州支队', drawLotsOrder: '9', name: ['支队长','副支队长'], seatNum: ['05号','23号'] }, - {order: 12, fireName: '河池支队', drawLotsOrder: '4', name: ['支队长','副支队长'], seatNum: ['14号','19号'] }, - {order: 13, fireName: '来宾支队', drawLotsOrder: '10', name: ['支队长','副支队长'], seatNum: ['10号','24号'] }, - {order: 14, fireName: '崇左支队', drawLotsOrder: '13', name: ['支队长','副支队长'], seatNum: ['13号','28号'] }, + {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: JSON.parse(localStorage.getItem("arr2"))[1], name: ['支队长','副支队长'], seatNum: [JSON.parse(localStorage.getItem("柳州支队seatnumbercopy")).zhi,JSON.parse(localStorage.getItem("柳州支队seatnumbercopy")).fuzhi] }, + {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: JSON.parse(localStorage.getItem("arr2"))[3], name: ['支队长','副支队长'], seatNum: [JSON.parse(localStorage.getItem("梧州支队seatnumbercopy")).zhi,JSON.parse(localStorage.getItem("梧州支队seatnumbercopy")).fuzhi] }, + {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: JSON.parse(localStorage.getItem("arr2"))[5], name: ['支队长','副支队长'], seatNum: [JSON.parse(localStorage.getItem("防城港支队seatnumbercopy")).zhi,JSON.parse(localStorage.getItem("防城港支队seatnumbercopy")).fuzhi] }, + {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: JSON.parse(localStorage.getItem("arr2"))[7], name: ['支队长','副支队长'], seatNum: [JSON.parse(localStorage.getItem("贵港支队seatnumbercopy")).zhi,JSON.parse(localStorage.getItem("贵港支队seatnumbercopy")).fuzhi] }, + {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: JSON.parse(localStorage.getItem("arr2"))[9], name: ['支队长','副支队长'], seatNum: [JSON.parse(localStorage.getItem("百色支队seatnumbercopy")).zhi,JSON.parse(localStorage.getItem("百色支队seatnumbercopy")).fuzhi] }, + {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: JSON.parse(localStorage.getItem("arr2"))[11], name: ['支队长','副支队长'], seatNum: [JSON.parse(localStorage.getItem("河池支队seatnumbercopy")).zhi,JSON.parse(localStorage.getItem("河池支队seatnumbercopy")).fuzhi]}, + {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: JSON.parse(localStorage.getItem("arr2"))[13], name: ['支队长','副支队长'], seatNum:[JSON.parse(localStorage.getItem("崇左支队seatnumbercopy")).zhi,JSON.parse(localStorage.getItem("崇左支队seatnumbercopy")).fuzhi]}, ] headers:string [] = ['序号','支队名称','抽签顺序','场景类型', '职级','座位号'] tableData = [ - {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号','22号'] }, - {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号','15号'] }, - {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号'] }, + {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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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(){ window.history.back(); diff --git a/src/app/ui/first-step-copy/first-step-copy.component.html b/src/app/ui/first-step-copy/first-step-copy.component.html index 48434de..4c766e2 100644 --- a/src/app/ui/first-step-copy/first-step-copy.component.html +++ b/src/app/ui/first-step-copy/first-step-copy.component.html @@ -13,6 +13,7 @@
+ 业务理论考试抽签顺序
diff --git a/src/app/ui/first-step-copy/first-step-copy.component.scss b/src/app/ui/first-step-copy/first-step-copy.component.scss index efffef6..f33532b 100644 --- a/src/app/ui/first-step-copy/first-step-copy.component.scss +++ b/src/app/ui/first-step-copy/first-step-copy.component.scss @@ -40,6 +40,13 @@ height: 90%; padding: 0.125rem 0.125rem 0; display: flex; + .title{ + position: absolute; + left: 28%; + top: 80px; + color: white; + font-size: 22px; + } } .chongzhi{ position: relative; diff --git a/src/app/ui/first-step-copy/first-step-copy.component.ts b/src/app/ui/first-step-copy/first-step-copy.component.ts index 56041c2..3f9c168 100644 --- a/src/app/ui/first-step-copy/first-step-copy.component.ts +++ b/src/app/ui/first-step-copy/first-step-copy.component.ts @@ -11,9 +11,6 @@ export class FirstStepCopyComponent implements OnInit { constructor(private router: Router) { } ngOnInit(){ - window.setTimeout(()=>{ - //zhuan.drawRouletteWheel() - },0) } //支队数据和是否抽奖 @@ -68,6 +65,6 @@ export class FirstStepCopyComponent implements OnInit { }else{ alert("未全部抽完!") } - + } } diff --git a/src/app/ui/first-step/first-step.component.html b/src/app/ui/first-step/first-step.component.html index a7f1fdd..4d6eb7a 100644 --- a/src/app/ui/first-step/first-step.component.html +++ b/src/app/ui/first-step/first-step.component.html @@ -9,11 +9,11 @@
-
-
+ 指挥员能力考评抽签顺序 +
序号 diff --git a/src/app/ui/first-step/first-step.component.scss b/src/app/ui/first-step/first-step.component.scss index 3dc8961..862ccfb 100644 --- a/src/app/ui/first-step/first-step.component.scss +++ b/src/app/ui/first-step/first-step.component.scss @@ -40,6 +40,14 @@ height: 90%; padding: 0.125rem 0.125rem 0; display: flex; + position: relative; + .title{ + position: absolute; + left: 28%; + top: 36px; + color: white; + font-size: 22px; + } } .centerLeft{ diff --git a/src/app/ui/first-step/first-step.component.ts b/src/app/ui/first-step/first-step.component.ts index 2670c7a..970ddf5 100644 --- a/src/app/ui/first-step/first-step.component.ts +++ b/src/app/ui/first-step/first-step.component.ts @@ -10,8 +10,52 @@ export class FirstStepComponent implements OnInit { constructor() { } 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 = [ @@ -68,4 +112,5 @@ export class FirstStepComponent implements OnInit { {name:"来宾支队",id:13,result :localStorage.getItem("来宾支队") || ""}, {name:"崇左支队",id:14,result :localStorage.getItem("崇左支队") || ""} ] + } diff --git a/src/app/ui/four-step-copy/four-step-copy.component.html b/src/app/ui/four-step-copy/four-step-copy.component.html index 83371e5..b3f7e56 100644 --- a/src/app/ui/four-step-copy/four-step-copy.component.html +++ b/src/app/ui/four-step-copy/four-step-copy.component.html @@ -13,11 +13,12 @@
+ 业务理论考试座位号抽签
序号 - {{item.seatnum}} + {{item}}
diff --git a/src/app/ui/four-step-copy/four-step-copy.component.scss b/src/app/ui/four-step-copy/four-step-copy.component.scss index 3121e8a..5f125c4 100644 --- a/src/app/ui/four-step-copy/four-step-copy.component.scss +++ b/src/app/ui/four-step-copy/four-step-copy.component.scss @@ -40,6 +40,13 @@ height: 90%; padding: 0.125rem 0.125rem 0; display: flex; + .title{ + position: absolute; + left: 28%; + top: 80px; + color: white; + font-size: 22px; + } } .centerLeft{ diff --git a/src/app/ui/four-step-copy/four-step-copy.component.ts b/src/app/ui/four-step-copy/four-step-copy.component.ts index f75197b..85f5f24 100644 --- a/src/app/ui/four-step-copy/four-step-copy.component.ts +++ b/src/app/ui/four-step-copy/four-step-copy.component.ts @@ -17,11 +17,9 @@ export class FourStepCopyComponent implements OnInit { constructor() { } + sortNum = [] ngOnInit(){ - window.setTimeout(()=>{ - //zhuan.drawRouletteWheel() - },0) - + this.sortNum = JSON.parse(localStorage.getItem("arr2")) } choujiang = [ diff --git a/src/app/ui/four-step/four-step.component.html b/src/app/ui/four-step/four-step.component.html index 909185a..71a9dc6 100644 --- a/src/app/ui/four-step/four-step.component.html +++ b/src/app/ui/four-step/four-step.component.html @@ -13,11 +13,12 @@
+ 指挥员能力考评座位号
序号 - {{item.seatnum}} + {{item}}
diff --git a/src/app/ui/four-step/four-step.component.scss b/src/app/ui/four-step/four-step.component.scss index 759d607..7b0663b 100644 --- a/src/app/ui/four-step/four-step.component.scss +++ b/src/app/ui/four-step/four-step.component.scss @@ -40,6 +40,13 @@ height: 90%; padding: 0.125rem 0.125rem 0; display: flex; + .title{ + position: absolute; + left: 28%; + top: 80px; + color: white; + font-size: 22px; + } } .chongzhi{ position: relative; diff --git a/src/app/ui/four-step/four-step.component.ts b/src/app/ui/four-step/four-step.component.ts index e1e5c87..21852fd 100644 --- a/src/app/ui/four-step/four-step.component.ts +++ b/src/app/ui/four-step/four-step.component.ts @@ -16,12 +16,9 @@ import '../../../assets/js/fourstep' export class FourStepComponent implements OnInit { constructor() { } - + sortNum = [] ngOnInit(){ - window.setTimeout(()=>{ - //zhuan.drawRouletteWheel() - },0) - + this.sortNum = JSON.parse(localStorage.getItem("arr")) } //支队数据和是否抽奖 choujiang = [ diff --git a/src/app/ui/luck-draw/luck-draw.component.html b/src/app/ui/luck-draw/luck-draw.component.html index 656d47e..37108a2 100644 --- a/src/app/ui/luck-draw/luck-draw.component.html +++ b/src/app/ui/luck-draw/luck-draw.component.html @@ -16,6 +16,7 @@
+ 指挥员能力考评场景类型抽签
diff --git a/src/app/ui/luck-draw/luck-draw.component.scss b/src/app/ui/luck-draw/luck-draw.component.scss index ba3ccdc..66c3316 100644 --- a/src/app/ui/luck-draw/luck-draw.component.scss +++ b/src/app/ui/luck-draw/luck-draw.component.scss @@ -39,7 +39,13 @@ height: 90%; padding: 0.125rem 0.125rem 0; display: flex; - + .title{ + position: absolute; + left: 28%; + top: 80px; + color: white; + font-size: 22px; + } /* background-attachment: fixed; background-repeat:no-repeat; */ } diff --git a/src/assets/js/firststep.js b/src/assets/js/firststep.js index cd5edbb..949c51f 100644 --- a/src/assets/js/firststep.js +++ b/src/assets/js/firststep.js @@ -1,4 +1,5 @@ $(document).ready(function(){ + var orgArr = ['南宁支队','柳州支队','桂林支队','梧州支队','北海支队','防城港支队','钦州支队','贵港支队','玉林支队','百色支队','贺州支队','河池支队','来宾支队','崇左支队',] var index = 0 var selected = null //点击的单位名称 var selectedIndex = null //点击的单位index @@ -6,50 +7,61 @@ $(document).ready(function(){ active : 0, delay : 500, randomize : function(activeElementIndex){ - if(selected == "南宁支队"){ - localStorage.setItem(selected,"5号") - return 5; - }else if(selected == "柳州支队"){ - localStorage.setItem(selected,'10号') - return 10; - }else if(selected == "桂林支队"){ - localStorage.setItem(selected,'14号') - return 14; - }else if(selected == "梧州支队"){ - localStorage.setItem(selected,'3号') - return 3; - }else if(selected == "北海支队"){ - console.log(1996,) - localStorage.setItem(selected,'8号') - return 8; - }else if(selected == "防城港支队"){ - localStorage.setItem(selected,'13号') - return 13; - }else if(selected == "钦州支队"){ - localStorage.setItem(selected,'6号') - return 6; - }else if(selected == "贵港支队"){ - localStorage.setItem(selected,'1号') - return 1; - }else if(selected == "玉林支队"){ - localStorage.setItem(selected,'7号') - return 7; - }else if(selected == "百色支队"){ - localStorage.setItem(selected,'12号') - return 12; - }else if(selected == "贺州支队"){ - localStorage.setItem(selected,'2号') - return 2; - }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; - } + var index=localStorage.getItem("indexNum") - 1; + localStorage.setItem(JSON.parse(localStorage.getItem("orgArr"))[index],JSON.parse(localStorage.getItem("arr"))[index]+"号") + return JSON.parse(localStorage.getItem("arr"))[index]; + // if(localStorage.getItem("pagetype") == "true"){ + // var index=localStorage.getItem("indexNum") - 1; + // localStorage.setItem(JSON.parse(localStorage.getItem("orgArr"))[index],JSON.parse(localStorage.getItem("arr"))[index]+"号") + // return JSON.parse(localStorage.getItem("arr"))[index]; + // }else{ + // if(selected == "南宁支队"){ + // localStorage.setItem(selected,"5号") + // return 5; + // }else if(selected == "柳州支队"){ + // localStorage.setItem(selected,'10号') + // return 10; + // }else if(selected == "桂林支队"){ + // localStorage.setItem(selected,'14号') + // return 14; + // }else if(selected == "梧州支队"){ + // localStorage.setItem(selected,'3号') + // return 3; + // }else if(selected == "北海支队"){ + // console.log(1996,) + // localStorage.setItem(selected,'8号') + // return 8; + // }else if(selected == "防城港支队"){ + // localStorage.setItem(selected,'13号') + // return 13; + // }else if(selected == "钦州支队"){ + // localStorage.setItem(selected,'6号') + // return 6; + // }else if(selected == "贵港支队"){ + // localStorage.setItem(selected,'1号') + // return 1; + // }else if(selected == "玉林支队"){ + // localStorage.setItem(selected,'7号') + // return 7; + // }else if(selected == "百色支队"){ + // localStorage.setItem(selected,'12号') + // return 12; + // }else if(selected == "贺州支队"){ + // localStorage.setItem(selected,'2号') + // return 2; + // }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"); setTimeout(() => { machine.stop(); - // $("#slotMachineButtonShuffle").removeClass("disabled"); setTimeout(() => { $("#endjieguoshao span").eq(selectedIndex).html(window.localStorage[selected]) $("#chooseZhishao .img").eq(selectedIndex - 1).css("display","inline-block"); diff --git a/src/assets/js/firststepcopy.js b/src/assets/js/firststepcopy.js index cbdc8c1..22e9625 100644 --- a/src/assets/js/firststepcopy.js +++ b/src/assets/js/firststepcopy.js @@ -7,49 +7,52 @@ $(document).ready(function(){ active : 0, delay : 500, randomize : function(activeElementIndex){ - if(selected == "南宁支队"){ - localStorage.setItem(selectedcopy,"12号") - return 12; - }else if(selected == "柳州支队"){ - localStorage.setItem(selectedcopy,'7号') - return 7; - }else if(selected == "桂林支队"){ - localStorage.setItem(selectedcopy,'1号') - return 1; - }else if(selected == "梧州支队"){ - localStorage.setItem(selectedcopy,'6号') - return 6; - }else if(selected == "北海支队"){ - localStorage.setItem(selectedcopy,'11号') - return 11; - }else if(selected == "防城港支队"){ - localStorage.setItem(selectedcopy,'2号') - return 2; - }else if(selected == "钦州支队"){ - localStorage.setItem(selectedcopy,'5号') - return 5; - }else if(selected == "贵港支队"){ - localStorage.setItem(selectedcopy,'8号') - return 8; - }else if(selected == "玉林支队"){ - localStorage.setItem(selectedcopy,'14号') - return 14; - }else if(selected == "百色支队"){ - localStorage.setItem(selectedcopy,'3号') - return 3; - }else if(selected == "贺州支队"){ - localStorage.setItem(selectedcopy,'9号') - return 9; - }else if(selected == "河池支队"){ - localStorage.setItem(selectedcopy,'4号') - return 4; - }else if(selected == "来宾支队"){ - localStorage.setItem(selectedcopy,'10号') - return 10; - }else if(selected == "崇左支队"){ - localStorage.setItem(selectedcopy,'13号') - return 13; - } + var index=localStorage.getItem("indexNum") - 1; + localStorage.setItem(JSON.parse(localStorage.getItem("orgArr"))[index] + 'copy',JSON.parse(localStorage.getItem("arr2"))[index]+"号") + return JSON.parse(localStorage.getItem("arr2"))[index]; + // if(selected == "南宁支队"){ + // localStorage.setItem(selectedcopy,"12号") + // return 12; + // }else if(selected == "柳州支队"){ + // localStorage.setItem(selectedcopy,'7号') + // return 7; + // }else if(selected == "桂林支队"){ + // localStorage.setItem(selectedcopy,'1号') + // return 1; + // }else if(selected == "梧州支队"){ + // localStorage.setItem(selectedcopy,'6号') + // return 6; + // }else if(selected == "北海支队"){ + // localStorage.setItem(selectedcopy,'11号') + // return 11; + // }else if(selected == "防城港支队"){ + // localStorage.setItem(selectedcopy,'2号') + // return 2; + // }else if(selected == "钦州支队"){ + // localStorage.setItem(selectedcopy,'5号') + // return 5; + // }else if(selected == "贵港支队"){ + // localStorage.setItem(selectedcopy,'8号') + // return 8; + // }else if(selected == "玉林支队"){ + // localStorage.setItem(selectedcopy,'14号') + // return 14; + // }else if(selected == "百色支队"){ + // localStorage.setItem(selectedcopy,'3号') + // return 3; + // }else if(selected == "贺州支队"){ + // localStorage.setItem(selectedcopy,'9号') + // return 9; + // }else if(selected == "河池支队"){ + // localStorage.setItem(selectedcopy,'4号') + // return 4; + // }else if(selected == "来宾支队"){ + // localStorage.setItem(selectedcopy,'10号') + // return 10; + // }else if(selected == "崇左支队"){ + // localStorage.setItem(selectedcopy,'13号') + // return 13; + // } } }); diff --git a/src/assets/js/fourstep.js b/src/assets/js/fourstep.js index e2877f8..bfa46c2 100644 --- a/src/assets/js/fourstep.js +++ b/src/assets/js/fourstep.js @@ -7,116 +7,120 @@ $(document).ready(function(){ active : 0, delay : 500, randomize : function(activeElementIndex){ - if(selected == "南宁支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"8号",fuzhi:"21号"})) - return 7; - }else if(selected == "柳州支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"12号",fuzhi:"26号"})) - return 11; - }else if(selected == "桂林支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"14号",fuzhi:"22号"})) - return 13; - }else if(selected == "梧州支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"13号",fuzhi:"28号"})) - return 12; - }else if(selected == "北海支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"4号",fuzhi:"15号"})) - return 3; - }else if(selected == "防城港支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"1号",fuzhi:"16号"})) - return 0; - }else if(selected == "钦州支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"10号",fuzhi:"25号"})) - return 9; - }else if(selected == "贵港支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"11号",fuzhi:"19号"})) - return 10; - }else if(selected == "玉林支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"2号",fuzhi:"27号"})) - return 1; - }else if(selected == "百色支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"9号",fuzhi:"20号"})) - return 8; - }else if(selected == "贺州支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"3号",fuzhi:"24号"})) - return 2; - }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 index=localStorage.getItem("indexNum") - 1; + localStorage.setItem(JSON.parse(localStorage.getItem("orgArr"))[index] + 'seatnumber', + JSON.stringify({zhi:JSON.parse(localStorage.getItem("arrSeat"))[index]+"号",fuzhi:JSON.parse(localStorage.getItem("arrSeat2"))[index]+"号"}) + ) + return JSON.parse(localStorage.getItem("arrSeat"))[index] - 1; + // if(localStorage.getItem("pagetype") == "true"){//如果是真抽签 + + // }else{ + // if(selected == "南宁支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"8号",fuzhi:"21号"})) + // return 7; + // }else if(selected == "柳州支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"12号",fuzhi:"26号"})) + // return 11; + // }else if(selected == "桂林支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"14号",fuzhi:"22号"})) + // return 13; + // }else if(selected == "梧州支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"13号",fuzhi:"28号"})) + // return 12; + // }else if(selected == "北海支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"4号",fuzhi:"15号"})) + // return 3; + // }else if(selected == "防城港支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"1号",fuzhi:"16号"})) + // return 0; + // }else if(selected == "钦州支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"10号",fuzhi:"25号"})) + // return 9; + // }else if(selected == "贵港支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"11号",fuzhi:"19号"})) + // return 10; + // }else if(selected == "玉林支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"2号",fuzhi:"27号"})) + // return 1; + // }else if(selected == "百色支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"9号",fuzhi:"20号"})) + // return 8; + // }else if(selected == "贺州支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"3号",fuzhi:"24号"})) + // return 2; + // }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({ active : 1, delay : 500, randomize : function(activeElementIndex){ - if(selected == "南宁支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"8号",fuzhi:"21号"})) - return 6; - }else if(selected == "柳州支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"12号",fuzhi:"26号"})) - return 11; - }else if(selected == "桂林支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"14号",fuzhi:"22号"})) - return 7; - }else if(selected == "梧州支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"13号",fuzhi:"28号"})) - return 13; - }else if(selected == "北海支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"4号",fuzhi:"15号"})) - return 0; - }else if(selected == "防城港支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"1号",fuzhi:"16号"})) - return 1; - }else if(selected == "钦州支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"10号",fuzhi:"25号"})) - return 10; - }else if(selected == "贵港支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"11号",fuzhi:"19号"})) - return 4; - }else if(selected == "玉林支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"2号",fuzhi:"27号"})) - return 12; - }else if(selected == "百色支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"9号",fuzhi:"20号"})) - return 5; - }else if(selected == "贺州支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"3号",fuzhi:"24号"})) - return 9; - }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 index=localStorage.getItem("indexNum") - 1; + localStorage.setItem(JSON.parse(localStorage.getItem("orgArr"))[index] + 'seatnumber', + JSON.stringify({zhi:JSON.parse(localStorage.getItem("arrSeat"))[index]+"号",fuzhi:JSON.parse(localStorage.getItem("arrSeat2"))[index]+"号"}) + ) + return JSON.parse(localStorage.getItem("arrSeat2"))[index] - 15; + // if(localStorage.getItem("pagetype") == "true"){ + + // }else{ + // if(selected == "南宁支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"8号",fuzhi:"21号"})) + // return 6; + // }else if(selected == "柳州支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"12号",fuzhi:"26号"})) + // return 11; + // }else if(selected == "桂林支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"14号",fuzhi:"22号"})) + // return 7; + // }else if(selected == "梧州支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"13号",fuzhi:"28号"})) + // return 13; + // }else if(selected == "北海支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"4号",fuzhi:"15号"})) + // return 0; + // }else if(selected == "防城港支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"1号",fuzhi:"16号"})) + // return 1; + // }else if(selected == "钦州支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"10号",fuzhi:"25号"})) + // return 10; + // }else if(selected == "贵港支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"11号",fuzhi:"19号"})) + // return 4; + // }else if(selected == "玉林支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"2号",fuzhi:"27号"})) + // return 12; + // }else if(selected == "百色支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"9号",fuzhi:"20号"})) + // return 5; + // }else if(selected == "贺州支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"3号",fuzhi:"24号"})) + // return 9; + // }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(){ if(!selected){ @@ -129,7 +133,8 @@ $(document).ready(function(){ machine.stop(); machine6.stop(); 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"); }, 1300); }, 1000); diff --git a/src/assets/js/fourstepcopy.js b/src/assets/js/fourstepcopy.js index 39f9f04..6a5a207 100644 --- a/src/assets/js/fourstepcopy.js +++ b/src/assets/js/fourstepcopy.js @@ -7,98 +7,108 @@ $(document).ready(function(){ active : 0, delay : 500, randomize : function(activeElementIndex){ - if(selected == "南宁支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"11号",fuzhi:"17号"})) - return 10; - }else if(selected == "柳州支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"8号",fuzhi:"15号"})) - return 7; - }else if(selected == "桂林支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"4号",fuzhi:"21号"})) - return 3; - }else if(selected == "梧州支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"2号",fuzhi:"26号"})) - return 1; - }else if(selected == "北海支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"7号",fuzhi:"27号"})) - return 6; - }else if(selected == "防城港支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"12号",fuzhi:"22号"})) - return 11; - }else if(selected == "钦州支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"3号",fuzhi:"25号"})) - return 2; - }else if(selected == "贵港支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"1号",fuzhi:"16号"})) - return 0; - }else if(selected == "玉林支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"9号",fuzhi:"20号"})) - return 8; - }else if(selected == "百色支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"6号",fuzhi:"18号"})) - return 5; - }else if(selected == "贺州支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"5号",fuzhi:"23号"})) - return 4; - }else if(selected == "河池支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"14号",fuzhi:"19号"})) - 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 12; - } + var index=localStorage.getItem("indexNum") - 1; + localStorage.setItem(JSON.parse(localStorage.getItem("orgArr"))[index] + 'seatnumbercopy', + JSON.stringify({zhi:JSON.parse(localStorage.getItem("arrSeatcopy"))[index]+"号",fuzhi:JSON.parse(localStorage.getItem("arrSeat2copy"))[index]+"号"}) + ) + return JSON.parse(localStorage.getItem("arrSeatcopy"))[index] - 1; + // if(selected == "南宁支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"11号",fuzhi:"17号"})) + // return 10; + // }else if(selected == "柳州支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"8号",fuzhi:"15号"})) + // return 7; + // }else if(selected == "桂林支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"4号",fuzhi:"21号"})) + // return 3; + // }else if(selected == "梧州支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"2号",fuzhi:"26号"})) + // return 1; + // }else if(selected == "北海支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"7号",fuzhi:"27号"})) + // return 6; + // }else if(selected == "防城港支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"12号",fuzhi:"22号"})) + // return 11; + // }else if(selected == "钦州支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"3号",fuzhi:"25号"})) + // return 2; + // }else if(selected == "贵港支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"1号",fuzhi:"16号"})) + // return 0; + // }else if(selected == "玉林支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"9号",fuzhi:"20号"})) + // return 8; + // }else if(selected == "百色支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"6号",fuzhi:"18号"})) + // return 5; + // }else if(selected == "贺州支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"5号",fuzhi:"23号"})) + // return 4; + // }else if(selected == "河池支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"14号",fuzhi:"19号"})) + // 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 12; + // } } }); var machine6 = $("#machine16").slotMachine({ active : 1, delay : 500, randomize : function(activeElementIndex){ - if(selected == "南宁支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"11号",fuzhi:"17号"})) - return 2; - }else if(selected == "柳州支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"8号",fuzhi:"15号"})) - return 0; - }else if(selected == "桂林支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"4号",fuzhi:"21号"})) - return 6; - }else if(selected == "梧州支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"2号",fuzhi:"26号"})) - return 11; - }else if(selected == "北海支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"7号",fuzhi:"27号"})) - return 12; - }else if(selected == "防城港支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"12号",fuzhi:"22号"})) - return 7; - }else if(selected == "钦州支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"3号",fuzhi:"25号"})) - return 10; - }else if(selected == "贵港支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"1号",fuzhi:"16号"})) - return 1; - }else if(selected == "玉林支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"9号",fuzhi:"20号"})) - return 5; - }else if(selected == "百色支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"6号",fuzhi:"18号"})) - return 3; - }else if(selected == "贺州支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"5号",fuzhi:"23号"})) - return 8; - }else if(selected == "河池支队"){ - localStorage.setItem(selectedtime,JSON.stringify({zhi:"14号",fuzhi:"19号"})) - return 4; - }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 index=localStorage.getItem("indexNum") - 1; + localStorage.setItem(JSON.parse(localStorage.getItem("orgArr"))[index] + 'seatnumbercopy', + JSON.stringify({zhi:JSON.parse(localStorage.getItem("arrSeatcopy"))[index]+"号",fuzhi:JSON.parse(localStorage.getItem("arrSeat2copy"))[index]+"号"}) + ) + return JSON.parse(localStorage.getItem("arrSeat2copy"))[index] - 15; + // if(selected == "南宁支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"11号",fuzhi:"17号"})) + // return 2; + // }else if(selected == "柳州支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"8号",fuzhi:"15号"})) + // return 0; + // }else if(selected == "桂林支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"4号",fuzhi:"21号"})) + // return 6; + // }else if(selected == "梧州支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"2号",fuzhi:"26号"})) + // return 11; + // }else if(selected == "北海支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"7号",fuzhi:"27号"})) + // return 12; + // }else if(selected == "防城港支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"12号",fuzhi:"22号"})) + // return 7; + // }else if(selected == "钦州支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"3号",fuzhi:"25号"})) + // return 10; + // }else if(selected == "贵港支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"1号",fuzhi:"16号"})) + // return 1; + // }else if(selected == "玉林支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"9号",fuzhi:"20号"})) + // return 5; + // }else if(selected == "百色支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"6号",fuzhi:"18号"})) + // return 3; + // }else if(selected == "贺州支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"5号",fuzhi:"23号"})) + // return 8; + // }else if(selected == "河池支队"){ + // localStorage.setItem(selectedtime,JSON.stringify({zhi:"14号",fuzhi:"19号"})) + // return 4; + // }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 = [ @@ -129,7 +139,8 @@ $(document).ready(function(){ machine.stop(); machine6.stop(); 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"); }, 1300); }, 1000);