添加国际化 同时导出文件名后缀加时间戳

This commit is contained in:
tanghao
2018-12-24 21:26:29 +08:00
parent 6a4e5f7959
commit 3e9bcc3340
3 changed files with 12 additions and 9 deletions

View File

@@ -200,6 +200,7 @@ function showActionTransChart(rs){
}
(function(H) {
var nowDate=new Date();
H.Chart.prototype.downloadXLS = function() {
var start=$("#beginDate").val();
var end=$("#endDate").val();
@@ -220,7 +221,7 @@ function showActionTransChart(rs){
var a =new Array();
a.push({
type:'string',
value:'Total'
value:'<spring:message code="total"></spring:message>'
})
if(xlsxRows!=null&&xlsxRows!=undefined&&xlsxRows.length>0){
@@ -241,7 +242,7 @@ function showActionTransChart(rs){
var b =new Array();
b.push({
type:'string',
value:'searchTime'
value:'<spring:message code="${searchAction}"></spring:message>'
})
b.push({
type:"string",
@@ -252,7 +253,7 @@ function showActionTransChart(rs){
zipcelx({
filename: 'Bolck',
filename: '<spring:message code="${searchAction}"></spring:message>'+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate(),
sheet: {
data: xlsxRows
}

View File

@@ -417,6 +417,7 @@ function showBandwidthChart(id,unitType,xdata,ydata,title){
}
(function(H) {
var nowDate=new Date();
H.Chart.prototype.downloadXLS = function() {
var start=$("#beginDate").val();
var end=$("#endDate").val();
@@ -437,7 +438,7 @@ function showBandwidthChart(id,unitType,xdata,ydata,title){
var a =new Array();
a.push({
type:'string',
value:'Total'
value:'<spring:message code="total"></spring:message>'
})
if(xlsxRows!=null&&xlsxRows!=undefined&&xlsxRows.length>0){
@@ -458,7 +459,7 @@ function showBandwidthChart(id,unitType,xdata,ydata,title){
var b =new Array();
b.push({
type:'string',
value:'searchTime'
value:'<spring:message code="traffic"></spring:message>'
})
b.push({
type:"string",
@@ -469,7 +470,7 @@ function showBandwidthChart(id,unitType,xdata,ydata,title){
zipcelx({
filename: 'Traffic',
filename: '<spring:message code="traffic"></spring:message>'+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate(),
sheet: {
data: xlsxRows
}

View File

@@ -345,6 +345,7 @@ function showIpActiveChart(rs){
}
(function(H) {
var nowDate=new Date();
H.Chart.prototype.downloadXLS = function() {
var div = document.createElement('div'),
xlsxRows = [],
@@ -366,7 +367,7 @@ function showIpActiveChart(rs){
var b =new Array();
b.push({
type:'string',
value:'IP-Active'
value:'<spring:message code="traffic_ipactive_hour_trend"></spring:message>'
})
b.push({
type:"string",
@@ -377,7 +378,7 @@ function showIpActiveChart(rs){
var a =new Array();
a.push({
type:'string',
value:'Total'
value:'<spring:message code="total"></spring:message>'
})
var total=total=JSON.parse($("#total").val());
$(total).each(function(i, d) {
@@ -388,7 +389,7 @@ function showIpActiveChart(rs){
})
xlsxRows.push(a)
zipcelx({
filename: 'IP-Active',
filename: '<spring:message code="traffic_ipactive_hour_trend"></spring:message>'+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate(),
sheet: {
data: xlsxRows
}