流量统计文件名导出增加时间后缀
This commit is contained in:
@@ -117,7 +117,7 @@
|
|||||||
}
|
}
|
||||||
// 局点信息
|
// 局点信息
|
||||||
function showActionTransChart(xData,series) {
|
function showActionTransChart(xData,series) {
|
||||||
|
var nowDate=new Date();
|
||||||
var chart = Highcharts.chart('chart',
|
var chart = Highcharts.chart('chart',
|
||||||
{
|
{
|
||||||
chart : {
|
chart : {
|
||||||
@@ -132,7 +132,7 @@
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
exporting : {
|
exporting : {
|
||||||
filename : '<spring:message code="${searchAction}"></spring:message>',
|
filename : '<spring:message code="${searchAction}"></spring:message>'+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate(),
|
||||||
scale : 1,
|
scale : 1,
|
||||||
sourceWidth : 1280,
|
sourceWidth : 1280,
|
||||||
sourceHeight : 500,
|
sourceHeight : 500,
|
||||||
@@ -240,7 +240,7 @@
|
|||||||
(function(H) {
|
(function(H) {
|
||||||
H.Chart.prototype.downloadXLS = function() {
|
H.Chart.prototype.downloadXLS = function() {
|
||||||
var div = document.createElement('div'), xlsxRows = [], xlsxColumns = [];
|
var div = document.createElement('div'), xlsxRows = [], xlsxColumns = [];
|
||||||
|
var nowDate=new Date();
|
||||||
div.style.display = 'none';
|
div.style.display = 'none';
|
||||||
document.body.appendChild(div);
|
document.body.appendChild(div);
|
||||||
rows = this.getDataRows(true);
|
rows = this.getDataRows(true);
|
||||||
@@ -313,6 +313,7 @@
|
|||||||
}(Highcharts));
|
}(Highcharts));
|
||||||
|
|
||||||
function exportCsv(obj){
|
function exportCsv(obj){
|
||||||
|
var nowDate=new Date();
|
||||||
//title ["","",""]
|
//title ["","",""]
|
||||||
var title = obj.title;
|
var title = obj.title;
|
||||||
//titleForKey ["","",""]
|
//titleForKey ["","",""]
|
||||||
@@ -330,7 +331,7 @@
|
|||||||
var uri = 'data:text/csv;charset=utf-8,' + encodeURIComponent(str.join(""));
|
var uri = 'data:text/csv;charset=utf-8,' + encodeURIComponent(str.join(""));
|
||||||
var downloadLink = document.createElement("a");
|
var downloadLink = document.createElement("a");
|
||||||
downloadLink.href = uri;
|
downloadLink.href = uri;
|
||||||
downloadLink.download = "<spring:message code='${searchAction}'/>"+".csv";
|
downloadLink.download = "<spring:message code='${searchAction}'/>"+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+".csv";
|
||||||
document.body.appendChild(downloadLink);
|
document.body.appendChild(downloadLink);
|
||||||
downloadLink.click();
|
downloadLink.click();
|
||||||
document.body.removeChild(downloadLink);
|
document.body.removeChild(downloadLink);
|
||||||
|
|||||||
@@ -99,13 +99,14 @@ function searchList(){
|
|||||||
}
|
}
|
||||||
// 局点信息
|
// 局点信息
|
||||||
function showActionTransChart(xData,series){
|
function showActionTransChart(xData,series){
|
||||||
|
var nowDate=new Date();
|
||||||
var chart = Highcharts.chart('chart', {
|
var chart = Highcharts.chart('chart', {
|
||||||
chart:{
|
chart:{
|
||||||
// type: 'area',
|
// type: 'area',
|
||||||
zoomType: 'x'
|
zoomType: 'x'
|
||||||
},
|
},
|
||||||
exporting: {
|
exporting: {
|
||||||
filename:'<spring:message code="${searchAction}"></spring:message>',
|
filename:'<spring:message code="${searchAction}"></spring:message>'+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate(),
|
||||||
scale:1,
|
scale:1,
|
||||||
sourceWidth: 1280,
|
sourceWidth: 1280,
|
||||||
sourceHeight: 500,
|
sourceHeight: 500,
|
||||||
@@ -284,7 +285,6 @@ function showActionTransChart(xData,series){
|
|||||||
(function(H) {
|
(function(H) {
|
||||||
H.Chart.prototype.downloadCSV = function() {
|
H.Chart.prototype.downloadCSV = function() {
|
||||||
var rows = this.getDataRows(true);
|
var rows = this.getDataRows(true);
|
||||||
var data=new Array();
|
|
||||||
var total = JSON.parse($("#total").val());
|
var total = JSON.parse($("#total").val());
|
||||||
$(rows).each(function (i,d){
|
$(rows).each(function (i,d){
|
||||||
if(d!=null){
|
if(d!=null){
|
||||||
@@ -312,6 +312,7 @@ function showActionTransChart(xData,series){
|
|||||||
}(Highcharts));
|
}(Highcharts));
|
||||||
|
|
||||||
function exportCsv(obj){
|
function exportCsv(obj){
|
||||||
|
var nowDate=new Date();
|
||||||
//title ["","",""]
|
//title ["","",""]
|
||||||
var title = obj.title;
|
var title = obj.title;
|
||||||
//titleForKey ["","",""]
|
//titleForKey ["","",""]
|
||||||
@@ -329,10 +330,10 @@ function showActionTransChart(xData,series){
|
|||||||
var uri = 'data:text/csv;charset=utf-8,' + encodeURIComponent(str.join(""));
|
var uri = 'data:text/csv;charset=utf-8,' + encodeURIComponent(str.join(""));
|
||||||
var downloadLink = document.createElement("a");
|
var downloadLink = document.createElement("a");
|
||||||
downloadLink.href = uri;
|
downloadLink.href = uri;
|
||||||
downloadLink.download = "<spring:message code='${searchAction}'/>"+".csv";
|
downloadLink.download = "<spring:message code='${searchAction}'/>"+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+".csv";
|
||||||
document.body.appendChild(downloadLink);
|
document.body.appendChild(downloadLink);
|
||||||
downloadLink.click();
|
downloadLink.click();
|
||||||
document.body.removeChild(downloadLink);
|
document.body.removeChild(downloadLink);
|
||||||
}
|
}
|
||||||
function sum(arr) {
|
function sum(arr) {
|
||||||
return arr.reduce(function(prev, curr, idx, arr){
|
return arr.reduce(function(prev, curr, idx, arr){
|
||||||
|
|||||||
Reference in New Issue
Block a user