From 092b7aab1265d60b67bfba620b2f0464e9afd8a9 Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期三, 28 五月 2025 11:28:27 +0800
Subject: [PATCH] 改一个大版本
---
src/utils/formatTime.ts | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/src/utils/formatTime.ts b/src/utils/formatTime.ts
index e2ab96e..68ee6f6 100644
--- a/src/utils/formatTime.ts
+++ b/src/utils/formatTime.ts
@@ -1,5 +1,5 @@
import { Data } from "electron/main"
-
+import { confingInfoStore } from '@/stores/StoresConfing'
/**
* 时间日期转换
* @param date 当前时间,new Date() 格式
@@ -222,3 +222,14 @@
var differenceInSeconds = Math.floor(differenceInMilliseconds / 1000);
return differenceInSeconds
}
+// 获取工作时间
+export function isworkTime(param: Date): boolean {
+ const begin=confingInfoStore().confingInfo.beginWorkTime
+ const endW=confingInfoStore().confingInfo.endWorkTime
+ const hour: number = new Date(param).getHours()
+ if(begin===undefined||endW===undefined) return true
+ if (hour < begin||hour>endW) return false
+ else return true
+}
+
+
--
Gitblit v1.8.0