From f4daaa8e75351b3b1fdbef0bbc04cc3361f2635e Mon Sep 17 00:00:00 2001 From: chenjinsong <523037378@qq.com> Date: Sat, 5 Mar 2022 20:25:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20detection=E5=88=97=E8=A1=A8=E5=8A=A0?= =?UTF-8?q?=E4=B8=8A=E5=88=86=E9=A1=B5=E3=80=81=E9=A1=B6=E9=83=A8=E6=9F=B1?= =?UTF-8?q?=E7=8A=B6=E5=9B=BE=E6=97=B6=E5=8C=BA=E8=A7=A3=E5=86=B3=EF=BC=9B?= =?UTF-8?q?=E5=AE=9E=E4=BD=93=E5=88=97=E8=A1=A8--ip=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E7=9A=84=E5=9C=B0=E5=9B=BE=E6=9F=A5=E8=AF=A2=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/api.js | 2 ++ src/utils/date-util.js | 7 +++---- src/views/charts/PanelChart.vue | 21 +++++++++---------- src/views/detections/Index.vue | 5 +++++ .../entityList/detailOverview/Ip.vue | 3 +-- 5 files changed, 21 insertions(+), 17 deletions(-) diff --git a/src/utils/api.js b/src/utils/api.js index 3162c88a..aba989fa 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -84,6 +84,7 @@ export const api = { victimLocation: '/interface/detection/security/filter/victimLocation', eventSeverity: '/interface/detection/security/filter/severity', listBasic: '/interface/detection/security/list/basic', + listCount: '/interface/detection/security/list/count', overviewBasic: '/interface/detection/security/detail/overview/basic', overviewEvent: '/interface/detection/security/detail/overview/event' }, @@ -93,6 +94,7 @@ export const api = { eventSeverity: '/interface/detection/performance/filter/severity', activeEntity: '/interface/detection/performance/filter/activeEntity', listBasic: '/interface/detection/performance/list/basic', + listCount: '/interface/detection/performance/list/count', overviewBasic: '/interface/detection/performance/detail/overview/basic' } } diff --git a/src/utils/date-util.js b/src/utils/date-util.js index 071ca43e..62dac86b 100644 --- a/src/utils/date-util.js +++ b/src/utils/date-util.js @@ -40,8 +40,7 @@ export function getNowTime (interval) { endTime } } -//日期格式转换 -export function rTime(date) { - let json_date = new Date(date).toJSON(); - return new Date(new Date(json_date) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '') +// 日期格式转换 +export function rTime (date) { + return window.$dayJs.tz(new Date(date)).format('YYYY-MM-DD HH:mm:ss') } diff --git a/src/views/charts/PanelChart.vue b/src/views/charts/PanelChart.vue index dae7e3a9..9e55529d 100644 --- a/src/views/charts/PanelChart.vue +++ b/src/views/charts/PanelChart.vue @@ -45,8 +45,7 @@