|
...
|
...
|
@@ -46,21 +46,23 @@ Component({ |
|
|
|
}
|
|
|
|
let durlist=[];
|
|
|
|
for(let key in timedur){
|
|
|
|
let arr=timedur[key].split('-');
|
|
|
|
//每个时段的开始时间、结束时间
|
|
|
|
let starttime=Number(arr[0].split(':')[0]);
|
|
|
|
let endtime=Number(arr[1].split(':')[0]);
|
|
|
|
if(util.unixtoTime(date/1000,'YYYY-MM-DD')==this.data.date){
|
|
|
|
if(currenttimemark+0.5<endtime){
|
|
|
|
if(currenttimemark+0.5>starttime){
|
|
|
|
starttime=Math.round(currenttimemark)+0.5;
|
|
|
|
if(timedur[key]!=""){
|
|
|
|
let arr=timedur[key].split('-');
|
|
|
|
//每个时段的开始时间、结束时间
|
|
|
|
let starttime=Number(arr[0].split(':')[0]);
|
|
|
|
let endtime=Number(arr[1].split(':')[0]);
|
|
|
|
if(util.unixtoTime(date/1000,'YYYY-MM-DD')==this.data.date){ //当天
|
|
|
|
if(currenttimemark+0.5<endtime){
|
|
|
|
if(currenttimemark+0.5>starttime){
|
|
|
|
starttime=Math.round(currenttimemark)+0.5;
|
|
|
|
}
|
|
|
|
let thisdurlist=this.getsinglelist(starttime,endtime)
|
|
|
|
durlist=durlist.concat(thisdurlist)
|
|
|
|
}
|
|
|
|
let thisdurlist=this.getsinglelist(starttime,endtime)
|
|
|
|
}else{
|
|
|
|
let thisdurlist=this.getsinglelist(starttime,endtime);
|
|
|
|
durlist=durlist.concat(thisdurlist)
|
|
|
|
}
|
|
|
|
}else{
|
|
|
|
let thisdurlist=this.getsinglelist(starttime,endtime);
|
|
|
|
durlist=durlist.concat(thisdurlist)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.setData({
|
...
|
...
|
|