diff --git a/web/src/util/commonUtils.js b/web/src/util/commonUtils.js index 2f8c9d3..44b0330 100644 --- a/web/src/util/commonUtils.js +++ b/web/src/util/commonUtils.js @@ -20,6 +20,18 @@ class CommonUtils { static formatWayName = (type) => { return CONSTANT.WAYS_DATA_MAP[type].label; } + + static getCurrentTimeStr = () => { + const currentDate = new Date(); + const year = currentDate.getFullYear(); + const month = String(currentDate.getMonth() + 1).padStart(2, '0'); + const day = String(currentDate.getDate()).padStart(2, '0'); + const hours = String(currentDate.getHours()).padStart(2, '0'); + const minutes = String(currentDate.getMinutes()).padStart(2, '0'); + const seconds = String(currentDate.getSeconds()).padStart(2, '0'); + const formattedDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; + return formattedDate; + } } diff --git a/web/src/views/tabsTools/sendLogs/sendLogs.vue b/web/src/views/tabsTools/sendLogs/sendLogs.vue index 106f93d..fa720a6 100644 --- a/web/src/views/tabsTools/sendLogs/sendLogs.vue +++ b/web/src/views/tabsTools/sendLogs/sendLogs.vue @@ -1,9 +1,18 @@