From 44dc02a02e31593c1e29cadc1ff0c5d7c7047484 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 25 Mar 2023 01:01:50 +0800 Subject: [PATCH] =?UTF-8?q?Vue3=20=E9=87=8D=E6=9E=84=EF=BC=9A=E7=AE=80?= =?UTF-8?q?=E5=8C=96=20formatDate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/formatTime.ts | 2 +- src/views/infra/apiAccessLog/ApiAccessLogDetail.vue | 3 +-- src/views/infra/apiAccessLog/index.vue | 2 +- src/views/infra/apiErrorLog/ApiErrorLogDetail.vue | 4 ++-- src/views/system/loginlog/LoginLogDetail.vue | 2 +- src/views/system/operatelog/detail.vue | 2 +- 6 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/utils/formatTime.ts b/src/utils/formatTime.ts index ec7f3744..008bc929 100644 --- a/src/utils/formatTime.ts +++ b/src/utils/formatTime.ts @@ -194,5 +194,5 @@ export const dateFormatter = (row, column, cellValue) => { if (!cellValue) { return } - return dayjs(cellValue).format('YYYY-MM-DD HH:mm:ss') + return formatDate(cellValue) } diff --git a/src/views/infra/apiAccessLog/ApiAccessLogDetail.vue b/src/views/infra/apiAccessLog/ApiAccessLogDetail.vue index 1db9820c..d046a521 100644 --- a/src/views/infra/apiAccessLog/ApiAccessLogDetail.vue +++ b/src/views/infra/apiAccessLog/ApiAccessLogDetail.vue @@ -27,8 +27,7 @@ {{ detailData.requestParams }} - {{ formatDate(detailData.beginTime, 'YYYY-MM-DD HH:mm:ss') }} ~ - {{ formatDate(detailData.endTime, 'YYYY-MM-DD HH:mm:ss') }} + {{ formatDate(detailData.beginTime) }} ~ {{ formatDate(detailData.endTime) }} {{ detailData.duration }} ms diff --git a/src/views/infra/apiAccessLog/index.vue b/src/views/infra/apiAccessLog/index.vue index ecae3821..3102d39d 100644 --- a/src/views/infra/apiAccessLog/index.vue +++ b/src/views/infra/apiAccessLog/index.vue @@ -101,7 +101,7 @@ diff --git a/src/views/infra/apiErrorLog/ApiErrorLogDetail.vue b/src/views/infra/apiErrorLog/ApiErrorLogDetail.vue index 479c4c4b..5076fe00 100644 --- a/src/views/infra/apiErrorLog/ApiErrorLogDetail.vue +++ b/src/views/infra/apiErrorLog/ApiErrorLogDetail.vue @@ -27,7 +27,7 @@ {{ detailData.requestParams }} - {{ formatDate(detailData.exceptionTime, 'YYYY-MM-DD HH:mm:ss') }} + {{ formatDate(detailData.exceptionTime) }} {{ detailData.exceptionName }} @@ -50,7 +50,7 @@ {{ detailData.processUserId }} - {{ formatDate(detailData.processTime, 'YYYY-MM-DD HH:mm:ss') }} + {{ formatDate(detailData.processTime) }} diff --git a/src/views/system/loginlog/LoginLogDetail.vue b/src/views/system/loginlog/LoginLogDetail.vue index c224f147..f0890eca 100644 --- a/src/views/system/loginlog/LoginLogDetail.vue +++ b/src/views/system/loginlog/LoginLogDetail.vue @@ -20,7 +20,7 @@ - {{ formatDate(detailData.createTime, 'YYYY-MM-DD HH:mm:ss') }} + {{ formatDate(detailData.createTime) }} diff --git a/src/views/system/operatelog/detail.vue b/src/views/system/operatelog/detail.vue index 6c856e95..b3603e2e 100644 --- a/src/views/system/operatelog/detail.vue +++ b/src/views/system/operatelog/detail.vue @@ -41,7 +41,7 @@ {{ detailData.javaMethodArgs }} - {{ formatDate(detailData.startTime, 'YYYY-MM-DD HH:mm:ss') }} + {{ formatDate(detailData.startTime) }} {{ detailData.duration }} ms