From 9414048af91d445215dde516484697a87d511cfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=9F=91=E8=9E=82?= Date: Fri, 27 Mar 2026 22:35:00 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E4=B8=AA=E4=BA=BA?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E7=BC=96=E8=BE=91=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 创建 /system/profile 路由 - 创建个人信息编辑页面,支持编辑姓名、手机号、备注 - 支持上传头像 - 用户下拉菜单添加"个人信息"入口 --- .../apps/web-antd/src/layouts/basic.vue | 13 +- .../src/router/routes/modules/system.ts | 10 + .../src/views/system/profile/index.vue | 217 ++++++++++++++++++ 3 files changed, 239 insertions(+), 1 deletion(-) create mode 100644 ecom-dmb-frontend/apps/web-antd/src/views/system/profile/index.vue diff --git a/ecom-dmb-frontend/apps/web-antd/src/layouts/basic.vue b/ecom-dmb-frontend/apps/web-antd/src/layouts/basic.vue index bd168e6c..626d983e 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/layouts/basic.vue +++ b/ecom-dmb-frontend/apps/web-antd/src/layouts/basic.vue @@ -16,7 +16,7 @@ import { } from '@vben/layouts'; import { preferences } from '@vben/preferences'; import { useAccessStore, useUserStore } from '@vben/stores'; -import { openWindow } from '@vben/utils'; +import { openWindow, navigateTo } from '@vben/utils'; import ImportTaskButton from '#/components/ImportTaskButton.vue'; import SwitchAccountModal from '#/components/SwitchAccountModal.vue'; @@ -74,10 +74,21 @@ const switchAccountModalRef = ref(); // 切换账户图标 const SwitchAccountIcon = createIconifyIcon('lucide:arrow-left-right'); +// 用户图标 +const UserIcon = createIconifyIcon('lucide:user'); const menus = computed(() => { const menuItems = []; + // 个人信息 + menuItems.push({ + handler: () => { + navigateTo('/system/profile'); + }, + icon: UserIcon, + text: '个人信息', + }); + // 只有超级管理员才显示切换账户功能 if (accessStore.userRole === 'super') { menuItems.push({ diff --git a/ecom-dmb-frontend/apps/web-antd/src/router/routes/modules/system.ts b/ecom-dmb-frontend/apps/web-antd/src/router/routes/modules/system.ts index 7825f622..885b332f 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/router/routes/modules/system.ts +++ b/ecom-dmb-frontend/apps/web-antd/src/router/routes/modules/system.ts @@ -19,6 +19,16 @@ const routes: RouteRecordRaw[] = [ title: '菜单管理', }, }, + { + name: 'PersonalProfile', + path: '/system/profile', + component: () => import('#/views/system/profile/index.vue'), + meta: { + icon: 'lucide:user', + title: '个人信息', + hideInMenu: true, + }, + }, ], }, ]; diff --git a/ecom-dmb-frontend/apps/web-antd/src/views/system/profile/index.vue b/ecom-dmb-frontend/apps/web-antd/src/views/system/profile/index.vue new file mode 100644 index 00000000..0e2fbf0f --- /dev/null +++ b/ecom-dmb-frontend/apps/web-antd/src/views/system/profile/index.vue @@ -0,0 +1,217 @@ + + +