From af8e8c46238730c8902d43c166d82247503646b4 Mon Sep 17 00:00:00 2001 From: zhaichao Date: Thu, 24 Sep 2026 10:34:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=8D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/tabs/clock.vue | 143 ++++++++++++++++++++++++++++++------------- 1 file changed, 101 insertions(+), 42 deletions(-) diff --git a/pages/tabs/clock.vue b/pages/tabs/clock.vue index 45e9ea9..839ed65 100644 --- a/pages/tabs/clock.vue +++ b/pages/tabs/clock.vue @@ -4,39 +4,69 @@ 当前账号没有打卡权限 - - {{ now }} - 班次 {{ rules.workStart }}–{{ rules.workEnd }}{{ locName ? ' · ' + locName : '' }} + + {{ dateLabel }} + 班次 {{ rules.workStart }}–{{ rules.workEnd }} - - - 上班 - {{ inRec ? inRec.time + ' 已打卡' : '未打卡' }} - {{ inRec ? (inRec.status || '正常') : '待打卡' }} + + + + + + 上班 {{ rules.workStart }} + {{ inRec ? (inRec.time || '') + ' 已打卡' : '未打卡' }} + + {{ inRec ? (inRec.status || '正常') : '' }} - - 下班 - {{ outRec ? outRec.time + ' 已打卡' : '未打卡' }} - {{ outRec ? (outRec.status || '正常') : '待打卡' }} + + + + 下班 {{ rules.workEnd }} + {{ outRec ? (outRec.time || '') + ' 已打卡' : '未打卡' }} + + {{ outRec ? (outRec.status || '正常') : '' }} - {{ outRec ? '更新打卡' : '打卡' }} - 将使用手机定位校验打卡范围 + + + + {{ now }} + {{ punchLabel }} + + + + + + {{ locName || '将使用手机定位校验打卡范围' }} + + - 补卡 - 请假 - 加班 - 外出 + + + 补卡 + + + + 请假 + + + + 加班 + + + + 外出 + - - 今日及近期记录 - - + + 打卡记录 + 暂无记录 - + + {{ r.title || r.kind || '打卡' }} {{ r.time || r.punchTime || '' }} - {{ r.location || r.address || '' }} + {{ r.location || r.address || locName || '' }} {{ r.status || '正常' }} @@ -61,6 +91,17 @@ export default { canPunch() { return store.can('personal', 'punch') }, rules() { return store.attendRules }, records() { return store.attendance || [] }, + dateLabel() { + const d = new Date() + const w = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'] + return (d.getMonth() + 1) + '月' + d.getDate() + '日 ' + w[d.getDay()] + }, + punchLabel() { + if (this.punching) return '打卡中' + if (!this.inRec) return '上班打卡' + if (!this.outRec) return '下班打卡' + return '更新打卡' + }, locName() { const locs = this.rules.locations || [] return locs[0] ? (locs[0].name || locs[0].title || '') : '' @@ -105,24 +146,42 @@ export default {