fix: 修复实体详情的安全事件tab时间显示异常的问题
This commit is contained in:
@@ -8,6 +8,7 @@ import router from '@/router'
|
||||
import store from '@/store'
|
||||
import indexedDBUtils from '@/indexedDB'
|
||||
import { columnType } from '@/components/advancedSearch/meta/meta'
|
||||
import { dateFormatByAppearance, getMillisecond } from '@/utils/date-util'
|
||||
|
||||
export const tableSort = {
|
||||
// 是否需要排序
|
||||
@@ -1463,3 +1464,20 @@ export const changeI18nOfSeverity = (severity) => {
|
||||
return '-'
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 将时间戳转为YYYY-MM-DD hh:mm:ss格式
|
||||
* @param timestamp
|
||||
* @returns {string|*}
|
||||
*/
|
||||
export const changeTimestampToTime = (timestamp) => {
|
||||
if (timestamp) {
|
||||
if (_.isNumber(Number(timestamp))) {
|
||||
return dateFormatByAppearance(getMillisecond(Number(timestamp)))
|
||||
} else {
|
||||
return '-'
|
||||
}
|
||||
} else {
|
||||
return '-'
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user