NEZ-2351 fix:terminal log command 二级页面时间时区错误

This commit is contained in:
zhangyu
2022-11-02 11:30:05 +08:00
parent 5974f4f0c4
commit 4426f06099
4 changed files with 5 additions and 5 deletions

View File

@@ -1,7 +1,6 @@
<template> <template>
<nz-bottom-data-list <nz-bottom-data-list
:showTitle='showTitle' :showTitle='showTitle'
:tableId="tableId"
:obj='obj' :obj='obj'
:layout="[]" :layout="[]"
:tabs="tabs" :tabs="tabs"
@@ -51,10 +50,10 @@ export default {
calcTime () { calcTime () {
return function (time) { return function (time) {
if (this.obj.startTime) { if (this.obj.startTime) {
const startTime = new Date(this.obj.startTime).getTime() const startTime = new Date(this.utcTimeToTimezoneStr(this.obj.startTime)).getTime()
if (startTime) { if (startTime) {
const thisTime = startTime + time const thisTime = startTime + time
return this.dateFormat(thisTime) return this.momentTz(thisTime)
} }
} }
return '-' return '-'

View File

@@ -6,7 +6,6 @@
:tabs="tabs" :tabs="tabs"
:targetTab="targetTab" :targetTab="targetTab"
@changeTab="changeTab" @changeTab="changeTab"
:tableId="tableId"
:title="'Session ID'" :title="'Session ID'"
> >
<template v-slot:title><span :title="obj.uuid.substring(0, 8).toUpperCase()">{{obj.uuid.substring(0, 8).toUpperCase()}}</span></template> <template v-slot:title><span :title="obj.uuid.substring(0, 8).toUpperCase()">{{obj.uuid.substring(0, 8).toUpperCase()}}</span></template>

View File

@@ -2,7 +2,6 @@
<nz-bottom-data-list <nz-bottom-data-list
:showTitle='showTitle' :showTitle='showTitle'
:obj='obj' :obj='obj'
:tableId="tableId"
:layout="[]" :layout="[]"
:tabs="tabs" :tabs="tabs"
:targetTab="targetTab" :targetTab="targetTab"

View File

@@ -1321,6 +1321,9 @@ export default {
} else if (this.$refs.dataDetail) { } else if (this.$refs.dataDetail) {
tableTitle = this.$refs.dataDetail.tableTitle tableTitle = this.$refs.dataDetail.tableTitle
} }
if (!tableTitle || !this.tableId) {
return
}
let localStorageTableTitle = localStorage.getItem('nz-tableTitle-' + localStorage.getItem('nz-username') + '-' + this.tableId) let localStorageTableTitle = localStorage.getItem('nz-tableTitle-' + localStorage.getItem('nz-username') + '-' + this.tableId)
localStorageTableTitle = localStorageTableTitle ? JSON.parse(localStorageTableTitle) : tableTitle localStorageTableTitle = localStorageTableTitle ? JSON.parse(localStorageTableTitle) : tableTitle
this.tools.customTableTitle = tableTitle.map((item, index) => { // 修复切换中英文的问题 this.tools.customTableTitle = tableTitle.map((item, index) => { // 修复切换中英文的问题