|
@ -274,7 +274,9 @@ function clearData(type){
|
|
|
function loadLineData(type, level, area){
|
|
|
plus.nativeUI.showWaiting();
|
|
|
var now = new Date();
|
|
|
var endDate = now.getFullYear()+'-'+(now.getMonth()*1+1)+'-'+(now.getDate());
|
|
|
var month = (now.getMonth()*1+1)<10?"0"+(now.getMonth()+1):(now.getMonth()+1);
|
|
|
var date = now.getDate()<10?"0"+now.getDate():now.getDate();
|
|
|
var endDate = now.getFullYear()+'-'+month+'-'+date;
|
|
|
monthGap = getMonthByDiff('2017-01-01',endDate);//月份数
|
|
|
var num = Math.ceil(monthGap/5);//5个月为一模块
|
|
|
addSlide(num);
|
|
@ -321,7 +323,8 @@ function lastDate(date){
|
|
|
year = year - 1;
|
|
|
}
|
|
|
var day = new Date(year,month,0).getDate();
|
|
|
var statDate = year+'-'+month+'-'+day;
|
|
|
var newMonth = month<10?"0"+month:month;
|
|
|
var statDate = year+'-'+newMonth+'-'+day;
|
|
|
return statDate;
|
|
|
}
|
|
|
//5个月前
|
|
@ -329,10 +332,12 @@ function fiveMonth(endDate){
|
|
|
var arr = endDate.split('-');
|
|
|
var reduce = arr[1]*1-4;
|
|
|
if(reduce>0){
|
|
|
reduce = reduce<10?"0"+reduce:reduce;
|
|
|
var statDate = arr[0]+'-'+reduce+'-01';
|
|
|
return statDate;
|
|
|
}else{
|
|
|
var statDate = arr[0]*1-1+'-'+(12+reduce*1)+'-01';
|
|
|
var newReduce = (12+reduce*1)<10?"0"+(12+reduce*1):(12+reduce*1);
|
|
|
var statDate = arr[0]*1-1+'-'+newReduce+'-01';
|
|
|
return statDate;
|
|
|
}
|
|
|
}
|