feat: add log view auto refresh

This commit is contained in:
engigu
2024-01-20 16:42:56 +08:00
parent d50ce18bad
commit 93434ad36e
3 changed files with 60 additions and 3 deletions
+12
View File
@@ -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;
}
}