|
@@ -27,20 +27,27 @@ Component({ |
|
@@ -27,20 +27,27 @@ Component({ |
|
27
|
this.changesectionstyle(this.data.section);
|
27
|
this.changesectionstyle(this.data.section);
|
|
28
|
}else{
|
28
|
}else{
|
|
29
|
this.changesectionstyle(this.data.sectionlist[0].section);
|
29
|
this.changesectionstyle(this.data.sectionlist[0].section);
|
|
|
|
30
|
+ //2019-12-13修改优化
|
|
|
|
31
|
+ let obj={
|
|
|
|
32
|
+ section:this.data.sectionlist[0].section,
|
|
|
|
33
|
+ action:'defalut',
|
|
|
|
34
|
+ time:this.data.sectionlist[0].sectiondur.split('-')[0]
|
|
|
|
35
|
+ }
|
|
|
|
36
|
+ this.triggerEvent('selectsection',obj)
|
|
30
|
}
|
37
|
}
|
|
31
|
- let obj={
|
|
|
|
32
|
- section:this.data.section ? this.data.section : this.data.sectionlist[0].section,
|
|
|
|
33
|
- action:'defalut',
|
|
|
|
34
|
- time:this.data.sectionlist[0].sectiondur.split('-')[0]
|
|
|
|
35
|
- }
|
|
|
|
36
|
- if(this.data.section){
|
|
|
|
37
|
- this.data.sectionlist.forEach((v,i)=>{
|
|
|
|
38
|
- if(this.data.section==v.section){
|
|
|
|
39
|
- obj.time=v.sectiondur.split('-')[0]
|
|
|
|
40
|
- }
|
|
|
|
41
|
- })
|
|
|
|
42
|
- }
|
|
|
|
43
|
- this.triggerEvent('selectsection',obj)
|
38
|
+ // let obj={
|
|
|
|
39
|
+ // section:this.data.section ? this.data.section : this.data.sectionlist[0].section,
|
|
|
|
40
|
+ // action:'defalut',
|
|
|
|
41
|
+ // time:this.data.sectionlist[0].sectiondur.split('-')[0]
|
|
|
|
42
|
+ // }
|
|
|
|
43
|
+ // if(this.data.section){
|
|
|
|
44
|
+ // this.data.sectionlist.forEach((v,i)=>{
|
|
|
|
45
|
+ // if(this.data.section==v.section){
|
|
|
|
46
|
+ // obj.time=v.sectiondur.split('-')[0]
|
|
|
|
47
|
+ // }
|
|
|
|
48
|
+ // })
|
|
|
|
49
|
+ // }
|
|
|
|
50
|
+ // this.triggerEvent('selectsection',obj)
|
|
44
|
}
|
51
|
}
|
|
45
|
}
|
52
|
}
|
|
46
|
},
|
53
|
},
|
|
@@ -127,11 +134,12 @@ Component({ |
|
@@ -127,11 +134,12 @@ Component({ |
|
127
|
//通知时段
|
134
|
//通知时段
|
|
128
|
tellsection(selectsection,action,index){
|
135
|
tellsection(selectsection,action,index){
|
|
129
|
console.log(index);
|
136
|
console.log(index);
|
|
130
|
- let today=util.unixtoTime(new Date()/1000,'YYYY-MM-DD');
|
137
|
+ //2019-12-13修改
|
|
|
|
138
|
+ // let today=util.unixtoTime(new Date()/1000,'YYYY-MM-DD');
|
|
131
|
let curtimestamp=new Date()/1000;
|
139
|
let curtimestamp=new Date()/1000;
|
|
132
|
let sectionarr=this.data.sectionlist[index].sectiondur.split('-');
|
140
|
let sectionarr=this.data.sectionlist[index].sectiondur.split('-');
|
|
133
|
- let starttimestamp=Number(util.timetouUnix(today+' '+sectionarr[0]+':00'));
|
|
|
|
134
|
- let endtimestamp=Number(util.timetouUnix(today+' '+sectionarr[1]+':00'));
|
141
|
+ let starttimestamp=Number(util.timetouUnix(this.data.date+' '+sectionarr[0]+':00'));
|
|
|
|
142
|
+ let endtimestamp=Number(util.timetouUnix(this.data.date+' '+sectionarr[1]+':00'));
|
|
135
|
let obj={
|
143
|
let obj={
|
|
136
|
section:selectsection,
|
144
|
section:selectsection,
|
|
137
|
action:action
|
145
|
action:action
|