From 75b84146050a552f6413d624db392d2a5ce9200a Mon Sep 17 00:00:00 2001 From: zhaichao Date: Thu, 24 Sep 2026 10:41:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=91=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/tabs/me.vue | 134 ++++++++++++++++++++++++++-------------------- 1 file changed, 77 insertions(+), 57 deletions(-) diff --git a/pages/tabs/me.vue b/pages/tabs/me.vue index 8f305d4..e1ed383 100644 --- a/pages/tabs/me.vue +++ b/pages/tabs/me.vue @@ -3,48 +3,56 @@ - - - - {{ initial }} - - - {{ me ? me.name : '' }} - 在职 - - {{ me ? (me.department + ' · ' + me.title) : '' }} - {{ phone }}{{ job }} + + + {{ initial }} + + + {{ me ? me.name : '' }} + {{ statusText }} + {{ deptLine }} + {{ phone }}{{ job }} - - - {{ attendDays }} - 本月出勤(天) - - - {{ todoCount }} - 待办申请(件) - - - 正常 - 考勤状态 - + + + + + + + + 本月出勤 + {{ attendDays }} 天 + + + + + 待办申请 + {{ todoCount }} + - - - - + + + + {{ a.title }} + + - - - - - - - + + + + 修改密码 + + + + + + + 退出登录 + @@ -56,6 +64,7 @@ import FyHeader from '../../components/fy-header.vue' import FyScroll from '../../components/fy-scroll.vue' import { store } from '../../utils/store.js' import { maskPhone } from '../../utils/format.js' +import { tileVisual } from '../../utils/nav.js' const ME_IDS = ['archive', 'salary', 'perf', 'expense', 'report', 'apply'] @@ -67,6 +76,13 @@ export default { computed: { me() { return store.me }, initial() { return this.me ? this.me.name.slice(0, 1) : '我' }, + statusText() { + return (this.me && this.me.employeeStatus) || '在职' + }, + deptLine() { + if (!this.me) return '' + return [this.me.department, this.me.title].filter(Boolean).join(' · ') + }, phone() { return maskPhone(this.me && this.me.phone) }, job() { return this.me && this.me.jobId ? ' · 工号: ' + this.me.jobId : '' }, todoCount() { return store.todoCount || 0 }, @@ -81,6 +97,13 @@ export default { }, onHide() { if (this.off) this.off() }, methods: { + iconOf(a) { return tileVisual(a).name }, + colorOf(a) { return tileVisual(a).color }, + goArchive() { + const a = store.personalApps().find((x) => x.id === 'archive') + if (a) this.open(a) + else uni.navigateTo({ url: '/pages/me/archive' }) + }, open(a) { if (a.url.startsWith('/pages/tabs/')) uni.switchTab({ url: a.url.split('?')[0] }) else uni.navigateTo({ url: a.url }) @@ -108,27 +131,24 @@ export default {