- 抽签结果:
+ 座位抽签结果:
{{item.result.zhi}}{{item.result.fuzhi}}
diff --git a/src/app/ui/four-step/four-step.component.ts b/src/app/ui/four-step/four-step.component.ts
index a3f2614..8fbafe2 100644
--- a/src/app/ui/four-step/four-step.component.ts
+++ b/src/app/ui/four-step/four-step.component.ts
@@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core';
-import '../../../assets/js/firststep2'
+import '../../../assets/js/fourstep'
@Component({
selector: 'app-four-step',
templateUrl: './four-step.component.html',
@@ -17,20 +17,20 @@ export class FourStepComponent implements OnInit {
}
//支队数据和是否抽奖
choujiang = [
- {name:"南宁支队",id:1,result :JSON.parse(localStorage.getItem("南宁支队seatnumber")) || ""},
- {name:"柳州支队",id:2,result :JSON.parse(localStorage.getItem("柳州支队seatnumber")) || ""},
- {name:"桂林支队",id:3,result :JSON.parse(localStorage.getItem("桂林支队seatnumber")) || ""},
- {name:"梧州支队",id:4,result :JSON.parse(localStorage.getItem("梧州支队seatnumber")) || ""},
- {name:"北海支队",id:5,result :JSON.parse(localStorage.getItem("北海支队seatnumber")) || ""},
- {name:"防城港支队",id:6,result :JSON.parse(localStorage.getItem("防城港支队seatnumber")) || ""},
- {name:"钦州支队",id:7,result :JSON.parse(localStorage.getItem("钦州支队seatnumber")) || ""},
- {name:"贵港支队",id:8,result :JSON.parse(localStorage.getItem("贵港支队seatnumber")) || ""},
- {name:"玉林支队",id:9,result :JSON.parse(localStorage.getItem("玉林支队seatnumber")) || ""},
- {name:"百色支队",id:10,result :JSON.parse(localStorage.getItem("百色支队seatnumber")) || ""},
- {name:"贺州支队",id:11,result :JSON.parse(localStorage.getItem("贺州支队seatnumber")) || ""},
- {name:"河池支队",id:12,result :JSON.parse(localStorage.getItem("河池支队seatnumber")) || ""},
- {name:"来宾支队",id:13,result :JSON.parse(localStorage.getItem("来宾支队seatnumber")) || ""},
- {name:"崇左支队",id:14,result :JSON.parse(localStorage.getItem("崇左支队seatnumber")) || ""}
+ {name:"南宁支队",id:1,result :JSON.parse(localStorage.getItem("南宁支队seatnumber")) || "",seatnum:"5"},
+ {name:"柳州支队",id:2,result :JSON.parse(localStorage.getItem("柳州支队seatnumber")) || "",seatnum:"10"},
+ {name:"桂林支队",id:3,result :JSON.parse(localStorage.getItem("桂林支队seatnumber")) || "",seatnum:"14"},
+ {name:"梧州支队",id:4,result :JSON.parse(localStorage.getItem("梧州支队seatnumber")) || "",seatnum:"3"},
+ {name:"北海支队",id:5,result :JSON.parse(localStorage.getItem("北海支队seatnumber")) || "",seatnum:"8"},
+ {name:"防城港支队",id:6,result :JSON.parse(localStorage.getItem("防城港支队seatnumber")) || "",seatnum:"13"},
+ {name:"钦州支队",id:7,result :JSON.parse(localStorage.getItem("钦州支队seatnumber")) || "",seatnum:"6"},
+ {name:"贵港支队",id:8,result :JSON.parse(localStorage.getItem("贵港支队seatnumber")) || "",seatnum:"1"},
+ {name:"玉林支队",id:9,result :JSON.parse(localStorage.getItem("玉林支队seatnumber")) || "",seatnum:"7"},
+ {name:"百色支队",id:10,result :JSON.parse(localStorage.getItem("百色支队seatnumber")) || "",seatnum:"12"},
+ {name:"贺州支队",id:11,result :JSON.parse(localStorage.getItem("贺州支队seatnumber")) || "",seatnum:"2"},
+ {name:"河池支队",id:12,result :JSON.parse(localStorage.getItem("河池支队seatnumber")) || "",seatnum:"4"},
+ {name:"来宾支队",id:13,result :JSON.parse(localStorage.getItem("来宾支队seatnumber")) || "",seatnum:"9"},
+ {name:"崇左支队",id:14,result :JSON.parse(localStorage.getItem("崇左支队seatnumber")) || "",seatnum:"11"}
]
numList = [
{name:"1号",id:1},
diff --git a/src/app/ui/ui.module.ts b/src/app/ui/ui.module.ts
index 6ac5179..4859b38 100644
--- a/src/app/ui/ui.module.ts
+++ b/src/app/ui/ui.module.ts
@@ -64,10 +64,12 @@ import { ResetComponent } from './reset/reset.component';
import { FirstStepComponent } from './first-step/first-step.component';
import { FourStepComponent } from './four-step/four-step.component';
import { DrawingResultComponent } from './drawing-result/drawing-result.component';
+import { FirstStepCopyComponent } from './first-step-copy/first-step-copy.component';
+import { FourStepCopyComponent } from './four-step-copy/four-step-copy.component';
@NgModule({
- declarations: [SafeHtmlPipe,UiComponent,PersonaldataComponent, ChangepasswordComponent,IsnoPipe,ConfirmpswDirective,TimePipe,WorkingAreaComponent, LuckDrawComponent, ResetComponent, DrawingResultComponent, FirstStepComponent, FourStepComponent],
+ declarations: [SafeHtmlPipe,UiComponent,PersonaldataComponent, ChangepasswordComponent,IsnoPipe,ConfirmpswDirective,TimePipe,WorkingAreaComponent, LuckDrawComponent, ResetComponent, DrawingResultComponent, FirstStepComponent, FourStepComponent, FirstStepCopyComponent, FourStepCopyComponent],
imports: [
CommonModule,
diff --git a/src/assets/js/firststep.js b/src/assets/js/firststep.js
index bdb836a..19b8b84 100644
--- a/src/assets/js/firststep.js
+++ b/src/assets/js/firststep.js
@@ -6,7 +6,6 @@ $(document).ready(function(){
active : 0,
delay : 500,
randomize : function(activeElementIndex){
- console.log("xxxxx")
if(selected == "南宁支队"){
localStorage.setItem(selected,"5号")
return 5;
@@ -65,8 +64,8 @@ $(document).ready(function(){
machine.stop();
// $("#slotMachineButtonShuffle").removeClass("disabled");
setTimeout(() => {
- $("#endjieguo span").eq(selectedIndex).html(window.localStorage[selected])
- $("#chooseZhi .img").eq(selectedIndex - 1).css("display","inline-block");
+ $("#endjieguoshao span").eq(selectedIndex).html(window.localStorage[selected])
+ $("#chooseZhishao .img").eq(selectedIndex - 1).css("display","inline-block");
}, 1300);
}, 1000);
}
@@ -77,7 +76,7 @@ $(document).ready(function(){
$("span[name='aaa']").on("click",function(e,index){
selected = $(this)[0].innerText
selectedIndex = localStorage.getItem("indexNum")
- if($("#endjieguo span").eq(selectedIndex)[0].innerText){
+ if($("#endjieguoshao span").eq(selectedIndex)[0].innerText){
$("#slotMachineButtonShuffle").addClass("disabled");
}else{
$("#slotMachineButtonShuffle").removeClass("disabled");
diff --git a/src/assets/js/firststepcopy.js b/src/assets/js/firststepcopy.js
new file mode 100644
index 0000000..cbdc8c1
--- /dev/null
+++ b/src/assets/js/firststepcopy.js
@@ -0,0 +1,85 @@
+$(document).ready(function(){
+ var index = 0
+ var selected = null //点击的单位名称
+ var selectedcopy = null
+ var selectedIndex = null //点击的单位index
+ var machine = $("#machine10").slotMachine({
+ 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;
+ }
+ }
+ });
+
+ $("#slotMachineButtonShuffle10").click(function(){
+ if(!selected){
+ alert("请先选择单位")
+ }else{
+ machine.shuffle();
+ $("#slotMachineButtonShuffle10").addClass("disabled");
+ setTimeout(() => {
+ machine.stop();
+ // $("#slotMachineButtonShuffle").removeClass("disabled");
+ setTimeout(() => {
+ $("#endjieguo10 span").eq(selectedIndex).html(window.localStorage[selectedcopy])
+ $("#chooseZhi10 .img").eq(selectedIndex - 1).css("display","inline-block");
+ }, 1300);
+ }, 1000);
+ }
+
+ });
+
+ //左侧表格点击事件
+ $("span[name='yyy']").on("click",function(e,index){
+ selected = $(this)[0].innerText
+ selectedcopy = $(this)[0].innerText + 'copy'
+ selectedIndex = localStorage.getItem("indexNum")
+ if($("#endjieguo10 span").eq(selectedIndex)[0].innerText){
+ $("#slotMachineButtonShuffle10").addClass("disabled");
+ }else{
+ $("#slotMachineButtonShuffle10").removeClass("disabled");
+ }
+ })
+});
\ No newline at end of file
diff --git a/src/assets/js/firststep2.js b/src/assets/js/fourstep.js
similarity index 100%
rename from src/assets/js/firststep2.js
rename to src/assets/js/fourstep.js
diff --git a/src/assets/js/fourstepcopy.js b/src/assets/js/fourstepcopy.js
new file mode 100644
index 0000000..39f9f04
--- /dev/null
+++ b/src/assets/js/fourstepcopy.js
@@ -0,0 +1,151 @@
+$(document).ready(function(){
+ var index = 0
+ var selected = null //点击的单位名称
+ var selectedtime = null //点击的单位名称 + 'time'
+ var selectedIndex = null //点击的单位index
+ var machine = $("#machine12").slotMachine({
+ 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 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 data = [
+ {'南宁支队':'11号17号'},
+ {'柳州支队':'8号15号'},
+ {'桂林支队':'4号21号'},
+ {'梧州支队':'2号26号'},
+ {'北海支队':'7号27号'},
+ {'防城港支队':'12号22号'},
+ {'钦州支队':'3号25号'},
+ {'贵港支队':'1号16号'},
+ {'玉林支队':'9号20号'},
+ {'百色支队':'6号18号'},
+ {'贺州支队':'5号23号'},
+ {'河池支队':'14号19号'},
+ {'来宾支队':'10号24号'},
+ {'崇左支队':'13号28号'}
+ ]
+
+ $("#slotMachineButtonShuffle22").click(function(){
+ if(!selected){
+ alert("请先选择单位")
+ }else{
+ machine.shuffle();
+ machine6.shuffle();
+ $("#slotMachineButtonShuffle22").addClass("disabled");
+ setTimeout(() => {
+ machine.stop();
+ machine6.stop();
+ setTimeout(() => {
+ $("#endjieguo22 span").eq(selectedIndex).html(data[selectedIndex - 1][selected])
+ $("#chooseZhi22 .img").eq(selectedIndex - 1).css("display","inline-block");
+ }, 1300);
+ }, 1000);
+ }
+ });
+
+ //左侧表格点击事件
+ $("span[name='zzz']").on("click",function(e,index){
+ selected = $(this)[0].innerText
+ selectedtime = $(this)[0].innerText + 'seatnumbercopy'
+ selectedIndex = localStorage.getItem("indexNum")
+ // console.log(456,selected,selectedIndex)
+ if($("#endjieguo22 span").eq(selectedIndex)[0].innerText){
+ $("#slotMachineButtonShuffle22").addClass("disabled");
+ }else{
+ $("#slotMachineButtonShuffle22").removeClass("disabled");
+ }
+ })
+});
\ No newline at end of file