NEZ-428 fix:修复overview 流量统计图x轴时区显示问题 & 修复所有页面设置表头后切换语言的显示bug
This commit is contained in:
@@ -535,6 +535,7 @@
|
||||
this.tools.customTableTitle = localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + this.$route.path)
|
||||
? JSON.parse(localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + this.$route.path))
|
||||
: this.tableTitle;
|
||||
this.tableTitleReset(this.tableTitle,this.tools.customTableTitle);
|
||||
//是否存在分页缓存
|
||||
let pageSize = localStorage.getItem('nz-pageSize-' + localStorage.getItem('nz-username') + '-' + this.tableId);
|
||||
if (pageSize != 'undefined' && pageSize != null) {
|
||||
|
||||
@@ -685,6 +685,7 @@
|
||||
this.tools.customTableTitle = localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + this.$route.path)
|
||||
? JSON.parse(localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + this.$route.path))
|
||||
: this.tableTitle;
|
||||
this.tableTitleReset(this.tableTitle,this.tools.customTableTitle);
|
||||
//是否存在分页缓存
|
||||
let pageSize = localStorage.getItem('nz-pageSize-' + localStorage.getItem('nz-username') + '-' + this.tableId);
|
||||
if (pageSize != 'undefined' && pageSize != null) {
|
||||
|
||||
@@ -737,6 +737,8 @@
|
||||
? JSON.parse(localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + this.$route.path))
|
||||
: this.tableTitle;
|
||||
|
||||
this.tableTitleReset(this.tableTitle,tableTitle);
|
||||
|
||||
if (this.assetPingSwitch == 'off') {
|
||||
this.dispatchEvent('asset-ping-switch-change',false)
|
||||
for (let i in tableTitle) {
|
||||
|
||||
@@ -365,6 +365,7 @@
|
||||
this.tools.customTableTitle = localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + this.$route.path)
|
||||
? JSON.parse(localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + this.$route.path))
|
||||
: this.tableTitle;
|
||||
this.tableTitleReset(this.tableTitle,this.tools.customTableTitle);
|
||||
//是否存在分页缓存
|
||||
let pageSize = localStorage.getItem('nz-pageSize-' + localStorage.getItem('nz-username') + '-' + this.tableId);
|
||||
if (pageSize != 'undefined' && pageSize != null) {
|
||||
|
||||
@@ -448,6 +448,7 @@
|
||||
this.tools.customTableTitle = localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + this.$route.path)
|
||||
? JSON.parse(localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + this.$route.path))
|
||||
: this.tableTitle;
|
||||
this.tableTitleReset(this.tableTitle,this.tools.customTableTitle);
|
||||
//是否存在分页缓存
|
||||
let pageSize = localStorage.getItem('nz-pageSize-' + localStorage.getItem('nz-username') + '-' + this.tableId);
|
||||
if (pageSize != 'undefined' && pageSize != null) {
|
||||
|
||||
@@ -336,6 +336,7 @@
|
||||
this.tools.customTableTitle = localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + this.$route.path)
|
||||
? JSON.parse(localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + this.$route.path))
|
||||
: this.tableTitle;
|
||||
this.tableTitleReset(this.tableTitle,this.tools.customTableTitle);
|
||||
//是否存在分页缓存
|
||||
let pageSize = localStorage.getItem('nz-pageSize-' + localStorage.getItem('nz-username') + '-' + this.tableId);
|
||||
if (pageSize != 'undefined' && pageSize != null) {
|
||||
|
||||
@@ -336,6 +336,7 @@
|
||||
this.tools.customTableTitle = localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + this.$route.path)
|
||||
? JSON.parse(localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + this.$route.path))
|
||||
: this.tableTitle;
|
||||
this.tableTitleReset(this.tableTitle,this.tools.customTableTitle);
|
||||
//是否存在分页缓存
|
||||
let pageSize = localStorage.getItem('nz-pageSize-' + localStorage.getItem('nz-username') + '-' + this.tableId);
|
||||
if (pageSize != 'undefined' && pageSize != null) {
|
||||
|
||||
@@ -272,6 +272,7 @@
|
||||
this.tools.customTableTitle = localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + this.$route.path)
|
||||
? JSON.parse(localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + this.$route.path))
|
||||
: this.tableTitle;
|
||||
this.tableTitleReset(this.tableTitle,this.tools.customTableTitle);
|
||||
//是否存在分页缓存
|
||||
let pageSize = localStorage.getItem('nz-pageSize-' + localStorage.getItem('nz-username') + '-' + this.tableId);
|
||||
if (pageSize && pageSize != 'undefined') {
|
||||
|
||||
@@ -406,6 +406,7 @@
|
||||
this.tools.customTableTitle = localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + this.$route.path)
|
||||
? JSON.parse(localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + this.$route.path))
|
||||
: this.tableTitle;
|
||||
this.tableTitleReset(this.tableTitle,this.tools.customTableTitle);
|
||||
//是否存在分页缓存
|
||||
let pageSize = localStorage.getItem('nz-pageSize-' + localStorage.getItem('nz-username') + '-' + this.tableId);
|
||||
if (pageSize != 'undefined' && pageSize != null) {
|
||||
|
||||
@@ -290,6 +290,7 @@
|
||||
this.tools.customTableTitle = localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + this.$route.path)
|
||||
? JSON.parse(localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + this.$route.path))
|
||||
: this.tableTitle;
|
||||
this.tableTitleReset(this.tableTitle,this.tools.customTableTitle);
|
||||
//是否存在分页缓存
|
||||
let pageSize = localStorage.getItem('nz-pageSize-' + localStorage.getItem('nz-username') + '-' + this.tableId);
|
||||
if (pageSize && pageSize != 'undefined') {
|
||||
|
||||
@@ -163,6 +163,18 @@
|
||||
this.option.yAxis.axisLabel.formatter=this.defaultYAxisFormatter
|
||||
}
|
||||
}
|
||||
if(this.chartType == 'overviewLine'){
|
||||
this.option.xAxis.axisLabel.formatter=function(value,index){
|
||||
value=bus.computeTimezone(value)
|
||||
let t_date = new Date(value);
|
||||
let month=t_date.getMonth()+1>9?t_date.getMonth()+1:'0'+(t_date.getMonth()+1);
|
||||
let day = t_date.getDate()>9?t_date.getDate():'0'+t_date.getDate();
|
||||
let hour = t_date.getHours()>9?t_date.getHours():'0'+t_date.getHours();
|
||||
let minute=t_date.getMinutes()>9?t_date.getMinutes():'0'+t_date.getMinutes();
|
||||
return [ month, day].join('-') + "\n"
|
||||
+ [hour, minute].join(':');
|
||||
}
|
||||
}
|
||||
if(this.series){
|
||||
this.$set(this.option,'series',this.series);
|
||||
this.noData=false;
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
type: 'time',
|
||||
// boundaryGap: false,//line-false; bar-true;
|
||||
axisLabel: {
|
||||
intervale: 0,
|
||||
interval: 0,
|
||||
rotate: 0,
|
||||
formatter: function (value) {
|
||||
value=value
|
||||
@@ -313,19 +313,6 @@
|
||||
},
|
||||
toolbox:{
|
||||
show:false,
|
||||
top:'0',
|
||||
showTitle:false,
|
||||
tooltip:{
|
||||
show:false,
|
||||
},
|
||||
feature:{
|
||||
dataZoom:{
|
||||
yAxisIndex:false
|
||||
},
|
||||
magicType:{
|
||||
type:['stack']
|
||||
},
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
@@ -344,22 +331,8 @@
|
||||
xAxis: {
|
||||
type: 'time',
|
||||
axisLabel: {
|
||||
intervale: 0,
|
||||
rotate: 0,
|
||||
formatter: function (value) {
|
||||
value = bus.computeTimezone(value)
|
||||
let now = bus.computeTimezone(new Date().getTime());
|
||||
let t_date = new Date(value);
|
||||
let hhmm = [t_date.getHours(), t_date.getMinutes() < 10 ? "0" + t_date.getMinutes() : t_date.getMinutes()].join(':');
|
||||
let mmdd = [t_date.getMonth() + 1, t_date.getDate() < 10 ? "0" + t_date.getDate() : t_date.getDate()].join('/');
|
||||
if (now-value < 1000*60*60*24) {
|
||||
return hhmm;
|
||||
} else if (now-value >= 1000*60*60*24 && now-value < 1000*60*60*24*30) {
|
||||
return mmdd + " " + hhmm;
|
||||
} else {
|
||||
return mmdd;
|
||||
}
|
||||
},
|
||||
|
||||
fontSize: 13*window.devicePixelRatio
|
||||
},
|
||||
axisPointer: {//y轴上显示指针对应的值
|
||||
|
||||
@@ -112,7 +112,15 @@ Vue.mixin({
|
||||
if(time){
|
||||
return bus.timeFormate(this.timezoneToUtcTime(time),format)
|
||||
}
|
||||
},
|
||||
tableTitleReset:function(src,dist){
|
||||
dist.forEach(item=>{
|
||||
let title=src.find(t=>t.prop == item.prop)
|
||||
if(title&&title.label){
|
||||
item.label=title.label;
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user