NEZ-1756 fix:explore table time 列时区转换不正确

This commit is contained in:
zhangyu
2022-03-31 09:55:22 +08:00
parent 5db4f9cb09
commit 60f8eb7d38
2 changed files with 5 additions and 2 deletions

View File

@@ -134,7 +134,7 @@
show-overflow-tooltip
>
<template slot-scope="scope" :column="item">
<template v-if="item.prop === 'time'">{{utcTimeToTimezoneStr(scope.row.time)}}</template>
<template v-if="item.prop === 'time'">{{timeFormate(scope.row.time)}}</template>
<span v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</span>
<template v-else>-</template>
</template>

View File

@@ -104,7 +104,7 @@ Vue.mixin({
},
utcTimeToTimezoneStr: function (time) {
if (time) {
return bus.timeFormate(time, localStorage.getItem('nz-default-dateFormat') || 'YYYY-MM-DD HH:mm:ss')
return bus.timeFormate(bus.UTCTimeToConfigTimezone(time), localStorage.getItem('nz-default-dateFormat') || 'YYYY-MM-DD HH:mm:ss')
} else {
return '-'
}
@@ -135,6 +135,9 @@ Vue.mixin({
return '-'
}
},
timeFormate (time) {
return bus.timeFormate(time)
},
hasButton (code) {
return hasButton(this.$store.getters.buttonList, code)
},