From f478b45ec1fc88de47489bad5a7619c2698dab62 Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: Tue, 17 Oct 2023 17:29:35 +0800
Subject: [PATCH] youhau daima
---
pages/my/staffDetailAttendance.vue | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/pages/my/staffDetailAttendance.vue b/pages/my/staffDetailAttendance.vue
index 8ed2216..23ffef7 100644
--- a/pages/my/staffDetailAttendance.vue
+++ b/pages/my/staffDetailAttendance.vue
@@ -22,7 +22,7 @@
{{item.rest}}
{{item.specCd=='1001'?'上班':'下班'}}:
- {{vc.timeFormat(item.checkTime)}}
+ {{timeFormat(item.checkTime)}}
-
({{item.stateName}})
@@ -122,12 +122,16 @@
});
return _attendance;
},
+
+ add0: function(m) {
+ return m < 10 ? '0' + m : m
+ },
timeFormat: function(_time) {
let _date = new Date(_time);
let h = _date.getHours();
let mm = _date.getMinutes();
let s = _date.getSeconds();
- return add0(h) + ':' + add0(mm) + ':' + add0(s);
+ return this.add0(h) + ':' + this.add0(mm) + ':' + this.add0(s);
},
_loadStaffAttendances: function() {
let staffId = this.getStaffId();
@@ -173,4 +177,4 @@
}
}
}
-
+
\ No newline at end of file