system-clients 4.0.16 → 4.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gradle/8.10/checksums/checksums.lock +0 -0
- package/.gradle/8.10/dependencies-accessors/gc.properties +0 -0
- package/.gradle/8.10/executionHistory/executionHistory.bin +0 -0
- package/.gradle/8.10/executionHistory/executionHistory.lock +0 -0
- package/.gradle/8.10/fileChanges/last-build.bin +0 -0
- package/.gradle/8.10/fileHashes/fileHashes.bin +0 -0
- package/.gradle/8.10/fileHashes/fileHashes.lock +0 -0
- package/.gradle/8.10/gc.properties +0 -0
- package/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/.gradle/file-system.probe +0 -0
- package/.gradle/vcs-1/gc.properties +0 -0
- package/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/gradle/wrapper/gradle-wrapper.properties +7 -0
- package/gradlew +252 -0
- package/gradlew.bat +94 -0
- package/package.json +105 -105
- package/src/components/equipment/PosList.vue +15 -0
- package/src/components/server/Login.vue +5 -0
- package/src/filiale/qianneng/Main.vue +818 -818
- package/src/util/dateUtil.js +44 -0
- package/.gradle/7.4/checksums/checksums.lock +0 -0
- package/.gradle/7.4/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/.gradle/7.4/fileHashes/fileHashes.lock +0 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 日期工具函数
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 检查给定日期是否超过指定月数
|
|
7
|
+
* @param {string} dateString - 日期字符串,格式: YYYY-MM-DD HH:mm:ss
|
|
8
|
+
* @param {number} months - 月数,默认为3
|
|
9
|
+
* @returns {boolean} 如果超过指定月数返回true,否则返回false
|
|
10
|
+
*/
|
|
11
|
+
export function isDateOlderThanMonths(dateString, months = 3) {
|
|
12
|
+
if (!dateString) {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
try {
|
|
17
|
+
const targetDate = new Date(dateString);
|
|
18
|
+
const currentDate = new Date();
|
|
19
|
+
|
|
20
|
+
// 检查日期是否有效
|
|
21
|
+
if (isNaN(targetDate.getTime())) {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// 计算指定月数前的日期
|
|
26
|
+
const monthsAgo = new Date();
|
|
27
|
+
monthsAgo.setMonth(monthsAgo.getMonth() - months);
|
|
28
|
+
|
|
29
|
+
// 如果目标日期早于指定月数前的日期,则返回true
|
|
30
|
+
return targetDate < monthsAgo;
|
|
31
|
+
} catch (error) {
|
|
32
|
+
console.error('日期比较出错:', error);
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* 检查密码更新时间是否超过3个月
|
|
39
|
+
* @param {string} updateTime - 密码更新时间字符串
|
|
40
|
+
* @returns {boolean} 如果超过3个月返回true,否则返回false
|
|
41
|
+
*/
|
|
42
|
+
export function isPasswordUpdateTimeExpired(updateTime) {
|
|
43
|
+
return isDateOlderThanMonths(updateTime, 3);
|
|
44
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|