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