|
...
|
...
|
@@ -27,20 +27,27 @@ Component({ |
|
|
|
this.changesectionstyle(this.data.section);
|
|
|
|
}else{
|
|
|
|
this.changesectionstyle(this.data.sectionlist[0].section);
|
|
|
|
//2019-12-13修改优化
|
|
|
|
let obj={
|
|
|
|
section:this.data.sectionlist[0].section,
|
|
|
|
action:'defalut',
|
|
|
|
time:this.data.sectionlist[0].sectiondur.split('-')[0]
|
|
|
|
}
|
|
|
|
this.triggerEvent('selectsection',obj)
|
|
|
|
}
|
|
|
|
let obj={
|
|
|
|
section:this.data.section ? this.data.section : this.data.sectionlist[0].section,
|
|
|
|
action:'defalut',
|
|
|
|
time:this.data.sectionlist[0].sectiondur.split('-')[0]
|
|
|
|
}
|
|
|
|
if(this.data.section){
|
|
|
|
this.data.sectionlist.forEach((v,i)=>{
|
|
|
|
if(this.data.section==v.section){
|
|
|
|
obj.time=v.sectiondur.split('-')[0]
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
this.triggerEvent('selectsection',obj)
|
|
|
|
// let obj={
|
|
|
|
// section:this.data.section ? this.data.section : this.data.sectionlist[0].section,
|
|
|
|
// action:'defalut',
|
|
|
|
// time:this.data.sectionlist[0].sectiondur.split('-')[0]
|
|
|
|
// }
|
|
|
|
// if(this.data.section){
|
|
|
|
// this.data.sectionlist.forEach((v,i)=>{
|
|
|
|
// if(this.data.section==v.section){
|
|
|
|
// obj.time=v.sectiondur.split('-')[0]
|
|
|
|
// }
|
|
|
|
// })
|
|
|
|
// }
|
|
|
|
// this.triggerEvent('selectsection',obj)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
...
|
...
|
@@ -127,11 +134,12 @@ Component({ |
|
|
|
//通知时段
|
|
|
|
tellsection(selectsection,action,index){
|
|
|
|
console.log(index);
|
|
|
|
let today=util.unixtoTime(new Date()/1000,'YYYY-MM-DD');
|
|
|
|
//2019-12-13修改
|
|
|
|
// let today=util.unixtoTime(new Date()/1000,'YYYY-MM-DD');
|
|
|
|
let curtimestamp=new Date()/1000;
|
|
|
|
let sectionarr=this.data.sectionlist[index].sectiondur.split('-');
|
|
|
|
let starttimestamp=Number(util.timetouUnix(today+' '+sectionarr[0]+':00'));
|
|
|
|
let endtimestamp=Number(util.timetouUnix(today+' '+sectionarr[1]+':00'));
|
|
|
|
let starttimestamp=Number(util.timetouUnix(this.data.date+' '+sectionarr[0]+':00'));
|
|
|
|
let endtimestamp=Number(util.timetouUnix(this.data.date+' '+sectionarr[1]+':00'));
|
|
|
|
let obj={
|
|
|
|
section:selectsection,
|
|
|
|
action:action
|
...
|
...
|
|