From 46a68597c5514cbbaf7e72fb4aa8a5ac88cb5768 Mon Sep 17 00:00:00 2001
From: yangan <yangan0921@163.com>
Date: 星期五, 31 五月 2024 10:51:13 +0800
Subject: [PATCH] faet:统计页面导出详情放开按钮权限

---
 utils/util.js |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/utils/util.js b/utils/util.js
index f5e9768..7285440 100644
--- a/utils/util.js
+++ b/utils/util.js
@@ -1,7 +1,15 @@
-export function todayDate(){
+export function todayDate(arg) {
 	let date = new Date()
 	let year = date.getFullYear()
 	let month = date.getMonth() + 1;
 	let day = date.getDate()
-	return year + '-' + month + '-' + day
-}
\ No newline at end of file
+	let hour = date.getHours()
+	let minutes = date.getMinutes()
+	let seconds = date.getSeconds()
+	if (arg == 'hms') {
+		hour = hour < 10 ? '0' + hour : hour
+		minutes = minutes < 10 ? '0' + minutes : minutes
+		seconds = seconds < 10 ? '0' + seconds : seconds
+		return hour + ':' + minutes + ':' + seconds
+	}
+}

--
Gitblit v1.9.1