diff --git a/src/main/webapp/WEB-INF/views/dashboard/ntcTotalReportDetailList.jsp b/src/main/webapp/WEB-INF/views/dashboard/ntcTotalReportDetailList.jsp
index 285b8f050..e788ccec9 100644
--- a/src/main/webapp/WEB-INF/views/dashboard/ntcTotalReportDetailList.jsp
+++ b/src/main/webapp/WEB-INF/views/dashboard/ntcTotalReportDetailList.jsp
@@ -117,7 +117,7 @@
}
// 局点信息
function showActionTransChart(xData,series) {
-
+ var nowDate=new Date();
var chart = Highcharts.chart('chart',
{
chart : {
@@ -132,7 +132,7 @@
},
},
exporting : {
- filename : '',
+ filename : ''+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate(),
scale : 1,
sourceWidth : 1280,
sourceHeight : 500,
@@ -240,7 +240,7 @@
(function(H) {
H.Chart.prototype.downloadXLS = function() {
var div = document.createElement('div'), xlsxRows = [], xlsxColumns = [];
-
+ var nowDate=new Date();
div.style.display = 'none';
document.body.appendChild(div);
rows = this.getDataRows(true);
@@ -313,6 +313,7 @@
}(Highcharts));
function exportCsv(obj){
+ var nowDate=new Date();
//title ["","",""]
var title = obj.title;
//titleForKey ["","",""]
@@ -330,7 +331,7 @@
var uri = 'data:text/csv;charset=utf-8,' + encodeURIComponent(str.join(""));
var downloadLink = document.createElement("a");
downloadLink.href = uri;
- downloadLink.download = ""+".csv";
+ downloadLink.download = ""+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+".csv";
document.body.appendChild(downloadLink);
downloadLink.click();
document.body.removeChild(downloadLink);
diff --git a/src/main/webapp/WEB-INF/views/dashboard/trafficActionTransList.jsp b/src/main/webapp/WEB-INF/views/dashboard/trafficActionTransList.jsp
index 1bcc56861..a55169841 100644
--- a/src/main/webapp/WEB-INF/views/dashboard/trafficActionTransList.jsp
+++ b/src/main/webapp/WEB-INF/views/dashboard/trafficActionTransList.jsp
@@ -99,13 +99,14 @@ function searchList(){
}
// 局点信息
function showActionTransChart(xData,series){
+ var nowDate=new Date();
var chart = Highcharts.chart('chart', {
chart:{
// type: 'area',
zoomType: 'x'
},
exporting: {
- filename:'',
+ filename:''+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate(),
scale:1,
sourceWidth: 1280,
sourceHeight: 500,
@@ -284,7 +285,6 @@ function showActionTransChart(xData,series){
(function(H) {
H.Chart.prototype.downloadCSV = function() {
var rows = this.getDataRows(true);
- var data=new Array();
var total = JSON.parse($("#total").val());
$(rows).each(function (i,d){
if(d!=null){
@@ -312,6 +312,7 @@ function showActionTransChart(xData,series){
}(Highcharts));
function exportCsv(obj){
+ var nowDate=new Date();
//title ["","",""]
var title = obj.title;
//titleForKey ["","",""]
@@ -329,10 +330,10 @@ function showActionTransChart(xData,series){
var uri = 'data:text/csv;charset=utf-8,' + encodeURIComponent(str.join(""));
var downloadLink = document.createElement("a");
downloadLink.href = uri;
- downloadLink.download = ""+".csv";
+ downloadLink.download = ""+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+".csv";
document.body.appendChild(downloadLink);
downloadLink.click();
- document.body.removeChild(downloadLink);
+ document.body.removeChild(downloadLink);
}
function sum(arr) {
return arr.reduce(function(prev, curr, idx, arr){