CN-930: detection顶部柱状图改为x轴时间轴模式

This commit is contained in:
刘洪洪
2023-03-13 15:16:59 +08:00
parent c26b05259d
commit b1e67452a5
4 changed files with 62 additions and 10 deletions

View File

@@ -41,6 +41,10 @@ export function getNowTime (interval) {
export function rTime (date) {
return window.$dayJs.tz(new Date(date)).format('MM-DD HH:mm')
}
// 日期转换为时间戳
export function toTime (date) {
return new Date(date).getTime()
}
// 时间格式转换
export function dateFormat (date, format = 'YYYY-MM-DD HH:mm:ss') {
let d = date