| | |
| | | import { Data } from "electron/main" |
| | | |
| | | import { confingInfoStore } from '@/stores/StoresConfing' |
| | | /** |
| | | * 时间日期转换 |
| | | * @param date 当前时间,new Date() 格式 |
| | |
| | | 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 |
| | | } |
| | | |