From 17b8ce1ddaf27cd7ca7822c54e9079eba8a18233 Mon Sep 17 00:00:00 2001 From: lyc Date: Thu, 12 Sep 2024 15:42:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/utils/date.js | 3 + .../views/desktop/container/work-trend.vue | 241 +++++++++++++----- 2 files changed, 183 insertions(+), 61 deletions(-) diff --git a/src/renderer/src/utils/date.js b/src/renderer/src/utils/date.js index 2a178ca..0723da4 100644 --- a/src/renderer/src/utils/date.js +++ b/src/renderer/src/utils/date.js @@ -88,6 +88,9 @@ export const getCurrentTime = (format)=> { const day = now.getDate().toString().padStart(2, '0'); const hours = now.getHours().toString().padStart(2, '0'); const minutes = now.getMinutes().toString().padStart(2, '0'); + if(format == 'YYYY-MM-DD HH:mm'){ + return `${year}-${month}-${day} ${hours}:${minutes}`; + } if(format == 'YYYY-MM-DD'){ return `${year}-${month}-${day}`; } diff --git a/src/renderer/src/views/desktop/container/work-trend.vue b/src/renderer/src/views/desktop/container/work-trend.vue index e4ca636..abca407 100644 --- a/src/renderer/src/views/desktop/container/work-trend.vue +++ b/src/renderer/src/views/desktop/container/work-trend.vue @@ -1,92 +1,211 @@ \ No newline at end of file