|
|
@@ -153,7 +153,7 @@ |
|
|
|
</div> |
|
|
|
<div id ="pro_detail" style="display:none;width: 100%;"> |
|
|
|
<div style="margin-top: 10px;"> |
|
|
|
<b class="pro_item">{{this.ownerName}}/{{this.pro_name}}</b> <span class="update_time">数据更新时间:</span><span style="font-size: 12px;">{{tableDataIDTotal.lastUpdatedTime}} / 从{{tableDataIDTotal.recordBeginTime}}开始</span> |
|
|
|
<b class="pro_item">{{this.ownerName}} / {{this.pro_name}}</b> <span class="update_time">数据更新时间:</span><span style="font-size: 12px;">{{tableDataIDTotal.lastUpdatedTime}} / 从{{tableDataIDTotal.recordBeginTime}}开始</span> |
|
|
|
</div> |
|
|
|
<div style="margin-top: 10px;"> |
|
|
|
项目描述:{{tableDataIDTotal.description | discriptionFun}} |
|
|
@@ -402,6 +402,9 @@ |
|
|
|
var nowMonth = now.getMonth(); // 当前月 |
|
|
|
var nowYear = now.getFullYear(); // 当前年 |
|
|
|
var today = this.saveFormatDate(nowYear,nowMonth+1,nowDay); |
|
|
|
var tmp = new Date(now.setTime(now.getTime()-24*60*60*1000)); |
|
|
|
var yesterday = this.saveFormatDate(tmp.getFullYear(),tmp.getMonth()+1,tmp.getDate()); |
|
|
|
var yesterday_tmp = this.formatDate(tmp.getFullYear(),tmp.getMonth()+1,tmp.getDate()) |
|
|
|
|
|
|
|
let lastMonthDate = new Date(); // 上月日期 |
|
|
|
lastMonthDate.setDate(1); |
|
|
@@ -413,16 +416,22 @@ |
|
|
|
var saveFileName = '' |
|
|
|
|
|
|
|
if (typeof this.paramsID.type=="undefined" || this.paramsID.type=="null" || this.paramsID.type==""){ |
|
|
|
startDate= this.saveFormatDate(this.create_time_pro[0].getFullYear(),this.create_time_pro[0].getMonth() + 1,this.create_time_pro[0].getDate()); |
|
|
|
|
|
|
|
// startDate= this.saveFormatDate(this.create_time_pro[0].getFullYear(),this.create_time_pro[0].getMonth() + 1,this.create_time_pro[0].getDate()); |
|
|
|
endDate = this.saveFormatDate(this.create_time_pro[1].getFullYear(),this.create_time_pro[1].getMonth() + 1,this.create_time_pro[1].getDate()); |
|
|
|
|
|
|
|
var tmp = this.formatDate(this.create_time_pro[0].getFullYear(),this.create_time_pro[0].getMonth() + 1,this.create_time_pro[0].getDate()) |
|
|
|
startDate = this.comparedate(tmp,this.recordBeginTime) |
|
|
|
|
|
|
|
console.log("comparedate:"+startDate) |
|
|
|
saveFileName = this.pro_name+"_"+startDate+'_'+endDate |
|
|
|
}else{ |
|
|
|
switch(this.paramsID.type){ |
|
|
|
case "yesterday":{ |
|
|
|
var now = new Date(); |
|
|
|
var tmp = new Date(now.setTime(now.getTime()-24*60*60*1000)); |
|
|
|
startDate = this.saveFormatDate(tmp.getFullYear(),tmp.getMonth()+1,tmp.getDate()); |
|
|
|
endDate = today |
|
|
|
|
|
|
|
startDate = this.comparedate(yesterday_tmp,this.recordBeginTime) |
|
|
|
endDate = startDate |
|
|
|
|
|
|
|
saveFileName = this.pro_name+"_"+startDate+'_'+ endDate |
|
|
|
break |
|
|
|
} |
|
|
@@ -430,42 +439,53 @@ |
|
|
|
var now = new Date(); // 当前日期 |
|
|
|
var nowDayOfWeek = now.getDay(); // 今天本周的第几天 |
|
|
|
var day = nowDayOfWeek || 7; |
|
|
|
startDate = this.saveFormatDate(now.getFullYear(), nowMonth+1, nowDay + 1 - day); |
|
|
|
endDate = today |
|
|
|
startDate = this.formatDate(now.getFullYear(), nowMonth+1, nowDay + 1 - day); |
|
|
|
startDate = this.comparedate(startDate,this.recordBeginTime) |
|
|
|
|
|
|
|
|
|
|
|
endDate = yesterday |
|
|
|
saveFileName = this.pro_name+"_"+startDate+'_'+ endDate |
|
|
|
break |
|
|
|
} |
|
|
|
case "current_month":{ |
|
|
|
startDate = this.saveFormatDate(nowYear,nowMonth+1,1); |
|
|
|
endDate = today |
|
|
|
|
|
|
|
startDate = this.formatDate(nowYear,nowMonth+1,1); |
|
|
|
startDate = this.comparedate(startDate,this.recordBeginTime) |
|
|
|
|
|
|
|
endDate = yesterday |
|
|
|
|
|
|
|
saveFileName = this.pro_name+"_"+startDate+'_'+ endDate |
|
|
|
break |
|
|
|
} |
|
|
|
case "last_month":{ |
|
|
|
startDate=this.saveFormatDate(nowYear, lastMonth+1, 1); |
|
|
|
endDate=this.saveFormatDate(nowYear, lastMonth+1, this.saveFormatDate(nowYear,lastMonth)); |
|
|
|
endDate = today |
|
|
|
startDate=this.formatDate(nowYear, lastMonth+1, 1); |
|
|
|
startDate = this.comparedate(startDate,this.recordBeginTime) |
|
|
|
|
|
|
|
endDate=this.saveFormatDate(nowYear, lastMonth+1, this.saveFormatDate(nowYear,lastMonth)); |
|
|
|
saveFileName = this.pro_name+"_"+startDate+'_'+ endDate |
|
|
|
break |
|
|
|
|
|
|
|
} |
|
|
|
case "monthly":{ |
|
|
|
var temp=new Date(now - 1000 * 60 * 60 * 24 * 30) |
|
|
|
startDate = this.saveFormatDate(temp.getFullYear(),temp.getMonth()+1,temp.getDate()); |
|
|
|
endDate = today |
|
|
|
startDate = this.formatDate(temp.getFullYear(),temp.getMonth()+1,temp.getDate()); |
|
|
|
startDate = this.comparedate(startDate,this.recordBeginTime) |
|
|
|
|
|
|
|
endDate = yesterday |
|
|
|
saveFileName = this.pro_name+"_"+startDate+'_'+ endDate |
|
|
|
break |
|
|
|
} |
|
|
|
case "current_year":{ |
|
|
|
startDate = this.saveFormatDate(now.getFullYear(), 1, 1); |
|
|
|
endDate = today |
|
|
|
startDate = this.formatDate(now.getFullYear(), 1, 1); |
|
|
|
startDate = this.comparedate(startDate,this.recordBeginTime) |
|
|
|
|
|
|
|
endDate = yesterday |
|
|
|
saveFileName = this.pro_name+"_"+startDate+'_'+ endDate |
|
|
|
break |
|
|
|
} |
|
|
|
case "all":{ |
|
|
|
console.log("e:"+today) |
|
|
|
startDate = 'all' |
|
|
|
endDate = today |
|
|
|
endDate = yesterday |
|
|
|
saveFileName = this.pro_name+'_所有' |
|
|
|
break |
|
|
|
} |
|
|
@@ -958,7 +978,21 @@ |
|
|
|
this.echartsSelectData.setOption(this.option); |
|
|
|
// }); |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
comparedate(date1,date2){ |
|
|
|
console.log("date1:"+date1) |
|
|
|
console.log("date1:"+date2) |
|
|
|
var oDate1 = new Date(date1); |
|
|
|
var oDate2 = new Date(date2); |
|
|
|
if(oDate1.getTime() < oDate2.getTime()){ |
|
|
|
var data = date2.split('-') |
|
|
|
return data[0]+''+data[1]+''+data[2] |
|
|
|
} else { |
|
|
|
var data = date1.split('-') |
|
|
|
return data[0]+''+data[1]+''+data[2] |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
filters:{ |
|
|
|
|
|
|
|