添加国际化 同时导出文件名后缀加时间戳
This commit is contained in:
@@ -200,6 +200,7 @@ function showActionTransChart(rs){
|
|||||||
}
|
}
|
||||||
|
|
||||||
(function(H) {
|
(function(H) {
|
||||||
|
var nowDate=new Date();
|
||||||
H.Chart.prototype.downloadXLS = function() {
|
H.Chart.prototype.downloadXLS = function() {
|
||||||
var start=$("#beginDate").val();
|
var start=$("#beginDate").val();
|
||||||
var end=$("#endDate").val();
|
var end=$("#endDate").val();
|
||||||
@@ -220,7 +221,7 @@ function showActionTransChart(rs){
|
|||||||
var a =new Array();
|
var a =new Array();
|
||||||
a.push({
|
a.push({
|
||||||
type:'string',
|
type:'string',
|
||||||
value:'Total'
|
value:'<spring:message code="total"></spring:message>'
|
||||||
})
|
})
|
||||||
|
|
||||||
if(xlsxRows!=null&&xlsxRows!=undefined&&xlsxRows.length>0){
|
if(xlsxRows!=null&&xlsxRows!=undefined&&xlsxRows.length>0){
|
||||||
@@ -241,7 +242,7 @@ function showActionTransChart(rs){
|
|||||||
var b =new Array();
|
var b =new Array();
|
||||||
b.push({
|
b.push({
|
||||||
type:'string',
|
type:'string',
|
||||||
value:'searchTime'
|
value:'<spring:message code="${searchAction}"></spring:message>'
|
||||||
})
|
})
|
||||||
b.push({
|
b.push({
|
||||||
type:"string",
|
type:"string",
|
||||||
@@ -252,7 +253,7 @@ function showActionTransChart(rs){
|
|||||||
|
|
||||||
|
|
||||||
zipcelx({
|
zipcelx({
|
||||||
filename: 'Bolck',
|
filename: '<spring:message code="${searchAction}"></spring:message>'+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate(),
|
||||||
sheet: {
|
sheet: {
|
||||||
data: xlsxRows
|
data: xlsxRows
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -417,6 +417,7 @@ function showBandwidthChart(id,unitType,xdata,ydata,title){
|
|||||||
|
|
||||||
}
|
}
|
||||||
(function(H) {
|
(function(H) {
|
||||||
|
var nowDate=new Date();
|
||||||
H.Chart.prototype.downloadXLS = function() {
|
H.Chart.prototype.downloadXLS = function() {
|
||||||
var start=$("#beginDate").val();
|
var start=$("#beginDate").val();
|
||||||
var end=$("#endDate").val();
|
var end=$("#endDate").val();
|
||||||
@@ -437,7 +438,7 @@ function showBandwidthChart(id,unitType,xdata,ydata,title){
|
|||||||
var a =new Array();
|
var a =new Array();
|
||||||
a.push({
|
a.push({
|
||||||
type:'string',
|
type:'string',
|
||||||
value:'Total'
|
value:'<spring:message code="total"></spring:message>'
|
||||||
})
|
})
|
||||||
|
|
||||||
if(xlsxRows!=null&&xlsxRows!=undefined&&xlsxRows.length>0){
|
if(xlsxRows!=null&&xlsxRows!=undefined&&xlsxRows.length>0){
|
||||||
@@ -458,7 +459,7 @@ function showBandwidthChart(id,unitType,xdata,ydata,title){
|
|||||||
var b =new Array();
|
var b =new Array();
|
||||||
b.push({
|
b.push({
|
||||||
type:'string',
|
type:'string',
|
||||||
value:'searchTime'
|
value:'<spring:message code="traffic"></spring:message>'
|
||||||
})
|
})
|
||||||
b.push({
|
b.push({
|
||||||
type:"string",
|
type:"string",
|
||||||
@@ -469,7 +470,7 @@ function showBandwidthChart(id,unitType,xdata,ydata,title){
|
|||||||
|
|
||||||
|
|
||||||
zipcelx({
|
zipcelx({
|
||||||
filename: 'Traffic',
|
filename: '<spring:message code="traffic"></spring:message>'+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate(),
|
||||||
sheet: {
|
sheet: {
|
||||||
data: xlsxRows
|
data: xlsxRows
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -345,6 +345,7 @@ function showIpActiveChart(rs){
|
|||||||
|
|
||||||
}
|
}
|
||||||
(function(H) {
|
(function(H) {
|
||||||
|
var nowDate=new Date();
|
||||||
H.Chart.prototype.downloadXLS = function() {
|
H.Chart.prototype.downloadXLS = function() {
|
||||||
var div = document.createElement('div'),
|
var div = document.createElement('div'),
|
||||||
xlsxRows = [],
|
xlsxRows = [],
|
||||||
@@ -366,7 +367,7 @@ function showIpActiveChart(rs){
|
|||||||
var b =new Array();
|
var b =new Array();
|
||||||
b.push({
|
b.push({
|
||||||
type:'string',
|
type:'string',
|
||||||
value:'IP-Active'
|
value:'<spring:message code="traffic_ipactive_hour_trend"></spring:message>'
|
||||||
})
|
})
|
||||||
b.push({
|
b.push({
|
||||||
type:"string",
|
type:"string",
|
||||||
@@ -377,7 +378,7 @@ function showIpActiveChart(rs){
|
|||||||
var a =new Array();
|
var a =new Array();
|
||||||
a.push({
|
a.push({
|
||||||
type:'string',
|
type:'string',
|
||||||
value:'Total'
|
value:'<spring:message code="total"></spring:message>'
|
||||||
})
|
})
|
||||||
var total=total=JSON.parse($("#total").val());
|
var total=total=JSON.parse($("#total").val());
|
||||||
$(total).each(function(i, d) {
|
$(total).each(function(i, d) {
|
||||||
@@ -388,7 +389,7 @@ function showIpActiveChart(rs){
|
|||||||
})
|
})
|
||||||
xlsxRows.push(a)
|
xlsxRows.push(a)
|
||||||
zipcelx({
|
zipcelx({
|
||||||
filename: 'IP-Active',
|
filename: '<spring:message code="traffic_ipactive_hour_trend"></spring:message>'+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate(),
|
||||||
sheet: {
|
sheet: {
|
||||||
data: xlsxRows
|
data: xlsxRows
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user