fix: 实体详情搜索历史时间格式调整,安全事件下拉列表时间格式调整

This commit is contained in:
@changcode
2022-05-10 10:46:49 +08:00
parent e135aab477
commit 133c024f37
3 changed files with 2 additions and 5 deletions

View File

@@ -230,7 +230,6 @@ import { get } from '@/utils/http'
import { unitTypes } from '@/utils/constants'
import { replaceUrlPlaceholder } from '@/utils/tools'
import * as echarts from 'echarts'
import { dateFormatByAppearance } from '@/utils/date-util'
import {
getOption,
getChartColor,

View File

@@ -230,9 +230,7 @@
</div>
<div class="timeline__start-time">
{{
dayJs
.tz(getMillisecond(event.startTime))
.format('YYYY-MM-DD HH:mm:ss')
dateFormatByAppearance(event.startTime)
}}
</div>
</div>

View File

@@ -262,7 +262,7 @@ export default {
if (sql) {
const oldHistory = localStorage.getItem(storageKey.entitySearchHistory)
let arr = []
const newItem = { sql, date: window.$dayJs.tz(new Date().getTime()).format('YYYY-MM-DD HH:mm:ss') }
const newItem = { sql, date: this.dateFormatByAppearance(new Date()) }
if (!this.$_.isEmpty(oldHistory)) {
const oldArr = JSON.parse(oldHistory)
oldArr.unshift(newItem)